| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<templates id="template" xml:space="preserve"> |
| 3 |
|
| 4 |
<t t-name="point_of_sale.Navbar"> |
| 5 |
<div class="pos-topheader position-relative d-flex align-items-center justify-content-between gap-1 p-2 m-0 bg-view border-bottom"> |
| 6 |
<div class="pos-leftheader d-flex align-items-center flex-grow-1 overflow-auto" t-att-class="{'d-none': ui.isSmall and state.searchBarOpen, 'mw-100': this.pos.getOrder()}"> |
| 7 |
<div class="d-flex flex-shrink-0 align-items-center gap-1 position-relative pe-2" t-att-class="{ 'w-100': !ui.isSmall }"> |
| 8 |
<div class="navbar-menu d-flex"> |
| 9 |
<button class="register-label btn btn-lg btn-light lh-lg" t-att-class="{'active': mainButton === 'register'}" t-on-click="() => this.onClickRegister()"> |
| 10 |
<span t-if="!ui.isSmall">Register</span> |
| 11 |
<i t-else="" class="fa fa-fw fa-pencil" t-att-class="{'fa-lg' : !ui.isSmall}"/> |
| 12 |
</button> |
| 13 |
<button class="orders-button btn btn-lg btn-light lh-lg" t-att-class="{'active': mainButton === 'order'}" t-on-click="() => this.pos.navigate('TicketScreen')"> |
| 14 |
<t t-if="!ui.isSmall"> |
| 15 |
<span>Orders</span> |
| 16 |
</t> |
| 17 |
<i t-else="" class="fa fa-fw fa-book" t-att-class="{'fa-lg' : !ui.isSmall}"/> |
| 18 |
</button> |
| 19 |
</div> |
| 20 |
<div t-if="!ui.isSmall" class="navbar-separator"/> |
| 21 |
<OrderTabs orders="getOrderTabs()" class="'h-50'"/> |
| 22 |
<button class="btn btn-secondary d-flex align-items-center gap-1 h-100 ms-2 p-2 preset-time-btn" t-on-click="openPresetTiming" t-if="shouldDisplayPresetTime"> |
| 23 |
<i class="fa fa-clock-o" aria-hidden="true"/> |
| 24 |
<span class="fw-bolder lh-1" t-esc="this.pos.getOrder()?.presetTime || '--:--'" /> |
| 25 |
</button> |
| 26 |
</div> |
| 27 |
</div> |
| 28 |
<div t-if="!this.pos.getOrder()" class="pos-centerheader d-none d-xl-flex justify-content-center overflow-hidden"> |
| 29 |
<div class="pos-logo mw-100" /> |
| 30 |
</div> |
| 31 |
<div class="pos-rightheader flex-grow-1"> |
| 32 |
<div class="status-buttons d-flex flex-grow-1 align-items-center justify-content-end gap-1"> |
| 33 |
<div t-if="this.pos.data.network.offline or this.pos.data.network.loading" class="oe_status btn btn-light btn-lg lh-lg h-100 pe-none"> |
| 34 |
<span t-if="this.pos.data.network.unsyncData.length > 0" t-esc="this.pos.data.network.unsyncData.length" /> |
| 35 |
<div t-if="this.pos.data.network.offline" class="fa fa-fw fa-chain-broken text-danger"/> |
| 36 |
<div t-else="" class="fa fa-fw fa-spin fa-circle-o-notch text-warning"/> |
| 37 |
</div> |
| 38 |
<Input tModel="[pos, 'searchProductWord']" |
| 39 |
class="ui.isSmall ? 'p-0' : 'w-100 w-xl-50 me-0 me-lg-2'" |
| 40 |
isSmall="ui.isSmall" |
| 41 |
placeholder.translate="Search products..." |
| 42 |
icon="{type: 'fa', value: 'fa-search fa-lg fa-fw'}" |
| 43 |
debounceMillis="500" |
| 44 |
getRef="(ref) => this.inputRef = ref" |
| 45 |
t-if="pos.showSearchButton()" |
| 46 |
isOpenCallback="(isOpen) => state.searchBarOpen = isOpen" /> |
| 47 |
<button class="btn btn-light btn-lg lh-lg" t-if="isBarcodeScannerSupported() and ['ProductScreen', 'TicketScreen'].includes(this.pos.router.state.current) and !pos.config.module_pos_restaurant" t-on-click="onClickScan"> |
| 48 |
<i class="fa fa-fw fa-lg fa-barcode" /><span t-if="this.pos.scanning" class="ms-1">Stop</span> |
| 49 |
</button> |
| 50 |
|
| 51 |
<CashierName t-if="!ui.isSmall"/> |
| 52 |
<Dropdown> |
| 53 |
<button class="btn btn-light btn-lg lh-lg"> |
| 54 |
<i class="fa fa-fw fa-bars"/> |
| 55 |
</button> |
| 56 |
<t t-set-slot="content"> |
| 57 |
<div class="d-flex gap-2 p-2 border-bottom"> |
| 58 |
<ProxyStatus t-if="pos.config.useProxy" /> |
| 59 |
<span t-on-click="openCustomerDisplay" t-attf-class="{{pos.config.useProxy ? 'd-flex align-items-center justify-content-center' : ''}} btn btn-secondary btn-lg w-100 text-center" title="Customer Display"> |
| 60 |
<i class="fa fa-fw fa-desktop"/> |
| 61 |
</span> |
| 62 |
</div> |
| 63 |
<div class="p-2 pos-burger-menu-items"> |
| 64 |
<DropdownItem t-if="!isDisplayStandalone and this.pos.cashier._role != 'minimal'" onSelected="() => window.open(this.appUrl)"> |
| 65 |
Install App |
| 66 |
</DropdownItem> |
| 67 |
<DropdownItem t-if="showCashMoveButton and this.pos.cashier._role != 'minimal'" onSelected="() => this.pos.cashMove()"> |
| 68 |
Cash In/Out |
| 69 |
</DropdownItem> |
| 70 |
<DropdownItem t-if="!this.pos.data.network.offline" onSelected="() => this.reloadProducts()"> |
| 71 |
Reload Data |
| 72 |
</DropdownItem> |
| 73 |
<DropdownItem t-if="showCreateProductButton" onSelected="() => this.pos.editProduct()"> |
| 74 |
Create Product |
| 75 |
</DropdownItem> |
| 76 |
<DropdownItem t-if="isBarcodeScannerSupported() and this.pos.router.state.current == 'ProductScreen' and ui.isSmall and !pos.config.module_pos_restaurant" onSelected="() => this.onClickScan()"> |
| 77 |
<span t-if="this.pos.scanning">Stop Barcode Scanner</span> |
| 78 |
<span t-else="">Barcode Scanner</span> |
| 79 |
</DropdownItem> |
| 80 |
<DropdownItem t-if="hardwareProxy.printer" onSelected="() => this.showSaleDetails()"> |
| 81 |
Print Report |
| 82 |
</DropdownItem> |
| 83 |
<DropdownItem onSelected="() => pos.closePos()"> |
| 84 |
Backend |
| 85 |
</DropdownItem> |
| 86 |
<DropdownItem onSelected="() => this.pos.closeSession()"> |
| 87 |
Close Register |
| 88 |
</DropdownItem> |
| 89 |
</div> |
| 90 |
<div class="border-top p-2"> |
| 91 |
<span t-on-click="openLnaPopup" t-attf-class="btn btn-{{this.pos.lnaState.type}} btn-sm rounded" title="Local Network Access"> |
| 92 |
<i class="fa fa-wifi" aria-hidden="true" /> Local Network Access |
| 93 |
</span> |
| 94 |
</div> |
| 95 |
</t> |
| 96 |
</Dropdown> |
| 97 |
</div> |
| 98 |
</div> |
| 99 |
</div> |
| 100 |
</t> |
| 101 |
|
| 102 |
</templates> |