feat: disable Table Checker button when order is empty or contains unsent items
This commit is contained in:
parent
c877b0ddb8
commit
d2fe0b9f3d
@ -8,10 +8,12 @@
|
|||||||
<!-- Hidden "Set Table" button on Register order -->
|
<!-- Hidden "Set Table" button on Register order -->
|
||||||
</xpath>
|
</xpath>
|
||||||
<!-- Change "Basic Receipt" button text to "Table Checker" -->
|
<!-- Change "Basic Receipt" button text to "Table Checker" -->
|
||||||
|
<!-- Disabled when order is empty or has unsent items (not yet sent/saved) -->
|
||||||
<xpath expr="//button[contains(@t-on-click, 'printReceipt')]" position="replace">
|
<xpath expr="//button[contains(@t-on-click, 'printReceipt')]" position="replace">
|
||||||
<button t-if="(this.pos.cashier.pos_role == 'waiter' or this.pos.cashier.pos_role == 'cashier') and this.pos.config.basic_receipt"
|
<button t-if="(this.pos.cashier.pos_role == 'waiter' or this.pos.cashier.pos_role == 'cashier') and this.pos.config.basic_receipt"
|
||||||
class="button btn btn-secondary btn-lg py-3 d-flex align-items-center justify-content-center flex-fill"
|
class="button btn btn-secondary btn-lg py-3 d-flex align-items-center justify-content-center flex-fill"
|
||||||
t-att-class="{'col-3': showFastPaymentMethods}"
|
t-att-class="{'col-3': showFastPaymentMethods}"
|
||||||
|
t-att-disabled="currentOrder.isEmpty() or this.pos.getOrderChanges().nbrOfChanges"
|
||||||
t-on-click="() => this.pos.printReceipt({ order: this.currentOrder, basic: true, printBillActionTriggered: true })">
|
t-on-click="() => this.pos.printReceipt({ order: this.currentOrder, basic: true, printBillActionTriggered: true })">
|
||||||
<i class="fa fa-print me-2"/> Table Checker
|
<i class="fa fa-print me-2"/> Table Checker
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user