| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<templates id="template" xml:space="preserve"> |
| 3 |
<t t-name="point_of_sale.DebugWidget"> |
| 4 |
<div t-if="!state.isOpen and !this.isDisabled" |
| 5 |
class="o-debug-widget-btn open position-absolute align-items-center justify-content-center d-flex cursor-pointer shadow-sm bg-danger text-white" |
| 6 |
t-on-click="toggleWidget" |
| 7 |
data-tooltip="Open debug widget" |
| 8 |
data-tooltip-delay="0"> |
| 9 |
<i class="fa fa-bug" aria-hidden="true" /> |
| 10 |
</div> |
| 11 |
<div class="debug-widget position-absolute bottom-0 end-0 bg-100 shadow-lg p-2 d-flex flex-column gap-1 m-2" |
| 12 |
t-attf-class="{{ state.isOpen ? '' : 'd-none' }}"> |
| 13 |
<div class="d-flex gap-1 mb-2"> |
| 14 |
<span class="badge o_colorlist_item_color_3 rounded">Device ID: <t t-esc="state.device_identifier" /></span> |
| 15 |
<span class="badge o_colorlist_item_color_3 rounded">Next number: <t t-esc="state.next_number" /></span> |
| 16 |
<span class="badge o_colorlist_item_color_3 rounded">Number stack: <t t-esc="state.unsynced_number_stack" /></span> |
| 17 |
</div> |
| 18 |
<div class="gap-1 d-flex align-items-center flex-wrap"> |
| 19 |
<div class="input-group input-group-sm"> |
| 20 |
<span class="input-group-text">Barcode</span> |
| 21 |
<input type="text" |
| 22 |
class="form-control ean" |
| 23 |
t-model="state.barcodeInput" |
| 24 |
t-att-disabled="!barcodeReader" |
| 25 |
t-attf-placeholder="{{ !barcodeReader ? 'No nomenclature' : '' }}"/> |
| 26 |
<div class="d-flex align-items-center gap-1 ms-1"> |
| 27 |
<button class="btn btn-secondary btn-sm text-nowrap" t-on-click="barcodeScan"> |
| 28 |
<i class="fa fa-barcode" aria-hidden="true"/> Scan |
| 29 |
</button> |
| 30 |
<button class="btn btn-secondary btn-sm text-nowrap" t-on-click="barcodeScanEAN"> |
| 31 |
<i class="fa fa-barcode" aria-hidden="true"/> EAN-13 |
| 32 |
</button> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
<div class="d-flex align-items-center gap-1 w-100 flex-wrap"> |
| 36 |
<div data-tooltip="Close debug widget" data-tooltip-delay="0"> |
| 37 |
<button class="btn btn-secondary btn-sm text-nowrap" t-on-click="toggleWidget"> |
| 38 |
<i class="fa fa-times" aria-hidden="true" /> Close |
| 39 |
</button> |
| 40 |
</div> |
| 41 |
<div data-tooltip="Disable debug mode" data-tooltip-delay="0"> |
| 42 |
<button class="btn btn-secondary btn-sm text-nowrap" t-on-click="disableDebugMode"> |
| 43 |
<i class="fa fa-sign-out" aria-hidden="true" /> Disable |
| 44 |
</button> |
| 45 |
</div> |
| 46 |
<div data-tooltip="Refresh customer display" data-tooltip-delay="0"> |
| 47 |
<button class="btn btn-secondary btn-sm text-nowrap" t-on-click="refreshDisplay"> |
| 48 |
<i class="fa fa-refresh" aria-hidden="true" /> Refresh |
| 49 |
</button> |
| 50 |
</div> |
| 51 |
<div data-tooltip="Export PoS data" data-tooltip-delay="0"> |
| 52 |
<button class="btn btn-secondary btn-sm text-nowrap" t-on-click="() => this.exportData()"> |
| 53 |
<i class="fa fa-download" aria-hidden="true" /> Export data |
| 54 |
</button> |
| 55 |
</div> |
| 56 |
<div data-tooltip="Import orders" data-tooltip-delay="0"> |
| 57 |
<button t-ref="import-order-input" class="btn btn-danger btn-sm text-nowrap"> |
| 58 |
<i class="fa fa-upload" aria-hidden="true" /> Import data |
| 59 |
</button> |
| 60 |
<input t-on-change="importData" type="file" class="d-none" id="import-order-input" /> |
| 61 |
</div> |
| 62 |
<div data-tooltip="Delete paid orders" data-tooltip-delay="0"> |
| 63 |
<button class="btn btn-danger btn-sm text-nowrap" t-on-click="() => this.deleteOrders({ paid: true })"> |
| 64 |
<i class="fa fa-trash" aria-hidden="true" /> Paid |
| 65 |
</button> |
| 66 |
</div> |
| 67 |
<div data-tooltip="Delete unpaid orders" data-tooltip-delay="0"> |
| 68 |
<button class="btn btn-danger btn-sm text-nowrap" t-on-click="() => this.deleteOrders({ paid: false })"> |
| 69 |
<i class="fa fa-trash" aria-hidden="true" /> Unpaid |
| 70 |
</button> |
| 71 |
</div> |
| 72 |
<div data-tooltip="Delete all indexed DB" data-tooltip-delay="0"> |
| 73 |
<button class="btn btn-danger btn-sm text-nowrap" t-on-click="deleteAllIndexedDB"> |
| 74 |
<i class="fa fa-trash" aria-hidden="true" /> Delete all indexed DB |
| 75 |
</button> |
| 76 |
</div> |
| 77 |
<div data-tooltip="Download logs" data-tooltip-delay="0"> |
| 78 |
<button class="btn btn-secondary btn-sm text-nowrap" t-on-click="downloadLogs"> |
| 79 |
<i class="fa fa-download" aria-hidden="true" /> Download Logs |
| 80 |
</button> |
| 81 |
</div> |
| 82 |
</div> |
| 83 |
</div> |
| 84 |
</div> |
| 85 |
</t> |
| 86 |
</templates> |