summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/static/src/xml/ChromeWidgets
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/point_of_sale/static/src/xml/ChromeWidgets
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/point_of_sale/static/src/xml/ChromeWidgets')
-rw-r--r--addons/point_of_sale/static/src/xml/ChromeWidgets/CashierName.xml12
-rw-r--r--addons/point_of_sale/static/src/xml/ChromeWidgets/ClientScreenButton.xml19
-rw-r--r--addons/point_of_sale/static/src/xml/ChromeWidgets/DebugWidget.xml93
-rw-r--r--addons/point_of_sale/static/src/xml/ChromeWidgets/HeaderButton.xml11
-rw-r--r--addons/point_of_sale/static/src/xml/ChromeWidgets/OrderManagementButton.xml12
-rw-r--r--addons/point_of_sale/static/src/xml/ChromeWidgets/ProxyStatus.xml28
-rw-r--r--addons/point_of_sale/static/src/xml/ChromeWidgets/SaleDetailsButton.xml13
-rw-r--r--addons/point_of_sale/static/src/xml/ChromeWidgets/SyncNotification.xml29
-rw-r--r--addons/point_of_sale/static/src/xml/ChromeWidgets/TicketButton.xml13
9 files changed, 230 insertions, 0 deletions
diff --git a/addons/point_of_sale/static/src/xml/ChromeWidgets/CashierName.xml b/addons/point_of_sale/static/src/xml/ChromeWidgets/CashierName.xml
new file mode 100644
index 00000000..41b7ee69
--- /dev/null
+++ b/addons/point_of_sale/static/src/xml/ChromeWidgets/CashierName.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="CashierName" owl="1">
+ <div class="oe_status">
+ <span class="username">
+ <t t-esc="username" />
+ </span>
+ </div>
+ </t>
+
+</templates>
diff --git a/addons/point_of_sale/static/src/xml/ChromeWidgets/ClientScreenButton.xml b/addons/point_of_sale/static/src/xml/ChromeWidgets/ClientScreenButton.xml
new file mode 100644
index 00000000..bbcb1167
--- /dev/null
+++ b/addons/point_of_sale/static/src/xml/ChromeWidgets/ClientScreenButton.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="ClientScreenButton" owl="1">
+ <div class="oe_status" t-on-click="onClick">
+ <span class="message"><t t-esc="message" /></span>
+ <div t-if="state.status === 'warning'" class="js_warning oe_icon oe_orange">
+ <i class="fa fa-fw fa-desktop" role="img" aria-label="Client Screen Warning" title="Client Screen Warning"></i>
+ </div>
+ <div t-if="state.status === 'failure'" class="js_disconnected oe_icon oe_red">
+ <i class="fa fa-fw fa-desktop" role="img" aria-label="Client Screen Disconnected" title="Client Screen Disconnected"></i>
+ </div>
+ <div t-if="state.status === 'success'" class="js_connected oe_icon oe_green">
+ <i class="fa fa-fw fa-desktop" role="img" aria-label="Client Screen Connected" title="Client Screen Connected"></i>
+ </div>
+ </div>
+ </t>
+
+</templates>
diff --git a/addons/point_of_sale/static/src/xml/ChromeWidgets/DebugWidget.xml b/addons/point_of_sale/static/src/xml/ChromeWidgets/DebugWidget.xml
new file mode 100644
index 00000000..6e67512e
--- /dev/null
+++ b/addons/point_of_sale/static/src/xml/ChromeWidgets/DebugWidget.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="DebugWidget" owl="1">
+ <Draggable limitArea="'.pos'">
+ <div class="debug-widget">
+ <header class="drag-handle">
+ <h1>Debug Window</h1>
+ </header>
+ <div class="toggle" t-on-click="trigger('toggle-debug-widget')" title="Dismiss"
+ role="img" aria-label="Dismiss"><i class="fa fa-times" /></div>
+ <div class="content">
+ <p class="category">Electronic Scale</p>
+ <ul>
+ <li>
+ <input t-model="state.weightInput" type="text" class="weight"></input>
+ </li>
+ <li class="button set_weight" t-on-click="setWeight">Set Weight</li>
+ <li class="button reset_weight" t-on-click="resetWeight">Reset</li>
+ </ul>
+
+ <p class="category">Barcode Scanner</p>
+ <ul>
+ <li>
+ <input t-model="state.barcodeInput" type="text" class="ean"></input>
+ </li>
+ <li class="button barcode" t-on-click="barcodeScan">Scan</li>
+ <li class="button custom_ean" t-on-click="barcodeScanEAN">Scan EAN-13</li>
+ </ul>
+
+ <p class="category">Orders</p>
+
+ <ul>
+ <li class="button" t-on-click="deleteOrders">
+ Delete Paid Orders
+ </li>
+ <li class="button" t-on-click="deleteUnpaidOrders">
+ Delete Unpaid Orders
+ </li>
+ <li t-if="!state.isPaidOrdersReady" class="button"
+ t-on-click="preparePaidOrders">
+ Export Paid Orders
+ </li>
+ <a t-else="" t-att-download="paidOrdersFilename" t-att-href="paidOrdersURL"
+ t-on-click="state.isPaidOrdersReady = !state.isPaidOrdersReady">
+ <li class="button">
+ Download Paid Orders
+ </li>
+ </a>
+ <li t-if="!state.isUnpaidOrdersReady" class="button"
+ t-on-click="prepareUnpaidOrders">
+ Export Unpaid Orders
+ </li>
+ <a t-else="" t-att-download="unpaidOrdersFilename"
+ t-att-href="unpaidOrdersURL"
+ t-on-click="state.isUnpaidOrdersReady = !state.isUnpaidOrdersReady">
+ <li class="button">
+ Download Unpaid Orders
+ </li>
+ </a>
+ <li class="button import_orders" style="position:relative">
+ Import Orders
+ <input t-on-change="importOrders" type="file"
+ style="opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;margin:0;cursor:pointer" />
+ </li>
+ </ul>
+
+ <p class="category">Hardware Status</p>
+ <ul>
+ <li class="status weighing">Weighing</li>
+ <li class="button display_refresh" t-on-click="refreshDisplay">
+ Refresh Display
+ </li>
+ </ul>
+ <p class="category">Hardware Events</p>
+ <ul>
+ <li class="event" t-ref="open_cashbox">Open Cashbox</li>
+ <li class="event" t-ref="print_receipt">Print Receipt</li>
+ <li class="event" t-ref="scale_read">Read Weighing Scale</li>
+ </ul>
+ <p class="category">Others</p>
+ <ul>
+ <li class="event">
+ <span>Buffer: </span>
+ <t t-esc="bufferRepr" />
+ </li>
+ </ul>
+ </div>
+ </div>
+ </Draggable>
+ </t>
+
+</templates>
diff --git a/addons/point_of_sale/static/src/xml/ChromeWidgets/HeaderButton.xml b/addons/point_of_sale/static/src/xml/ChromeWidgets/HeaderButton.xml
new file mode 100644
index 00000000..19d9c7c8
--- /dev/null
+++ b/addons/point_of_sale/static/src/xml/ChromeWidgets/HeaderButton.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="HeaderButton" owl="1">
+ <div class="header-button close_button" t-att-class="{ confirm: state.label === 'Confirm' }"
+ t-on-click="onClick">
+ <t t-esc="translatedLabel" />
+ </div>
+ </t>
+
+</templates>
diff --git a/addons/point_of_sale/static/src/xml/ChromeWidgets/OrderManagementButton.xml b/addons/point_of_sale/static/src/xml/ChromeWidgets/OrderManagementButton.xml
new file mode 100644
index 00000000..062e11c3
--- /dev/null
+++ b/addons/point_of_sale/static/src/xml/ChromeWidgets/OrderManagementButton.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="OrderManagementButton" owl="1">
+ <div class="oe_status order-management" t-on-click="onClick">
+ <div class="oe_icon oe_green">
+ <i class="fa fa-fw fa-search" role="img" aria-label="Order Management Button" title="Order Management Button"></i>
+ </div>
+ </div>
+ </t>
+
+</templates>
diff --git a/addons/point_of_sale/static/src/xml/ChromeWidgets/ProxyStatus.xml b/addons/point_of_sale/static/src/xml/ChromeWidgets/ProxyStatus.xml
new file mode 100644
index 00000000..3bcbef6d
--- /dev/null
+++ b/addons/point_of_sale/static/src/xml/ChromeWidgets/ProxyStatus.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="ProxyStatus" owl="1">
+ <div class="oe_status js_proxy" t-on-click="onClick">
+ <span t-if="state.msg and !env.isMobile" class="js_msg">
+ <t t-esc="state.msg" />
+ </span>
+ <span t-if="state.status === 'connected'" class="js_connected oe_green">
+ <i class="fa fa-fw fa-sitemap" role="img" aria-label="Proxy Connected"
+ title="Proxy Connected"></i>
+ </span>
+ <span t-if="state.status === 'connecting'" class="js_connecting">
+ <i class="fa fa-fw fa-spin fa-spinner" role="img" aria-label="Connecting to Proxy"
+ title="Connecting to Proxy"></i>
+ </span>
+ <span t-if="state.status === 'warning'" class="js_warning oe_orange">
+ <i class="fa fa-fw fa-sitemap" role="img" aria-label="Proxy Warning"
+ title="Proxy Warning"></i>
+ </span>
+ <span t-if="state.status === 'disconnected'" class="js_disconnected oe_red">
+ <i class="fa fa-fw fa-sitemap" role="img" aria-label="Proxy Disconnected"
+ title="Proxy Disconnected"></i>
+ </span>
+ </div>
+ </t>
+
+</templates>
diff --git a/addons/point_of_sale/static/src/xml/ChromeWidgets/SaleDetailsButton.xml b/addons/point_of_sale/static/src/xml/ChromeWidgets/SaleDetailsButton.xml
new file mode 100644
index 00000000..dc5ecc04
--- /dev/null
+++ b/addons/point_of_sale/static/src/xml/ChromeWidgets/SaleDetailsButton.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="SaleDetailsButton" owl="1">
+ <div class="oe_status">
+ <div class="js_connected oe_icon">
+ <i class="fa fa-fw fa-print" role="img" aria-label="Print" t-on-click="onClick"
+ title="Print a report with all the sales of the current PoS Session"></i>
+ </div>
+ </div>
+ </t>
+
+</templates>
diff --git a/addons/point_of_sale/static/src/xml/ChromeWidgets/SyncNotification.xml b/addons/point_of_sale/static/src/xml/ChromeWidgets/SyncNotification.xml
new file mode 100644
index 00000000..4a08c7ac
--- /dev/null
+++ b/addons/point_of_sale/static/src/xml/ChromeWidgets/SyncNotification.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="SyncNotification" owl="1">
+ <div class="oe_status" t-on-click="onClick">
+ <span t-if="state.msg" class="js_msg">
+ <t t-esc="state.msg" />
+ <span> </span>
+ </span>
+ <div t-if="state.status === 'connected'" class="js_connected oe_icon oe_green">
+ <i class="fa fa-fw fa-wifi" role="img" aria-label="Synchronisation Connected"
+ title="Synchronisation Connected"></i>
+ </div>
+ <div t-if="state.status === 'connecting'" class="js_connecting oe_icon">
+ <i class="fa fa-fw fa-spin fa-spinner" role="img"
+ aria-label="Synchronisation Connecting" title="Synchronisation Connecting"></i>
+ </div>
+ <div t-if="state.status === 'disconnected'" class="js_disconnected oe_icon oe_red">
+ <i class="fa fa-fw fa-wifi" role="img" aria-label="Synchronisation Disconnected"
+ title="Synchronisation Disconnected"></i>
+ </div>
+ <div t-if="state.status === 'error'" class="js_error oe_icon oe_red">
+ <i class="fa fa-fw fa-warning" role="img" aria-label="Synchronisation Error"
+ title="Synchronisation Error"></i>
+ </div>
+ </div>
+ </t>
+
+</templates>
diff --git a/addons/point_of_sale/static/src/xml/ChromeWidgets/TicketButton.xml b/addons/point_of_sale/static/src/xml/ChromeWidgets/TicketButton.xml
new file mode 100644
index 00000000..8a1a3a32
--- /dev/null
+++ b/addons/point_of_sale/static/src/xml/ChromeWidgets/TicketButton.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+ <t t-name="TicketButton" owl="1">
+ <div class="ticket-button" t-att-class="{ highlight: props.isTicketScreenShown }" t-on-click="onClick">
+ <div class="with-badge" t-att-badge="count">
+ <i class="fa fa-ticket" aria-hidden="true"></i>
+ </div>
+ <div>Orders</div>
+ </div>
+ </t>
+
+</templates>