Debian Codegraph @

addons/point_of_sale/static/src/app/screens/scale_screen/scale_screen.xml

raw
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <templates id="template" xml:space="preserve">
3 <t t-name="point_of_sale.ScaleScreen">
4 <Dialog size="'md'">
5 <t t-set-slot="header">
6 <t t-if="env.isSmall">
7 <button class="btn oi oi-arrow-left" data-bs-dismiss="modal" aria-label="Close" t-on-click="props.close"/>
8 </t>
9 <h4 class="modal-title text-break text-center w-100" t-att-class="{ 'me-auto': env.isSmall }">
10 <t t-esc="scale.product.name"/>
11 </h4>
12 <t t-if="!env.isSmall">
13 <button type="button" class="btn-close" aria-label="Close" tabindex="-1" t-on-click="props.close"/>
14 </t>
15 </t>
16 <div class="d-flex flex-column">
17 <div class="d-flex gap-2 align-items-center mb-2">
18 <div class="w-60 fs-3 me-2">Gross Weight:</div>
19 <div class="gross-weight fs-3 px-5 text-end form-control-plaintext" t-esc="scale.grossWeightString"/>
20 </div>
21 <div class="d-flex gap-5 align-items-center mb-2">
22 <div class="w-50">
23 <button class="btn btn-primary w-50 fs-3" t-att-disabled="scale.tareRequested" t-on-click="() => scale.requestTare()">
24 <i t-if="scale.tareRequested" class="fa fa-circle-o-notch fa-spin"/>
25 <t t-else="">Tare</t>
26 </button>
27 </div>
28 <div class="d-flex flex-row justify-content-end w-50 align-items-center px-5">
29 <input type="number" class="form-control me-2" t-att-readonly="scale.tareRequested" t-model.number="this.scale.tare"/>
30 <span class="text-end fs-3" t-esc="scale.product.unitOfMeasure"/>
31 </div>
32 </div>
33 <div class="d-flex gap-2 align-items-center mb-2">
34 <div class="w-60 fs-3 me-2">Net Weight:</div>
35 <div class="text-end fs-3 px-5 form-control-plaintext" t-esc="scale.netWeightString"/>
36 </div>
37 <div class="d-flex px-5 flex-row gap-2 m-2 align-items-center">
38 <div class="product-price w-50 fs-2 text-center" t-esc="scale.unitPriceString"/>
39 <div class="computed-price fd-flex flex-grow-1 p-3 rounded text-center text-bg-info bg-opacity-25 text-info fs-2 fw-bold" t-esc="scale.totalPriceString"/>
40 </div>
41 </div>
42 <t t-set-slot="footer">
43 <button class="btn btn-secondary mx-2 w-100" t-if="scale.isManualMeasurement" t-att-disabled="scale.loading" t-on-click="() => scale.readWeight()">
44 <i t-if="scale.loading and !scale.tareRequested" class="fa fa-spinner fa-spin"/>
45 <t t-else="">Get Weight</t>
46 </button>
47 <button class="buy-product btn btn-lg btn-primary d-flex align-items-center justify-content-center mx-2 mb-2 cursor-pointer w-100" t-on-click="confirm" t-att-disabled="!scale.isWeightValid">
48 Order
49 <i class="fa fa-angle-double-right ms-2"/>
50 </button>
51 </t>
52 </Dialog>
53 </t>
54 </templates>