refactor: update xpath selectors to use hasclass and correct component targets in POS XML templates
This commit is contained in:
parent
cc9aeb9103
commit
dac89886cd
@ -2,10 +2,10 @@
|
|||||||
<templates id="template" xml:space="preserve">
|
<templates id="template" xml:space="preserve">
|
||||||
<!-- Hide payment button if role is waiter -->
|
<!-- Hide payment button if role is waiter -->
|
||||||
<t t-name="pos_employee_role.ActionpadWidget" t-inherit="point_of_sale.ActionpadWidget" t-inherit-mode="extension">
|
<t t-name="pos_employee_role.ActionpadWidget" t-inherit="point_of_sale.ActionpadWidget" t-inherit-mode="extension">
|
||||||
<xpath expr="//button[contains(@class, 'pay-order-button')]" position="attributes">
|
<xpath expr="//button[hasclass('pay-order-button')]" position="attributes">
|
||||||
<attribute name="t-if">this.pos.cashier.pos_role != 'waiter'</attribute>
|
<attribute name="t-if">this.pos.cashier.pos_role != 'waiter'</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//button[contains(@class, 'pay-order-button')]" position="after">
|
<xpath expr="//button[hasclass('pay-order-button')]" position="after">
|
||||||
<button t-if="this.pos.cashier.pos_role == 'waiter' and this.pos.config.basic_receipt"
|
<button t-if="this.pos.cashier.pos_role == 'waiter' 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}"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<templates id="template" xml:space="preserve">
|
<templates id="template" xml:space="preserve">
|
||||||
<!-- Hide refund button in Ticket Screen from waiter and cashier -->
|
<!-- Hide refund button in Ticket Screen from waiter and cashier -->
|
||||||
<t t-name="pos_employee_role.TicketScreen" t-inherit="point_of_sale.TicketScreen" t-inherit-mode="extension">
|
<t t-name="pos_employee_role.TicketScreen" t-inherit="point_of_sale.TicketScreen" t-inherit-mode="extension">
|
||||||
<xpath expr="//button[@actionToTrigger.bind='onDoRefund']" position="attributes">
|
<xpath expr="//ActionpadWidget[@actionToTrigger.bind='onDoRefund']" position="attributes">
|
||||||
<attribute name="t-if">getHasItemsToRefund() and (this.pos.cashier.pos_role == 'outlet_manager' or this.pos.cashier.pos_role == 'area_manager')</attribute>
|
<attribute name="t-if">getHasItemsToRefund() and (this.pos.cashier.pos_role == 'outlet_manager' or this.pos.cashier.pos_role == 'area_manager')</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
</t>
|
</t>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user