color: inherit;
}
-/* ********* The paypad contains the payment buttons ********* */
+/* ********* The actionpad (payment, set customer) ********* */
-.pos .paypad {
- padding: 8px 4px 8px 8px;
+.pos .actionpad{
+ padding: 8px 3px 8px 19px;
display: inline-block;
text-align: center;
vertical-align: top;
- width: 205px;
+ width: 183px;
max-height: 350px;
overflow-y: auto;
overflow-x: hidden;
}
-.pos .paypad button {
- height: 39px;
+.pos .actionpad .button {
+ height: 50px;
display: block;
width: 100%;
margin: 0px -6px 4px -2px;
color: #555555;
font-size: 14px;
}
-.pos .paypad button:active,
-.pos .numpad button:active,
-.pos .numpad .selected-mode,
-.pos .popup button:active{
- border: none;
+.pos .actionpad .button.pay {
+ height: 158px;
+}
+.pos .actionpad .button.pay .fa {
+ display: block;
+ font-size: 32px;
+ line-height: 60px;
+ background: rgb(86, 86, 86);
color: white;
- background: #7f82ac;
+ width: 60px;
+ margin: auto;
+ border-radius: 30px;
+ margin-bottom: 10px;
}
/* ********* The Numpad ********* */
.pos .numpad button {
height: 50px;
width: 50px;
- margin: 0px 0px 4px 0px;
+ margin: 0px 3px 4px 0px;
font-weight: bold;
vertical-align: middle;
color: #555555;
},
});
- // The paypad allows to select the payment method (cashregisters)
- // used to pay the order.
- module.PaypadWidget = module.PosBaseWidget.extend({
- template: 'PaypadWidget',
+ // The action pads contains the payment button and the customer selection button.
+ module.ActionpadWidget = module.PosBaseWidget.extend({
+ template: 'ActionpadWidget',
renderElement: function() {
var self = this;
this._super();
-
- _.each(this.pos.cashregisters,function(cashregister) {
- var button = new module.PaypadButtonWidget(self,{
- pos: self.pos,
- pos_widget : self.pos_widget,
- cashregister: cashregister,
- });
- button.appendTo(self.$el);
+ this.$('.pay').click(function(){
+ self.pos.pos_widget.screen_selector.set_current_screen('payment');
});
- }
- });
-
- module.PaypadButtonWidget = module.PosBaseWidget.extend({
- template: 'PaypadButtonWidget',
- init: function(parent, options){
- this._super(parent, options);
- this.cashregister = options.cashregister;
- },
- renderElement: function() {
- var self = this;
- this._super();
-
- this.$el.click(function(){
- if (self.pos.get('selectedOrder').get('screen') === 'receipt'){ //TODO Why ?
- console.warn('TODO should not get there...?');
- return;
- }
- self.pos.get('selectedOrder').addPaymentline(self.cashregister);
- self.pos_widget.screen_selector.set_current_screen('payment');
+ this.$('.set-customer').click(function(){
+ self.pos.pos_widget.screen_selector.set_current_screen('clientlist');
});
- },
+ }
});
module.OrderWidget = module.PosBaseWidget.extend({
this.action_bar = new module.ActionBarWidget(this);
this.action_bar.replace(this.$(".placeholder-RightActionBar"));
- this.paypad = new module.PaypadWidget(this, {});
- this.paypad.replace(this.$('.placeholder-PaypadWidget'));
+ this.actionpad = new module.ActionpadWidget(this, {});
+ this.actionpad.replace(this.$('.placeholder-ActionpadWidget'));
this.numpad = new module.NumpadWidget(this);
this.numpad.replace(this.$('.placeholder-NumpadWidget'));
this.numpad_visible = visible;
if(visible){
this.numpad.show();
- this.paypad.show();
+ this.actionpad.show();
}else{
this.numpad.hide();
- this.paypad.hide();
+ this.actionpad.hide();
}
}
},
<div class='subwindow-container'>
<div class='subwindow-container-fix pads'>
<div class="control-buttons oe_hidden"></div>
- <div class="placeholder-PaypadWidget"></div>
+ <div class="placeholder-ActionpadWidget"></div>
<div class="placeholder-NumpadWidget"></div>
</div>
</div>
<div>There are pending operations that could not be saved into the database, are you sure you want to exit?</div>
</t>
- <t t-name="PaypadWidget">
- <div class="paypad touch-scrollable">
+ <t t-name="ActionpadWidget">
+ <div class='actionpad'>
+ <button class='button set-customer'>
+ <i class='fa fa-user' /> Set Customer
+ </button>
+ <button class="button pay">
+ <i class='fa fa-dollar' /> Payment
+ </button>
</div>
</t>
</tr>
</t>
- <t t-name="PaypadButtonWidget">
- <button class="paypad-button" t-att-cash-register-id="widget.cashregister.id">
- <t t-esc="widget.cashregister.journal.name"/>
- </button>
- </t>
-
<t t-name="OrderButtonWidget">
<span class="order-button select-order">
<t t-if='widget.selected'>