font-size: 14px;
text-align: left;
font-family: 'Inconsolata';
+ -webkit-user-select: text;
+ -moz-user-select: text;
+ user-select: text;
}
.pos .popup .footer{
position:absolute;
template: 'ErrorInvoiceTransferPopupWidget',
});
+ module.UnsentOrdersPopupWidget = module.PopUpWidget.extend({
+ template: 'UnsentOrdersPopupWidget',
+ show: function(options){
+ var self = this;
+ this._super(options);
+ this.renderElement();
+ this.$('.button.confirm').click(function(){
+ self.pos_widget.screen_selector.close_popup();
+ });
+ },
+ });
+
module.ScaleScreenWidget = module.ScreenWidget.extend({
template:'ScaleScreenWidget',
this.$('.button.reference').click(function(){
self.pos.barcode_reader.scan(self.$('input.ean').val());
});
+ this.$('.button.show_orders').click(function(){
+ self.pos.pos_widget.screen_selector.show_popup('unsent-orders');
+ });
_.each(this.eans, function(ean, name){
self.$('.button.'+name).click(function(){
self.$('input.ean').val(ean);
this.confirm_popup = new module.ConfirmPopupWidget(this,{});
this.confirm_popup.appendTo(this.$el);
+ this.unsent_orders_popup = new module.UnsentOrdersPopupWidget(this,{});
+ this.unsent_orders_popup.appendTo(this.$el);
+
// -------- Misc ---------
this.close_button = new module.HeaderButtonWidget(this,{
'error-invoice-transfer': this.error_invoice_transfer_popup,
'error-traceback': this.error_traceback_popup,
'confirm': this.confirm_popup,
+ 'unsent-orders': this.unsent_orders_popup,
},
default_screen: 'products',
default_mode: 'cashier',
</div>
</t>
+ <t t-name="UnsentOrdersPopupWidget">
+ <div class="modal-dialog">
+ <div class="popup popup-unsent-orders">
+ <p class="message">Unsent Orders</p>
+ <t t-if='widget.pos.db.get_orders().length === 0'>
+ <p class='comment'>
+ There are no unsent orders
+ </p>
+ </t>
+ <t t-if='widget.pos.db.get_orders().length > 0'>
+ <p class='comment traceback'>
+ <t t-esc='JSON.stringify(widget.pos.db.get_orders(),null,2)' />
+ </p>
+ </t>
+ <div class="footer">
+ <div class="button confirm">
+ Ok
+ </div>
+ </div>
+ </div>
+ </div>
+ </t>
+
<t t-name="Product">
<span class='product' t-att-data-product-id="product.id">
<div class="product-img">
<li class="button reference">Reference</li>
</ul>
+ <p class="category">Unsent Orders</p>
+ <ul>
+ <li class="button show_orders">Show All Unsent Orders</li>
+ </ul>
+
<p class="category">Hardware Status</p>
<ul>
<li class="status weighting">Weighting</li>