@feedmepos/mf-order-setting 0.0.16 → 0.0.17

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 (49) hide show
  1. package/dist/KioskDevicesView-DkDKK-o-.js +4 -0
  2. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-uz5kCfDz.js +206 -0
  3. package/dist/KioskSettingView-6Q0qwSTl.js +345 -0
  4. package/dist/KioskView-dXsAOdRK.js +289 -0
  5. package/dist/OrderSettingsView-mw8PFd0W.js +70943 -0
  6. package/dist/app-BsFGRC2y.js +620 -0
  7. package/dist/app.js +5 -4
  8. package/dist/dayjs.min-vPr9KJUN.js +123632 -0
  9. package/dist/frontend/mf-order/src/api/restaurant-setting/index.d.ts +1 -1
  10. package/dist/frontend/mf-order/src/app.d.ts +1 -0
  11. package/dist/frontend/mf-order/src/helpers/map.d.ts +3 -2
  12. package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +6 -6
  13. package/dist/frontend/mf-order/src/stores/restaurant/index.d.ts +8 -8
  14. package/dist/frontend/mf-order/src/views/all-orders/FilterRestaurant.vue.d.ts +4 -4
  15. package/dist/frontend/mf-order/src/views/all-orders/ReflowOrder.vue.d.ts +2 -2
  16. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  17. package/dist/index-B9mJLWE5.js +70 -0
  18. package/dist/index-CpFXjGaf.js +86 -0
  19. package/dist/package/entity/delivery/delivery.dto.d.ts +6 -6
  20. package/dist/package/entity/delivery/gateway/pandago.dto.d.ts +10 -10
  21. package/dist/package/entity/food-court/order.dto.d.ts +38 -38
  22. package/dist/package/entity/kiosk/kiosk.do.d.ts +20 -20
  23. package/dist/package/entity/kiosk/kiosk.dto.d.ts +24 -24
  24. package/dist/package/entity/order/order.dto.d.ts +278 -278
  25. package/dist/package/entity/order/payment/payment.dto.d.ts +152 -152
  26. package/dist/package/entity/order-platform/foodpanda/foodpanda-order.do.d.ts +24 -24
  27. package/dist/package/entity/order-platform/foodpanda/foodpanda-order.dto.d.ts +6 -6
  28. package/dist/package/entity/order-platform/grabfood/grabfood-menu.do.d.ts +74 -74
  29. package/dist/package/entity/order-platform/grabfood/grabfood-order.do.d.ts +106 -106
  30. package/dist/package/entity/order-platform/grabfood/grabfood.dto.d.ts +32 -32
  31. package/dist/package/entity/order-platform/menu.dto.d.ts +54 -54
  32. package/dist/package/entity/order-platform/shopeefood/shopeefood-order.do.d.ts +238 -238
  33. package/dist/package/entity/order-platform/shopeefood/shopeefood-order.dto.d.ts +64 -64
  34. package/dist/package/entity/payment/payment.dto.d.ts +2 -2
  35. package/dist/package/entity/printer/printer.do.d.ts +2 -2
  36. package/dist/package/entity/websocket/websocket.dto.d.ts +2 -2
  37. package/package.json +1 -1
  38. package/src/Entry.vue +2 -8
  39. package/src/api/restaurant-setting/index.ts +3 -2
  40. package/src/app.ts +17 -0
  41. package/src/components/GoogleMap.vue +102 -104
  42. package/src/helpers/map.ts +23 -15
  43. package/src/router/routes.ts +4 -8
  44. package/src/stores/restaurant/index.ts +1 -1
  45. package/src/views/order-settings/delivery/inhouse/DeliveryOrder.vue +3 -2
  46. package/src/views/order-settings/pickup/AddressInput.vue +3 -2
  47. package/src/views/order-settings/pickup/PickUpSetting.vue +34 -25
  48. package/dist/KioskSettingView-DGfS1NzO.js +0 -4
  49. package/dist/app-9Q-zRVKD.js +0 -196056
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-uz5kCfDz.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,206 @@
1
+ import { defineComponent as g, ref as D, resolveComponent as f, openBlock as i, createElementBlock as c, createElementVNode as a, toDisplayString as d, unref as m, createVNode as v, computed as B, withCtx as F, Fragment as y, renderList as h, createCommentVNode as C, createBlock as M } from "vue";
2
+ import { useDialog as O, useSnackbar as q } from "@feedmepos/ui-library";
3
+ import { useI18n as I } from "@feedmepos/mf-common";
4
+ import { defineStore as N } from "pinia";
5
+ import { r as w, g as K, D as T } from "./dayjs.min-vPr9KJUN.js";
6
+ const U = /* @__PURE__ */ g({
7
+ __name: "KioskUnbindConfirm",
8
+ props: {
9
+ machineId: {}
10
+ },
11
+ emits: ["update:modelValue"],
12
+ setup(e, { emit: t }) {
13
+ const { t: n } = I(), l = t, o = D("");
14
+ function s(r) {
15
+ l("update:modelValue", r);
16
+ }
17
+ return (r, x) => {
18
+ const _ = f("FmTextField");
19
+ return i(), c("div", null, [
20
+ a("span", null, d(m(n)("order.unbindKioskDeviceWarning", { machineId: r.machineId })), 1),
21
+ v(_, {
22
+ "model-value": o.value,
23
+ "onUpdate:modelValue": s,
24
+ placeholder: r.machineId
25
+ }, null, 8, ["model-value", "placeholder"])
26
+ ]);
27
+ };
28
+ }
29
+ });
30
+ async function Y() {
31
+ const e = await w().get("/kiosk/otp");
32
+ return K(e);
33
+ }
34
+ async function j() {
35
+ const e = await w().get("/kiosk/devices");
36
+ return K(e);
37
+ }
38
+ async function L(e) {
39
+ await w().delete(`/kiosk/unbind/${e}`);
40
+ }
41
+ const k = {
42
+ requestOtp: Y,
43
+ getDevices: j,
44
+ unbind: L
45
+ }, W = (e) => ({
46
+ name: e.name ?? "N/A",
47
+ machineId: e.machineId,
48
+ config: {
49
+ scannerInfo: e.scannerInfo ?? void 0,
50
+ printerInfo: e.printerInfo ?? void 0,
51
+ terminalInfo: e.terminalInfo ?? void 0
52
+ },
53
+ activatedAt: H(e.token)
54
+ });
55
+ function H(e) {
56
+ const t = e.substring(0, 8), n = parseInt(t, 16);
57
+ return new Date(n * 1e3);
58
+ }
59
+ const P = {
60
+ toMfKioskDevice: W
61
+ }, z = N("kiosk", () => {
62
+ const e = D({
63
+ otp: "",
64
+ devices: []
65
+ });
66
+ async function t() {
67
+ const o = await k.requestOtp();
68
+ e.value.otp = o.otp;
69
+ }
70
+ async function n() {
71
+ const o = await k.getDevices();
72
+ e.value.devices = o.map((s) => P.toMfKioskDevice(s));
73
+ }
74
+ async function l(o) {
75
+ await k.unbind(o), await n();
76
+ }
77
+ return {
78
+ state: e,
79
+ requestOtp: t,
80
+ getDevices: n,
81
+ unbind: l
82
+ };
83
+ }), E = { class: "border fm-corner-radius-lg flex justify-between pr-[1rem] w-11/12" }, G = { class: "py-[1rem] flex flex-col gap-6" }, J = { class: "fm-typo-en-title-sm-600" }, Q = { class: "w-full border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2" }, R = {
84
+ key: 0,
85
+ class: "fm-typo-en-title-sm-600"
86
+ }, X = { class: "flex flex-col gap-1" }, Z = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ee = { class: "fm-typo-en-body-lg-600 block" }, te = /* @__PURE__ */ g({
87
+ __name: "KioskDeviceCard",
88
+ props: {
89
+ device: {}
90
+ },
91
+ setup(e) {
92
+ const { t } = I(), n = O(), l = q(), o = z(), s = e, r = D(""), x = B(() => Object.entries(s.device.config));
93
+ function _() {
94
+ r.value = "", n.open({
95
+ title: t("order.unbindKioskDevice"),
96
+ contentComponent: U,
97
+ contentComponentProps: {
98
+ machineId: s.device.machineId,
99
+ "onUpdate:modelValue": (p) => {
100
+ r.value = p;
101
+ }
102
+ },
103
+ dismissAway: !1,
104
+ primaryActions: {
105
+ text: t("order.unbind"),
106
+ variant: "destructive",
107
+ close: !1
108
+ },
109
+ secondaryActions: {
110
+ text: t("order.cancel"),
111
+ variant: "tertiary",
112
+ close: !0
113
+ }
114
+ }).onPrimary(async () => {
115
+ r.value == s.device.machineId ? (await V(), l.open({
116
+ type: "success",
117
+ message: t("order.unbindSuccess"),
118
+ position: "bottom"
119
+ }), n.close()) : l.open({
120
+ type: "warning",
121
+ message: t("order.unbindWarning"),
122
+ position: "bottom"
123
+ });
124
+ });
125
+ }
126
+ async function V() {
127
+ await o.unbind(s.device.machineId);
128
+ }
129
+ return (p, ce) => {
130
+ const S = f("FmListItem"), $ = f("FmSideSheet"), A = f("FmButton");
131
+ return i(), c("div", E, [
132
+ v($, {
133
+ header: m(t)("order.deviceDetails"),
134
+ "dismiss-away": "",
135
+ class: "w-full",
136
+ maxWidth: 700
137
+ }, {
138
+ "side-sheet-button": F(() => [
139
+ v(S, {
140
+ class: "flex-1",
141
+ label: p.device.name,
142
+ sublabel: `${m(t)("order.activatedDate")}: ${m(T)(p.device.activatedAt).format("DD MMM YYYY HH:mm")}`
143
+ }, null, 8, ["label", "sublabel"])
144
+ ]),
145
+ default: F(() => [
146
+ a("div", G, [
147
+ a("span", J, d(p.device.name), 1),
148
+ (i(!0), c(y, null, h(x.value.filter((u) => u[1]), (u) => (i(), c("div", Q, [
149
+ u[1] ? (i(), c("span", R, d(u[0]), 1)) : C("", !0),
150
+ u[1] ? (i(!0), c(y, { key: 1 }, h(Object.entries(u[1]), (b) => (i(), c("div", X, [
151
+ a("span", Z, d(b[0]), 1),
152
+ a("span", ee, d(b[1] == "" ? "-" : b[1]), 1)
153
+ ]))), 256)) : C("", !0)
154
+ ]))), 256))
155
+ ])
156
+ ]),
157
+ _: 1
158
+ }, 8, ["header"]),
159
+ v(A, {
160
+ variant: "plain",
161
+ "append-icon": "link_off",
162
+ class: "text-fm-color-system-error-300 align-middle my-auto",
163
+ onClick: _
164
+ })
165
+ ]);
166
+ };
167
+ }
168
+ }), ne = { class: "flex flex-col gap-2" }, oe = { class: "flex flex-col gap-2" }, se = { class: "fm-typo-en-title-sm-600 block" }, ie = { class: "fm-typo-en-body-md-400 block" }, ae = { class: "flex flex-col gap-6" }, pe = /* @__PURE__ */ g({
169
+ __name: "KioskDevicesView",
170
+ props: {
171
+ devices: {},
172
+ requestOtp: { type: Function }
173
+ },
174
+ setup(e) {
175
+ const { t } = I();
176
+ return (n, l) => {
177
+ const o = f("FmButton");
178
+ return i(), c("div", null, [
179
+ a("div", ne, [
180
+ a("div", oe, [
181
+ a("span", se, d(m(t)("order.kioskDisplay")), 1),
182
+ a("span", ie, d(m(t)("order.kioskDisplayDescription")), 1)
183
+ ]),
184
+ a("div", ae, [
185
+ (i(!0), c(y, null, h(n.devices, (s) => (i(), M(te, {
186
+ key: s.machineId,
187
+ device: s
188
+ }, null, 8, ["device"]))), 128)),
189
+ v(o, {
190
+ variant: "plain",
191
+ class: "w-[10rem] border border-fm-color-primary fm-corner-radius-lg",
192
+ label: m(t)("order.bindDevice"),
193
+ size: "md",
194
+ "prepend-icon": "link",
195
+ onClick: n.requestOtp
196
+ }, null, 8, ["label", "onClick"])
197
+ ])
198
+ ])
199
+ ]);
200
+ };
201
+ }
202
+ });
203
+ export {
204
+ pe as _,
205
+ z as u
206
+ };
@@ -0,0 +1,345 @@
1
+ import { defineComponent as w, ref as D, computed as I, resolveComponent as k, openBlock as f, createElementBlock as _, createVNode as b, unref as l, withDirectives as q, createElementVNode as S, toDisplayString as V, vShow as B, watch as P, createBlock as U, createCommentVNode as T } from "vue";
2
+ import { useI18n as h } from "@feedmepos/mf-common";
3
+ import { u as C } from "./index-B9mJLWE5.js";
4
+ import { useSnackbar as K } from "@feedmepos/ui-library";
5
+ function M(p, o) {
6
+ let t = p.toString(), i = o - t.length;
7
+ return i > 0 && (t = Array(i + 1).join("0") + t), t;
8
+ }
9
+ const E = {
10
+ applyPadDigits: M
11
+ };
12
+ function L(p, o = []) {
13
+ const t = JSON.parse(JSON.stringify(p));
14
+ return o.length > 0 && o.forEach((i) => {
15
+ t[i] !== void 0 && delete t[i];
16
+ }), t;
17
+ }
18
+ const $ = {
19
+ clone: L
20
+ }, j = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, J = { class: "fm-typo-en-title-sm-600" }, z = { class: "flex flex-col gap-10" }, G = { class: "flex flex-row gap-2" }, H = /* @__PURE__ */ w({
21
+ __name: "KioskDisplayStandSection",
22
+ props: {
23
+ displayStand: {}
24
+ },
25
+ emits: ["updateDisplayStand"],
26
+ setup(p, { emit: o }) {
27
+ const { t } = h(), i = p, c = o, a = D($.clone(i.displayStand)), d = (u) => u < 0 ? t("order.nonNegativeRule") : !0, n = (u) => u <= (a.value.standSlotRange.min ?? 0) ? t("order.greaterThanMinRule") : !0, s = I(() => [d]), g = I(() => [d]), y = I(() => [d, n]);
28
+ I(() => {
29
+ const m = E.applyPadDigits(5, a.value.padDigit ?? 0);
30
+ return `Preview: ${a.value.prefix}${m}`;
31
+ });
32
+ function x(u) {
33
+ a.value.enabled = u, c("updateDisplayStand", a.value);
34
+ }
35
+ function R(u) {
36
+ u && c("updateDisplayStand", a.value);
37
+ }
38
+ function e(u) {
39
+ u && c("updateDisplayStand", a.value);
40
+ }
41
+ function r(u) {
42
+ c("updateDisplayStand", a.value);
43
+ }
44
+ function F(u) {
45
+ u && c("updateDisplayStand", a.value);
46
+ }
47
+ return (u, m) => {
48
+ const A = k("FmSwitch"), O = k("FmTextField"), N = k("FmStepperField");
49
+ return f(), _("div", null, [
50
+ b(A, {
51
+ modelValue: a.value.enabled,
52
+ "onUpdate:modelValue": [
53
+ m[0] || (m[0] = (v) => a.value.enabled = v),
54
+ x
55
+ ],
56
+ label: l(t)("order.displayStand"),
57
+ "label-placement": "right"
58
+ }, null, 8, ["modelValue", "label"]),
59
+ q(S("div", j, [
60
+ S("span", J, V(l(t)("order.tableServiceSetting")), 1),
61
+ S("div", z, [
62
+ b(O, {
63
+ modelValue: a.value.prefix,
64
+ "onUpdate:modelValue": [
65
+ m[1] || (m[1] = (v) => a.value.prefix = v),
66
+ r
67
+ ],
68
+ label: l(t)("order.prefix"),
69
+ placeholder: l(t)("order.prefix")
70
+ }, null, 8, ["modelValue", "label", "placeholder"])
71
+ ]),
72
+ S("div", G, [
73
+ b(N, {
74
+ class: "w-1/2",
75
+ modelValue: a.value.standSlotRange.min,
76
+ "onUpdate:modelValue": [
77
+ m[2] || (m[2] = (v) => a.value.standSlotRange.min = v),
78
+ R
79
+ ],
80
+ label: l(t)("order.start"),
81
+ labelMark: "required",
82
+ rules: g.value,
83
+ placeholder: l(t)("order.enterANumber")
84
+ }, null, 8, ["modelValue", "label", "rules", "placeholder"]),
85
+ b(N, {
86
+ class: "w-1/2",
87
+ modelValue: a.value.standSlotRange.max,
88
+ "onUpdate:modelValue": [
89
+ m[3] || (m[3] = (v) => a.value.standSlotRange.max = v),
90
+ e
91
+ ],
92
+ label: l(t)("order.end"),
93
+ labelMark: "required",
94
+ rules: y.value,
95
+ placeholder: l(t)("order.enterANumber")
96
+ }, null, 8, ["modelValue", "label", "rules", "placeholder"])
97
+ ]),
98
+ S("div", null, [
99
+ b(N, {
100
+ modelValue: a.value.padDigit,
101
+ "onUpdate:modelValue": [
102
+ m[4] || (m[4] = (v) => a.value.padDigit = v),
103
+ F
104
+ ],
105
+ label: l(t)("order.padDigit"),
106
+ labelMark: "required",
107
+ rules: s.value,
108
+ placeholder: l(t)("order.padDigit")
109
+ }, null, 8, ["modelValue", "label", "rules", "placeholder"])
110
+ ])
111
+ ], 512), [
112
+ [B, a.value.enabled]
113
+ ])
114
+ ]);
115
+ };
116
+ }
117
+ }), Q = /* @__PURE__ */ w({
118
+ __name: "KioskPickAtCounterSection",
119
+ props: {
120
+ enabled: { type: Boolean }
121
+ },
122
+ emits: ["update-pick-up"],
123
+ setup(p, { emit: o }) {
124
+ const { t } = h(), i = p, c = o, a = D(i.enabled), d = (n) => {
125
+ a.value = n, c("update-pick-up", n);
126
+ };
127
+ return (n, s) => {
128
+ const g = k("FmSwitch");
129
+ return f(), _("div", null, [
130
+ b(g, {
131
+ modelValue: a.value,
132
+ "onUpdate:modelValue": [
133
+ s[0] || (s[0] = (y) => a.value = y),
134
+ d
135
+ ],
136
+ label: l(t)("order.pickAtCounter"),
137
+ "label-placement": "right"
138
+ }, null, 8, ["modelValue", "label"])
139
+ ]);
140
+ };
141
+ }
142
+ }), W = { class: "flex flex-col gap-5" }, X = { class: "flex flex-col gap-16" }, Y = { class: "flex flex-col gap-16" }, Z = /* @__PURE__ */ w({
143
+ __name: "KioskDineInSection",
144
+ props: {
145
+ getSetting: { type: Function },
146
+ isApplyLoading: { type: Boolean },
147
+ restaurantId: {}
148
+ },
149
+ emits: ["updateDineIn"],
150
+ setup(p, { emit: o }) {
151
+ const { t } = h();
152
+ function i(s) {
153
+ n.value.pickUp = {
154
+ enabled: s
155
+ }, d("updateDineIn", n.value);
156
+ }
157
+ function c(s) {
158
+ n.value.displayStand = s, d("updateDineIn", n.value);
159
+ }
160
+ const a = p, d = o, n = D($.clone(a.getSetting()));
161
+ return P(() => a.restaurantId, () => {
162
+ n.value = a.getSetting();
163
+ }), (s, g) => {
164
+ const y = k("FmSwitch");
165
+ return f(), _("div", W, [
166
+ S("div", X, [
167
+ b(y, {
168
+ modelValue: n.value.enabled,
169
+ "onUpdate:modelValue": g[0] || (g[0] = (x) => n.value.enabled = x),
170
+ label: l(t)("order.dineIn"),
171
+ "label-placement": "right"
172
+ }, null, 8, ["modelValue", "label"]),
173
+ q(S("div", Y, [
174
+ n.value.pickUp ? (f(), U(Q, {
175
+ key: 0,
176
+ enabled: n.value.pickUp.enabled,
177
+ onUpdatePickUp: i
178
+ }, null, 8, ["enabled"])) : T("", !0),
179
+ n.value.displayStand ? (f(), U(H, {
180
+ key: 1,
181
+ "display-stand": n.value.displayStand,
182
+ onUpdateDisplayStand: c
183
+ }, null, 8, ["display-stand"])) : T("", !0)
184
+ ], 512), [
185
+ [B, n.value.enabled]
186
+ ])
187
+ ])
188
+ ]);
189
+ };
190
+ }
191
+ }), ee = /* @__PURE__ */ w({
192
+ __name: "KioskTakeawaySection",
193
+ props: {
194
+ getSetting: { type: Function },
195
+ isApplyLoading: { type: Boolean },
196
+ restaurantId: {}
197
+ },
198
+ emits: ["updateTakeaway"],
199
+ setup(p, { emit: o }) {
200
+ const { t } = h(), i = p, c = o, a = D($.clone(i.getSetting()));
201
+ function d(n) {
202
+ a.value.enabled = n, c("updateTakeaway", a.value);
203
+ }
204
+ return P(() => i.restaurantId, () => {
205
+ a.value = i.getSetting();
206
+ }), (n, s) => {
207
+ const g = k("FmSwitch");
208
+ return f(), _("div", null, [
209
+ b(g, {
210
+ modelValue: a.value.enabled,
211
+ "onUpdate:modelValue": [
212
+ s[0] || (s[0] = (y) => a.value.enabled = y),
213
+ d
214
+ ],
215
+ label: l(t)("order.takeaway"),
216
+ "label-placement": "right",
217
+ class: "mb-5"
218
+ }, null, 8, ["modelValue", "label"])
219
+ ]);
220
+ };
221
+ }
222
+ }), ae = {
223
+ key: 0,
224
+ class: "flex flex-col gap-32"
225
+ }, te = { class: "flex flex-col gap-2" }, ne = { class: "fm-typo-en-title-sm-600" }, le = { class: "flex flex-col gap-2" }, ie = { class: "fm-typo-en-title-sm-600" }, de = { key: 1 }, pe = /* @__PURE__ */ w({
226
+ __name: "KioskSettingView",
227
+ props: {
228
+ restaurantId: {},
229
+ form: {}
230
+ },
231
+ emits: ["updateKioskOrderSetting"],
232
+ setup(p, { emit: o }) {
233
+ const { t } = h(), i = p, c = K(), a = o, d = D(i.form), n = I(() => {
234
+ const e = d.value;
235
+ if (!e.dineIn.enabled)
236
+ return {
237
+ dineIn: {
238
+ enabled: e.dineIn.enabled,
239
+ sequenceNumber: e.dineIn.sequenceNumber,
240
+ pickUp: e.dineIn.pickUp,
241
+ displayStand: {
242
+ enabled: !1,
243
+ padDigit: e.dineIn.displayStand.padDigit ?? 0,
244
+ standSlotRange: {
245
+ min: e.dineIn.displayStand.standSlotRange.min ?? 0,
246
+ max: e.dineIn.displayStand.standSlotRange.max ?? 10
247
+ },
248
+ prefix: e.dineIn.displayStand.prefix ?? ""
249
+ }
250
+ },
251
+ takeaway: e.takeaway
252
+ };
253
+ if (e.dineIn.enabled && e.dineIn.displayStand.enabled) {
254
+ const r = e.dineIn.displayStand;
255
+ return r.padDigit != null && r.padDigit >= 0 && r.standSlotRange.min && r.standSlotRange.max && r.standSlotRange.min <= r.standSlotRange.max ? {
256
+ dineIn: {
257
+ enabled: e.dineIn.enabled,
258
+ sequenceNumber: e.dineIn.sequenceNumber,
259
+ pickUp: e.dineIn.pickUp,
260
+ displayStand: {
261
+ enabled: r.enabled,
262
+ padDigit: r.padDigit,
263
+ standSlotRange: {
264
+ min: r.standSlotRange.min,
265
+ max: r.standSlotRange.max
266
+ },
267
+ prefix: r.prefix ?? ""
268
+ }
269
+ },
270
+ takeaway: e.takeaway
271
+ } : null;
272
+ }
273
+ return {
274
+ dineIn: {
275
+ enabled: e.dineIn.enabled,
276
+ sequenceNumber: e.dineIn.sequenceNumber,
277
+ pickUp: e.dineIn.pickUp,
278
+ displayStand: {
279
+ enabled: !1,
280
+ padDigit: e.dineIn.displayStand.padDigit ?? 0,
281
+ standSlotRange: {
282
+ min: e.dineIn.displayStand.standSlotRange.min ?? 0,
283
+ max: e.dineIn.displayStand.standSlotRange.max ?? 10
284
+ },
285
+ prefix: e.dineIn.displayStand.prefix ?? ""
286
+ }
287
+ },
288
+ takeaway: e.takeaway
289
+ };
290
+ }), { startAsyncCall: s, isLoading: g } = C();
291
+ async function y(e) {
292
+ d.value.dineIn = e;
293
+ }
294
+ async function x(e) {
295
+ d.value.takeaway = e;
296
+ }
297
+ async function R() {
298
+ if (n.value) {
299
+ const e = n.value;
300
+ s(async () => {
301
+ await a("updateKioskOrderSetting", e);
302
+ });
303
+ } else
304
+ c.open({
305
+ title: t("order.failedToUpdateSetting"),
306
+ type: "error"
307
+ });
308
+ }
309
+ return (e, r) => {
310
+ const F = k("FmButton");
311
+ return d.value ? (f(), _("div", ae, [
312
+ S("div", te, [
313
+ S("span", ne, V(l(t)("order.dineIn")), 1),
314
+ (f(), U(Z, {
315
+ key: "dine-in-" + e.restaurantId,
316
+ "restaurant-id": e.restaurantId,
317
+ "is-apply-loading": l(g),
318
+ "get-setting": () => d.value.dineIn,
319
+ onUpdateDineIn: y
320
+ }, null, 8, ["restaurant-id", "is-apply-loading", "get-setting"]))
321
+ ]),
322
+ S("div", le, [
323
+ S("span", ie, V(l(t)("order.takeawayTitle")), 1),
324
+ (f(), U(ee, {
325
+ key: "takeaway-" + e.restaurantId,
326
+ "restaurant-id": e.restaurantId,
327
+ "is-apply-loading": l(g),
328
+ "get-setting": () => d.value.takeaway,
329
+ onUpdateTakeaway: x
330
+ }, null, 8, ["restaurant-id", "is-apply-loading", "get-setting"]))
331
+ ]),
332
+ b(F, {
333
+ class: "w-1/4 mb-10",
334
+ variant: "primary",
335
+ label: l(t)("order.updateSetting"),
336
+ disabled: !n.value,
337
+ onClick: R
338
+ }, null, 8, ["label", "disabled"])
339
+ ])) : (f(), _("div", de, V(l(t)("order.pleaseSelectRestaurant")), 1));
340
+ };
341
+ }
342
+ });
343
+ export {
344
+ pe as default
345
+ };