refactor: refine XPath selectors to separately target non-cash payment overview rows and input fields in closing popup
This commit is contained in:
parent
3d9be58a77
commit
2cbd87b9b1
@ -12,23 +12,27 @@
|
|||||||
<attribute name="t-if">pos.config.module_pos_hr and !pos.config.custom_hide_payment_details</attribute>
|
<attribute name="t-if">pos.config.module_pos_hr and !pos.config.custom_hide_payment_details</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<!-- 2. Hide Non Cash Input Fields -->
|
<!-- 2. Hide Non Cash Overview Rows -->
|
||||||
<!-- We use t-att-class to hide them if the setting is on -->
|
<xpath expr="//div[hasclass('payment-methods-overview')]//div[@t-foreach='props.non_cash_payment_methods']" position="attributes">
|
||||||
<xpath expr="//div[@t-foreach='props.non_cash_payment_methods']" position="attributes">
|
|
||||||
<attribute name="t-att-class">pos.config.custom_hide_non_cash_inputs ? 'd-none' : 'w-100 mb-3'</attribute>
|
<attribute name="t-att-class">pos.config.custom_hide_non_cash_inputs ? 'd-none' : 'w-100 mb-3'</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<!-- 3. Hide Cash In/Out -->
|
<!-- 3. Hide Non Cash Input Fields -->
|
||||||
|
<xpath expr="//div[@t-foreach='props.non_cash_payment_methods' and .//Input]" position="attributes">
|
||||||
|
<attribute name="t-att-class">pos.config.custom_hide_non_cash_inputs ? 'd-none' : 'w-100 mb-3'</attribute>
|
||||||
|
</xpath>
|
||||||
|
|
||||||
|
<!-- 4. Hide Cash In/Out -->
|
||||||
<xpath expr="//button[contains(@t-on-click, 'this.cashMove()')]" position="attributes">
|
<xpath expr="//button[contains(@t-on-click, 'this.cashMove()')]" position="attributes">
|
||||||
<attribute name="t-if">pos.showCashMoveButton and !pos.config.custom_hide_cash_in_out</attribute>
|
<attribute name="t-if">pos.showCashMoveButton and !pos.config.custom_hide_cash_in_out</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<!-- 4. Hide Summary Data -->
|
<!-- 5. Hide Summary Data -->
|
||||||
<xpath expr="//div[hasclass('total-orders')]" position="attributes">
|
<xpath expr="//div[hasclass('total-orders')]" position="attributes">
|
||||||
<attribute name="t-if">!pos.config.custom_hide_summary_data</attribute>
|
<attribute name="t-if">!pos.config.custom_hide_summary_data</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<!-- 5. Hide Copy Buttons -->
|
<!-- 6. Hide Copy Buttons -->
|
||||||
<!-- Cash count autofill -->
|
<!-- Cash count autofill -->
|
||||||
<xpath expr="//button[@t-on-click='autoFillCashCount']" position="attributes">
|
<xpath expr="//button[@t-on-click='autoFillCashCount']" position="attributes">
|
||||||
<attribute name="t-if">!pos.config.custom_hide_copy_btn</attribute>
|
<attribute name="t-if">!pos.config.custom_hide_copy_btn</attribute>
|
||||||
@ -38,7 +42,7 @@
|
|||||||
<attribute name="t-if">!pos.config.custom_hide_copy_btn</attribute>
|
<attribute name="t-if">!pos.config.custom_hide_copy_btn</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<!-- 6. Hide Daily Sale Button -->
|
<!-- 7. Hide Daily Sale Button -->
|
||||||
<xpath expr="//button[@t-on-click='downloadSalesReport']" position="attributes">
|
<xpath expr="//button[@t-on-click='downloadSalesReport']" position="attributes">
|
||||||
<attribute name="t-if">!pos.config.custom_hide_daily_sale_btn</attribute>
|
<attribute name="t-if">!pos.config.custom_hide_daily_sale_btn</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user