diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/point_of_sale/static/src/xml/Popups | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/point_of_sale/static/src/xml/Popups')
13 files changed, 455 insertions, 0 deletions
diff --git a/addons/point_of_sale/static/src/xml/Popups/ConfirmPopup.xml b/addons/point_of_sale/static/src/xml/Popups/ConfirmPopup.xml new file mode 100644 index 00000000..f3b22b61 --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/ConfirmPopup.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="ConfirmPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <Draggable> + <div class="popup popup-confirm"> + <header class="title drag-handle"> + <t t-esc="props.title" /> + </header> + <main class="body"> + <t t-esc=" props.body" /> + </main> + <footer class="footer"> + <div class="button confirm" t-on-click="confirm"> + <t t-esc="props.confirmText" /> + </div> + <div class="button cancel" t-on-click="cancel"> + <t t-esc="props.cancelText" /> + </div> + </footer> + </div> + </Draggable> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/EditListInput.xml b/addons/point_of_sale/static/src/xml/Popups/EditListInput.xml new file mode 100644 index 00000000..b33a5161 --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/EditListInput.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="EditListInput" owl="1"> + <div> + <input type="text" t-model="props.item.text" class="popup-input list-line-input" + placeholder="Serial/Lot Number" t-on-keyup="onKeyup" /> + <i class="oe_link_icon fa fa-trash-o" role="img" aria-label="Remove" title="Remove" + t-on-click="trigger('remove-item', props.item)"></i> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/EditListPopup.xml b/addons/point_of_sale/static/src/xml/Popups/EditListPopup.xml new file mode 100644 index 00000000..9b6d6354 --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/EditListPopup.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="EditListPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <div class="popup popup-text"> + <header class="title"> + <t t-esc="props.title" /> + </header> + <main class="list-lines" t-on-remove-item="removeItem" + t-on-create-new-item="createNewItem"> + <t t-foreach="state.array" t-as="item" t-key="item._id"> + <EditListInput item="item" /> + </t> + </main> + <footer class="footer"> + <div class="button confirm" t-on-click="confirm"> + Ok + </div> + <div class="button cancel" t-on-click="cancel"> + Cancel + </div> + </footer> + </div> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/ErrorBarcodePopup.xml b/addons/point_of_sale/static/src/xml/Popups/ErrorBarcodePopup.xml new file mode 100644 index 00000000..6b455fca --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/ErrorBarcodePopup.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="ErrorBarcodePopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <Draggable> + <div class="popup popup-barcode"> + <header class="title drag-handle"> + <span>Unknown Barcode</span> + <br /> + <span class="barcode"> + <t t-esc="props.code" /> + </span> + </header> + <main class="body"> + <t t-esc="translatedMessage" /> + </main> + <footer class="footer"> + <div class="button cancel" t-on-click="confirm"> + Ok + </div> + </footer> + </div> + </Draggable> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/ErrorPopup.xml b/addons/point_of_sale/static/src/xml/Popups/ErrorPopup.xml new file mode 100644 index 00000000..0f2e19e3 --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/ErrorPopup.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="ErrorPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <div class="popup popup-error"> + <p class="title"> + <t t-esc="props.title" /> + </p> + <p class="body"> + <t t-esc="props.body" /> + </p> + <div class="footer"> + <div class="button cancel" t-on-click="confirm"> + <t t-esc="props.confirmText" /> + </div> + </div> + </div> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/ErrorTracebackPopup.xml b/addons/point_of_sale/static/src/xml/Popups/ErrorTracebackPopup.xml new file mode 100644 index 00000000..e7552c7c --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/ErrorTracebackPopup.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="ErrorTracebackPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <div class="popup popup-error"> + <header class="title"> + <t t-esc="props.title" /> + </header> + <main class="body traceback"> + <t t-esc="props.body" /> + </main> + <footer class="footer"> + <div t-if="!props.exitButtonIsShown" class="button cancel" t-on-click="confirm"> + <t t-esc="props.confirmText" /> + </div> + <div t-if="props.exitButtonIsShown" class="button cancel" t-on-click="trigger(props.exitButtonTrigger)"> + <t t-esc="props.exitButtonText" /> + </div> + <a t-att-download="tracebackFilename" t-att-href="tracebackUrl"> + <div class="button icon download"> + <i class="fa fa-download" role="img" + aria-label="Download error traceback" + title="Download error traceback"></i> + </div> + </a> + <div class="button icon email" t-on-click="emailTraceback"> + <i class="fa fa-paper-plane" role="img" aria-label="Send by email" + title="Send by email"></i> + </div> + </footer> + </div> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/NumberPopup.xml b/addons/point_of_sale/static/src/xml/Popups/NumberPopup.xml new file mode 100644 index 00000000..41d37ee5 --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/NumberPopup.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="NumberPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <Draggable> + <div class="popup popup-number" t-att-class="{ 'popup-password': props.isPassword }"> + <header class="title drag-handle"> + <t t-esc="props.title" /> + </header> + <div class="popup-input value active"> + <t t-esc="inputBuffer" /> + </div> + <div class="popup-numpad"> + <button class="input-button number-char" t-on-mousedown.prevent="sendInput('1')">1</button> + <button class="input-button number-char" t-on-mousedown.prevent="sendInput('2')">2</button> + <button class="input-button number-char" t-on-mousedown.prevent="sendInput('3')">3</button> + <t t-if="props.cheap"> + <button class="mode-button add" t-on-mousedown.prevent="sendInput('+1')">+1</button> + </t> + <t t-if="!props.cheap"> + <button class="mode-button add" t-on-mousedown.prevent="sendInput('+10')">+10</button> + </t> + <br /> + <button class="input-button number-char" t-on-mousedown.prevent="sendInput('4')">4</button> + <button class="input-button number-char" t-on-mousedown.prevent="sendInput('5')">5</button> + <button class="input-button number-char" t-on-mousedown.prevent="sendInput('6')">6</button> + <t t-if="props.cheap"> + <button class="mode-button add" t-on-mousedown.prevent="sendInput('+2')">+2</button> + </t> + <t t-if="!props.cheap"> + <button class="mode-button add" t-on-mousedown.prevent="sendInput('+20')">+20</button> + </t> + <br /> + <button class="input-button number-char" t-on-mousedown.prevent="sendInput('7')">7</button> + <button class="input-button number-char" t-on-mousedown.prevent="sendInput('8')">8</button> + <button class="input-button number-char" t-on-mousedown.prevent="sendInput('9')">9</button> + <button t-if="!props.isPassword" class="input-button number-char" t-on-mousedown.prevent="sendInput('-')">-</button> + <br /> + <button class="input-button numpad-char" t-on-mousedown.prevent="sendInput('Delete')">C</button> + <button class="input-button number-char" t-on-mousedown.prevent="sendInput('0')">0</button> + <button class="input-button number-char dot" t-on-mousedown.prevent="sendInput(decimalSeparator)"> + <t t-esc="decimalSeparator" /></button> + <button class="input-button numpad-backspace" t-on-mousedown.prevent="sendInput('Backspace')"> + <img style="pointer-events: none;" + src="/point_of_sale/static/src/img/backspace.png" width="24" + height="21" alt="Backspace" /> + </button> + <br /> + </div> + <footer class="footer centered"> + <div class="button cancel" t-on-mousedown.prevent="cancel"> + <t t-esc="props.cancelText" /> + </div> + <div class="button confirm" t-on-mousedown.prevent="confirm"> + <t t-esc="props.confirmText" /> + </div> + </footer> + </div> + </Draggable> + + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/OfflineErrorPopup.xml b/addons/point_of_sale/static/src/xml/Popups/OfflineErrorPopup.xml new file mode 100644 index 00000000..9950bc3d --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/OfflineErrorPopup.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="OfflineErrorPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <Draggable> + <div class="popup popup-error"> + <header class="title drag-handle"> + <t t-esc="props.title" /> + </header> + <main class="body traceback"><t t-esc="props.body"/></main> + <footer class="footer"> + <div class="button cancel" t-on-click="cancel"> + Ok + </div> + <div class="button dont-show-again" t-on-click="dontShowAgain"> + Don't show again + </div> + </footer> + </div> + </Draggable> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/OrderImportPopup.xml b/addons/point_of_sale/static/src/xml/Popups/OrderImportPopup.xml new file mode 100644 index 00000000..b2f142b9 --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/OrderImportPopup.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="OrderImportPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <Draggable> + <div class="popup popup-import"> + <header class="title drag-handle"> + <span>Finished Importing Orders</span> + </header> + <ul class="body"> + <li>Successfully imported <b><t t-esc="props.report.paid or 0" /></b> paid orders</li> + <li>Successfully imported <b><t t-esc="props.report.unpaid or 0" /></b> unpaid orders</li> + <t t-if="unpaidSkipped"> + <li><b><t t-esc="unpaidSkipped"/></b> unpaid orders could not be imported + <ul> + <li><b><t t-esc="props.report.unpaid_skipped_existing or 0" /></b> were duplicates of existing orders</li> + <li><b><t t-esc="props.report.unpaid_skipped_session or 0" /></b> belong to another session: + <t t-if="props.report.unpaid_skipped_sessions"> + <ul> + <li>Session ids: <b><t t-esc="props.report.unpaid_skipped_sessions" /></b></li> + </ul> + </t> + </li> + </ul> + </li> + </t> + </ul> + <footer class="footer"> + <div class="button cancel" t-on-click="cancel"> + <t t-esc="props.confirmText" /> + </div> + </footer> + </div> + </Draggable> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/ProductConfiguratorPopup.xml b/addons/point_of_sale/static/src/xml/Popups/ProductConfiguratorPopup.xml new file mode 100644 index 00000000..fb863754 --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/ProductConfiguratorPopup.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="ProductConfiguratorPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <div class="popup popup-text popup-lg product-configurator-popup"> + <header class="title"> + <t t-esc="props.product.display_name" /> + </header> + + <main class="body product_configurator_attributes col-lg-4 col-md-6 col-sm-12"> + <div t-foreach="props.attributes" t-as="attribute" class="attribute"> + <div class="attribute_name" t-esc="attribute.name"/> + <RadioProductAttribute t-if="attribute.display_type === 'radio'" attribute="attribute"/> + <SelectProductAttribute t-elif="attribute.display_type === 'select'" attribute="attribute"/> + <ColorProductAttribute t-elif="attribute.display_type === 'color'" attribute="attribute"/> + </div> + </main> + + <footer class="footer"> + <div class="button highlight confirm" t-on-click="confirm"> + Add + </div> + <div class="button cancel" t-on-click="cancel"> + Cancel + </div> + </footer> + </div> + </div> + </t> + + <t t-name="RadioProductAttribute" owl="1"> + <div class="configurator_radio"> + <div t-foreach="values" t-as="value"> + <input type="radio" t-model="state.selected_value" t-att-name="attribute.id" + t-attf-id="{{ attribute.id }}_{{ value.id }}" t-att-value="value.id"/> + + <label t-attf-for="{{ attribute.id }}_{{ value.id }}"> + <div class="radio_attribute_label"> + <t t-esc="value.name"/> + <span t-if="value.price_extra" class="price_extra"> + + <t t-esc="env.pos.format_currency(value.price_extra)"/> + </span> + </div> + + <t t-if="value.id == state.selected_value && value.is_custom"> + <input class="custom_value" type="text" t-model="state.custom_value"/> + </t> + </label> + </div> + </div> + </t> + + <t t-name="SelectProductAttribute" owl="1"> + <div> + <t t-set="is_custom" t-value="false"/> + + <select class="configurator_select" t-model="state.selected_value"> + <option t-foreach="values" t-as="value" t-att-value="value.id"> + <t t-set="is_custom" t-value="is_custom || (value.is_custom && value.id == state.selected_value)"/> + <t t-esc="value.name"/> + <t t-if="value.price_extra"> + + <t t-esc="env.pos.format_currency(value.price_extra)"/> + </t> + </option> + </select> + + <input class="custom_value" t-if="is_custom" type="text" t-model="state.custom_value"/> + </div> + </t> + + <t t-name="ColorProductAttribute" owl="1"> + <div> + <t t-set="is_custom" t-value="false"/> + + <ul class="color_attribute_list"> + <li t-foreach="values" t-as="value" class="color_attribute_list_item"> + <t t-set="is_custom" t-value="is_custom || (value.is_custom && value.id == state.selected_value)"/> + <label t-attf-class="configurator_color {{ value.id == state.selected_value ? 'active' : '' }}" + t-attf-style="background-color: {{ value.html_color }};" t-att-data-color="value.name"> + <input type="radio" t-model="state.selected_value" t-att-value="value.id" t-att-name="attribute.id"/> + </label> + </li> + </ul> + + <input class="custom_value" t-if="is_custom" type="text" t-model="state.custom_value"/> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/SelectionPopup.xml b/addons/point_of_sale/static/src/xml/Popups/SelectionPopup.xml new file mode 100644 index 00000000..b9ca1bc7 --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/SelectionPopup.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="SelectionPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <Draggable> + <div class="popup popup-selection"> + <header class="title drag-handle"> + <t t-esc="props.title" /> + </header> + <div class="selection scrollable-y"> + <t t-foreach="props.list" t-as="item" t-key="item.id"> + <div class="selection-item" t-att-class="{ selected: item.isSelected }" + t-on-click="selectItem(item.id)"> + <t t-esc="item.label" /> + </div> + </t> + </div> + <footer class="footer"> + <div class="button cancel" t-on-click="cancel"> + <t t-esc="props.cancelText" /> + </div> + </footer> + </div> + </Draggable> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/TextAreaPopup.xml b/addons/point_of_sale/static/src/xml/Popups/TextAreaPopup.xml new file mode 100644 index 00000000..a142c995 --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/TextAreaPopup.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="TextAreaPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <Draggable> + <div class="popup popup-textarea"> + <header class="title drag-handle"> + <t t-esc="props.title" /> + </header> + <textarea t-model="state.inputValue" t-ref="input"></textarea> + <footer class="footer"> + <div class="button confirm" t-on-click="confirm"> + <t t-esc="props.confirmText" /> + </div> + <div class="button cancel" t-on-click="cancel"> + <t t-esc="props.cancelText" /> + </div> + </footer> + </div> + </Draggable> + </div> + </t> + +</templates> diff --git a/addons/point_of_sale/static/src/xml/Popups/TextInputPopup.xml b/addons/point_of_sale/static/src/xml/Popups/TextInputPopup.xml new file mode 100644 index 00000000..cc28d706 --- /dev/null +++ b/addons/point_of_sale/static/src/xml/Popups/TextInputPopup.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<templates id="template" xml:space="preserve"> + + <t t-name="TextInputPopup" owl="1"> + <div role="dialog" class="modal-dialog"> + <div class="popup popup-textinput"> + <header class="title"> + <t t-esc="props.title" /> + </header> + <div class="div"> + <p> + <t t-esc="props.body" /> + </p> + <input type="text" t-model="state.inputValue" t-ref="input" /> + </div> + <div class="footer"> + <div class="button confirm" t-on-click="confirm"> + <t t-esc="props.confirmText" /> + </div> + <div class="button cancel" t-on-click="cancel"> + <t t-esc="props.cancelText" /> + </div> + </div> + </div> + </div> + </t> + +</templates> |
