@feedmepos/mf-order-setting 0.0.102 → 0.0.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/{DisplaySystemView-jnt6letY.js → DisplaySystemView-BBiZqcWq.js} +1497 -1468
  2. package/dist/{FoodCourtInvitationsView-DoynqFWB.js → FoodCourtInvitationsView-DwOkVs9m.js} +4 -4
  3. package/dist/{FoodCourtOrderSettingsView-DYZLhTHy.js → FoodCourtOrderSettingsView-C9Ag5Bsg.js} +1 -1
  4. package/dist/FoodCourtOrdersView-y4EwK3sn.js +1173 -0
  5. package/dist/{FoodCourtStallsView-CRMTt5BB.js → FoodCourtStallsView-Bi8H-yR7.js} +2 -2
  6. package/dist/{FoodCourtStatusView-C-b-eI-8.js → FoodCourtStatusView-jugAzTKg.js} +1 -1
  7. package/dist/KioskDevicesView-CYiew4X5.js +4 -0
  8. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-BCvbeo7R.js +1497 -0
  9. package/dist/KioskSettingView-AKBiij9a.js +1124 -0
  10. package/dist/KioskView-zKB6mC8I.js +765 -0
  11. package/dist/{OrderSettingsView-BBCnekaj.js → OrderSettingsView-CoV_yX3m.js} +22064 -21635
  12. package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-DjoTyV6m.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-KSMU_jGl.js} +1 -1
  13. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  14. package/dist/{app-Dvk30CIa.js → app-CmuI6uSl.js} +3589 -2902
  15. package/dist/app.js +1 -1
  16. package/dist/{dayjs.min-DUFHhM7O.js → dayjs.min-B3MssMma.js} +1 -1
  17. package/dist/{featureFlag-BvcirzHS.js → featureFlag-CWvkPOBY.js} +123 -130
  18. package/dist/frontend/mf-order/src/api/food-court/index.d.ts +51 -0
  19. package/dist/frontend/mf-order/src/api/kiosk/index.d.ts +4 -0
  20. package/dist/frontend/mf-order/src/api/payment/index.d.ts +8 -0
  21. package/dist/frontend/mf-order/src/api/queue/index.d.ts +13 -0
  22. package/dist/frontend/mf-order/src/api/restaurant-setting/index.d.ts +9 -1
  23. package/dist/frontend/mf-order/src/app.d.ts +687 -0
  24. package/dist/frontend/mf-order/src/main.d.ts +687 -0
  25. package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +5 -0
  26. package/dist/frontend/mf-order/src/modules/kiosk/interface.d.ts +4 -0
  27. package/dist/frontend/mf-order/src/modules/kiosk/license.d.ts +92 -0
  28. package/dist/frontend/mf-order/src/modules/kiosk/outletLoad.d.ts +15 -0
  29. package/dist/frontend/mf-order/src/modules/kiosk/settingsSections.d.ts +24 -0
  30. package/dist/frontend/mf-order/src/modules/kiosk/useKioskSettings.d.ts +29 -0
  31. package/dist/frontend/mf-order/src/modules/payment/paymentDevice.d.ts +58 -0
  32. package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +67 -1
  33. package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +19 -10
  34. package/dist/frontend/mf-order/src/stores/payment/index.d.ts +59 -1
  35. package/dist/frontend/mf-order/src/views/food-court/food-court-export.d.ts +38 -0
  36. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDeviceCard.vue.d.ts +3 -0
  37. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDevicesView.vue.d.ts +7 -0
  38. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicenseSummary.vue.d.ts +7 -0
  39. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicensesView.vue.d.ts +6 -0
  40. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskOtpDialog.vue.d.ts +3 -0
  41. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskPaymentDeviceCard.vue.d.ts +17 -0
  42. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskSettingView.vue.d.ts +5 -2
  43. package/dist/frontend/mf-order/src/views/order-settings/pickup/PickUpSettingDialogContent.vue.d.ts +0 -9
  44. package/dist/frontend/mf-order/src/views/order-settings/pos-status/PosOrderingStatus.vue.d.ts +17 -0
  45. package/dist/frontend/mf-order/src/views/order-settings/pos-status/pos-status.d.ts +44 -0
  46. package/dist/frontend/mf-order/src/views/order-settings/queue/called-message.d.ts +1 -0
  47. package/dist/frontend/mf-order/src/views/order-settings/queue/phone-join-mode.d.ts +25 -0
  48. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/{index-C4n5H7t3.js → index-BQa8AudZ.js} +3 -3
  50. package/dist/index-CMOvrim4.js +147 -0
  51. package/dist/{index-CW4VlFWz.js → index-D5qh2_4b.js} +1 -1
  52. package/dist/{index-C5n6lil6.js → index-Dup6kWLX.js} +6 -6
  53. package/dist/{index-CGxCWKHB.js → index-wuFIsXHT.js} +188 -179
  54. package/dist/{order.dto-Cb_gh3iB.js → order.dto-BD9raQG5.js} +2782 -2735
  55. package/dist/package/entity/display/blocks.d.ts +12 -2
  56. package/dist/package/entity/marketing/marketing.dto.d.ts +18 -18
  57. package/dist/package/entity/order-platform/external/reconciliation/external-reconciliation.do.d.ts +24 -24
  58. package/dist/package/entity/order-platform/menu.dto.d.ts +20 -20
  59. package/dist/package/entity/order-setting/order-setting.do.d.ts +10 -0
  60. package/dist/package/entity/order-setting/order-setting.dto.d.ts +26 -0
  61. package/dist/package/entity/order-setting/queue/queue.do.d.ts +23 -0
  62. package/dist/package/entity/order-setting/queue/queue.dto.d.ts +14 -0
  63. package/dist/package/entity/queue/queue.do.d.ts +153 -0
  64. package/dist/package/entity/queue/queue.dto.d.ts +221 -2
  65. package/dist/package/entity/queue/queue.enum.d.ts +5 -0
  66. package/dist/package/entity/restaurant/restaurant.dto.d.ts +20 -0
  67. package/dist/style.css +1 -1
  68. package/dist/{index-ILnighyU.js → useInternalUser-CHtaur9A.js} +93 -81
  69. package/package.json +2 -1
  70. package/src/api/food-court/index.ts +63 -0
  71. package/src/api/kiosk/index.ts +8 -0
  72. package/src/api/payment/index.ts +18 -1
  73. package/src/api/queue/index.ts +39 -0
  74. package/src/api/restaurant-setting/index.ts +14 -0
  75. package/src/locales/en-US.json +197 -26
  76. package/src/locales/ja-JP.json +193 -23
  77. package/src/locales/th-TH.json +193 -21
  78. package/src/locales/zh-CN.json +197 -23
  79. package/src/modules/display-system/interface.spec.ts +26 -1
  80. package/src/modules/display-system/interface.ts +20 -0
  81. package/src/modules/kiosk/interface.ts +4 -0
  82. package/src/modules/kiosk/license.spec.ts +167 -0
  83. package/src/modules/kiosk/license.ts +175 -0
  84. package/src/modules/kiosk/outletLoad.spec.ts +25 -0
  85. package/src/modules/kiosk/outletLoad.ts +19 -0
  86. package/src/modules/kiosk/settingsSections.spec.ts +85 -0
  87. package/src/modules/kiosk/settingsSections.ts +82 -0
  88. package/src/modules/kiosk/useKioskSettings.spec.ts +157 -0
  89. package/src/modules/kiosk/useKioskSettings.ts +61 -0
  90. package/src/modules/payment/paymentDevice.spec.ts +175 -0
  91. package/src/modules/payment/paymentDevice.ts +156 -0
  92. package/src/stores/kiosk/index.ts +16 -1
  93. package/src/stores/kiosk/mapper.ts +2 -0
  94. package/src/stores/order-setting/index.spec.ts +83 -0
  95. package/src/stores/order-setting/index.ts +49 -27
  96. package/src/stores/payment/index.spec.ts +86 -0
  97. package/src/stores/payment/index.ts +48 -2
  98. package/src/views/display-system/DisplayInspector.vue +17 -8
  99. package/src/views/display-system/DisplayTemplateEditor.vue +3 -1
  100. package/src/views/food-court/FoodCourtOrdersView.vue +46 -1
  101. package/src/views/food-court/food-court-export.spec.ts +151 -0
  102. package/src/views/food-court/food-court-export.ts +283 -0
  103. package/src/views/kiosk/KioskStatePanel.vue +2 -2
  104. package/src/views/kiosk/KioskView.vue +219 -82
  105. package/src/views/kiosk/devices/KioskDeviceCard.vue +148 -23
  106. package/src/views/kiosk/devices/KioskDevicesView.vue +48 -10
  107. package/src/views/kiosk/devices/KioskLicenseSummary.vue +79 -0
  108. package/src/views/kiosk/devices/KioskLicensesView.vue +152 -0
  109. package/src/views/kiosk/devices/KioskOtpDialog.vue +41 -1
  110. package/src/views/kiosk/devices/KioskPaymentDeviceCard.spec.ts +97 -0
  111. package/src/views/kiosk/devices/KioskPaymentDeviceCard.vue +221 -0
  112. package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +1 -1
  113. package/src/views/kiosk/settings/KioskSettingView.vue +702 -419
  114. package/src/views/order-settings/delivery/DeliverySetting.vue +4 -0
  115. package/src/views/order-settings/dine-in/DineInSetting.vue +4 -0
  116. package/src/views/order-settings/pickup/PickUpSetting.vue +4 -4
  117. package/src/views/order-settings/pickup/PickUpSettingDialogContent.vue +0 -23
  118. package/src/views/order-settings/pos-status/PosOrderingStatus.spec.ts +207 -0
  119. package/src/views/order-settings/pos-status/PosOrderingStatus.vue +209 -0
  120. package/src/views/order-settings/pos-status/pos-status.spec.ts +103 -0
  121. package/src/views/order-settings/pos-status/pos-status.ts +86 -0
  122. package/src/views/order-settings/queue/QueueSetting.source.spec.ts +43 -0
  123. package/src/views/order-settings/queue/QueueSetting.vue +289 -15
  124. package/src/views/order-settings/queue/called-message.spec.ts +29 -1
  125. package/src/views/order-settings/queue/called-message.ts +18 -0
  126. package/src/views/order-settings/queue/phone-join-mode.spec.ts +90 -0
  127. package/src/views/order-settings/queue/phone-join-mode.ts +49 -0
  128. package/dist/FoodCourtOrdersView-CAPOycT3.js +0 -544
  129. package/dist/KioskDevicesView-B0U9JxRl.js +0 -4
  130. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-V3ai4FVI.js +0 -937
  131. package/dist/KioskSettingView-rdom_aS8.js +0 -880
  132. package/dist/KioskView-DOON9zR6.js +0 -516
  133. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskDisplayStandSection.vue.d.ts +0 -10
  134. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskInstructionSection.vue.d.ts +0 -15
  135. package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPickAtCounterSection.vue.d.ts +0 -10
  136. package/dist/index-CaHG3M7C.js +0 -135
  137. package/src/views/kiosk/settings/KioskDisplayStandSection.vue +0 -189
  138. package/src/views/kiosk/settings/KioskInstructionSection.vue +0 -40
  139. package/src/views/kiosk/settings/KioskPickAtCounterSection.vue +0 -68
