@feedmepos/mf-order-setting 0.0.99 → 0.0.100
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-Brrexhuz.js → DisplaySystemView-bnG_JNDd.js} +4 -4
- package/dist/{FoodCourtInvitationsView-wmZ1J7dm.js → FoodCourtInvitationsView-DbuetF4z.js} +5 -5
- package/dist/{FoodCourtOrderSettingsView-CNZs4q-x.js → FoodCourtOrderSettingsView-BXgApCVG.js} +1 -1
- package/dist/{FoodCourtOrdersView-DMvZ_Z_C.js → FoodCourtOrdersView-K0iC1arR.js} +4 -4
- package/dist/FoodCourtStallsView-DijfdyBw.js +668 -0
- package/dist/{FoodCourtStatusView-YdiL94wn.js → FoodCourtStatusView-DTriHcSD.js} +2 -2
- package/dist/{KioskDevicesView-DsXy1LWl.js → KioskDevicesView-d2SWWkhC.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-Byoci4Fo.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-DA6c96uZ.js} +5 -5
- package/dist/{KioskSettingView-DqUpOq_Y.js → KioskSettingView-I7Hgzrvr.js} +3 -3
- package/dist/{KioskView-CdRnNSU0.js → KioskView-B_lLNsaU.js} +6 -6
- package/dist/{OrderSettingsView-CjXph68w.js → OrderSettingsView-8OS93YGL.js} +10 -10
- package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-BG71fNkx.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-K0oCZMt8.js} +1 -1
- package/dist/{app-moKDIx07.js → app-qdN8kXAM.js} +43 -27
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DQqlQ2dX.js → dayjs.min-C-IKwmsU.js} +1 -1
- package/dist/{featureFlag-qLUdllY9.js → featureFlag-z_-AhzUC.js} +1 -1
- package/dist/food-court-member-joC8tmsI.js +234 -0
- package/dist/frontend/mf-order/src/api/food-court/index.d.ts +24 -4
- package/dist/frontend/mf-order/src/api/food-court/invitation.d.ts +3 -1
- package/dist/frontend/mf-order/src/app.d.ts +16 -0
- package/dist/frontend/mf-order/src/main.d.ts +16 -0
- package/dist/frontend/mf-order/src/views/food-court/food-court-member.d.ts +29 -14
- package/dist/frontend/mf-order/src/views/food-court/stalls/EditStallSheet.vue.d.ts +7 -3
- package/dist/frontend/mf-order/src/views/food-court/stalls/GenerateJoinCodeSheet.vue.d.ts +2 -2
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-D5T7zJ3M.js → index-BK-RT8YN.js} +1 -1
- package/dist/{index-BthRwhFh.js → index-BxK-mqfV.js} +1 -1
- package/dist/{index-Dy5GRKwA.js → index-DeUtM1Z8.js} +2 -2
- package/dist/{index-C44A5dgm.js → index-DfsaaxdM.js} +1 -1
- package/dist/{index-BDgJZqqD.js → index-DjtNAyFp.js} +4 -4
- package/dist/{index-By3yKf-8.js → index-WSlqpTW2.js} +55 -42
- package/dist/{order.dto-DvP9y_72.js → order.dto-BTF8MlM5.js} +2 -2
- package/package.json +1 -1
- package/src/api/food-court/index.ts +36 -4
- package/src/api/food-court/invitation.ts +3 -0
- package/src/locales/en-US.json +8 -4
- package/src/locales/ja-JP.json +8 -4
- package/src/locales/th-TH.json +8 -4
- package/src/locales/zh-CN.json +8 -4
- package/src/views/food-court/FoodCourtStallsView.vue +43 -10
- package/src/views/food-court/food-court-member.spec.ts +139 -13
- package/src/views/food-court/food-court-member.ts +99 -30
- package/src/views/food-court/stalls/EditStallSheet.vue +41 -20
- package/src/views/food-court/stalls/GenerateJoinCodeSheet.vue +6 -6
- package/dist/FoodCourtStallsView-B3egjtKo.js +0 -635
- package/dist/food-court-member-CfV5vmHz.js +0 -216
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ref as C, defineComponent as Q, resolveComponent as x, openBlock as l, createElementBlock as m, createElementVNode as a, toDisplayString as d, unref as s, createVNode as v, computed as _, createBlock as M, withCtx as K, createCommentVNode as D, Fragment as q, renderList as G, watch as he, normalizeClass as $e, createTextVNode as te, renderSlot as Me } from "vue";
|
|
2
2
|
import { useI18n as ne, useCoreStore as Ve } from "@feedmepos/mf-common";
|
|
3
3
|
import { defineStore as ge } from "pinia";
|
|
4
|
-
import { r as J, g as ue, a as Be, p as Re } from "./index-
|
|
5
|
-
import "./order.dto-
|
|
4
|
+
import { r as J, g as ue, a as Be, p as Re } from "./index-BxK-mqfV.js";
|
|
5
|
+
import "./order.dto-BTF8MlM5.js";
|
|
6
6
|
import { useDialog as Oe, useSnackbar as Le } from "@feedmepos/ui-library";
|
|
7
|
-
import { d as ce } from "./dayjs.min-
|
|
8
|
-
import { c as Ne, g as Ke, a as xe } from "./app-
|
|
9
|
-
import { s as be } from "./index-
|
|
7
|
+
import { d as ce } from "./dayjs.min-C-IKwmsU.js";
|
|
8
|
+
import { c as Ne, g as Ke, a as xe } from "./app-qdN8kXAM.js";
|
|
9
|
+
import { s as be } from "./index-DfsaaxdM.js";
|
|
10
10
|
async function Ue() {
|
|
11
11
|
const t = await J().get("/kiosk/otp");
|
|
12
12
|
return ue(t);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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-
|
|
3
|
-
import { b as v, K as Le, c as Me } from "./order.dto-
|
|
4
|
-
import { _ as We, u as De } from "./index-
|
|
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-qdN8kXAM.js";
|
|
3
|
+
import { b as v, K as Le, c as Me } from "./order.dto-BTF8MlM5.js";
|
|
4
|
+
import { _ as We, u as De } from "./index-DjtNAyFp.js";
|
|
5
5
|
import { useI18n as he, FeedMeAuth as Ie, useCoreStore as $e } from "@feedmepos/mf-common";
|
|
6
6
|
import { u as Ye } from "./index-Cmb4sEqq.js";
|
|
7
7
|
import { useSnackbar as Ge } from "@feedmepos/ui-library";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
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-
|
|
2
|
+
import { u as pe, a as me, _ as de } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-DA6c96uZ.js";
|
|
3
3
|
import { useDialog as ie, useSnackbar as fe } from "@feedmepos/ui-library";
|
|
4
4
|
import { useI18n as J, useCoreStore as ye } from "@feedmepos/mf-common";
|
|
5
|
-
import { S as j } from "./index-
|
|
5
|
+
import { S as j } from "./index-BxK-mqfV.js";
|
|
6
6
|
import { defineStore as ve } from "pinia";
|
|
7
|
-
import { O as F } from "./index-
|
|
8
|
-
import { F as be, a as he } from "./order.dto-
|
|
9
|
-
import { u as _e } from "./app-
|
|
7
|
+
import { O as F } from "./index-DeUtM1Z8.js";
|
|
8
|
+
import { F as be, a as he } from "./order.dto-BTF8MlM5.js";
|
|
9
|
+
import { u as _e } from "./app-qdN8kXAM.js";
|
|
10
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
11
|
__name: "KioskOtpDialog",
|
|
12
12
|
props: {
|
|
@@ -358,7 +358,7 @@ const He = { class: "py-[1.5rem]" }, Qe = { class: "px-[1.5rem]" }, ze = { class
|
|
|
358
358
|
setup(e) {
|
|
359
359
|
var M, W;
|
|
360
360
|
const { t: a } = J(), { canManageOrderSetting: n } = _e(), u = ce(
|
|
361
|
-
() => import("./KioskSettingView-
|
|
361
|
+
() => import("./KioskSettingView-I7Hgzrvr.js")
|
|
362
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
363
|
const c = x.value.trim().toLowerCase();
|
|
364
364
|
return d.value.filter(
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { defineComponent as ft, ref as je, watch as Ct, computed as we, resolveComponent as Ae, openBlock as re, createElementBlock as me, Fragment as Xe, createElementVNode as x, createVNode as ee, unref as U, withCtx as tt, toDisplayString as fe, renderList as yt, createCommentVNode as ke, createBlock as ut, renderSlot as Fc, normalizeClass as Et, reactive as Vt, onMounted as In, createTextVNode as Bt, onUnmounted as W$, nextTick as Ik, shallowRef as VG, Teleport as qG, withModifiers as Uc, withDirectives as e$, vModelText as t$, toRaw as EA, normalizeStyle as GG, isRef as KG, createSlots as zG, h as YG, withKeys as wk, resolveDynamicComponent as HG } from "vue";
|
|
2
2
|
import { useDialog as ma, useSnackbar as Ak } from "@feedmepos/ui-library";
|
|
3
|
-
import { _ as gi } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { d as Ou, T as kc, C as xn, e as xu, f as WG, g as Tk, p as QG, r as JG, h as Ln, i as Hi, j as Fu, O as SA, k as FA, l as CA, m as IA, n as ZG, o as n$, q as XG, s as eK } from "./order.dto-
|
|
5
|
-
import { e as St, i as tK, c as ii, j as Q$, k as nK, g as kk, l as ri, m as J$, n as aK, o as Z$, p as rK, q as w$, t as iK } from "./app-
|
|
6
|
-
import { O as ba, s as uK } from "./index-
|
|
3
|
+
import { _ as gi } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-K0oCZMt8.js";
|
|
4
|
+
import { d as Ou, T as kc, C as xn, e as xu, f as WG, g as Tk, p as QG, r as JG, h as Ln, i as Hi, j as Fu, O as SA, k as FA, l as CA, m as IA, n as ZG, o as n$, q as XG, s as eK } from "./order.dto-BTF8MlM5.js";
|
|
5
|
+
import { e as St, i as tK, c as ii, j as Q$, k as nK, g as kk, l as ri, m as J$, n as aK, o as Z$, p as rK, q as w$, t as iK } from "./app-qdN8kXAM.js";
|
|
6
|
+
import { O as ba, s as uK } from "./index-DeUtM1Z8.js";
|
|
7
7
|
import { useCoreStore as Nt, useI18n as _t } from "@feedmepos/mf-common";
|
|
8
8
|
import { u as on } from "./index-Cmb4sEqq.js";
|
|
9
|
-
import { r as vt, _ as Ok, u as oo, a as a$ } from "./index-
|
|
10
|
-
import { c as r$, r as $n, a as Kt } from "./index-
|
|
11
|
-
import { r as oK, d as Rt } from "./dayjs.min-
|
|
9
|
+
import { r as vt, _ as Ok, u as oo, a as a$ } from "./index-DjtNAyFp.js";
|
|
10
|
+
import { c as r$, r as $n, a as Kt } from "./index-BK-RT8YN.js";
|
|
11
|
+
import { r as oK, d as Rt } from "./dayjs.min-C-IKwmsU.js";
|
|
12
12
|
import { defineStore as Rk } from "pinia";
|
|
13
|
-
import { g as zu, m as wA, S as sK, b as Bc, c as lK } from "./index-
|
|
13
|
+
import { g as zu, m as wA, S as sK, b as Bc, c as lK } from "./index-BxK-mqfV.js";
|
|
14
14
|
import { u as tn } from "./snackbar-DZQ0_reQ.js";
|
|
15
|
-
import { _ as Rr, u as dK, e as cK } from "./featureFlag-
|
|
15
|
+
import { _ as Rr, u as dK, e as cK } from "./featureFlag-z_-AhzUC.js";
|
|
16
16
|
import { useRouter as mK } from "vue-router";
|
|
17
17
|
import { u as pK } from "./search-BAPEUu1R.js";
|
|
18
|
-
import { s as Oc } from "./index-
|
|
18
|
+
import { s as Oc } from "./index-DfsaaxdM.js";
|
|
19
19
|
function fK(o, c) {
|
|
20
20
|
return o ? o.autoAccept ? o.autoAcceptPaidOnly ? c : !0 : !1 : null;
|
|
21
21
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as O, computed as u, ref as z, onMounted as L, onUnmounted as N, resolveComponent as i, openBlock as s, createBlock as D, withCtx as T, createElementVNode as n, createVNode as d, toDisplayString as k, unref as m, createElementBlock as p, isRef as U, Fragment as K, renderList as M, createCommentVNode as $ } from "vue";
|
|
2
2
|
import { useI18n as j, useCoreStore as q } from "@feedmepos/mf-common";
|
|
3
3
|
import { u as A } from "./search-BAPEUu1R.js";
|
|
4
|
-
import "./app-
|
|
4
|
+
import "./app-qdN8kXAM.js";
|
|
5
5
|
const G = { class: "relative w-full" }, H = { class: "flex-grow mx-2 min-w-0" }, J = { class: "inline-block w-full break-words fm-typo-en-body-md-400" }, P = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "absolute w-full mt-2 bg-white border border-gray-200 rounded-lg shadow-lg min-w-[350px] z-[9999]"
|
|
@@ -86,6 +86,8 @@ const dp = {
|
|
|
86
86
|
statusActive: "Active",
|
|
87
87
|
statusInactive: "Inactive",
|
|
88
88
|
statusDeclined: "Declined",
|
|
89
|
+
statusLeft: "Left",
|
|
90
|
+
statusRemoved: "Removed",
|
|
89
91
|
actionDeactivate: "Deactivate",
|
|
90
92
|
actionActivate: "Activate",
|
|
91
93
|
actionRemove: "Remove",
|
|
@@ -126,18 +128,19 @@ const dp = {
|
|
|
126
128
|
generateIntro: "Generate a code for one stall. The stall enters it in Restaurant Operation › Food Courts to ask to join, and you approve the request here. You can set the stall number and display name it joins with now or later.",
|
|
127
129
|
generateCode: "Generate code",
|
|
128
130
|
codeTitle: "Join code",
|
|
129
|
-
codeShareHint: "Share it with the stall. It works once, for
|
|
131
|
+
codeShareHint: "Share it with the stall. It works once, for 30 days. You can copy it again from the Stalls list until a stall uses it.",
|
|
130
132
|
codeForStall: "For {stall}",
|
|
131
133
|
codeDone: "Done",
|
|
132
134
|
joinCode: "Join code",
|
|
133
135
|
codeCount: "How many?",
|
|
134
136
|
codeCountHint: "Up to 50 codes at a time.",
|
|
135
137
|
generateCodes: "Generate {count} codes",
|
|
136
|
-
generateIntroMany: "Generate one code for each stall. Each stall enters its code in Restaurant Operation › Food Courts to ask to join, and you approve each request here. Codes made together carry no stall number or display name: set them by editing each stall once you approve it.",
|
|
138
|
+
generateIntroMany: "Generate one code for each stall. Each stall enters its code in Restaurant Operation › Food Courts to ask to join, and you approve each request here. Codes made together carry no stall number or display name: set them by editing each code in the Stalls list, or each stall once you approve it.",
|
|
137
139
|
codesTitle: "Join codes",
|
|
138
|
-
codesShareHint: "Give each stall one code. Each works once, for
|
|
140
|
+
codesShareHint: "Give each stall one code. Each works once, for 30 days. You can copy them again from the Stalls list until each is used.",
|
|
139
141
|
copyAll: "Copy all",
|
|
140
|
-
joinCodes: "Join codes"
|
|
142
|
+
joinCodes: "Join codes",
|
|
143
|
+
editCodeHint: "The stall joins with this stall number and display name when you approve its request."
|
|
141
144
|
},
|
|
142
145
|
invitations: {
|
|
143
146
|
title: "Food Courts",
|
|
@@ -154,6 +157,7 @@ const dp = {
|
|
|
154
157
|
statusDeclined: "Declined",
|
|
155
158
|
statusCancelled: "Cancelled",
|
|
156
159
|
statusLeft: "Left",
|
|
160
|
+
statusRemoved: "Removed by food court",
|
|
157
161
|
leave: "Leave food court",
|
|
158
162
|
leaveTitle: "Leave this food court?",
|
|
159
163
|
leaveMessage: "You will stop receiving orders from {court}. To rejoin, ask the food court for a new join code.",
|
|
@@ -1465,6 +1469,8 @@ const dp = {
|
|
|
1465
1469
|
statusActive: "启用",
|
|
1466
1470
|
statusInactive: "停用",
|
|
1467
1471
|
statusDeclined: "已拒绝",
|
|
1472
|
+
statusLeft: "已退出",
|
|
1473
|
+
statusRemoved: "已移除",
|
|
1468
1474
|
actionDeactivate: "停用",
|
|
1469
1475
|
actionActivate: "启用",
|
|
1470
1476
|
actionRemove: "移除",
|
|
@@ -1505,18 +1511,19 @@ const dp = {
|
|
|
1505
1511
|
generateIntro: "为一个摊位生成加入码。摊位在「餐厅运营 › 美食广场」中输入加入码申请加入,然后由您在此批准。摊位编号和显示名称可以现在设置,也可以稍后设置。",
|
|
1506
1512
|
generateCode: "生成加入码",
|
|
1507
1513
|
codeTitle: "加入码",
|
|
1508
|
-
codeShareHint: "请将加入码分享给摊位。仅可使用一次,
|
|
1514
|
+
codeShareHint: "请将加入码分享给摊位。仅可使用一次,30 天内有效。在摊位使用之前,您可以在摊位列表中再次复制。",
|
|
1509
1515
|
codeForStall: "适用于:{stall}",
|
|
1510
1516
|
codeDone: "完成",
|
|
1511
1517
|
joinCode: "加入码",
|
|
1512
1518
|
codeCount: "生成数量",
|
|
1513
1519
|
codeCountHint: "每次最多生成 50 个。",
|
|
1514
1520
|
generateCodes: "生成 {count} 个加入码",
|
|
1515
|
-
generateIntroMany: "为每个摊位各生成一个加入码。每个摊位在「餐厅运营 ›
|
|
1521
|
+
generateIntroMany: "为每个摊位各生成一个加入码。每个摊位在「餐厅运营 › 美食广场」中输入自己的加入码申请加入,然后由您在此逐一批准。一起生成的加入码不带摊位编号和显示名称,请在摊位列表中编辑各加入码进行设置,或在批准后编辑各摊位。",
|
|
1516
1522
|
codesTitle: "加入码",
|
|
1517
|
-
codesShareHint: "请给每个摊位一个加入码。每个加入码仅可使用一次,
|
|
1523
|
+
codesShareHint: "请给每个摊位一个加入码。每个加入码仅可使用一次,30 天内有效。在每个加入码被使用之前,您可以在摊位列表中再次复制。",
|
|
1518
1524
|
copyAll: "全部复制",
|
|
1519
|
-
joinCodes: "加入码"
|
|
1525
|
+
joinCodes: "加入码",
|
|
1526
|
+
editCodeHint: "批准申请后,摊位将以此摊位编号和显示名称加入。"
|
|
1520
1527
|
},
|
|
1521
1528
|
invitations: {
|
|
1522
1529
|
title: "美食广场",
|
|
@@ -1533,6 +1540,7 @@ const dp = {
|
|
|
1533
1540
|
statusDeclined: "已拒绝",
|
|
1534
1541
|
statusCancelled: "已取消",
|
|
1535
1542
|
statusLeft: "已退出",
|
|
1543
|
+
statusRemoved: "已被美食广场移除",
|
|
1536
1544
|
leave: "退出美食广场",
|
|
1537
1545
|
leaveTitle: "退出此美食广场?",
|
|
1538
1546
|
leaveMessage: "您将不再接收来自 {court} 的订单。如需重新加入,请向美食广场索取新的加入码。",
|
|
@@ -2830,6 +2838,8 @@ const dp = {
|
|
|
2830
2838
|
statusActive: "ใช้งาน",
|
|
2831
2839
|
statusInactive: "ไม่ใช้งาน",
|
|
2832
2840
|
statusDeclined: "ปฏิเสธแล้ว",
|
|
2841
|
+
statusLeft: "ออกแล้ว",
|
|
2842
|
+
statusRemoved: "ถูกนำออก",
|
|
2833
2843
|
actionDeactivate: "ปิดใช้งาน",
|
|
2834
2844
|
actionActivate: "เปิดใช้งาน",
|
|
2835
2845
|
actionRemove: "นำออก",
|
|
@@ -2870,18 +2880,19 @@ const dp = {
|
|
|
2870
2880
|
generateIntro: "สร้างรหัสสำหรับร้านค้าหนึ่งร้าน ร้านค้าป้อนรหัสในเมนู การดำเนินงานร้านอาหาร › ศูนย์อาหาร เพื่อขอเข้าร่วม แล้วคุณอนุมัติคำขอที่นี่ คุณตั้งหมายเลขร้านค้าและชื่อที่แสดงได้ตอนนี้หรือภายหลัง",
|
|
2871
2881
|
generateCode: "สร้างรหัส",
|
|
2872
2882
|
codeTitle: "รหัสเข้าร่วม",
|
|
2873
|
-
codeShareHint: "แชร์รหัสนี้ให้ร้านค้า ใช้ได้ครั้งเดียวภายใน
|
|
2883
|
+
codeShareHint: "แชร์รหัสนี้ให้ร้านค้า ใช้ได้ครั้งเดียวภายใน 30 วัน คุณคัดลอกรหัสอีกครั้งได้จากรายการร้านค้าจนกว่าร้านค้าจะใช้รหัส",
|
|
2874
2884
|
codeForStall: "สำหรับ {stall}",
|
|
2875
2885
|
codeDone: "เสร็จสิ้น",
|
|
2876
2886
|
joinCode: "รหัสเข้าร่วม",
|
|
2877
2887
|
codeCount: "จำนวนรหัส",
|
|
2878
2888
|
codeCountHint: "สร้างได้ครั้งละไม่เกิน 50 รหัส",
|
|
2879
2889
|
generateCodes: "สร้าง {count} รหัส",
|
|
2880
|
-
generateIntroMany: "สร้างรหัสให้ร้านค้าร้านละหนึ่งรหัส แต่ละร้านป้อนรหัสของตนในเมนู การดำเนินงานร้านอาหาร › ศูนย์อาหาร เพื่อขอเข้าร่วม แล้วคุณอนุมัติแต่ละคำขอที่นี่ รหัสที่สร้างพร้อมกันจะไม่มีหมายเลขร้านค้าและชื่อที่แสดง
|
|
2890
|
+
generateIntroMany: "สร้างรหัสให้ร้านค้าร้านละหนึ่งรหัส แต่ละร้านป้อนรหัสของตนในเมนู การดำเนินงานร้านอาหาร › ศูนย์อาหาร เพื่อขอเข้าร่วม แล้วคุณอนุมัติแต่ละคำขอที่นี่ รหัสที่สร้างพร้อมกันจะไม่มีหมายเลขร้านค้าและชื่อที่แสดง ให้ตั้งค่าโดยแก้ไขแต่ละรหัสในรายการร้านค้า หรือแก้ไขร้านค้าแต่ละร้านหลังจากอนุมัติแล้ว",
|
|
2881
2891
|
codesTitle: "รหัสเข้าร่วม",
|
|
2882
|
-
codesShareHint: "ให้รหัสแก่ร้านค้าร้านละหนึ่งรหัส แต่ละรหัสใช้ได้ครั้งเดียวภายใน
|
|
2892
|
+
codesShareHint: "ให้รหัสแก่ร้านค้าร้านละหนึ่งรหัส แต่ละรหัสใช้ได้ครั้งเดียวภายใน 30 วัน คุณคัดลอกรหัสอีกครั้งได้จากรายการร้านค้าจนกว่าจะมีการใช้รหัส",
|
|
2883
2893
|
copyAll: "คัดลอกทั้งหมด",
|
|
2884
|
-
joinCodes: "รหัสเข้าร่วม"
|
|
2894
|
+
joinCodes: "รหัสเข้าร่วม",
|
|
2895
|
+
editCodeHint: "ร้านค้าจะเข้าร่วมด้วยหมายเลขร้านค้าและชื่อที่แสดงนี้เมื่อคุณอนุมัติคำขอ"
|
|
2885
2896
|
},
|
|
2886
2897
|
invitations: {
|
|
2887
2898
|
title: "ศูนย์อาหาร",
|
|
@@ -2898,6 +2909,7 @@ const dp = {
|
|
|
2898
2909
|
statusDeclined: "ปฏิเสธแล้ว",
|
|
2899
2910
|
statusCancelled: "ยกเลิกแล้ว",
|
|
2900
2911
|
statusLeft: "ออกแล้ว",
|
|
2912
|
+
statusRemoved: "ถูกนำออกโดยศูนย์อาหาร",
|
|
2901
2913
|
leave: "ออกจากศูนย์อาหาร",
|
|
2902
2914
|
leaveTitle: "ออกจากศูนย์อาหารนี้หรือไม่",
|
|
2903
2915
|
leaveMessage: "คุณจะหยุดรับคำสั่งซื้อจาก {court} หากต้องการกลับเข้าร่วม โปรดขอรหัสเข้าร่วมใหม่จากศูนย์อาหาร",
|
|
@@ -4030,6 +4042,8 @@ const dp = {
|
|
|
4030
4042
|
statusActive: "有効",
|
|
4031
4043
|
statusInactive: "無効",
|
|
4032
4044
|
statusDeclined: "辞退",
|
|
4045
|
+
statusLeft: "退出",
|
|
4046
|
+
statusRemoved: "削除済み",
|
|
4033
4047
|
actionDeactivate: "無効にする",
|
|
4034
4048
|
actionActivate: "有効にする",
|
|
4035
4049
|
actionRemove: "削除",
|
|
@@ -4070,18 +4084,19 @@ const dp = {
|
|
|
4070
4084
|
generateIntro: "1つの店舗用のコードを発行します。店舗は「レストラン運営 › フードコート」でコードを入力して参加を申請し、あなたがここで承認します。参加時の店舗番号と表示名は、今でも後からでも設定できます。",
|
|
4071
4085
|
generateCode: "コードを発行",
|
|
4072
4086
|
codeTitle: "参加コード",
|
|
4073
|
-
codeShareHint: "このコードを店舗に共有してください。1回のみ、
|
|
4087
|
+
codeShareHint: "このコードを店舗に共有してください。1回のみ、30日間有効です。店舗が使用するまでは、店舗一覧から再度コピーできます。",
|
|
4074
4088
|
codeForStall: "対象:{stall}",
|
|
4075
4089
|
codeDone: "完了",
|
|
4076
4090
|
joinCode: "参加コード",
|
|
4077
4091
|
codeCount: "発行数",
|
|
4078
4092
|
codeCountHint: "一度に50個まで発行できます。",
|
|
4079
4093
|
generateCodes: "{count}個のコードを発行",
|
|
4080
|
-
generateIntroMany: "店舗ごとに1つずつコードを発行します。各店舗は「レストラン運営 › フードコート」で自分のコードを入力して参加を申請し、あなたがここで申請を1
|
|
4094
|
+
generateIntroMany: "店舗ごとに1つずつコードを発行します。各店舗は「レストラン運営 › フードコート」で自分のコードを入力して参加を申請し、あなたがここで申請を1件ずつ承認します。まとめて発行したコードには店舗番号と表示名が付きません。店舗一覧で各コードを編集するか、承認後に各店舗を編集して設定してください。",
|
|
4081
4095
|
codesTitle: "参加コード",
|
|
4082
|
-
codesShareHint: "各店舗に1つずつコードを渡してください。どのコードも1回のみ、
|
|
4096
|
+
codesShareHint: "各店舗に1つずつコードを渡してください。どのコードも1回のみ、30日間有効です。使用されるまでは、店舗一覧から再度コピーできます。",
|
|
4083
4097
|
copyAll: "すべてコピー",
|
|
4084
|
-
joinCodes: "参加コード"
|
|
4098
|
+
joinCodes: "参加コード",
|
|
4099
|
+
editCodeHint: "申請を承認すると、店舗はこの店舗番号と表示名で参加します。"
|
|
4085
4100
|
},
|
|
4086
4101
|
invitations: {
|
|
4087
4102
|
title: "フードコート",
|
|
@@ -4098,6 +4113,7 @@ const dp = {
|
|
|
4098
4113
|
statusDeclined: "辞退",
|
|
4099
4114
|
statusCancelled: "取り消し",
|
|
4100
4115
|
statusLeft: "退出",
|
|
4116
|
+
statusRemoved: "フードコートにより削除",
|
|
4101
4117
|
leave: "フードコートから退出",
|
|
4102
4118
|
leaveTitle: "このフードコートから退出しますか?",
|
|
4103
4119
|
leaveMessage: "{court} からの注文を受け付けなくなります。再参加するには、フードコートに新しい参加コードを依頼してください。",
|
|
@@ -6558,7 +6574,7 @@ const dp = {
|
|
|
6558
6574
|
}, Ap = {
|
|
6559
6575
|
order: hp,
|
|
6560
6576
|
menu: fp
|
|
6561
|
-
}, pp = "0.0.
|
|
6577
|
+
}, pp = "0.0.100", yp = "fmmf";
|
|
6562
6578
|
let Sd = !1;
|
|
6563
6579
|
function bp() {
|
|
6564
6580
|
Sd || (Sd = !0, console.log(
|
|
@@ -25210,14 +25226,14 @@ const yC = "/kiosk", bC = "/kiosk/device", vC = "/kiosk/order-setting", FC = "/o
|
|
|
25210
25226
|
// allow access via either subject (coverSubject = OR fallback).
|
|
25211
25227
|
path: Ve.KioskRoute,
|
|
25212
25228
|
name: "Kiosk",
|
|
25213
|
-
component: en(ke(() => import("./KioskView-
|
|
25229
|
+
component: en(ke(() => import("./KioskView-B_lLNsaU.js"))),
|
|
25214
25230
|
meta: tn([{ ...Pg, coverSubject: TC.subject }])
|
|
25215
25231
|
},
|
|
25216
25232
|
{
|
|
25217
25233
|
path: Ve.KioskDeviceRoute,
|
|
25218
25234
|
name: "Kiosk Device",
|
|
25219
25235
|
component: en(
|
|
25220
|
-
ke(() => import("./KioskDevicesView-
|
|
25236
|
+
ke(() => import("./KioskDevicesView-d2SWWkhC.js"))
|
|
25221
25237
|
),
|
|
25222
25238
|
meta: tn([Pg])
|
|
25223
25239
|
},
|
|
@@ -25227,7 +25243,7 @@ const yC = "/kiosk", bC = "/kiosk/device", vC = "/kiosk/order-setting", FC = "/o
|
|
|
25227
25243
|
path: Ve.KioskOrderSettingRoute,
|
|
25228
25244
|
name: "Kiosk Order Setting",
|
|
25229
25245
|
component: en(
|
|
25230
|
-
ke(() => import("./KioskSettingView-
|
|
25246
|
+
ke(() => import("./KioskSettingView-I7Hgzrvr.js"))
|
|
25231
25247
|
),
|
|
25232
25248
|
meta: tn([is])
|
|
25233
25249
|
},
|
|
@@ -25235,7 +25251,7 @@ const yC = "/kiosk", bC = "/kiosk/device", vC = "/kiosk/order-setting", FC = "/o
|
|
|
25235
25251
|
path: Ve.OrderSettingView,
|
|
25236
25252
|
name: "Order Setting View",
|
|
25237
25253
|
component: en(
|
|
25238
|
-
ke(() => import("./OrderSettingsView-
|
|
25254
|
+
ke(() => import("./OrderSettingsView-8OS93YGL.js"))
|
|
25239
25255
|
),
|
|
25240
25256
|
meta: tn([is])
|
|
25241
25257
|
},
|
|
@@ -25243,7 +25259,7 @@ const yC = "/kiosk", bC = "/kiosk/device", vC = "/kiosk/order-setting", FC = "/o
|
|
|
25243
25259
|
path: Ve.DisplaySystemView,
|
|
25244
25260
|
name: "Display System View",
|
|
25245
25261
|
component: en(
|
|
25246
|
-
ke(() => import("./DisplaySystemView-
|
|
25262
|
+
ke(() => import("./DisplaySystemView-bnG_JNDd.js"))
|
|
25247
25263
|
),
|
|
25248
25264
|
meta: tn([{ ...is, coverSubject: Pe.Subject.Business.miniProgram_brandkit }])
|
|
25249
25265
|
},
|
|
@@ -25254,7 +25270,7 @@ const yC = "/kiosk", bC = "/kiosk/device", vC = "/kiosk/order-setting", FC = "/o
|
|
|
25254
25270
|
path: Ve.FoodCourtOrderSettingView,
|
|
25255
25271
|
name: "Food Court Order Setting View",
|
|
25256
25272
|
component: ke(
|
|
25257
|
-
() => import("./FoodCourtOrderSettingsView-
|
|
25273
|
+
() => import("./FoodCourtOrderSettingsView-BXgApCVG.js")
|
|
25258
25274
|
)
|
|
25259
25275
|
},
|
|
25260
25276
|
{
|
|
@@ -25262,13 +25278,13 @@ const yC = "/kiosk", bC = "/kiosk/device", vC = "/kiosk/order-setting", FC = "/o
|
|
|
25262
25278
|
// members. Owner-only on the backend, as Order Setting above.
|
|
25263
25279
|
path: Ve.FoodCourtStallsView,
|
|
25264
25280
|
name: "Food Court Stalls View",
|
|
25265
|
-
component: ke(() => import("./FoodCourtStallsView-
|
|
25281
|
+
component: ke(() => import("./FoodCourtStallsView-DijfdyBw.js"))
|
|
25266
25282
|
},
|
|
25267
25283
|
{
|
|
25268
25284
|
// Food Court Operations › Food Court: the court's Active / Inactive status (KDI-4915).
|
|
25269
25285
|
path: Ve.FoodCourtStatusView,
|
|
25270
25286
|
name: "Food Court Status View",
|
|
25271
|
-
component: ke(() => import("./FoodCourtStatusView-
|
|
25287
|
+
component: ke(() => import("./FoodCourtStatusView-DTriHcSD.js"))
|
|
25272
25288
|
},
|
|
25273
25289
|
{
|
|
25274
25290
|
// Food Court Operations › Orders (KDI-4941): the court's orders. Owner-only on
|
|
@@ -25277,7 +25293,7 @@ const yC = "/kiosk", bC = "/kiosk/device", vC = "/kiosk/order-setting", FC = "/o
|
|
|
25277
25293
|
// and a link to one order opens the list with it.
|
|
25278
25294
|
path: Ve.FoodCourtOrdersView,
|
|
25279
25295
|
name: "Food Court Orders View",
|
|
25280
|
-
component: ke(() => import("./FoodCourtOrdersView-
|
|
25296
|
+
component: ke(() => import("./FoodCourtOrdersView-K0iC1arR.js")),
|
|
25281
25297
|
children: [
|
|
25282
25298
|
{
|
|
25283
25299
|
path: ":orderId",
|
|
@@ -25293,7 +25309,7 @@ const yC = "/kiosk", bC = "/kiosk/device", vC = "/kiosk/order-setting", FC = "/o
|
|
|
25293
25309
|
path: Ve.FoodCourtInvitationsView,
|
|
25294
25310
|
name: "Food Court Invitations View",
|
|
25295
25311
|
component: en(
|
|
25296
|
-
ke(() => import("./FoodCourtInvitationsView-
|
|
25312
|
+
ke(() => import("./FoodCourtInvitationsView-DbuetF4z.js"))
|
|
25297
25313
|
),
|
|
25298
25314
|
meta: tn([RC])
|
|
25299
25315
|
}
|
package/dist/app.js
CHANGED
|
@@ -2,7 +2,7 @@ var le = Object.defineProperty;
|
|
|
2
2
|
var ue = (S, c, v) => c in S ? le(S, c, { enumerable: !0, configurable: !0, writable: !0, value: v }) : S[c] = v;
|
|
3
3
|
var ot = (S, c, v) => ue(S, typeof c != "symbol" ? c + "" : c, v);
|
|
4
4
|
import { readonly as Pt, ref as Ut } from "vue";
|
|
5
|
-
import { c as st } from "./app-
|
|
5
|
+
import { c as st } from "./app-qdN8kXAM.js";
|
|
6
6
|
const _e = (S, c) => {
|
|
7
7
|
const v = S.__vccOpts || S;
|
|
8
8
|
for (const [d, s] of c)
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
function I(t, o = null) {
|
|
2
|
+
switch (t.status) {
|
|
3
|
+
case "ACTIVE":
|
|
4
|
+
return t.visible === !1 ? "INACTIVE" : "ACTIVE";
|
|
5
|
+
case "INVITED":
|
|
6
|
+
return "INVITED";
|
|
7
|
+
case "DECLINED":
|
|
8
|
+
return "DECLINED";
|
|
9
|
+
case "REMOVED":
|
|
10
|
+
return o === "STALL" ? "LEFT" : "REMOVED";
|
|
11
|
+
default:
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function E(t) {
|
|
16
|
+
return t === "LEFT" || t === "REMOVED";
|
|
17
|
+
}
|
|
18
|
+
function f(t) {
|
|
19
|
+
switch (t) {
|
|
20
|
+
case "PENDING":
|
|
21
|
+
return "PENDING_APPROVAL";
|
|
22
|
+
case "OPEN":
|
|
23
|
+
return "CODE_ISSUED";
|
|
24
|
+
default:
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function D(t) {
|
|
29
|
+
var e, a;
|
|
30
|
+
const o = [];
|
|
31
|
+
for (const { member: n, restaurant: s, endedBy: r } of t) {
|
|
32
|
+
const i = I(n, r ?? null);
|
|
33
|
+
i && o.push({
|
|
34
|
+
kind: "member",
|
|
35
|
+
key: `member:${n._id}`,
|
|
36
|
+
memberId: n._id,
|
|
37
|
+
restaurantId: n.restaurantId,
|
|
38
|
+
restaurantName: (s == null ? void 0 : s.name) || null,
|
|
39
|
+
status: n.status,
|
|
40
|
+
listStatus: i,
|
|
41
|
+
unitNo: ((e = n.stall) == null ? void 0 : e.unitNo) ?? null,
|
|
42
|
+
displayName: ((a = n.stall) == null ? void 0 : a.displayName) ?? null
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return o;
|
|
46
|
+
}
|
|
47
|
+
function T(t, o) {
|
|
48
|
+
const e = [];
|
|
49
|
+
for (const { joinCode: a, restaurant: n } of t) {
|
|
50
|
+
const s = f(a.status);
|
|
51
|
+
if (!s) continue;
|
|
52
|
+
const r = a.stall ?? (a.status === "PENDING" && a.restaurantId ? o.get(a.restaurantId) : null);
|
|
53
|
+
e.push({
|
|
54
|
+
kind: "joinCode",
|
|
55
|
+
key: `joinCode:${a._id}`,
|
|
56
|
+
joinCodeId: a._id,
|
|
57
|
+
status: a.status === "PENDING" ? "PENDING" : "OPEN",
|
|
58
|
+
listStatus: s,
|
|
59
|
+
restaurantId: a.restaurantId ?? (n == null ? void 0 : n._id) ?? null,
|
|
60
|
+
restaurantName: (n == null ? void 0 : n.name) || null,
|
|
61
|
+
businessName: (n == null ? void 0 : n.businessName) || null,
|
|
62
|
+
unitNo: (r == null ? void 0 : r.unitNo) ?? null,
|
|
63
|
+
displayName: (r == null ? void 0 : r.displayName) ?? null,
|
|
64
|
+
expiresAt: a.expiresAt,
|
|
65
|
+
code: a.status === "OPEN" ? a.code ?? null : null
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return e;
|
|
69
|
+
}
|
|
70
|
+
function S(t, o = []) {
|
|
71
|
+
const e = new Map(t.map(({ member: s }) => [s.restaurantId, s.stall])), a = T(o, e), n = D(t);
|
|
72
|
+
return [
|
|
73
|
+
...a.filter((s) => s.status === "PENDING"),
|
|
74
|
+
...n.filter((s) => !E(s.listStatus)),
|
|
75
|
+
...a.filter((s) => s.status === "OPEN"),
|
|
76
|
+
...n.filter((s) => E(s.listStatus))
|
|
77
|
+
];
|
|
78
|
+
}
|
|
79
|
+
const y = {
|
|
80
|
+
ACTIVE: { variant: "success", labelKey: "order.foodCourt.stalls.statusActive" },
|
|
81
|
+
INACTIVE: { variant: "neutral", labelKey: "order.foodCourt.stalls.statusInactive" },
|
|
82
|
+
INVITED: { variant: "neutral", labelKey: "order.foodCourt.stalls.statusInvited" },
|
|
83
|
+
DECLINED: { variant: "critical", labelKey: "order.foodCourt.stalls.statusDeclined" },
|
|
84
|
+
LEFT: { variant: "neutral", labelKey: "order.foodCourt.stalls.statusLeft" },
|
|
85
|
+
REMOVED: { variant: "neutral", labelKey: "order.foodCourt.stalls.statusRemoved" },
|
|
86
|
+
PENDING_APPROVAL: {
|
|
87
|
+
variant: "warning",
|
|
88
|
+
labelKey: "order.foodCourt.stalls.statusPendingApproval"
|
|
89
|
+
},
|
|
90
|
+
CODE_ISSUED: { variant: "info", labelKey: "order.foodCourt.stalls.statusCodeIssued" }
|
|
91
|
+
};
|
|
92
|
+
function p(t) {
|
|
93
|
+
return t.displayName || t.restaurantName || t.restaurantId || "";
|
|
94
|
+
}
|
|
95
|
+
function R(t) {
|
|
96
|
+
const o = t.restaurantName || t.restaurantId || "";
|
|
97
|
+
return t.businessName && t.businessName !== o ? `${o} (${t.businessName})` : o;
|
|
98
|
+
}
|
|
99
|
+
const V = {
|
|
100
|
+
ACTIVE: ["edit", "deactivate", "remove"],
|
|
101
|
+
INACTIVE: ["edit", "activate", "remove"],
|
|
102
|
+
INVITED: ["edit", "cancelInvite"],
|
|
103
|
+
DECLINED: [],
|
|
104
|
+
LEFT: [],
|
|
105
|
+
REMOVED: [],
|
|
106
|
+
PENDING_APPROVAL: ["edit", "approve", "decline"],
|
|
107
|
+
CODE_ISSUED: ["edit", "cancelCode"]
|
|
108
|
+
}, M = {
|
|
109
|
+
edit: "order.edit",
|
|
110
|
+
deactivate: "order.foodCourt.stalls.actionDeactivate",
|
|
111
|
+
activate: "order.foodCourt.stalls.actionActivate",
|
|
112
|
+
remove: "order.foodCourt.stalls.actionRemove",
|
|
113
|
+
cancelInvite: "order.foodCourt.stalls.actionCancelInvite",
|
|
114
|
+
approve: "order.foodCourt.stalls.actionApprove",
|
|
115
|
+
decline: "order.foodCourt.stalls.actionDecline",
|
|
116
|
+
cancelCode: "order.foodCourt.stalls.actionCancelCode"
|
|
117
|
+
}, m = "ABCDEFGHJKMNPQRSTUVWXYZ23456789", d = 10;
|
|
118
|
+
function C(t) {
|
|
119
|
+
return (t ?? "").toUpperCase().replace(/[\s-]/g, "");
|
|
120
|
+
}
|
|
121
|
+
function b(t) {
|
|
122
|
+
const o = C(t);
|
|
123
|
+
return o.length === d && [...o].every((e) => m.includes(e));
|
|
124
|
+
}
|
|
125
|
+
function A(t) {
|
|
126
|
+
const o = C(t);
|
|
127
|
+
if (o.length !== d) return o;
|
|
128
|
+
const e = d / 2;
|
|
129
|
+
return `${o.slice(0, e)}-${o.slice(e)}`;
|
|
130
|
+
}
|
|
131
|
+
const l = { min: 1, max: 50 };
|
|
132
|
+
function P(t) {
|
|
133
|
+
return typeof t != "number" || Number.isNaN(t) ? l.min : Math.min(l.max, Math.max(l.min, Math.trunc(t)));
|
|
134
|
+
}
|
|
135
|
+
function j(t) {
|
|
136
|
+
return t.map((o) => A(o)).filter(Boolean).join(`
|
|
137
|
+
`);
|
|
138
|
+
}
|
|
139
|
+
const N = {
|
|
140
|
+
JOIN_CODE_INVALID: "order.foodCourt.joinErrors.invalid",
|
|
141
|
+
JOIN_CODE_EXPIRED: "order.foodCourt.joinErrors.expired",
|
|
142
|
+
JOIN_CODE_USED: "order.foodCourt.joinErrors.used",
|
|
143
|
+
TOO_MANY_ATTEMPTS: "order.foodCourt.joinErrors.tooManyAttempts",
|
|
144
|
+
MEMBER_EXISTS: "order.foodCourt.joinErrors.memberExists",
|
|
145
|
+
JOIN_REQUEST_EXISTS: "order.foodCourt.joinErrors.requestExists",
|
|
146
|
+
RESTAURANT_NOT_MANAGEABLE: "order.foodCourt.joinErrors.notManageable"
|
|
147
|
+
};
|
|
148
|
+
function K(t) {
|
|
149
|
+
const o = typeof t == "object" && t !== null ? t.code : void 0;
|
|
150
|
+
return typeof o == "string" && Object.prototype.hasOwnProperty.call(N, o) ? N[o] : null;
|
|
151
|
+
}
|
|
152
|
+
function J(t) {
|
|
153
|
+
return typeof t == "object" && t !== null && t.code === "RESTAURANT_NOT_FOUND";
|
|
154
|
+
}
|
|
155
|
+
const v = {
|
|
156
|
+
INVITED: "INVITED",
|
|
157
|
+
ACTIVE: "JOINED",
|
|
158
|
+
DECLINED: "DECLINED",
|
|
159
|
+
REVOKED: "CANCELLED",
|
|
160
|
+
REMOVED: "LEFT"
|
|
161
|
+
};
|
|
162
|
+
function O(t) {
|
|
163
|
+
const o = [t == null ? void 0 : t.line1, t == null ? void 0 : t.city, t == null ? void 0 : t.state].map((e) => (e ?? "").trim()).filter(Boolean);
|
|
164
|
+
return o.length ? o.reduce((e, a) => `${e}${e.endsWith(",") ? " " : ", "}${a}`) : null;
|
|
165
|
+
}
|
|
166
|
+
function _(t, o) {
|
|
167
|
+
return t.status === "REMOVED" && o === "COURT" ? "REMOVED" : v[t.status] ?? "CANCELLED";
|
|
168
|
+
}
|
|
169
|
+
function h(t) {
|
|
170
|
+
const o = t.map(({ foodCourtId: a, profile: n, member: s, endedBy: r }) => {
|
|
171
|
+
var i, c;
|
|
172
|
+
return {
|
|
173
|
+
foodCourtId: a,
|
|
174
|
+
memberId: s._id,
|
|
175
|
+
courtName: (n == null ? void 0 : n.name) || null,
|
|
176
|
+
courtAddress: O(n == null ? void 0 : n.address),
|
|
177
|
+
status: _(s, r),
|
|
178
|
+
unitNo: ((i = s.stall) == null ? void 0 : i.unitNo) ?? null,
|
|
179
|
+
displayName: ((c = s.stall) == null ? void 0 : c.displayName) ?? null,
|
|
180
|
+
joinedAt: s.joinedAt ?? null,
|
|
181
|
+
since: s.joinedAt ?? s.invitedAt ?? null
|
|
182
|
+
};
|
|
183
|
+
}), e = (a) => a.since && Date.parse(a.since) || 0;
|
|
184
|
+
return o.sort((a, n) => e(n) - e(a));
|
|
185
|
+
}
|
|
186
|
+
const U = {
|
|
187
|
+
JOINED: { variant: "success", labelKey: "order.foodCourt.invitations.statusJoined" },
|
|
188
|
+
INVITED: { variant: "neutral", labelKey: "order.foodCourt.invitations.statusInvited" },
|
|
189
|
+
DECLINED: { variant: "critical", labelKey: "order.foodCourt.invitations.statusDeclined" },
|
|
190
|
+
CANCELLED: { variant: "neutral", labelKey: "order.foodCourt.invitations.statusCancelled" },
|
|
191
|
+
LEFT: { variant: "neutral", labelKey: "order.foodCourt.invitations.statusLeft" },
|
|
192
|
+
REMOVED: { variant: "neutral", labelKey: "order.foodCourt.invitations.statusRemoved" }
|
|
193
|
+
}, g = 60;
|
|
194
|
+
function u(t) {
|
|
195
|
+
const o = (t ?? "").trim();
|
|
196
|
+
return o || null;
|
|
197
|
+
}
|
|
198
|
+
function L(t, o) {
|
|
199
|
+
const e = u(t);
|
|
200
|
+
return e === u(o) ? null : e;
|
|
201
|
+
}
|
|
202
|
+
function G(t, o, e) {
|
|
203
|
+
return { unitNo: u(t), displayName: L(o, e) };
|
|
204
|
+
}
|
|
205
|
+
function x(t, o) {
|
|
206
|
+
const e = { unitNo: u(t), displayName: u(o) };
|
|
207
|
+
return e.unitNo || e.displayName ? e : null;
|
|
208
|
+
}
|
|
209
|
+
function B(t) {
|
|
210
|
+
return t instanceof Error && t.message ? t.message : String(t);
|
|
211
|
+
}
|
|
212
|
+
export {
|
|
213
|
+
l as J,
|
|
214
|
+
U as M,
|
|
215
|
+
V as S,
|
|
216
|
+
M as a,
|
|
217
|
+
g as b,
|
|
218
|
+
P as c,
|
|
219
|
+
x as d,
|
|
220
|
+
B as e,
|
|
221
|
+
A as f,
|
|
222
|
+
p as g,
|
|
223
|
+
y as h,
|
|
224
|
+
O as i,
|
|
225
|
+
j,
|
|
226
|
+
b as k,
|
|
227
|
+
K as l,
|
|
228
|
+
h as m,
|
|
229
|
+
C as n,
|
|
230
|
+
J as o,
|
|
231
|
+
R as r,
|
|
232
|
+
G as s,
|
|
233
|
+
S as t
|
|
234
|
+
};
|