@feedmepos/mf-order-setting 0.0.95 → 0.0.96

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 (88) hide show
  1. package/dist/{DisplaySystemView-rCw3DE0u.js → DisplaySystemView-BH8SkCOF.js} +4 -4
  2. package/dist/FoodCourtInvitationsView-3cA0Z-5m.js +383 -0
  3. package/dist/FoodCourtOrderSettingsView-DysrLZJD.js +294 -0
  4. package/dist/FoodCourtOrdersView-CbZqHIXO.js +544 -0
  5. package/dist/FoodCourtStallsView-CTZzPUQ6.js +635 -0
  6. package/dist/FoodCourtStatusView-C71y7ghx.js +113 -0
  7. package/dist/{KioskDevicesView-B4dgvMq_.js → KioskDevicesView-BJpbuSzp.js} +1 -1
  8. package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-B-Oi8ZLq.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-CQFpwn28.js} +7 -6
  9. package/dist/{KioskSettingView-DXx6wQQQ.js → KioskSettingView-CJxhMf7N.js} +3 -3
  10. package/dist/{KioskView-BmSHCl13.js → KioskView-BZsdRID1.js} +6 -6
  11. package/dist/{OrderSettingsView-9NOSAxLf.js → OrderSettingsView-gnyXaJjf.js} +10631 -10601
  12. package/dist/{app-y20uA-tu.js → app-CeEFBB-w.js} +4484 -3672
  13. package/dist/app.js +1 -1
  14. package/dist/dayjs.min-zBHHlxAP.js +285 -0
  15. package/dist/{featureFlag-GHmH1G2d.js → featureFlag-BTY_R78k.js} +1 -1
  16. package/dist/food-court-member-piX3gesl.js +212 -0
  17. package/dist/frontend/mf-order/src/api/food-court/index.d.ts +269 -0
  18. package/dist/frontend/mf-order/src/api/food-court/invitation.d.ts +55 -0
  19. package/dist/frontend/mf-order/src/app.d.ts +676 -0
  20. package/dist/frontend/mf-order/src/main.d.ts +676 -0
  21. package/dist/frontend/mf-order/src/stores/business/index.d.ts +3 -3
  22. package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +6 -0
  23. package/dist/frontend/mf-order/src/utils/constants/route.d.ts +4 -0
  24. package/dist/frontend/mf-order/src/views/food-court/FoodCourtInvitationsView.vue.d.ts +2 -0
  25. package/dist/frontend/mf-order/src/views/food-court/FoodCourtOrdersView.vue.d.ts +2 -0
  26. package/dist/frontend/mf-order/src/views/food-court/FoodCourtStallsView.vue.d.ts +2 -0
  27. package/dist/frontend/mf-order/src/views/food-court/FoodCourtStatusView.vue.d.ts +2 -0
  28. package/dist/frontend/mf-order/src/views/food-court/food-court-member.d.ts +150 -0
  29. package/dist/frontend/mf-order/src/views/food-court/food-court-order.d.ts +66 -0
  30. package/dist/frontend/mf-order/src/views/food-court/invitations/JoinFoodCourtCard.vue.d.ts +13 -0
  31. package/dist/frontend/mf-order/src/views/food-court/invitations/MembershipRowActions.vue.d.ts +11 -0
  32. package/dist/frontend/mf-order/src/views/food-court/orders/FoodCourtOrderSheet.vue.d.ts +16 -0
  33. package/dist/frontend/mf-order/src/views/food-court/stalls/EditStallSheet.vue.d.ts +15 -0
  34. package/dist/frontend/mf-order/src/views/food-court/stalls/GenerateJoinCodeSheet.vue.d.ts +21 -0
  35. package/dist/frontend/mf-order/src/views/food-court/stalls/StallAssignmentFields.vue.d.ts +16 -0
  36. package/dist/frontend/mf-order/src/views/food-court/stalls/StallRowActions.vue.d.ts +11 -0
  37. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/{index-CmdP_QXF.js → index-601eG3_R.js} +1 -1
  39. package/dist/index-BeBZTUcq.js +122 -0
  40. package/dist/index-BtudnkMi.js +1065 -0
  41. package/dist/{index-BlG6mIU4.js → index-CGiWgTn1.js} +38 -37
  42. package/dist/{index-wMygvJpP.js → index-D5nv3ncu.js} +2 -2
  43. package/dist/index-DLDihONy.js +25142 -0
  44. package/dist/order.dto-JM_fmWnQ.js +14842 -0
  45. package/dist/package/entity/food-court/food-court.do.d.ts +1 -1
  46. package/dist/package/entity/food-court/food-court.dto.d.ts +7 -7
  47. package/dist/package/entity/food-court/order-v2.dto.d.ts +4 -4
  48. package/dist/package/entity/order-platform/order-platform.dto.d.ts +190 -92
  49. package/dist/package/entity/order-setting/order-setting.do.d.ts +10 -0
  50. package/dist/package/entity/order-setting/order-setting.dto.d.ts +20 -0
  51. package/dist/package/entity/order-setting/queue/queue.do.d.ts +22 -0
  52. package/dist/package/entity/order-setting/queue/queue.dto.d.ts +7 -0
  53. package/dist/package/entity/queue/queue.do.d.ts +1 -0
  54. package/dist/package/entity/queue/queue.dto.d.ts +8 -8
  55. package/dist/package/entity/restaurant/restaurant.dto.d.ts +20 -0
  56. package/dist/search-BAPEUu1R.js +15 -0
  57. package/dist/useFoodCourtContext-2p5sJMcB.js +16 -0
  58. package/package.json +3 -3
  59. package/src/api/food-court/index.ts +357 -0
  60. package/src/api/food-court/invitation.ts +81 -0
  61. package/src/locales/en-US.json +171 -2
  62. package/src/locales/ja-JP.json +171 -2
  63. package/src/locales/th-TH.json +171 -2
  64. package/src/locales/zh-CN.json +171 -2
  65. package/src/router/routes.ts +44 -0
  66. package/src/utils/constants/route.ts +8 -0
  67. package/src/views/food-court/FoodCourtInvitationsView.vue +187 -0
  68. package/src/views/food-court/FoodCourtOrdersView.vue +263 -0
  69. package/src/views/food-court/FoodCourtStallsView.vue +369 -0
  70. package/src/views/food-court/FoodCourtStatusView.vue +111 -0
  71. package/src/views/food-court/food-court-member.spec.ts +339 -0
  72. package/src/views/food-court/food-court-member.ts +397 -0
  73. package/src/views/food-court/food-court-order.spec.ts +137 -0
  74. package/src/views/food-court/food-court-order.ts +206 -0
  75. package/src/views/food-court/invitations/JoinFoodCourtCard.vue +201 -0
  76. package/src/views/food-court/invitations/MembershipRowActions.vue +19 -0
  77. package/src/views/food-court/orders/FoodCourtOrderSheet.vue +226 -0
  78. package/src/views/food-court/stalls/EditStallSheet.vue +91 -0
  79. package/src/views/food-court/stalls/GenerateJoinCodeSheet.vue +281 -0
  80. package/src/views/food-court/stalls/StallAssignmentFields.vue +36 -0
  81. package/src/views/food-court/stalls/StallRowActions.vue +31 -0
  82. package/src/views/order-settings/OrderSettingsView.vue +2 -4
  83. package/src/views/order-settings/dine-in/DineInSetting.vue +1 -4
  84. package/src/views/order-settings/queue/QueueSetting.vue +27 -0
  85. package/src/views/order-settings/reservation/ReservationSetting.vue +8 -0
  86. package/dist/FoodCourtOrderSettingsView-DUQXCKzB.js +0 -323
  87. package/dist/index-CUI1lL9F.js +0 -1347
  88. package/dist/order.dto-CyHtvyly.js +0 -38829
