@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.
- package/dist/{DisplaySystemView-jnt6letY.js → DisplaySystemView-BBiZqcWq.js} +1497 -1468
- package/dist/{FoodCourtInvitationsView-DoynqFWB.js → FoodCourtInvitationsView-DwOkVs9m.js} +4 -4
- package/dist/{FoodCourtOrderSettingsView-DYZLhTHy.js → FoodCourtOrderSettingsView-C9Ag5Bsg.js} +1 -1
- package/dist/FoodCourtOrdersView-y4EwK3sn.js +1173 -0
- package/dist/{FoodCourtStallsView-CRMTt5BB.js → FoodCourtStallsView-Bi8H-yR7.js} +2 -2
- package/dist/{FoodCourtStatusView-C-b-eI-8.js → FoodCourtStatusView-jugAzTKg.js} +1 -1
- package/dist/KioskDevicesView-CYiew4X5.js +4 -0
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-BCvbeo7R.js +1497 -0
- package/dist/KioskSettingView-AKBiij9a.js +1124 -0
- package/dist/KioskView-zKB6mC8I.js +765 -0
- package/dist/{OrderSettingsView-BBCnekaj.js → OrderSettingsView-CoV_yX3m.js} +22064 -21635
- 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
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/{app-Dvk30CIa.js → app-CmuI6uSl.js} +3589 -2902
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DUFHhM7O.js → dayjs.min-B3MssMma.js} +1 -1
- package/dist/{featureFlag-BvcirzHS.js → featureFlag-CWvkPOBY.js} +123 -130
- package/dist/frontend/mf-order/src/api/food-court/index.d.ts +51 -0
- package/dist/frontend/mf-order/src/api/kiosk/index.d.ts +4 -0
- package/dist/frontend/mf-order/src/api/payment/index.d.ts +8 -0
- package/dist/frontend/mf-order/src/api/queue/index.d.ts +13 -0
- package/dist/frontend/mf-order/src/api/restaurant-setting/index.d.ts +9 -1
- package/dist/frontend/mf-order/src/app.d.ts +687 -0
- package/dist/frontend/mf-order/src/main.d.ts +687 -0
- package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +5 -0
- package/dist/frontend/mf-order/src/modules/kiosk/interface.d.ts +4 -0
- package/dist/frontend/mf-order/src/modules/kiosk/license.d.ts +92 -0
- package/dist/frontend/mf-order/src/modules/kiosk/outletLoad.d.ts +15 -0
- package/dist/frontend/mf-order/src/modules/kiosk/settingsSections.d.ts +24 -0
- package/dist/frontend/mf-order/src/modules/kiosk/useKioskSettings.d.ts +29 -0
- package/dist/frontend/mf-order/src/modules/payment/paymentDevice.d.ts +58 -0
- package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +67 -1
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +19 -10
- package/dist/frontend/mf-order/src/stores/payment/index.d.ts +59 -1
- package/dist/frontend/mf-order/src/views/food-court/food-court-export.d.ts +38 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDeviceCard.vue.d.ts +3 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDevicesView.vue.d.ts +7 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicenseSummary.vue.d.ts +7 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskLicensesView.vue.d.ts +6 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskOtpDialog.vue.d.ts +3 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskPaymentDeviceCard.vue.d.ts +17 -0
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskSettingView.vue.d.ts +5 -2
- package/dist/frontend/mf-order/src/views/order-settings/pickup/PickUpSettingDialogContent.vue.d.ts +0 -9
- package/dist/frontend/mf-order/src/views/order-settings/pos-status/PosOrderingStatus.vue.d.ts +17 -0
- package/dist/frontend/mf-order/src/views/order-settings/pos-status/pos-status.d.ts +44 -0
- package/dist/frontend/mf-order/src/views/order-settings/queue/called-message.d.ts +1 -0
- package/dist/frontend/mf-order/src/views/order-settings/queue/phone-join-mode.d.ts +25 -0
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-C4n5H7t3.js → index-BQa8AudZ.js} +3 -3
- package/dist/index-CMOvrim4.js +147 -0
- package/dist/{index-CW4VlFWz.js → index-D5qh2_4b.js} +1 -1
- package/dist/{index-C5n6lil6.js → index-Dup6kWLX.js} +6 -6
- package/dist/{index-CGxCWKHB.js → index-wuFIsXHT.js} +188 -179
- package/dist/{order.dto-Cb_gh3iB.js → order.dto-BD9raQG5.js} +2782 -2735
- package/dist/package/entity/display/blocks.d.ts +12 -2
- package/dist/package/entity/marketing/marketing.dto.d.ts +18 -18
- package/dist/package/entity/order-platform/external/reconciliation/external-reconciliation.do.d.ts +24 -24
- package/dist/package/entity/order-platform/menu.dto.d.ts +20 -20
- package/dist/package/entity/order-setting/order-setting.do.d.ts +10 -0
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +26 -0
- package/dist/package/entity/order-setting/queue/queue.do.d.ts +23 -0
- package/dist/package/entity/order-setting/queue/queue.dto.d.ts +14 -0
- package/dist/package/entity/queue/queue.do.d.ts +153 -0
- package/dist/package/entity/queue/queue.dto.d.ts +221 -2
- package/dist/package/entity/queue/queue.enum.d.ts +5 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +20 -0
- package/dist/style.css +1 -1
- package/dist/{index-ILnighyU.js → useInternalUser-CHtaur9A.js} +93 -81
- package/package.json +2 -1
- package/src/api/food-court/index.ts +63 -0
- package/src/api/kiosk/index.ts +8 -0
- package/src/api/payment/index.ts +18 -1
- package/src/api/queue/index.ts +39 -0
- package/src/api/restaurant-setting/index.ts +14 -0
- package/src/locales/en-US.json +197 -26
- package/src/locales/ja-JP.json +193 -23
- package/src/locales/th-TH.json +193 -21
- package/src/locales/zh-CN.json +197 -23
- package/src/modules/display-system/interface.spec.ts +26 -1
- package/src/modules/display-system/interface.ts +20 -0
- package/src/modules/kiosk/interface.ts +4 -0
- package/src/modules/kiosk/license.spec.ts +167 -0
- package/src/modules/kiosk/license.ts +175 -0
- package/src/modules/kiosk/outletLoad.spec.ts +25 -0
- package/src/modules/kiosk/outletLoad.ts +19 -0
- package/src/modules/kiosk/settingsSections.spec.ts +85 -0
- package/src/modules/kiosk/settingsSections.ts +82 -0
- package/src/modules/kiosk/useKioskSettings.spec.ts +157 -0
- package/src/modules/kiosk/useKioskSettings.ts +61 -0
- package/src/modules/payment/paymentDevice.spec.ts +175 -0
- package/src/modules/payment/paymentDevice.ts +156 -0
- package/src/stores/kiosk/index.ts +16 -1
- package/src/stores/kiosk/mapper.ts +2 -0
- package/src/stores/order-setting/index.spec.ts +83 -0
- package/src/stores/order-setting/index.ts +49 -27
- package/src/stores/payment/index.spec.ts +86 -0
- package/src/stores/payment/index.ts +48 -2
- package/src/views/display-system/DisplayInspector.vue +17 -8
- package/src/views/display-system/DisplayTemplateEditor.vue +3 -1
- package/src/views/food-court/FoodCourtOrdersView.vue +46 -1
- package/src/views/food-court/food-court-export.spec.ts +151 -0
- package/src/views/food-court/food-court-export.ts +283 -0
- package/src/views/kiosk/KioskStatePanel.vue +2 -2
- package/src/views/kiosk/KioskView.vue +219 -82
- package/src/views/kiosk/devices/KioskDeviceCard.vue +148 -23
- package/src/views/kiosk/devices/KioskDevicesView.vue +48 -10
- package/src/views/kiosk/devices/KioskLicenseSummary.vue +79 -0
- package/src/views/kiosk/devices/KioskLicensesView.vue +152 -0
- package/src/views/kiosk/devices/KioskOtpDialog.vue +41 -1
- package/src/views/kiosk/devices/KioskPaymentDeviceCard.spec.ts +97 -0
- package/src/views/kiosk/devices/KioskPaymentDeviceCard.vue +221 -0
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +1 -1
- package/src/views/kiosk/settings/KioskSettingView.vue +702 -419
- package/src/views/order-settings/delivery/DeliverySetting.vue +4 -0
- package/src/views/order-settings/dine-in/DineInSetting.vue +4 -0
- package/src/views/order-settings/pickup/PickUpSetting.vue +4 -4
- package/src/views/order-settings/pickup/PickUpSettingDialogContent.vue +0 -23
- package/src/views/order-settings/pos-status/PosOrderingStatus.spec.ts +207 -0
- package/src/views/order-settings/pos-status/PosOrderingStatus.vue +209 -0
- package/src/views/order-settings/pos-status/pos-status.spec.ts +103 -0
- package/src/views/order-settings/pos-status/pos-status.ts +86 -0
- package/src/views/order-settings/queue/QueueSetting.source.spec.ts +43 -0
- package/src/views/order-settings/queue/QueueSetting.vue +289 -15
- package/src/views/order-settings/queue/called-message.spec.ts +29 -1
- package/src/views/order-settings/queue/called-message.ts +18 -0
- package/src/views/order-settings/queue/phone-join-mode.spec.ts +90 -0
- package/src/views/order-settings/queue/phone-join-mode.ts +49 -0
- package/dist/FoodCourtOrdersView-CAPOycT3.js +0 -544
- package/dist/KioskDevicesView-B0U9JxRl.js +0 -4
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-V3ai4FVI.js +0 -937
- package/dist/KioskSettingView-rdom_aS8.js +0 -880
- package/dist/KioskView-DOON9zR6.js +0 -516
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskDisplayStandSection.vue.d.ts +0 -10
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskInstructionSection.vue.d.ts +0 -15
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPickAtCounterSection.vue.d.ts +0 -10
- package/dist/index-CaHG3M7C.js +0 -135
- package/src/views/kiosk/settings/KioskDisplayStandSection.vue +0 -189
- package/src/views/kiosk/settings/KioskInstructionSection.vue +0 -40
- package/src/views/kiosk/settings/KioskPickAtCounterSection.vue +0 -68
|
@@ -1,516 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Q, openBlock as C, createElementBlock as z, createElementVNode as f, toDisplayString as A, unref as i, ref as v, defineAsyncComponent as ce, computed as T, onMounted as re, watch as oe, resolveComponent as I, createVNode as U, withCtx as se, createBlock as L, createCommentVNode as E } from "vue";
|
|
2
|
-
import { u as pe, a as me, _ as de } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-V3ai4FVI.js";
|
|
3
|
-
import { useDialog as ie, useSnackbar as fe } from "@feedmepos/ui-library";
|
|
4
|
-
import { useI18n as J, useCoreStore as ye } from "@feedmepos/mf-common";
|
|
5
|
-
import { S as j } from "./index-C4n5H7t3.js";
|
|
6
|
-
import { defineStore as ve } from "pinia";
|
|
7
|
-
import { O as F } from "./index-C5n6lil6.js";
|
|
8
|
-
import { F as be, a as he } from "./order.dto-Cb_gh3iB.js";
|
|
9
|
-
import { u as _e } from "./app-Dvk30CIa.js";
|
|
10
|
-
const Ce = { class: "flex flex-col gap-5 pb-6" }, we = { class: "fm-typo-en-body-md-400 block" }, Pe = { class: "fm-typo-en-title-md-600" }, Ie = /* @__PURE__ */ Q({
|
|
11
|
-
__name: "KioskOtpDialog",
|
|
12
|
-
props: {
|
|
13
|
-
otp: {}
|
|
14
|
-
},
|
|
15
|
-
setup(e) {
|
|
16
|
-
const { t: a } = J();
|
|
17
|
-
return (n, u) => (C(), z("div", Ce, [
|
|
18
|
-
f("span", we, A(i(a)("order.bindDeviceMessage")), 1),
|
|
19
|
-
f("div", Pe, A(e.otp), 1)
|
|
20
|
-
]));
|
|
21
|
-
}
|
|
22
|
-
}), Ae = "KIOSK_LICENSE_QUOTA_EXHAUSTED";
|
|
23
|
-
function xe(e) {
|
|
24
|
-
return e ? e.status === 403 ? "order.bindDevicePermissionDenied" : e.code === Ae || /no quota available/i.test(e.message ?? "") ? "order.bindDeviceNoQuota" : e.status === void 0 ? "order.bindDeviceNetworkError" : "order.bindDeviceFailed" : "order.bindDeviceFailed";
|
|
25
|
-
}
|
|
26
|
-
const Y = {
|
|
27
|
-
enabled: !1,
|
|
28
|
-
prefix: null,
|
|
29
|
-
padDigit: 0,
|
|
30
|
-
standSlotRange: {
|
|
31
|
-
min: 1,
|
|
32
|
-
max: 10
|
|
33
|
-
},
|
|
34
|
-
enablePaxDialog: !1,
|
|
35
|
-
submitOrderInstruction: {
|
|
36
|
-
payAtCounter: null,
|
|
37
|
-
paid: null
|
|
38
|
-
}
|
|
39
|
-
}, Re = {
|
|
40
|
-
enabled: !1,
|
|
41
|
-
submitOrderInstruction: {
|
|
42
|
-
payAtCounter: null,
|
|
43
|
-
paid: null
|
|
44
|
-
}
|
|
45
|
-
}, Z = {
|
|
46
|
-
enabled: !1,
|
|
47
|
-
submitOrderInstruction: {
|
|
48
|
-
payAtCounter: null,
|
|
49
|
-
paid: null
|
|
50
|
-
},
|
|
51
|
-
enablePaxDialog: !1
|
|
52
|
-
}, Ke = {
|
|
53
|
-
dineIn: {
|
|
54
|
-
enabled: !1,
|
|
55
|
-
pickUp: Z,
|
|
56
|
-
sequenceNumber: be.parse({}),
|
|
57
|
-
displayStand: Y
|
|
58
|
-
},
|
|
59
|
-
takeaway: Re,
|
|
60
|
-
paymentSetting: {
|
|
61
|
-
paymentTypes: [],
|
|
62
|
-
offlinePaymentTypes: [],
|
|
63
|
-
ePaymentTypes: {
|
|
64
|
-
terminal: !1,
|
|
65
|
-
card: {
|
|
66
|
-
terminal: !1,
|
|
67
|
-
nfc: !1
|
|
68
|
-
},
|
|
69
|
-
eWallet: {
|
|
70
|
-
terminalQrPay: !1,
|
|
71
|
-
terminalScanPay: !1,
|
|
72
|
-
qrPay: !1,
|
|
73
|
-
scanPay: !1
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
menuItem: {
|
|
78
|
-
showAllOnly: !1
|
|
79
|
-
},
|
|
80
|
-
coverImageLandscape: null,
|
|
81
|
-
coverImagePortrait: null,
|
|
82
|
-
otaChannel: "",
|
|
83
|
-
autoSendKitchen: null,
|
|
84
|
-
autoCloseBill: null,
|
|
85
|
-
printReceiptAfterClose: null,
|
|
86
|
-
allowReject: null,
|
|
87
|
-
languages: null,
|
|
88
|
-
minWeighGrams: null,
|
|
89
|
-
shareNumber: !1
|
|
90
|
-
}, N = {
|
|
91
|
-
payAtCounter: null,
|
|
92
|
-
paid: null
|
|
93
|
-
}, Te = (e) => {
|
|
94
|
-
var a, n;
|
|
95
|
-
return {
|
|
96
|
-
kiosk: Ue(e.kioskSettings, (a = e.sequenceSettings) == null ? void 0 : a.kioskDineIn, (n = e.sequenceSettings) == null ? void 0 : n.kioskShareNumber)
|
|
97
|
-
};
|
|
98
|
-
}, Ue = (e, a, n) => {
|
|
99
|
-
var u, t, l, r, o, p, m, d, w, b, y, h;
|
|
100
|
-
return {
|
|
101
|
-
dineIn: Ee(
|
|
102
|
-
a ?? {
|
|
103
|
-
current: 0,
|
|
104
|
-
prefix: "#K"
|
|
105
|
-
},
|
|
106
|
-
(e == null ? void 0 : e.dineIn) ?? void 0
|
|
107
|
-
),
|
|
108
|
-
takeaway: {
|
|
109
|
-
enabled: (e == null ? void 0 : e.canTakeaway) ?? !1,
|
|
110
|
-
submitOrderInstruction: (u = e == null ? void 0 : e.takeaway) != null && u.submitOrderInstruction ? {
|
|
111
|
-
payAtCounter: ((r = (l = (t = e == null ? void 0 : e.takeaway) == null ? void 0 : t.submitOrderInstruction) == null ? void 0 : l.payAtCounter) == null ? void 0 : r.en) ?? null,
|
|
112
|
-
paid: ((m = (p = (o = e == null ? void 0 : e.takeaway) == null ? void 0 : o.submitOrderInstruction) == null ? void 0 : p.paid) == null ? void 0 : m.en) ?? null
|
|
113
|
-
} : N
|
|
114
|
-
},
|
|
115
|
-
paymentSetting: {
|
|
116
|
-
paymentTypes: ((d = e == null ? void 0 : e.paymentSetting) == null ? void 0 : d.paymentTypes) ?? [],
|
|
117
|
-
offlinePaymentTypes: ((w = e == null ? void 0 : e.paymentSetting) == null ? void 0 : w.offlinePaymentTypes) ?? [],
|
|
118
|
-
ePaymentTypes: ((b = e == null ? void 0 : e.paymentSetting) == null ? void 0 : b.ePaymentTypes) ?? he.parse({
|
|
119
|
-
card: {
|
|
120
|
-
terminal: !1,
|
|
121
|
-
nfc: !1
|
|
122
|
-
},
|
|
123
|
-
eWallet: {
|
|
124
|
-
qrPay: !1,
|
|
125
|
-
scanPay: !1
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
},
|
|
129
|
-
menuItem: {
|
|
130
|
-
showAllOnly: ((y = e == null ? void 0 : e.menuItem) == null ? void 0 : y.showAllOnly) ?? !1
|
|
131
|
-
},
|
|
132
|
-
otaChannel: (e == null ? void 0 : e.otaChannel) ?? "",
|
|
133
|
-
coverImageLandscape: (e == null ? void 0 : e.coverImageLandscape) ?? null,
|
|
134
|
-
coverImagePortrait: (e == null ? void 0 : e.coverImagePortrait) ?? null,
|
|
135
|
-
// The cover-image editor works on one list per orientation and writes both
|
|
136
|
-
// this and coverImage* through modules/order-setting/kiosk/coverCarousel.
|
|
137
|
-
// It still has to be read back explicitly: the write side rebuilds
|
|
138
|
-
// kioskSettings field by field and the backend $sets the whole
|
|
139
|
-
// subdocument, so anything not carried here is deleted on the next
|
|
140
|
-
// unrelated save.
|
|
141
|
-
coverCarousel: e == null ? void 0 : e.coverCarousel,
|
|
142
|
-
// Preserve "unset" as null — collapsing to a boolean here is what let an
|
|
143
|
-
// unrelated save overwrite the inherited dineInSettings value.
|
|
144
|
-
autoSendKitchen: (e == null ? void 0 : e.autoSendKitchen) ?? null,
|
|
145
|
-
autoCloseBill: (e == null ? void 0 : e.autoCloseBill) ?? null,
|
|
146
|
-
printReceiptAfterClose: (e == null ? void 0 : e.printReceiptAfterClose) ?? null,
|
|
147
|
-
// Read back purely so the write side can hand it straight back. Nothing in
|
|
148
|
-
// the form touches it; dropping it here deletes it on the next save.
|
|
149
|
-
allowReject: (e == null ? void 0 : e.allowReject) ?? null,
|
|
150
|
-
// Stored [] means the same thing as unset ("all languages"), so collapse it
|
|
151
|
-
// to null here — the form only ever has to reason about null vs a real set.
|
|
152
|
-
languages: (h = e == null ? void 0 : e.languages) != null && h.length ? [...e.languages] : null,
|
|
153
|
-
// KDI-5138. Read back so a save of any other kiosk field keeps it.
|
|
154
|
-
minWeighGrams: (e == null ? void 0 : e.minWeighGrams) ?? null,
|
|
155
|
-
shareNumber: n === !0
|
|
156
|
-
};
|
|
157
|
-
}, G = "#K", Le = (e, a) => {
|
|
158
|
-
var t;
|
|
159
|
-
const n = { ...a ?? {} }, u = ((t = e.dineIn.sequenceNumber.prefix) == null ? void 0 : t.trim()) || G;
|
|
160
|
-
return (a != null && a.kioskDineIn || u !== G) && (n.kioskDineIn = {
|
|
161
|
-
...(a == null ? void 0 : a.kioskDineIn) ?? { current: 0 },
|
|
162
|
-
prefix: u
|
|
163
|
-
}), (e.shareNumber || (a == null ? void 0 : a.kioskShareNumber) != null) && (n.kioskShareNumber = e.shareNumber), n;
|
|
164
|
-
}, Ee = (e, a) => {
|
|
165
|
-
var n, u, t, l, r, o, p, m;
|
|
166
|
-
return {
|
|
167
|
-
enabled: !!a,
|
|
168
|
-
sequenceNumber: e,
|
|
169
|
-
pickUp: a != null && a.pickUp ? {
|
|
170
|
-
...a.pickUp,
|
|
171
|
-
submitOrderInstruction: a.pickUp.submitOrderInstruction ? {
|
|
172
|
-
payAtCounter: ((u = (n = a.pickUp.submitOrderInstruction) == null ? void 0 : n.payAtCounter) == null ? void 0 : u.en) ?? null,
|
|
173
|
-
paid: ((l = (t = a.pickUp.submitOrderInstruction) == null ? void 0 : t.paid) == null ? void 0 : l.en) ?? null
|
|
174
|
-
} : N,
|
|
175
|
-
enablePaxDialog: a.pickUp.enablePaxDialog ? a.pickUp.enablePaxDialog : !1
|
|
176
|
-
} : Z,
|
|
177
|
-
displayStand: a != null && a.displayStand ? {
|
|
178
|
-
enabled: a.displayStand.enabled,
|
|
179
|
-
standSlotRange: a.displayStand.standSlotRange,
|
|
180
|
-
prefix: a.displayStand.prefix,
|
|
181
|
-
padDigit: a.displayStand.padDigit,
|
|
182
|
-
enablePaxDialog: a.displayStand.enablePaxDialog ?? !1,
|
|
183
|
-
submitOrderInstruction: a.displayStand.submitOrderInstruction ? {
|
|
184
|
-
payAtCounter: ((o = (r = a.displayStand.submitOrderInstruction) == null ? void 0 : r.payAtCounter) == null ? void 0 : o.en) ?? null,
|
|
185
|
-
paid: ((m = (p = a.displayStand.submitOrderInstruction) == null ? void 0 : p.paid) == null ? void 0 : m.en) ?? null
|
|
186
|
-
} : N
|
|
187
|
-
} : Y
|
|
188
|
-
};
|
|
189
|
-
}, Fe = (e) => {
|
|
190
|
-
const a = (t) => {
|
|
191
|
-
var l, r, o, p;
|
|
192
|
-
return {
|
|
193
|
-
requiredSlot: !!t.displayStand,
|
|
194
|
-
displayStand: {
|
|
195
|
-
...t.displayStand,
|
|
196
|
-
submitOrderInstruction: {
|
|
197
|
-
payAtCounter: (l = t.displayStand.submitOrderInstruction) != null && l.payAtCounter ? {
|
|
198
|
-
en: t.displayStand.submitOrderInstruction.payAtCounter
|
|
199
|
-
} : null,
|
|
200
|
-
paid: (r = t.displayStand.submitOrderInstruction) != null && r.paid ? {
|
|
201
|
-
en: t.displayStand.submitOrderInstruction.paid
|
|
202
|
-
} : null
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
pickUp: {
|
|
206
|
-
...t.pickUp,
|
|
207
|
-
submitOrderInstruction: {
|
|
208
|
-
payAtCounter: (o = t.pickUp.submitOrderInstruction) != null && o.payAtCounter ? {
|
|
209
|
-
en: t.pickUp.submitOrderInstruction.payAtCounter
|
|
210
|
-
} : null,
|
|
211
|
-
paid: (p = t.pickUp.submitOrderInstruction) != null && p.paid ? {
|
|
212
|
-
en: t.pickUp.submitOrderInstruction.paid
|
|
213
|
-
} : null
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
}, n = (t) => {
|
|
218
|
-
var l;
|
|
219
|
-
return {
|
|
220
|
-
canTakeaway: e.takeaway.enabled,
|
|
221
|
-
dineIn: t,
|
|
222
|
-
menuItem: e.menuItem,
|
|
223
|
-
coverImageLandscape: e.coverImageLandscape,
|
|
224
|
-
coverImagePortrait: e.coverImagePortrait,
|
|
225
|
-
// Written straight back; see the read side in toKiosk().
|
|
226
|
-
coverCarousel: e.coverCarousel,
|
|
227
|
-
otaChannel: e.otaChannel || void 0,
|
|
228
|
-
// Omit when unset so the backend's `?? config.autoCloseBill` inheritance
|
|
229
|
-
// still applies — sending `false` here would pin it off for good.
|
|
230
|
-
autoSendKitchen: e.autoSendKitchen ?? void 0,
|
|
231
|
-
autoCloseBill: e.autoCloseBill ?? void 0,
|
|
232
|
-
printReceiptAfterClose: e.printReceiptAfterClose ?? void 0,
|
|
233
|
-
allowReject: e.allowReject ?? void 0,
|
|
234
|
-
// Omit rather than send [] when the merchant restricts nothing, so the
|
|
235
|
-
// saved document stays free of a field that means "all languages" anyway.
|
|
236
|
-
languages: (l = e.languages) != null && l.length ? e.languages : void 0,
|
|
237
|
-
// Omitted when unset: the backend $sets the whole kiosk subdocument, so a
|
|
238
|
-
// cleared minimum is removed instead of being stored as null.
|
|
239
|
-
minWeighGrams: e.minWeighGrams ?? void 0,
|
|
240
|
-
paymentSetting: u(e.paymentSetting),
|
|
241
|
-
takeaway: e.takeaway.submitOrderInstruction ? {
|
|
242
|
-
submitOrderInstruction: {
|
|
243
|
-
payAtCounter: e.takeaway.submitOrderInstruction.payAtCounter ? {
|
|
244
|
-
en: e.takeaway.submitOrderInstruction.payAtCounter
|
|
245
|
-
} : null,
|
|
246
|
-
paid: e.takeaway.submitOrderInstruction.paid ? {
|
|
247
|
-
en: e.takeaway.submitOrderInstruction.paid
|
|
248
|
-
} : null
|
|
249
|
-
}
|
|
250
|
-
} : void 0
|
|
251
|
-
};
|
|
252
|
-
}, u = (t) => ({
|
|
253
|
-
paymentTypes: t.paymentTypes,
|
|
254
|
-
offlinePaymentTypes: t.offlinePaymentTypes,
|
|
255
|
-
ePaymentTypes: t.ePaymentTypes
|
|
256
|
-
});
|
|
257
|
-
return e.dineIn.enabled ? {
|
|
258
|
-
kioskSettings: n(a(e.dineIn)),
|
|
259
|
-
kioskDineIn: e.dineIn.sequenceNumber
|
|
260
|
-
} : {
|
|
261
|
-
kioskSettings: n()
|
|
262
|
-
};
|
|
263
|
-
}, D = {
|
|
264
|
-
convertOrderSettingDto: Te,
|
|
265
|
-
toOrderKioskSettingsDto: Fe,
|
|
266
|
-
toKioskSequenceSettings: Le
|
|
267
|
-
}, De = ve("orderSetting", () => {
|
|
268
|
-
const e = v({});
|
|
269
|
-
async function a() {
|
|
270
|
-
const l = await F.getOrderSetting();
|
|
271
|
-
u(l);
|
|
272
|
-
}
|
|
273
|
-
async function n() {
|
|
274
|
-
if (e.value.orderSetting && e.value.kiosk) {
|
|
275
|
-
const { _id: l, ...r } = e.value.orderSetting, o = D.toOrderKioskSettingsDto(e.value.kiosk), p = await F.getOrderSetting(), m = {
|
|
276
|
-
...r,
|
|
277
|
-
kioskSettings: o.kioskSettings,
|
|
278
|
-
sequenceSettings: D.toKioskSequenceSettings(
|
|
279
|
-
e.value.kiosk,
|
|
280
|
-
p.sequenceSettings
|
|
281
|
-
)
|
|
282
|
-
}, d = await F.updateOrderSetting(m);
|
|
283
|
-
u(d);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
function u(l) {
|
|
287
|
-
e.value.orderSetting = l, e.value.kiosk = D.convertOrderSettingDto(l).kiosk;
|
|
288
|
-
}
|
|
289
|
-
function t(l) {
|
|
290
|
-
e.value.kiosk = l;
|
|
291
|
-
}
|
|
292
|
-
return {
|
|
293
|
-
state: e.value,
|
|
294
|
-
getSetting: a,
|
|
295
|
-
updateKioskSetting: n,
|
|
296
|
-
setKioskOrderSetting: t
|
|
297
|
-
};
|
|
298
|
-
}), Ne = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), qe = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), Be = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), Ve = /[^\p{L}\d]+/giu, X = "$1\0$2", H = "";
|
|
299
|
-
function g(e) {
|
|
300
|
-
let a = e.trim();
|
|
301
|
-
a = a.replace(Ne, X).replace(qe, X), a = a.replace(Ve, "\0");
|
|
302
|
-
let n = 0, u = a.length;
|
|
303
|
-
for (; a.charAt(n) === "\0"; )
|
|
304
|
-
n++;
|
|
305
|
-
if (n === u)
|
|
306
|
-
return [];
|
|
307
|
-
for (; a.charAt(u - 1) === "\0"; )
|
|
308
|
-
u--;
|
|
309
|
-
return a.slice(n, u).split(/\0/g);
|
|
310
|
-
}
|
|
311
|
-
function $e(e) {
|
|
312
|
-
const a = g(e);
|
|
313
|
-
for (let n = 0; n < a.length; n++) {
|
|
314
|
-
const u = a[n], t = Be.exec(u);
|
|
315
|
-
if (t) {
|
|
316
|
-
const l = t.index + (t[1] ?? t[2]).length;
|
|
317
|
-
a.splice(n, 1, u.slice(0, l), u.slice(l));
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
return a;
|
|
321
|
-
}
|
|
322
|
-
function Me(e, a) {
|
|
323
|
-
const [n, u, t] = Xe(e, a), l = We(a == null ? void 0 : a.locale), r = je(a == null ? void 0 : a.locale);
|
|
324
|
-
return n + u.map(Ge(l, r)).join(" ") + t;
|
|
325
|
-
}
|
|
326
|
-
function We(e) {
|
|
327
|
-
return (a) => a.toLocaleLowerCase(e);
|
|
328
|
-
}
|
|
329
|
-
function je(e) {
|
|
330
|
-
return (a) => a.toLocaleUpperCase(e);
|
|
331
|
-
}
|
|
332
|
-
function Ge(e, a) {
|
|
333
|
-
return (n) => `${a(n[0])}${e(n.slice(1))}`;
|
|
334
|
-
}
|
|
335
|
-
function Xe(e, a = {}) {
|
|
336
|
-
const n = a.split ?? (a.separateNumbers ? $e : g), u = a.prefixCharacters ?? H, t = a.suffixCharacters ?? H;
|
|
337
|
-
let l = 0, r = e.length;
|
|
338
|
-
for (; l < e.length; ) {
|
|
339
|
-
const o = e.charAt(l);
|
|
340
|
-
if (!u.includes(o))
|
|
341
|
-
break;
|
|
342
|
-
l++;
|
|
343
|
-
}
|
|
344
|
-
for (; r > l; ) {
|
|
345
|
-
const o = r - 1, p = e.charAt(o);
|
|
346
|
-
if (!t.includes(p))
|
|
347
|
-
break;
|
|
348
|
-
r = o;
|
|
349
|
-
}
|
|
350
|
-
return [
|
|
351
|
-
e.slice(0, l),
|
|
352
|
-
n(e.slice(l, r)),
|
|
353
|
-
e.slice(r)
|
|
354
|
-
];
|
|
355
|
-
}
|
|
356
|
-
const He = { class: "py-[1.5rem]" }, Qe = { class: "px-[1.5rem]" }, ze = { class: "pt-[1.5rem]" }, Je = { class: "flex flex-col gap-10" }, Ye = { class: "fm-typo-en-title-sm-600" }, Ze = { class: "fm-typo-en-title-sm-400" }, ua = /* @__PURE__ */ Q({
|
|
357
|
-
__name: "KioskView",
|
|
358
|
-
setup(e) {
|
|
359
|
-
var M, W;
|
|
360
|
-
const { t: a } = J(), { canManageOrderSetting: n } = _e(), u = ce(
|
|
361
|
-
() => import("./KioskSettingView-rdom_aS8.js")
|
|
362
|
-
), t = v("device"), l = pe(), r = De(), o = me(), p = ie(), { currentRestaurant: m, restaurants: d, changeRestaurant: w } = ye(), b = fe(), y = v(((M = m.value) == null ? void 0 : M._id) ?? void 0), h = v(null), x = v(""), q = v(null), B = T(() => {
|
|
363
|
-
const c = x.value.trim().toLowerCase();
|
|
364
|
-
return d.value.filter(
|
|
365
|
-
(s) => !c || s.profile.name.toLowerCase().includes(c) || s._id.toLowerCase().includes(c)
|
|
366
|
-
).map((s) => ({
|
|
367
|
-
label: s.profile.name,
|
|
368
|
-
value: s._id
|
|
369
|
-
}));
|
|
370
|
-
});
|
|
371
|
-
async function S(c) {
|
|
372
|
-
x.value = c;
|
|
373
|
-
}
|
|
374
|
-
function O(c) {
|
|
375
|
-
var s, _;
|
|
376
|
-
if (!c) {
|
|
377
|
-
x.value = "";
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
380
|
-
(_ = (s = q.value) == null ? void 0 : s.querySelector("input")) == null || _.select();
|
|
381
|
-
}
|
|
382
|
-
const P = v(((W = m.value) == null ? void 0 : W._id) ?? "");
|
|
383
|
-
async function V(c) {
|
|
384
|
-
const s = d.value.find((_) => _._id == c);
|
|
385
|
-
await w(s), await $(), y.value = c, P.value = c;
|
|
386
|
-
}
|
|
387
|
-
async function $() {
|
|
388
|
-
if (n.value)
|
|
389
|
-
try {
|
|
390
|
-
await r.getSetting();
|
|
391
|
-
} catch {
|
|
392
|
-
}
|
|
393
|
-
await o.loadCheckouts(), await R();
|
|
394
|
-
}
|
|
395
|
-
async function R() {
|
|
396
|
-
h.value = null;
|
|
397
|
-
try {
|
|
398
|
-
await l.getDevices();
|
|
399
|
-
} catch (c) {
|
|
400
|
-
h.value = c instanceof j && c.status === 403 ? "forbidden" : "error";
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
const k = T(() => {
|
|
404
|
-
const c = [{ label: a("order.deviceBinding"), value: "device" }];
|
|
405
|
-
return n.value && c.push({ label: a("order.settings"), value: "setting" }), c;
|
|
406
|
-
}), ee = T(() => l.state.devices);
|
|
407
|
-
async function ae() {
|
|
408
|
-
try {
|
|
409
|
-
await l.requestOtp();
|
|
410
|
-
} catch (c) {
|
|
411
|
-
b.open({
|
|
412
|
-
title: a(xe(c instanceof j ? c : null)),
|
|
413
|
-
type: "error"
|
|
414
|
-
});
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
p.open({
|
|
418
|
-
title: Me(a("order.bindDevice")),
|
|
419
|
-
contentComponent: Ie,
|
|
420
|
-
contentComponentProps: {
|
|
421
|
-
otp: l.state.otp
|
|
422
|
-
}
|
|
423
|
-
}).onClose(async () => {
|
|
424
|
-
await R();
|
|
425
|
-
});
|
|
426
|
-
}
|
|
427
|
-
async function te(c) {
|
|
428
|
-
try {
|
|
429
|
-
r.setKioskOrderSetting(c), await r.updateKioskSetting(), b.open({
|
|
430
|
-
title: a("order.kioskSettingSuccess"),
|
|
431
|
-
type: "success"
|
|
432
|
-
});
|
|
433
|
-
} catch {
|
|
434
|
-
b.open({
|
|
435
|
-
title: a("order.kioskSettingFailed"),
|
|
436
|
-
type: "error"
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
return re(async () => {
|
|
441
|
-
var c;
|
|
442
|
-
(c = m.value) != null && c._id && (P.value = m.value._id, await $());
|
|
443
|
-
}), oe(
|
|
444
|
-
() => d.value.length,
|
|
445
|
-
async (c) => {
|
|
446
|
-
y.value === void 0 && d.value.length > 0 && await V(d.value[0]._id);
|
|
447
|
-
},
|
|
448
|
-
{ immediate: !0 }
|
|
449
|
-
), (c, s) => {
|
|
450
|
-
const _ = I("FmPageHead"), ne = I("FmTabs"), le = I("FmMenuItem"), ue = I("FmSelect");
|
|
451
|
-
return C(), z("div", He, [
|
|
452
|
-
U(_, {
|
|
453
|
-
title: i(a)("order.kiosk")
|
|
454
|
-
}, null, 8, ["title"]),
|
|
455
|
-
f("div", Qe, [
|
|
456
|
-
U(ne, {
|
|
457
|
-
"model-value": t.value,
|
|
458
|
-
"onUpdate:modelValue": s[0] || (s[0] = (K) => t.value = K),
|
|
459
|
-
items: k.value
|
|
460
|
-
}, null, 8, ["model-value", "items"]),
|
|
461
|
-
f("div", ze, [
|
|
462
|
-
f("div", Je, [
|
|
463
|
-
f("div", {
|
|
464
|
-
class: "flex flex-col gap-2",
|
|
465
|
-
ref_key: "restaurantPicker",
|
|
466
|
-
ref: q
|
|
467
|
-
}, [
|
|
468
|
-
f("span", Ye, A(i(a)("order.activateLocation")), 1),
|
|
469
|
-
f("span", Ze, A(i(a)("order.selectRestaurant")) + ": ", 1),
|
|
470
|
-
U(ue, {
|
|
471
|
-
class: "w-1/2",
|
|
472
|
-
modelValue: y.value,
|
|
473
|
-
"onUpdate:modelValue": [
|
|
474
|
-
s[1] || (s[1] = (K) => y.value = K),
|
|
475
|
-
V
|
|
476
|
-
],
|
|
477
|
-
items: B.value,
|
|
478
|
-
placeholder: i(a)("order.searchRestaurant"),
|
|
479
|
-
searchable: "",
|
|
480
|
-
"search-debounce": 150,
|
|
481
|
-
"on-search": S,
|
|
482
|
-
onDropdownChanged: O
|
|
483
|
-
}, {
|
|
484
|
-
"append-menu": se(() => [
|
|
485
|
-
B.value.length ? E("", !0) : (C(), L(le, {
|
|
486
|
-
key: 0,
|
|
487
|
-
disabled: "",
|
|
488
|
-
label: i(a)("order.noRestaurantFound")
|
|
489
|
-
}, null, 8, ["label"]))
|
|
490
|
-
]),
|
|
491
|
-
_: 1
|
|
492
|
-
}, 8, ["modelValue", "items", "placeholder"])
|
|
493
|
-
], 512),
|
|
494
|
-
t.value == "device" ? (C(), L(de, {
|
|
495
|
-
key: 0,
|
|
496
|
-
devices: ee.value,
|
|
497
|
-
"load-error": h.value,
|
|
498
|
-
onRequestOtp: ae,
|
|
499
|
-
onRetry: R
|
|
500
|
-
}, null, 8, ["devices", "load-error"])) : E("", !0),
|
|
501
|
-
t.value == "setting" && i(n) ? (C(), L(i(u), {
|
|
502
|
-
key: `KioskSettingView-${P.value}`,
|
|
503
|
-
"restaurant-id": P.value,
|
|
504
|
-
onUpdateKioskOrderSetting: te,
|
|
505
|
-
form: i(r).state.kiosk ?? i(Ke)
|
|
506
|
-
}, null, 8, ["restaurant-id", "form"])) : E("", !0)
|
|
507
|
-
])
|
|
508
|
-
])
|
|
509
|
-
])
|
|
510
|
-
]);
|
|
511
|
-
};
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
export {
|
|
515
|
-
ua as default
|
|
516
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { DisplayStandSettingForm } from '@/modules/order-setting/kiosk/interface';
|
|
2
|
-
interface Props {
|
|
3
|
-
displayStand: DisplayStandSettingForm;
|
|
4
|
-
}
|
|
5
|
-
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
-
updateDisplayStand: (displayStand: DisplayStandSettingForm) => any;
|
|
7
|
-
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
8
|
-
onUpdateDisplayStand?: ((displayStand: DisplayStandSettingForm) => any) | undefined;
|
|
9
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
-
export default _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
interface ITextField {
|
|
2
|
-
id: string;
|
|
3
|
-
value: string | undefined;
|
|
4
|
-
title: string;
|
|
5
|
-
defaultValue: string;
|
|
6
|
-
}
|
|
7
|
-
interface Props {
|
|
8
|
-
fields: ITextField[];
|
|
9
|
-
}
|
|
10
|
-
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
-
"update:field": (id: string, value: string) => any;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
13
|
-
"onUpdate:field"?: ((id: string, value: string) => any) | undefined;
|
|
14
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { PickAtCounterSettingForm } from '@/modules/order-setting/kiosk/interface';
|
|
2
|
-
interface Props {
|
|
3
|
-
form: PickAtCounterSettingForm;
|
|
4
|
-
}
|
|
5
|
-
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
-
"update-pick-up": (form: PickAtCounterSettingForm) => any;
|
|
7
|
-
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
8
|
-
"onUpdate-pick-up"?: ((form: PickAtCounterSettingForm) => any) | undefined;
|
|
9
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
-
export default _default;
|
package/dist/index-CaHG3M7C.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { g as a, b as o } from "./index-C4n5H7t3.js";
|
|
2
|
-
const n = (e) => o(`/food-court-v2/${e}`), u = {
|
|
3
|
-
async getDineIn(e) {
|
|
4
|
-
return a(await n(e).get("/dine-in"));
|
|
5
|
-
},
|
|
6
|
-
async updateDineIn(e, t) {
|
|
7
|
-
return a(
|
|
8
|
-
await n(e).put("/dine-in", t)
|
|
9
|
-
);
|
|
10
|
-
},
|
|
11
|
-
async getOrderNumber(e) {
|
|
12
|
-
return a(
|
|
13
|
-
await n(e).get("/order-number")
|
|
14
|
-
);
|
|
15
|
-
},
|
|
16
|
-
async updateOrderNumber(e, t) {
|
|
17
|
-
return a(
|
|
18
|
-
await n(e).put("/order-number", t)
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
}, r = (e) => o(`/foodcourt-v2/${e}`), c = {
|
|
22
|
-
/** Every row of the court, any status, in court order. */
|
|
23
|
-
async listMembers(e) {
|
|
24
|
-
return a(
|
|
25
|
-
await r(e).get("/members")
|
|
26
|
-
);
|
|
27
|
-
},
|
|
28
|
-
async updateMember(e, t) {
|
|
29
|
-
return a(
|
|
30
|
-
await r(e).post("/members/update", t)
|
|
31
|
-
);
|
|
32
|
-
},
|
|
33
|
-
/** Cancel a legacy pending invitation (an INVITED row from before join codes). */
|
|
34
|
-
async revokeInvite(e, t) {
|
|
35
|
-
return a(
|
|
36
|
-
await r(e).post("/members/revoke-invite", { memberId: t })
|
|
37
|
-
);
|
|
38
|
-
},
|
|
39
|
-
/** Remove an active stall from the court. */
|
|
40
|
-
async removeMember(e, t) {
|
|
41
|
-
return a(
|
|
42
|
-
await r(e).post("/members/remove", { memberId: t })
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
}, d = {
|
|
46
|
-
/** Every code of the court, any status, newest first. */
|
|
47
|
-
async listJoinCodes(e) {
|
|
48
|
-
return a(
|
|
49
|
-
await r(e).get("/join-codes")
|
|
50
|
-
);
|
|
51
|
-
},
|
|
52
|
-
/** Null `stall`: the code carries no stall number or display name. */
|
|
53
|
-
async createJoinCode(e, t) {
|
|
54
|
-
return a(
|
|
55
|
-
await r(e).post("/join-codes", t ? { stall: t } : {})
|
|
56
|
-
);
|
|
57
|
-
},
|
|
58
|
-
/**
|
|
59
|
-
* `count` blank codes (a whole number, 1 to 50) in one go, all or none.
|
|
60
|
-
* Each code is returned only here, as with one; a bad count is 400
|
|
61
|
-
* INVALID_REQUEST.
|
|
62
|
-
*/
|
|
63
|
-
async createJoinCodes(e, t) {
|
|
64
|
-
return a(
|
|
65
|
-
await r(e).post("/join-codes", { count: t })
|
|
66
|
-
);
|
|
67
|
-
},
|
|
68
|
-
/**
|
|
69
|
-
* Replaces the stall number and display name a code carries (null clears
|
|
70
|
-
* them), while it is unused or its request waits for approval; the stall
|
|
71
|
-
* joins with them when approved. Any other code is 400 JOIN_CODE_NOT_EDITABLE.
|
|
72
|
-
*/
|
|
73
|
-
async updateJoinCode(e, t, s) {
|
|
74
|
-
return a(
|
|
75
|
-
await r(e).post("/join-codes/update", {
|
|
76
|
-
joinCodeId: t,
|
|
77
|
-
stall: s
|
|
78
|
-
})
|
|
79
|
-
);
|
|
80
|
-
},
|
|
81
|
-
/** An OPEN code (expired included) can no longer be redeemed. */
|
|
82
|
-
async cancelJoinCode(e, t) {
|
|
83
|
-
return a(
|
|
84
|
-
await r(e).post("/join-codes/cancel", { joinCodeId: t })
|
|
85
|
-
);
|
|
86
|
-
},
|
|
87
|
-
/** The requesting outlet joins as an ACTIVE stall: answers its member row. */
|
|
88
|
-
async approveJoinRequest(e, t) {
|
|
89
|
-
return a(
|
|
90
|
-
await r(e).post("/join-codes/approve", { joinCodeId: t })
|
|
91
|
-
);
|
|
92
|
-
},
|
|
93
|
-
/** The code is used up; the stall needs a new one to ask again. */
|
|
94
|
-
async declineJoinRequest(e, t) {
|
|
95
|
-
return a(
|
|
96
|
-
await r(e).post("/join-codes/decline", { joinCodeId: t })
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
}, p = {
|
|
100
|
-
async getStatus(e) {
|
|
101
|
-
return a(
|
|
102
|
-
await r(e).get("/status")
|
|
103
|
-
);
|
|
104
|
-
},
|
|
105
|
-
/**
|
|
106
|
-
* ACTIVE without a ready payout account is refused (400 PAYOUT_ACCOUNT_NOT_READY,
|
|
107
|
-
* or PAYOUT_ACCOUNT_UNAVAILABLE while payment-service is down).
|
|
108
|
-
*/
|
|
109
|
-
async updateStatus(e, t) {
|
|
110
|
-
return a(
|
|
111
|
-
await r(e).put("/status", { status: t })
|
|
112
|
-
);
|
|
113
|
-
}
|
|
114
|
-
}, m = {
|
|
115
|
-
async listOrders(e, t) {
|
|
116
|
-
return a(
|
|
117
|
-
await n(e).get("/orders", {
|
|
118
|
-
params: { ...t, status: t.status.join(",") }
|
|
119
|
-
})
|
|
120
|
-
);
|
|
121
|
-
},
|
|
122
|
-
async getOrder(e, t) {
|
|
123
|
-
return a(
|
|
124
|
-
await n(e).get(`/orders/${t}`)
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
export {
|
|
129
|
-
u as F,
|
|
130
|
-
d as a,
|
|
131
|
-
c as b,
|
|
132
|
-
p as c,
|
|
133
|
-
m as d,
|
|
134
|
-
r as f
|
|
135
|
-
};
|