@@ -1,880 +0,0 @@
1
- import { defineComponent as ve, computed as C, ref as Y, onMounted as Ue, resolveComponent as w, openBlock as V, createBlock as oe, withCtx as R, createVNode as i, unref as l, createElementVNode as s, withDirectives as F, vShow as N, toDisplayString as f, watch as Ee, createElementBlock as U, createCommentVNode as B, Fragment as te, renderList as ne, normalizeClass as Fe } from "vue";
2
- import { e as me, b as be, s as ge, d as Ne, r as pe, f as ce, h as Oe } from "./app-Dvk30CIa.js";
3
- import { b as v, K as Le, c as Me } from "./order.dto-Cb_gh3iB.js";
4
- import { _ as We, u as De } from "./index-CGxCWKHB.js";
5
- import { useI18n as he, FeedMeAuth as Ie, useCoreStore as $e } from "@feedmepos/mf-common";
6
- import { u as Ye } from "./index-Cmb4sEqq.js";
7
- import { useSnackbar as Ge } from "@feedmepos/ui-library";
8
- const Ke = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary ml-7" }, qe = { class: "ml-7" }, je = { class: "ml-7" }, Be = { class: "flex flex-row gap-9" }, He = /* @__PURE__ */ ve({
9
- __name: "KioskPaymentTypeSection",
10
- props: {
11
- paymentTypes: {
12
- type: Array,
13
- required: !0
14
- },
15
- offlinePaymentTypes: {
16
- type: Array,
17
- required: !0
18
- },
19
- allowEPayment: {
20
- type: [Boolean, String],
21
- required: !0
22
- },
23
- allowCredit: {
24
- type: [Boolean, String],
25
- default: !1
26
- },
27
- ePaymentTypes: {
28
- type: Object,
29
- required: !0
30
- }
31
- },
32
- emits: ["update:paymentTypes", "update:offlinePaymentTypes", "update:ePaymentTypes"],
33
- setup(o, { emit: d }) {
34
- const { t: e } = he(), u = o, h = d, _ = C(() => (u.paymentTypes || []).includes(me.F_ORDER_PAYMENT_TYPE.enum.ePayment)), I = Y(), g = Y([]), a = Y(!1), E = Y(!1), A = Y(!1), G = () => {
35
- Object.keys(u.ePaymentTypes).length !== 0 && (u.ePaymentTypes.terminal && (E.value = !0), u.ePaymentTypes.card.terminal ? (I.value = v.enum.TERMINAL, a.value = !0) : u.ePaymentTypes.card.nfc && (I.value = v.enum.NFC, a.value = !0), u.ePaymentTypes.eWallet.qrPay && (g.value.push(v.enum.QRPAY), A.value = !0), u.ePaymentTypes.eWallet.scanPay && (g.value.push(v.enum.SCANPAY), A.value = !0));
36
- };
37
- G();
38
- const Z = (b) => {
39
- const m = {
40
- terminal: !1,
41
- card: {
42
- terminal: !1,
43
- nfc: !1
44
- },
45
- eWallet: {
46
- qrPay: !1,
47
- scanPay: !1
48
- }
49
- };
50
- _.value && (b == v.enum.TERMINAL && (m.card.terminal = !0), b == v.enum.NFC && (m.card.nfc = !0), g.value.length > 0 && (g.value.includes(v.enum.QRPAY) && (m.eWallet.qrPay = !0), g.value.includes(v.enum.SCANPAY) && (m.eWallet.scanPay = !0))), E.value && (m.terminal = !0), h("update:ePaymentTypes", m);
51
- }, T = () => {
52
- const b = {
53
- terminal: !1,
54
- card: {
55
- terminal: !1,
56
- nfc: !1
57
- },
58
- eWallet: {
59
- qrPay: !1,
60
- scanPay: !1,
61
- terminalScanPay: !1,
62
- terminalQrPay: !1
63
- }
64
- };
65
- _.value && (I.value && (I.value === v.enum.TERMINAL && (b.card.terminal = !0), I.value === v.enum.NFC && (b.card.nfc = !0)), E.value && (b.terminal = !0), g.value.includes(v.enum.QRPAY) && (b.eWallet.qrPay = !0), g.value.includes(v.enum.SCANPAY) && (b.eWallet.scanPay = !0), g.value.includes(v.enum.TERMINAL_SCAN_PAY) && (b.eWallet.terminalScanPay = !0), g.value.includes(v.enum.TERMINAL_QR_PAY) && (b.eWallet.terminalQrPay = !0)), h("update:ePaymentTypes", b);
66
- }, W = (b) => {
67
- I.value = "", b && (I.value = v.enum.TERMINAL), T();
68
- }, H = (b) => {
69
- g.value = [], b && (g.value = [
70
- v.enum.QRPAY,
71
- v.enum.SCANPAY
72
- ]), T();
73
- }, ee = (b) => {
74
- h("update:paymentTypes", b), b.includes(me.F_ORDER_PAYMENT_TYPE.enum.ePayment) || (a.value = !1, A.value = !1, W(!1), H(!1));
75
- };
76
- return Ue(() => {
77
- G();
78
- }), (b, m) => {
79
- const O = w("FmSwitch"), K = w("FmRadio"), le = w("FmRadioGroup"), q = w("FmCardSection"), j = w("FmCard"), D = w("FmCheckbox");
80
- return V(), oe(We, {
81
- "payment-types": o.paymentTypes,
82
- "offline-payment-types": o.offlinePaymentTypes,
83
- "allow-e-payment": u.allowEPayment,
84
- "allow-credit": u.allowCredit,
85
- "onUpdate:paymentTypes": ee,
86
- "onUpdate:offlinePaymentTypes": m[8] || (m[8] = (y) => h("update:offlinePaymentTypes", y || []))
87
- }, {
88
- "e-payment-note": R(() => [
89
- s("div", Ke, f(l(e)("order.legacyEPaymentNote")), 1)
90
- ]),
91
- "e-payment-content": R(() => [
92
- i(j, { variant: "outlined" }, {
93
- default: R(() => [
94
- i(q, null, {
95
- default: R(() => [
96
- i(O, {
97
- label: l(e)("order.bankCard"),
98
- sublabel: l(e)("order.cardPaymentDescription"),
99
- "label-placement": "right",
100
- modelValue: a.value,
101
- "onUpdate:modelValue": [
102
- m[0] || (m[0] = (y) => a.value = y),
103
- W
104
- ]
105
- }, null, 8, ["label", "sublabel", "modelValue"]),
106
- m[9] || (m[9] = s("br", null, null, -1)),
107
- F(s("div", qe, [
108
- i(le, {
109
- modelValue: I.value,
110
- "onUpdate:modelValue": [
111
- m[1] || (m[1] = (y) => I.value = y),
112
- Z
113
- ],
114
- inline: ""
115
- }, {
116
- default: R(() => [
117
- i(K, {
118
- label: l(e)("order.terminal"),
119
- value: l(v).enum.TERMINAL
120
- }, null, 8, ["label", "value"]),
121
- i(K, {
122
- label: l(e)("order.nfc"),
123
- value: l(v).enum.NFC
124
- }, null, 8, ["label", "value"])
125
- ]),
126
- _: 1
127
- }, 8, ["modelValue"])
128
- ], 512), [
129
- [N, a.value]
130
- ])
131
- ]),
132
- _: 1
133
- })
134
- ]),
135
- _: 1
136
- }),
137
- i(j, {
138
- variant: "outlined",
139
- class: "mt-2"
140
- }, {
141
- default: R(() => [
142
- i(q, null, {
143
- default: R(() => [
144
- i(O, {
145
- label: l(e)("order.terminal"),
146
- sublabel: l(e)("order.terminalPaymentDescription"),
147
- "label-placement": "right",
148
- modelValue: E.value,
149
- "onUpdate:modelValue": [
150
- m[2] || (m[2] = (y) => E.value = y),
151
- T
152
- ]
153
- }, null, 8, ["label", "sublabel", "modelValue"])
154
- ]),
155
- _: 1
156
- })
157
- ]),
158
- _: 1
159
- }),
160
- i(j, {
161
- variant: "outlined",
162
- class: "mt-2"
163
- }, {
164
- default: R(() => [
165
- i(q, null, {
166
- default: R(() => [
167
- i(O, {
168
- label: l(e)("order.eWallet"),
169
- sublabel: l(e)("order.eWalletDescription"),
170
- "label-placement": "right",
171
- modelValue: A.value,
172
- "onUpdate:modelValue": [
173
- m[3] || (m[3] = (y) => A.value = y),
174
- H
175
- ]
176
- }, null, 8, ["label", "sublabel", "modelValue"]),
177
- m[10] || (m[10] = s("br", null, null, -1)),
178
- F(s("div", je, [
179
- s("div", Be, [
180
- i(D, {
181
- modelValue: g.value,
182
- "onUpdate:modelValue": [
183
- m[4] || (m[4] = (y) => g.value = y),
184
- T
185
- ],
186
- label: l(e)("order.qrPay"),
187
- value: l(v).enum.QRPAY
188
- }, null, 8, ["modelValue", "label", "value"]),
189
- i(D, {
190
- modelValue: g.value,
191
- "onUpdate:modelValue": [
192
- m[5] || (m[5] = (y) => g.value = y),
193
- T
194
- ],
195
- label: l(e)("order.scanPay"),
196
- value: l(v).enum.SCANPAY
197
- }, null, 8, ["modelValue", "label", "value"]),
198
- i(D, {
199
- modelValue: g.value,
200
- "onUpdate:modelValue": [
201
- m[6] || (m[6] = (y) => g.value = y),
202
- T
203
- ],
204
- label: l(e)("order.terminalScanPay"),
205
- value: l(v).enum.TERMINAL_SCAN_PAY
206
- }, null, 8, ["modelValue", "label", "value"]),
207
- i(D, {
208
- modelValue: g.value,
209
- "onUpdate:modelValue": [
210
- m[7] || (m[7] = (y) => g.value = y),
211
- T
212
- ],
213
- label: l(e)("order.terminalQrPay"),
214
- value: l(v).enum.TERMINAL_QR_PAY
215
- }, null, 8, ["modelValue", "label", "value"])
216
- ])
217
- ], 512), [
218
- [N, A.value]
219
- ])
220
- ]),
221
- _: 1
222
- })
223
- ]),
224
- _: 1
225
- })
226
- ]),
227
- _: 1
228
- }, 8, ["payment-types", "offline-payment-types", "allow-e-payment", "allow-credit"]);
229
- };
230
- }
231
- }), ze = {
232
- "en-US": "English",
233
- "zh-CN": "中文",
234
- "th-TH": "ไทย",
235
- "vi-VN": "Tiếng Việt",
236
- "id-ID": "Bahasa Indonesia",
237
- "ko-KR": "한국어",
238
- "ja-JP": "日本語",
239
- "ar-SA": "العربية"
240
- }, Qe = Le.map((o) => ({
241
- code: o,
242
- label: ze[o]
243
- }));
244
- var Xe = { firebase: {} }, Je = {};
245
- let Q = null;
246
- function Ze(o) {
247
- var u;
248
- const d = (u = o.name.split(".").pop()) == null ? void 0 : u.toLowerCase();
249
- return d && /^[a-z0-9]+$/.test(d) ? d : {
250
- "image/jpeg": "jpg",
251
- "image/png": "png",
252
- "image/webp": "webp",
253
- "image/gif": "gif"
254
- }[o.type] ?? "bin";
255
- }
256
- function el() {
257
- var e;
258
- return (((e = Je.firebase) == null ? void 0 : e.storageBucket) ?? Xe.firebase.storageBucket ?? "image.feedme.cc").replace(/^https?:\/\//, "").replace(/\/+$/, "");
259
- }
260
- function ll(o) {
261
- const d = o.replace(/^\/+/, "");
262
- return `https://${el()}/${d}`;
263
- }
264
- async function al() {
265
- const o = be();
266
- if (!o.currentUser && (await o.authStateReady(), !o.currentUser && (Q || (Q = (async () => {
267
- const d = await Ie.getCustomToken();
268
- await ge(o, d);
269
- })().finally(() => {
270
- Q = null;
271
- })), await Q, !o.currentUser)))
272
- throw new Error("User not authenticated for image upload");
273
- }
274
- async function tl() {
275
- const o = be();
276
- o.currentUser && await Oe(o);
277
- const d = await Ie.getCustomToken();
278
- await ge(o, d);
279
- }
280
- async function nl(o, d) {
281
- const e = Ne(), u = pe(e, o);
282
- try {
283
- await ce(u, d, {
284
- contentType: d.type || void 0
285
- });
286
- return;
287
- } catch (_) {
288
- if ((_ == null ? void 0 : _.code) !== "storage/unauthorized")
289
- throw _;
290
- }
291
- await tl();
292
- const h = pe(e, o);
293
- await ce(h, d, {
294
- contentType: d.type || void 0
295
- });
296
- }
297
- async function ol(o, d) {
298
- await al();
299
- const e = o.replace(/^\/+/, "").replace(/\/+$/, ""), u = Ze(d), h = `${Date.now()}_${Math.random().toString(36).slice(2, 10)}.${u}`, _ = `${e}/${h}`;
300
- return await nl(_, d), ll(_);
301
- }
302
- const X = 8, ye = 6, _e = 2, Se = 60, rl = {
303
- landscape: "coverImageLandscape",
304
- portrait: "coverImagePortrait"
305
- };
306
- function xe(o) {
307
- if (!Array.isArray(o)) return [];
308
- const d = /* @__PURE__ */ new Set(), e = [];
309
- for (const u of o) {
310
- const h = typeof u == "string" ? u.trim() : "";
311
- !h || d.has(h) || (d.add(h), e.push(h));
312
- }
313
- return e;
314
- }
315
- function J(o, d) {
316
- var e;
317
- return xe((e = o.coverCarousel) == null ? void 0 : e[d]);
318
- }
319
- function sl(o, d) {
320
- const e = o[rl[d]], u = typeof e == "string" ? e.trim() : "";
321
- return u.length > 0 ? u : null;
322
- }
323
- function dl(o, d) {
324
- const e = J(o, d);
325
- if (e.length > 0) return e;
326
- const u = sl(o, d);
327
- return u ? [u] : [];
328
- }
329
- function il(o) {
330
- var e;
331
- const d = (e = o.coverCarousel) == null ? void 0 : e.intervalMs;
332
- return typeof d != "number" || !Number.isFinite(d) || d <= 0 ? null : Math.round(d / 1e3);
333
- }
334
- function Pe(o, d, e) {
335
- return o.length === 0 && d.length === 0 ? null : {
336
- landscape: o.length > 0 ? o : void 0,
337
- portrait: d.length > 0 ? d : void 0,
338
- intervalMs: typeof e == "number" && e > 0 ? e : void 0
339
- };
340
- }
341
- function ul(o, d, e) {
342
- var I;
343
- const u = xe(e).slice(0, X), h = d === "landscape" ? "portrait" : "landscape", _ = {
344
- [d]: u.length > 1 ? u : [],
345
- [h]: J(o, h)
346
- };
347
- return {
348
- coverImageLandscape: d === "landscape" ? u[0] ?? null : o.coverImageLandscape,
349
- coverImagePortrait: d === "portrait" ? u[0] ?? null : o.coverImagePortrait,
350
- coverCarousel: Pe(
351
- _.landscape,
352
- _.portrait,
353
- (I = o.coverCarousel) == null ? void 0 : I.intervalMs
354
- )
355
- };
356
- }
357
- function ml(o, d) {
358
- const e = d == null || !Number.isFinite(d) ? null : Math.min(Se, Math.max(_e, Math.round(d)));
359
- return {
360
- coverImageLandscape: o.coverImageLandscape,
361
- coverImagePortrait: o.coverImagePortrait,
362
- coverCarousel: Pe(
363
- J(o, "landscape"),
364
- J(o, "portrait"),
365
- e == null ? null : e * 1e3
366
- )
367
- };
368
- }
369
- function pl(o, d, e) {
370
- if (d === e) return [...o];
371
- if (d < 0 || e < 0 || d >= o.length || e >= o.length) return [...o];
372
- const u = [...o], [h] = u.splice(d, 1);
373
- return u.splice(e, 0, h), u;
374
- }
375
- const cl = {
376
- key: 0,
377
- class: "flex flex-col gap-32"
378
- }, yl = {
379
- key: 0,
380
- class: "flex flex-col gap-2"
381
- }, fl = { class: "fm-typo-en-title-sm-600" }, vl = { class: "flex flex-col gap-1 w-full md:w-1/2" }, bl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, gl = { class: "flex flex-col gap-2" }, hl = { class: "fm-typo-en-title-sm-600" }, Il = { class: "flex flex-col gap-5" }, _l = { class: "flex flex-col gap-16" }, Sl = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, xl = { class: "fm-typo-en-title-sm-600" }, Pl = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, Cl = { class: "fm-typo-en-title-sm-600" }, Vl = { class: "flex flex-row gap-2" }, wl = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, kl = { class: "fm-typo-en-title-sm-600" }, Al = { class: "flex flex-col gap-2" }, Tl = { class: "fm-typo-en-title-sm-600" }, Rl = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, Ul = { class: "fm-typo-en-title-sm-600" }, El = { class: "flex flex-col gap-2" }, Fl = { class: "fm-typo-en-title-sm-600" }, Nl = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12" }, Ol = { class: "flex flex-col gap-2" }, Ll = { class: "fm-typo-en-title-sm-600" }, Ml = { class: "flex flex-col gap-2" }, Wl = { class: "fm-typo-en-title-sm-600" }, Dl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, $l = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12" }, Yl = { class: "grid grid-cols-1 md:grid-cols-2 gap-3" }, Gl = {
382
- key: 0,
383
- class: "fm-typo-en-body-sm-400 text-fm-color-system-error-300"
384
- }, Kl = { class: "flex flex-col gap-2" }, ql = { class: "fm-typo-en-title-sm-600" }, jl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Bl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Hl = { class: "fm-typo-en-body-md-600" }, zl = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ql = { class: "flex flex-wrap items-start gap-4" }, Xl = { class: "relative" }, Jl = ["src", "alt"], Zl = { class: "absolute top-2 left-2 px-2 rounded-full bg-fm-color-typo-primary text-fm-color-neutral-white fm-typo-en-body-sm-400" }, ea = { class: "flex items-center gap-1" }, la = {
385
- key: 0,
386
- class: "w-11/12"
387
- }, aa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ta = { class: "flex flex-col gap-2" }, na = { class: "fm-typo-en-title-sm-600" }, oa = { class: "w-11/12" }, ra = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, sa = { class: "flex flex-col gap-2" }, da = { class: "fm-typo-en-title-sm-600" }, ia = { class: "flex flex-col gap-2" }, ua = { key: 1 }, ma = 10 * 1e3 * 1e3, fe = 1e5, ha = /* @__PURE__ */ ve({
388
- __name: "KioskSettingView",
389
- props: {
390
- restaurantId: {},
391
- form: {}
392
- },
393
- emits: ["updateKioskOrderSetting"],
394
- setup(o, { emit: d }) {
395
- const { t: e } = he(), u = $e(), h = C(() => {
396
- var t;
397
- return ((t = u.sessionUser.value) == null ? void 0 : t.role.isAdmin) ?? !1;
398
- }), _ = o, I = Ge(), g = d, a = Y(_.form), E = Qe, A = C(() => a.value.languages != null), G = C(() => a.value.languages ?? []);
399
- function Z(t) {
400
- a.value.languages = t ? ["en-US"] : null;
401
- }
402
- function T(t, r) {
403
- const p = a.value.languages ?? [];
404
- a.value.languages = r ? E.filter((c) => c.code === t || p.includes(c.code)).map((c) => c.code) : p.filter((c) => c !== t);
405
- }
406
- const W = (t) => t < 0 ? e("order.nonNegativeRule") : !0, H = (t) => t <= (a.value.dineIn.displayStand.standSlotRange.min ?? 0) ? e("order.greaterThanMinRule") : !0, ee = C(() => [W]), b = C(() => [W]), m = C(() => [W, H]), O = C(() => {
407
- var c, S, L, M, z, n, k, P;
408
- const t = a.value, r = (c = t.otaChannel) == null ? void 0 : c.trim();
409
- if (t.dineIn.enabled && t.dineIn.displayStand.enabled) {
410
- const { padDigit: x, standSlotRange: $ } = t.dineIn.displayStand;
411
- if (!(x != null && x >= 0 && $.min != null && $.max != null && $.min <= $.max)) return null;
412
- }
413
- if (t.languages != null && t.languages.length === 0 || t.minWeighGrams != null && (!Number.isInteger(t.minWeighGrams) || t.minWeighGrams < 1 || t.minWeighGrams > fe))
414
- return null;
415
- const p = t.paymentSetting;
416
- if ((S = p == null ? void 0 : p.paymentTypes) != null && S.includes(Me.enum.ePayment)) {
417
- const x = p.ePaymentTypes;
418
- if (!x) return null;
419
- const $ = ((L = x.card) == null ? void 0 : L.terminal) || ((M = x.card) == null ? void 0 : M.nfc), ue = ((z = x.eWallet) == null ? void 0 : z.qrPay) || ((n = x.eWallet) == null ? void 0 : n.scanPay) || ((k = x.eWallet) == null ? void 0 : k.terminalScanPay) || ((P = x.eWallet) == null ? void 0 : P.terminalQrPay), Re = x.terminal;
420
- if (!$ && !ue && !Re) return null;
421
- }
422
- return {
423
- ...t,
424
- otaChannel: r || void 0,
425
- dineIn: {
426
- ...t.dineIn,
427
- displayStand: {
428
- ...t.dineIn.displayStand,
429
- enabled: t.dineIn.enabled && t.dineIn.displayStand.enabled,
430
- padDigit: t.dineIn.displayStand.padDigit ?? 0,
431
- standSlotRange: {
432
- min: t.dineIn.displayStand.standSlotRange.min ?? 0,
433
- max: t.dineIn.displayStand.standSlotRange.max ?? 10
434
- },
435
- prefix: t.dineIn.displayStand.prefix ?? ""
436
- }
437
- }
438
- };
439
- }), { startAsyncCall: K } = Ye();
440
- function le(t) {
441
- a.value.paymentSetting.paymentTypes = t;
442
- }
443
- function q(t) {
444
- a.value.paymentSetting.ePaymentTypes = t;
445
- }
446
- const j = De(), D = [
447
- {
448
- value: "landscape",
449
- labelKey: "order.coverImageLandscape",
450
- hintKey: "order.coverImageLandscapeHint",
451
- previewClass: "w-[280px] aspect-video",
452
- dropClass: "w-[280px] aspect-video"
453
- },
454
- {
455
- value: "portrait",
456
- labelKey: "order.coverImagePortrait",
457
- hintKey: "order.coverImagePortraitHint",
458
- previewClass: "w-[160px] aspect-[9/16]",
459
- dropClass: "w-[160px] aspect-[9/16]"
460
- }
461
- ];
462
- function y(t) {
463
- return dl(a.value, t);
464
- }
465
- const Ce = C(
466
- () => y("landscape").length > 1 || y("portrait").length > 1
467
- );
468
- function ae(t, r) {
469
- Object.assign(
470
- a.value,
471
- ul(a.value, t, r)
472
- );
473
- }
474
- function re(t, r, p) {
475
- ae(t, pl(y(t), r, p));
476
- }
477
- function Ve(t, r) {
478
- const p = y(t).filter((c, S) => S !== r);
479
- ae(t, p);
480
- }
481
- const se = C({
482
- get: () => a.value.minWeighGrams ?? null,
483
- set: (t) => {
484
- a.value.minWeighGrams = typeof t == "number" && Number.isFinite(t) && t >= 1 ? Math.trunc(t) : null;
485
- }
486
- }), de = C({
487
- get: () => il(a.value),
488
- set: (t) => {
489
- Object.assign(
490
- a.value,
491
- ml(a.value, t)
492
- );
493
- }
494
- });
495
- async function we(t, r) {
496
- if (!(y(t).length >= X))
497
- try {
498
- const p = await K(async () => {
499
- const c = `/restaurant/${_.restaurantId}/kiosk/cover-${t}`;
500
- return await ol(c, r);
501
- });
502
- ae(t, [...y(t), p]), I.open({
503
- title: e("order.imageUploadSuccess"),
504
- type: "success"
505
- });
506
- } catch (p) {
507
- console.error(p), I.open({
508
- title: e("order.imageUploadFailed"),
509
- type: "error"
510
- });
511
- }
512
- }
513
- function ke(t, r) {
514
- var S, L;
515
- const p = e(t === "landscape" ? "order.coverImageLandscape" : "order.coverImagePortrait"), c = (L = (S = r[0]) == null ? void 0 : S.reason) == null ? void 0 : L[0];
516
- I.open({
517
- title: c ? `${e("order.imageUploadRejected")}: ${p} (${c})` : `${e("order.imageUploadRejected")}: ${p}`,
518
- type: "error"
519
- });
520
- }
521
- const Ae = C(() => j.getRestaurantEPayment()), ie = C({
522
- get: () => (a.value.dineIn.displayStand.enabled && a.value.dineIn.displayStand.enablePaxDialog || a.value.dineIn.pickUp.enablePaxDialog) ?? !1,
523
- set: (t) => {
524
- a.value.dineIn.displayStand.enablePaxDialog = t, a.value.dineIn.pickUp.enablePaxDialog = t;
525
- }
526
- });
527
- Ee(
528
- () => [
529
- a.value.dineIn.enabled,
530
- a.value.dineIn.pickUp.enabled,
531
- a.value.dineIn.displayStand.enabled
532
- ],
533
- ([t, r, p], c) => {
534
- const S = (c == null ? void 0 : c[0]) ?? !1;
535
- t && !r && !p && (a.value.dineIn.pickUp.enabled = !0, S || I.open({
536
- title: e("order.dineInModeAutoCorrected"),
537
- type: "info"
538
- }));
539
- },
540
- { immediate: !0 }
541
- );
542
- async function Te() {
543
- if (O.value) {
544
- const t = O.value;
545
- K(async () => {
546
- await g("updateKioskOrderSetting", t);
547
- });
548
- } else
549
- I.open({
550
- title: e("order.failedToUpdateSetting"),
551
- type: "error"
552
- });
553
- }
554
- return (t, r) => {
555
- const p = w("FmTextField"), c = w("FmSwitch"), S = w("FmStepperField"), L = w("FmCheckbox"), M = w("FmButton"), z = w("FmDropField");
556
- return a.value ? (V(), U("div", cl, [
557
- h.value ? (V(), U("div", yl, [
558
- s("span", fl, f(l(e)("order.otaChannel")), 1),
559
- s("div", vl, [
560
- i(p, {
561
- modelValue: a.value.otaChannel,
562
- "onUpdate:modelValue": r[0] || (r[0] = (n) => a.value.otaChannel = n),
563
- label: l(e)("order.otaChannel"),
564
- placeholder: l(e)("order.otaChannelHint")
565
- }, null, 8, ["modelValue", "label", "placeholder"]),
566
- s("span", bl, f(l(e)("order.otaChannelHint")), 1)
567
- ])
568
- ])) : B("", !0),
569
- s("div", gl, [
570
- s("span", hl, f(l(e)("order.dineIn")), 1),
571
- s("div", Il, [
572
- i(c, {
573
- modelValue: a.value.dineIn.enabled,
574
- "onUpdate:modelValue": r[1] || (r[1] = (n) => a.value.dineIn.enabled = n),
575
- label: l(e)("order.dineIn"),
576
- "label-placement": "right"
577
- }, null, 8, ["modelValue", "label"]),
578
- F(s("div", _l, [
579
- s("div", null, [
580
- i(c, {
581
- modelValue: a.value.dineIn.pickUp.enabled,
582
- "onUpdate:modelValue": r[2] || (r[2] = (n) => a.value.dineIn.pickUp.enabled = n),
583
- label: l(e)("order.pickAtCounter"),
584
- "label-placement": "right"
585
- }, null, 8, ["modelValue", "label"]),
586
- F(s("div", Sl, [
587
- s("span", xl, f(l(e)("order.submitOrderInstruction")), 1),
588
- i(p, {
589
- modelValue: a.value.dineIn.pickUp.submitOrderInstruction.payAtCounter,
590
- "onUpdate:modelValue": r[3] || (r[3] = (n) => a.value.dineIn.pickUp.submitOrderInstruction.payAtCounter = n),
591
- label: l(e)("order.payAtCounter"),
592
- placeholder: "Collect your transaction slip below and present it to the cashier"
593
- }, null, 8, ["modelValue", "label"]),
594
- i(p, {
595
- modelValue: a.value.dineIn.pickUp.submitOrderInstruction.paid,
596
- "onUpdate:modelValue": r[4] || (r[4] = (n) => a.value.dineIn.pickUp.submitOrderInstruction.paid = n),
597
- label: l(e)("order.paid"),
598
- placeholder: "Please wait as we prepare your food. We'll call your number when it's ready."
599
- }, null, 8, ["modelValue", "label"])
600
- ], 512), [
601
- [N, a.value.dineIn.pickUp.enabled]
602
- ])
603
- ]),
604
- s("div", null, [
605
- i(c, {
606
- modelValue: a.value.dineIn.displayStand.enabled,
607
- "onUpdate:modelValue": r[5] || (r[5] = (n) => a.value.dineIn.displayStand.enabled = n),
608
- label: l(e)("order.displayStand"),
609
- "label-placement": "right"
610
- }, null, 8, ["modelValue", "label"]),
611
- F(s("div", Pl, [
612
- s("span", Cl, f(l(e)("order.tableServiceSetting")), 1),
613
- i(p, {
614
- modelValue: a.value.dineIn.displayStand.prefix,
615
- "onUpdate:modelValue": r[6] || (r[6] = (n) => a.value.dineIn.displayStand.prefix = n),
616
- label: l(e)("order.prefix"),
617
- placeholder: l(e)("order.prefix")
618
- }, null, 8, ["modelValue", "label", "placeholder"]),
619
- s("div", Vl, [
620
- i(S, {
621
- modelValue: a.value.dineIn.displayStand.standSlotRange.min,
622
- "onUpdate:modelValue": r[7] || (r[7] = (n) => a.value.dineIn.displayStand.standSlotRange.min = n),
623
- class: "w-1/2",
624
- label: l(e)("order.start"),
625
- labelMark: "required",
626
- rules: b.value,
627
- placeholder: l(e)("order.enterANumber")
628
- }, null, 8, ["modelValue", "label", "rules", "placeholder"]),
629
- i(S, {
630
- modelValue: a.value.dineIn.displayStand.standSlotRange.max,
631
- "onUpdate:modelValue": r[8] || (r[8] = (n) => a.value.dineIn.displayStand.standSlotRange.max = n),
632
- class: "w-1/2",
633
- label: l(e)("order.end"),
634
- labelMark: "required",
635
- rules: m.value,
636
- placeholder: l(e)("order.enterANumber")
637
- }, null, 8, ["modelValue", "label", "rules", "placeholder"])
638
- ]),
639
- i(S, {
640
- modelValue: a.value.dineIn.displayStand.padDigit,
641
- "onUpdate:modelValue": r[9] || (r[9] = (n) => a.value.dineIn.displayStand.padDigit = n),
642
- label: l(e)("order.padDigit"),
643
- labelMark: "required",
644
- rules: ee.value,
645
- placeholder: l(e)("order.padDigit")
646
- }, null, 8, ["modelValue", "label", "rules", "placeholder"])
647
- ], 512), [
648
- [N, a.value.dineIn.displayStand.enabled]
649
- ]),
650
- F(s("div", wl, [
651
- s("span", kl, f(l(e)("order.submitOrderInstruction")), 1),
652
- i(p, {
653
- modelValue: a.value.dineIn.displayStand.submitOrderInstruction.payAtCounter,
654
- "onUpdate:modelValue": r[10] || (r[10] = (n) => a.value.dineIn.displayStand.submitOrderInstruction.payAtCounter = n),
655
- label: l(e)("order.payAtCounter"),
656
- placeholder: "Collect your transaction slip below and present it to the cashier"
657
- }, null, 8, ["modelValue", "label"]),
658
- i(p, {
659
- modelValue: a.value.dineIn.displayStand.submitOrderInstruction.paid,
660
- "onUpdate:modelValue": r[11] || (r[11] = (n) => a.value.dineIn.displayStand.submitOrderInstruction.paid = n),
661
- label: l(e)("order.paid"),
662
- placeholder: "Please collect your receipt and we'll bring your food to your table once it's ready."
663
- }, null, 8, ["modelValue", "label"])
664
- ], 512), [
665
- [N, a.value.dineIn.displayStand.enabled]
666
- ])
667
- ])
668
- ], 512), [
669
- [N, a.value.dineIn.enabled]
670
- ])
671
- ])
672
- ]),
673
- s("div", Al, [
674
- s("span", Tl, f(l(e)("order.takeawayTitle")), 1),
675
- i(c, {
676
- modelValue: a.value.takeaway.enabled,
677
- "onUpdate:modelValue": r[12] || (r[12] = (n) => a.value.takeaway.enabled = n),
678
- label: l(e)("order.takeaway"),
679
- "label-placement": "right",
680
- class: "mb-5"
681
- }, null, 8, ["modelValue", "label"]),
682
- F(s("div", Rl, [
683
- s("span", Ul, f(l(e)("order.submitOrderInstruction")), 1),
684
- i(p, {
685
- modelValue: a.value.takeaway.submitOrderInstruction.payAtCounter,
686
- "onUpdate:modelValue": r[13] || (r[13] = (n) => a.value.takeaway.submitOrderInstruction.payAtCounter = n),
687
- label: l(e)("order.payAtCounter"),
688
- placeholder: "Collect your transaction slip below and present it to the cashier"
689
- }, null, 8, ["modelValue", "label"]),
690
- i(p, {
691
- modelValue: a.value.takeaway.submitOrderInstruction.paid,
692
- "onUpdate:modelValue": r[14] || (r[14] = (n) => a.value.takeaway.submitOrderInstruction.paid = n),
693
- label: l(e)("order.paid"),
694
- placeholder: "Please wait as we prepare your food. We'll call your number when it's ready."
695
- }, null, 8, ["modelValue", "label"])
696
- ], 512), [
697
- [N, a.value.takeaway.enabled]
698
- ])
699
- ]),
700
- s("div", El, [
701
- s("span", Fl, f(l(e)("order.kioskOrderNumber")), 1),
702
- s("div", Nl, [
703
- i(p, {
704
- modelValue: a.value.dineIn.sequenceNumber.prefix,
705
- "onUpdate:modelValue": r[15] || (r[15] = (n) => a.value.dineIn.sequenceNumber.prefix = n),
706
- label: l(e)("order.kioskOrderNumberPrefix"),
707
- placeholder: "#K",
708
- "helper-text": l(e)("order.kioskOrderNumberHint")
709
- }, null, 8, ["modelValue", "label", "helper-text"]),
710
- i(c, {
711
- modelValue: a.value.shareNumber,
712
- "onUpdate:modelValue": r[16] || (r[16] = (n) => a.value.shareNumber = n),
713
- label: l(e)("order.kioskShareNumber"),
714
- sublabel: l(e)("order.kioskShareNumberSublabel"),
715
- "label-placement": "right"
716
- }, null, 8, ["modelValue", "label", "sublabel"])
717
- ])
718
- ]),
719
- s("div", Ol, [
720
- s("span", Ll, f(l(e)("order.menuItem")), 1),
721
- i(c, {
722
- modelValue: a.value.menuItem.showAllOnly,
723
- "onUpdate:modelValue": r[17] || (r[17] = (n) => a.value.menuItem.showAllOnly = n),
724
- label: l(e)("order.showNotAvailableMenuItem"),
725
- "label-placement": "right",
726
- class: "mb-5"
727
- }, null, 8, ["modelValue", "label"])
728
- ]),
729
- s("div", Ml, [
730
- s("span", Wl, f(l(e)("order.kioskLanguage")), 1),
731
- s("span", Dl, f(l(e)("order.kioskLanguageHint")), 1),
732
- s("div", $l, [
733
- i(c, {
734
- "model-value": A.value,
735
- label: l(e)("order.kioskLanguageRestrict"),
736
- sublabel: l(e)("order.kioskLanguageRestrictSublabel"),
737
- "label-placement": "right",
738
- "onUpdate:modelValue": Z
739
- }, null, 8, ["model-value", "label", "sublabel"]),
740
- F(s("div", Yl, [
741
- (V(!0), U(te, null, ne(l(E), (n) => (V(), oe(L, {
742
- key: n.code,
743
- "model-value": G.value.includes(n.code),
744
- value: n.code,
745
- label: n.label,
746
- "onUpdate:modelValue": (k) => T(n.code, k)
747
- }, null, 8, ["model-value", "value", "label", "onUpdate:modelValue"]))), 128))
748
- ], 512), [
749
- [N, A.value]
750
- ]),
751
- A.value && G.value.length === 0 ? (V(), U("span", Gl, f(l(e)("order.kioskLanguageAtLeastOne")), 1)) : B("", !0)
752
- ])
753
- ]),
754
- s("div", Kl, [
755
- s("span", ql, f(l(e)("order.coverImage")), 1),
756
- s("span", jl, f(l(e)("order.coverImageFallbackHint")), 1),
757
- s("span", Bl, f(l(e)("order.coverCarouselHint", { max: l(X) })), 1),
758
- (V(), U(te, null, ne(D, (n) => s("div", {
759
- key: n.value,
760
- class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12"
761
- }, [
762
- s("span", Hl, f(l(e)(n.labelKey)), 1),
763
- s("span", zl, f(l(e)(n.hintKey)), 1),
764
- s("div", Ql, [
765
- (V(!0), U(te, null, ne(y(n.value), (k, P) => (V(), U("div", {
766
- key: `${n.value}-${P}-${k}`,
767
- class: "flex flex-col gap-2"
768
- }, [
769
- s("div", Xl, [
770
- s("img", {
771
- src: k,
772
- alt: `${l(e)(n.labelKey)} ${P + 1}`,
773
- class: Fe([
774
- n.previewClass,
775
- "object-cover rounded-md border border-fm-color-neutral-gray-200"
776
- ])
777
- }, null, 10, Jl),
778
- s("span", Zl, f(P + 1), 1)
779
- ]),
780
- s("div", ea, [
781
- i(M, {
782
- variant: "tertiary",
783
- size: "md",
784
- "prepend-icon": "arrow_back",
785
- disabled: P === 0,
786
- "aria-label": l(e)("order.coverCarouselMoveEarlier"),
787
- onClick: (x) => re(n.value, P, P - 1)
788
- }, null, 8, ["disabled", "aria-label", "onClick"]),
789
- i(M, {
790
- variant: "tertiary",
791
- size: "md",
792
- "prepend-icon": "arrow_forward",
793
- disabled: P === y(n.value).length - 1,
794
- "aria-label": l(e)("order.coverCarouselMoveLater"),
795
- onClick: (x) => re(n.value, P, P + 1)
796
- }, null, 8, ["disabled", "aria-label", "onClick"]),
797
- i(M, {
798
- variant: "tertiary",
799
- size: "md",
800
- "prepend-icon": "delete",
801
- "aria-label": l(e)("common.delete"),
802
- onClick: (x) => Ve(n.value, P)
803
- }, null, 8, ["aria-label", "onClick"])
804
- ])
805
- ]))), 128)),
806
- y(n.value).length < l(X) ? (V(), oe(z, {
807
- key: 0,
808
- accept: "image/*",
809
- "max-file-size": ma,
810
- "content-class": n.dropClass,
811
- onFileUpload: (k) => we(n.value, k),
812
- onFileRejected: (k) => ke(n.value, k)
813
- }, null, 8, ["content-class", "onFileUpload", "onFileRejected"])) : B("", !0)
814
- ])
815
- ])), 64)),
816
- Ce.value ? (V(), U("div", la, [
817
- i(S, {
818
- modelValue: de.value,
819
- "onUpdate:modelValue": r[18] || (r[18] = (n) => de.value = n),
820
- class: "max-w-[240px]",
821
- label: l(e)("order.coverCarouselInterval"),
822
- min: l(_e),
823
- max: l(Se),
824
- placeholder: String(l(ye))
825
- }, null, 8, ["modelValue", "label", "min", "max", "placeholder"]),
826
- s("span", aa, f(l(e)("order.coverCarouselIntervalHint", { seconds: l(ye) })), 1)
827
- ])) : B("", !0)
828
- ]),
829
- s("div", ta, [
830
- s("span", na, f(l(e)("order.minWeighGrams")), 1),
831
- s("div", oa, [
832
- i(S, {
833
- modelValue: se.value,
834
- "onUpdate:modelValue": r[19] || (r[19] = (n) => se.value = n),
835
- class: "max-w-[240px]",
836
- label: l(e)("order.minWeighGramsLabel"),
837
- min: 1,
838
- max: fe,
839
- placeholder: l(e)("order.minWeighGramsPlaceholder")
840
- }, null, 8, ["modelValue", "label", "placeholder"]),
841
- s("span", ra, f(l(e)("order.minWeighGramsHint")), 1)
842
- ])
843
- ]),
844
- s("div", sa, [
845
- s("span", da, f(l(e)("order.displayPaxDialogTitle")), 1),
846
- i(c, {
847
- modelValue: ie.value,
848
- "onUpdate:modelValue": r[20] || (r[20] = (n) => ie.value = n),
849
- label: l(e)("order.displayPaxDialogDescription"),
850
- "label-placement": "right",
851
- class: "mb-5"
852
- }, null, 8, ["modelValue", "label"])
853
- ]),
854
- B("", !0),
855
- s("div", ia, [
856
- i(He, {
857
- "payment-types": a.value.paymentSetting.paymentTypes ?? [],
858
- "allow-credit": !0,
859
- "allow-e-payment": Ae.value,
860
- "offline-payment-types": a.value.paymentSetting.offlinePaymentTypes ?? [],
861
- ePaymentTypes: a.value.paymentSetting.ePaymentTypes ?? {},
862
- "onUpdate:paymentTypes": le,
863
- "onUpdate:offlinePaymentTypes": r[22] || (r[22] = (n) => a.value.paymentSetting.offlinePaymentTypes = n),
864
- "onUpdate:ePaymentTypes": q
865
- }, null, 8, ["payment-types", "allow-e-payment", "offline-payment-types", "ePaymentTypes"])
866
- ]),
867
- i(M, {
868
- class: "w-1/4 mb-10",
869
- variant: "primary",
870
- label: l(e)("order.updateSetting"),
871
- disabled: !O.value,
872
- onClick: Te
873
- }, null, 8, ["label", "disabled"])
874
- ])) : (V(), U("div", ua, f(l(e)("order.pleaseSelectRestaurant")), 1));
875
- };
876
- }
877
- });
878
- export {
879
- ha as default
880
- };