@@ -1,323 +0,0 @@
1
- import { computed as g, defineComponent as V, ref as F, onMounted as G, resolveComponent as u, unref as o, openBlock as i, createElementBlock as b, createElementVNode as l, toDisplayString as c, createVNode as d, createBlock as $, createCommentVNode as O, withCtx as A, Fragment as z } from "vue";
2
- import "@feedmepos/ui-library";
3
- import { useCoreStore as te, useI18n as P } from "@feedmepos/mf-common";
4
- import { useRoute as re } from "vue-router";
5
- import { u as H } from "./index-Cmb4sEqq.js";
6
- import { u as W } from "./snackbar-DZQ0_reQ.js";
7
- import { g as k, b as ne } from "./index-CmdP_QXF.js";
8
- function le() {
9
- const t = te(), n = re();
10
- return g(() => {
11
- var m, p, f;
12
- if (((m = t.currentContextType) == null ? void 0 : m.value) === "foodCourt")
13
- return ((f = (p = t.currentFoodCourt) == null ? void 0 : p.value) == null ? void 0 : f._id) ?? null;
14
- const e = n.query.foodCourtId;
15
- return typeof e == "string" && /^[0-9a-f]{24}$/i.test(e) ? e : null;
16
- });
17
- }
18
- const N = (t) => ne(`/food-court-v2/${t}`), R = {
19
- async getDineIn(t) {
20
- return k(await N(t).get("/dine-in"));
21
- },
22
- async updateDineIn(t, n) {
23
- return k(
24
- await N(t).put("/dine-in", n)
25
- );
26
- },
27
- async getOrderNumber(t) {
28
- return k(
29
- await N(t).get("/order-number")
30
- );
31
- },
32
- async updateOrderNumber(t, n) {
33
- return k(
34
- await N(t).put("/order-number", n)
35
- );
36
- }
37
- }, ae = { key: 0 }, se = { class: "p-[1.5rem] flex flex-col gap-5 m-5 w-2/3" }, ue = { class: "flex-grow fm-typo-en-title-sm-600" }, de = { class: "flex-grow fm-typo-en-title-sm-600 mt-4" }, ie = { class: "flex flex-col gap-2 fm-typo-en-body-md-400" }, ce = { class: "text-fm-color-typo-secondary" }, me = { class: "text-fm-color-typo-secondary" }, pe = { class: "fm-corner-radius-lg flex flex-col gap-5 m-5" }, fe = {
38
- key: 2,
39
- class: "p-[1.5rem] m-5 flex flex-col gap-3 items-start"
40
- }, ve = { class: "fm-typo-en-body-md-400" }, _e = /* @__PURE__ */ V({
41
- __name: "FoodCourtDineInSetting",
42
- props: {
43
- foodCourtId: {}
44
- },
45
- setup(t) {
46
- const n = t, { t: e } = P(), { showSuccess: m } = W(), { startAsyncCallWithErr: p, isLoading: f } = H(), a = F(), r = F(!1);
47
- async function v() {
48
- r.value = !1;
49
- try {
50
- a.value = await p(
51
- () => R.getDineIn(n.foodCourtId)
52
- );
53
- } catch {
54
- r.value = !0;
55
- }
56
- }
57
- G(v);
58
- async function h() {
59
- if (!a.value) return;
60
- const y = { qrOrderingEnabled: a.value.qrOrderingEnabled };
61
- a.value = await p(
62
- () => R.updateDineIn(n.foodCourtId, y)
63
- ), m(e("order.foodCourt.saved"));
64
- }
65
- return (y, C) => {
66
- const w = u("FmSwitch"), I = u("FmButton"), D = u("FmCircularProgress");
67
- return !o(f) && a.value ? (i(), b("div", ae, [
68
- l("div", se, [
69
- l("div", ue, c(o(e)("order.generalSetting")), 1),
70
- d(w, {
71
- modelValue: a.value.qrOrderingEnabled,
72
- "onUpdate:modelValue": C[0] || (C[0] = (S) => a.value.qrOrderingEnabled = S),
73
- value: "qrOrderingEnabled",
74
- label: o(e)("order.foodCourt.qrOrdering"),
75
- sublabel: o(e)("order.foodCourt.qrOrderingSublabel"),
76
- "label-placement": "right"
77
- }, null, 8, ["modelValue", "label", "sublabel"]),
78
- l("div", de, c(o(e)("order.acceptedPayment")), 1),
79
- l("div", ie, [
80
- l("span", null, c(o(e)("order.foodCourt.acceptedPaymentOnline")), 1),
81
- l("span", ce, c(o(e)("order.foodCourt.acceptedPaymentNotAccepted")), 1),
82
- l("span", me, c(o(e)("order.foodCourt.acceptedPaymentSource")), 1)
83
- ])
84
- ]),
85
- l("div", pe, [
86
- d(I, {
87
- variant: "primary",
88
- label: o(e)("order.saveSetting"),
89
- class: "mr-auto",
90
- onClick: h
91
- }, null, 8, ["label"])
92
- ])
93
- ])) : o(f) ? (i(), $(D, {
94
- key: 1,
95
- size: "xxl"
96
- })) : r.value ? (i(), b("div", fe, [
97
- l("span", ve, c(o(e)("order.foodCourt.loadFailed")), 1),
98
- d(I, {
99
- variant: "secondary",
100
- label: o(e)("order.foodCourt.retry"),
101
- onClick: v
102
- }, null, 8, ["label"])
103
- ])) : O("", !0);
104
- };
105
- }
106
- }), Q = "FC-", L = 3, T = { min: 2, max: 6 };
107
- function E(t) {
108
- return typeof t == "number" && Number.isInteger(t) && t >= T.min && t <= T.max;
109
- }
110
- function ge(t) {
111
- const n = (e) => `${Q}${String(e).padStart(t, "0")}`;
112
- return { start: n(1), end: n(Math.pow(10, t) - 1) };
113
- }
114
- function B(t) {
115
- return Math.pow(10, t) - 1;
116
- }
117
- function be(t, n) {
118
- return typeof t == "number" && Number.isInteger(t) && t >= 0 && t <= B(n);
119
- }
120
- function ye(t, n) {
121
- const e = t + 1 > B(n) ? 1 : t + 1;
122
- return `${Q}${String(e).padStart(n, "0")}`;
123
- }
124
- const Ce = { key: 0 }, xe = { class: "p-[1.5rem] flex flex-col gap-5 m-5 mr-8 w-full max-w-4xl" }, Fe = { class: "flex-grow fm-typo-en-title-sm-600" }, he = { class: "mr-9 grid grid-cols-1 md:grid-cols-2 gap-5" }, we = { class: "min-w-0" }, Ie = { class: "bg-gray-50 p-3 rounded-lg border" }, Se = { class: "flex items-center gap-2" }, $e = { class: "mr-9 grid grid-cols-1 md:grid-cols-2 gap-5" }, ke = { class: "min-w-0" }, Ne = { class: "mt-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Oe = { class: "mt-1 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Re = { class: "fm-corner-radius-lg flex flex-col gap-5 m-5" }, Te = {
125
- key: 2,
126
- class: "p-[1.5rem] m-5 flex flex-col gap-3 items-start"
127
- }, De = { class: "fm-typo-en-body-md-400" }, Ee = /* @__PURE__ */ V({
128
- __name: "FoodCourtGeneralSetting",
129
- props: {
130
- foodCourtId: {}
131
- },
132
- setup(t) {
133
- const n = t, { t: e } = P(), { showSuccess: m, showError: p } = W(), { startAsyncCallWithErr: f, isLoading: a } = H(), r = F(), v = g(
134
- () => {
135
- var s;
136
- return E((s = r.value) == null ? void 0 : s.digit) ? r.value.digit : L;
137
- }
138
- ), h = g(() => ge(v.value)), y = F(null), C = g(() => {
139
- var s;
140
- return (((s = r.value) == null ? void 0 : s.current) ?? null) !== y.value;
141
- }), w = g(() => {
142
- var s;
143
- return be((s = r.value) == null ? void 0 : s.current, v.value);
144
- }), I = g(
145
- () => e("order.foodCourt.currentNumberRule", { max: B(v.value) })
146
- ), D = g(
147
- () => ye(w.value ? r.value.current : y.value ?? 0, v.value)
148
- ), S = F(!1);
149
- async function U() {
150
- S.value = !1;
151
- try {
152
- r.value = await f(
153
- () => R.getOrderNumber(n.foodCourtId)
154
- ), y.value = r.value.current ?? null;
155
- } catch {
156
- S.value = !0;
157
- }
158
- }
159
- G(U);
160
- function X(s) {
161
- r.value && (r.value.resetTime = s ? "00:00" : null);
162
- }
163
- async function j() {
164
- if (!r.value) return;
165
- if (!E(r.value.digit)) {
166
- p(e("order.foodCourt.numberOfDigitsRule"));
167
- return;
168
- }
169
- if (C.value && !w.value) {
170
- p(I.value);
171
- return;
172
- }
173
- const s = {
174
- digit: r.value.digit,
175
- resetTime: r.value.resetTime ?? null,
176
- ...C.value ? { current: r.value.current } : {}
177
- };
178
- r.value = await f(
179
- () => R.updateOrderNumber(n.foodCourtId, s)
180
- ), y.value = r.value.current ?? null, m(e("order.foodCourt.saved"));
181
- }
182
- return (s, x) => {
183
- const J = u("FmSwitch"), K = u("FmIcon"), Y = u("FmTooltip"), Z = u("FmTimePicker"), q = u("FmStepperField"), ee = u("FmCard"), M = u("FmButton"), oe = u("FmCircularProgress");
184
- return !o(a) && r.value ? (i(), b("div", Ce, [
185
- l("div", xe, [
186
- l("div", Fe, c(o(e)("order.orderNumberSettings")), 1),
187
- l("div", he, [
188
- l("div", we, [
189
- l("div", Ie, [
190
- l("div", Se, [
191
- d(J, {
192
- "model-value": !!r.value.resetTime,
193
- label: o(e)("order.autoResetOrderNumber"),
194
- "onUpdate:modelValue": X,
195
- "label-placement": "right"
196
- }, null, 8, ["model-value", "label"]),
197
- d(Y, {
198
- content: o(e)("order.foodCourt.autoResetTooltip"),
199
- zIndex: 1e3
200
- }, {
201
- default: A(() => [
202
- d(K, {
203
- name: "info",
204
- size: "sm",
205
- class: "cursor-help text-fm-color-neutral-gray-400"
206
- })
207
- ]),
208
- _: 1
209
- }, 8, ["content"])
210
- ]),
211
- r.value.resetTime ? (i(), $(Z, {
212
- key: 0,
213
- "model-value": r.value.resetTime,
214
- "onUpdate:modelValue": x[0] || (x[0] = (_) => _ && (r.value.resetTime = _)),
215
- class: "mt-3"
216
- }, null, 8, ["model-value"])) : O("", !0)
217
- ])
218
- ])
219
- ]),
220
- l("div", $e, [
221
- l("div", ke, [
222
- d(ee, {
223
- variant: "outlined",
224
- class: "p-3"
225
- }, {
226
- default: A(() => [
227
- d(q, {
228
- "model-value": r.value.digit,
229
- label: o(e)("order.foodCourt.numberOfDigits"),
230
- "onUpdate:modelValue": x[1] || (x[1] = (_) => r.value.digit = _),
231
- "show-steppers": !1,
232
- placeholder: String(o(L)),
233
- rules: [() => {
234
- var _;
235
- return o(E)((_ = r.value) == null ? void 0 : _.digit) || o(e)("order.foodCourt.numberOfDigitsRule");
236
- }],
237
- min: o(T).min,
238
- max: o(T).max
239
- }, null, 8, ["model-value", "label", "placeholder", "rules", "min", "max"]),
240
- d(q, {
241
- "model-value": r.value.current ?? null,
242
- label: o(e)("order.currentNumber"),
243
- "onUpdate:modelValue": x[2] || (x[2] = (_) => r.value.current = _),
244
- "show-steppers": !1,
245
- placeholder: "0",
246
- rules: [() => !C.value || w.value || I.value],
247
- min: 0,
248
- class: "mt-3"
249
- }, null, 8, ["model-value", "label", "rules"]),
250
- l("div", Ne, c(o(e)("order.foodCourt.numberPreview", h.value)), 1),
251
- l("div", Oe, c(o(e)("order.foodCourt.nextNumber", { number: D.value })), 1)
252
- ]),
253
- _: 1
254
- })
255
- ])
256
- ])
257
- ]),
258
- l("div", Re, [
259
- d(M, {
260
- variant: "primary",
261
- label: o(e)("order.saveSetting"),
262
- class: "mr-auto",
263
- onClick: j
264
- }, null, 8, ["label"])
265
- ])
266
- ])) : o(a) ? (i(), $(oe, {
267
- key: 1,
268
- size: "xxl"
269
- })) : S.value ? (i(), b("div", Te, [
270
- l("span", De, c(o(e)("order.foodCourt.loadFailed")), 1),
271
- d(M, {
272
- variant: "secondary",
273
- label: o(e)("order.foodCourt.retry"),
274
- onClick: U
275
- }, null, 8, ["label"])
276
- ])) : O("", !0);
277
- };
278
- }
279
- }), Ve = { class: "py-[1.5rem]" }, Pe = {
280
- key: 0,
281
- class: "flex px-[1.5rem] items-center"
282
- }, Be = {
283
- key: 1,
284
- class: "px-[1.5rem] fm-typo-en-body-md-400 text-fm-color-typo-secondary"
285
- }, He = /* @__PURE__ */ V({
286
- __name: "FoodCourtOrderSettingsView",
287
- setup(t) {
288
- const { t: n } = P(), e = le(), m = F("dinein"), p = g(() => [
289
- { label: n("order.dineIn"), value: "dinein" },
290
- { label: n("order.general"), value: "general" }
291
- ]);
292
- return (f, a) => {
293
- const r = u("FmPageHead"), v = u("FmTabs");
294
- return i(), b(z, null, [
295
- l("div", Ve, [
296
- d(r, {
297
- title: o(n)("order.orderSetting"),
298
- "line-height": 1.7
299
- }, null, 8, ["title"]),
300
- o(e) ? (i(), b("div", Pe, [
301
- d(v, {
302
- "model-value": m.value,
303
- "onUpdate:modelValue": a[0] || (a[0] = (h) => m.value = h),
304
- items: p.value
305
- }, null, 8, ["model-value", "items"])
306
- ])) : O("", !0)
307
- ]),
308
- o(e) ? (i(), b(z, { key: 0 }, [
309
- m.value === "dinein" ? (i(), $(_e, {
310
- key: `dinein-${o(e)}`,
311
- "food-court-id": o(e)
312
- }, null, 8, ["food-court-id"])) : (i(), $(Ee, {
313
- key: `general-${o(e)}`,
314
- "food-court-id": o(e)
315
- }, null, 8, ["food-court-id"]))
316
- ], 64)) : (i(), b("div", Be, c(o(n)("order.foodCourt.noFoodCourt")), 1))
317
- ], 64);
318
- };
319
- }
320
- });
321
- export {
322
- He as default
323
- };