@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,4 +1,4 @@
|
|
|
1
|
-
import { c as Le, j as ea } from "./app-
|
|
1
|
+
import { c as Le, j as ea } from "./app-qdN8kXAM.js";
|
|
2
2
|
function Ct(me) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + me + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var dn = Object.defineProperty;
|
|
2
2
|
var pn = (e, t, n) => t in e ? dn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var je = (e, t, n) => pn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { e as Ct } from "./app-
|
|
4
|
+
import { e as Ct } from "./app-qdN8kXAM.js";
|
|
5
5
|
import { useCoreStore as Y } from "@feedmepos/mf-common";
|
|
6
6
|
function Ut(e, t) {
|
|
7
7
|
return function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as n, s as a, a as r, r as e } from "./index-
|
|
2
|
-
import "./order.dto-
|
|
1
|
+
import { g as n, s as a, a as r, r as e } from "./index-BxK-mqfV.js";
|
|
2
|
+
import "./order.dto-BTF8MlM5.js";
|
|
3
3
|
async function i() {
|
|
4
4
|
const t = await e().get("/order-settings");
|
|
5
5
|
return n(t);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as H, ref as V, resolveComponent as R, openBlock as f, createElementBlock as T, createElementVNode as v, toDisplayString as S, createVNode as b, unref as x, createBlock as z, computed as U, watch as oe, onMounted as re, withCtx as N, createTextVNode as se, createCommentVNode as E, Fragment as ie, renderList as le, renderSlot as ae } from "vue";
|
|
2
|
-
import { e as g } from "./app-
|
|
2
|
+
import { e as g } from "./app-qdN8kXAM.js";
|
|
3
3
|
import { useDialog as ue } from "@feedmepos/ui-library";
|
|
4
4
|
import { useI18n as Y, useCoreStore as ne } from "@feedmepos/mf-common";
|
|
5
5
|
import { defineStore as de } from "pinia";
|
|
6
|
-
import { r as F, g as a, b as O, a as Q } from "./index-
|
|
7
|
-
import "./order.dto-
|
|
8
|
-
import { a as q } from "./index-
|
|
6
|
+
import { r as F, g as a, b as O, a as Q } from "./index-BxK-mqfV.js";
|
|
7
|
+
import "./order.dto-BTF8MlM5.js";
|
|
8
|
+
import { a as q } from "./index-BK-RT8YN.js";
|
|
9
9
|
const ce = /* @__PURE__ */ H({
|
|
10
10
|
__name: "OfflinePaymentTypeDialogContent",
|
|
11
11
|
props: {
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
const n = (e) => o(`/food-court-v2/${e}`),
|
|
1
|
+
import { g as a, b as o } from "./index-BxK-mqfV.js";
|
|
2
|
+
const n = (e) => o(`/food-court-v2/${e}`), u = {
|
|
3
3
|
async getDineIn(e) {
|
|
4
|
-
return
|
|
4
|
+
return a(await n(e).get("/dine-in"));
|
|
5
5
|
},
|
|
6
6
|
async updateDineIn(e, t) {
|
|
7
|
-
return
|
|
7
|
+
return a(
|
|
8
8
|
await n(e).put("/dine-in", t)
|
|
9
9
|
);
|
|
10
10
|
},
|
|
11
11
|
async getOrderNumber(e) {
|
|
12
|
-
return
|
|
12
|
+
return a(
|
|
13
13
|
await n(e).get("/order-number")
|
|
14
14
|
);
|
|
15
15
|
},
|
|
16
16
|
async updateOrderNumber(e, t) {
|
|
17
|
-
return
|
|
17
|
+
return a(
|
|
18
18
|
await n(e).put("/order-number", t)
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, r = (e) => o(`/foodcourt-v2/${e}`), c = {
|
|
22
22
|
/** Every row of the court, any status, in court order. */
|
|
23
23
|
async listMembers(e) {
|
|
24
|
-
return
|
|
25
|
-
await
|
|
24
|
+
return a(
|
|
25
|
+
await r(e).get("/members")
|
|
26
26
|
);
|
|
27
27
|
},
|
|
28
28
|
async updateMember(e, t) {
|
|
29
|
-
return
|
|
30
|
-
await
|
|
29
|
+
return a(
|
|
30
|
+
await r(e).post("/members/update", t)
|
|
31
31
|
);
|
|
32
32
|
},
|
|
33
33
|
/** Cancel a legacy pending invitation (an INVITED row from before join codes). */
|
|
34
34
|
async revokeInvite(e, t) {
|
|
35
|
-
return
|
|
36
|
-
await
|
|
35
|
+
return a(
|
|
36
|
+
await r(e).post("/members/revoke-invite", { memberId: t })
|
|
37
37
|
);
|
|
38
38
|
},
|
|
39
39
|
/** Remove an active stall from the court. */
|
|
40
40
|
async removeMember(e, t) {
|
|
41
|
-
return
|
|
42
|
-
await
|
|
41
|
+
return a(
|
|
42
|
+
await r(e).post("/members/remove", { memberId: t })
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, d = {
|
|
46
46
|
/** Every code of the court, any status, newest first. */
|
|
47
47
|
async listJoinCodes(e) {
|
|
48
|
-
return
|
|
49
|
-
await
|
|
48
|
+
return a(
|
|
49
|
+
await r(e).get("/join-codes")
|
|
50
50
|
);
|
|
51
51
|
},
|
|
52
52
|
/** Null `stall`: the code carries no stall number or display name. */
|
|
53
53
|
async createJoinCode(e, t) {
|
|
54
|
-
return
|
|
55
|
-
await
|
|
54
|
+
return a(
|
|
55
|
+
await r(e).post("/join-codes", t ? { stall: t } : {})
|
|
56
56
|
);
|
|
57
57
|
},
|
|
58
58
|
/**
|
|
@@ -61,32 +61,45 @@ const n = (e) => o(`/food-court-v2/${e}`), i = {
|
|
|
61
61
|
* INVALID_REQUEST.
|
|
62
62
|
*/
|
|
63
63
|
async createJoinCodes(e, t) {
|
|
64
|
-
return
|
|
65
|
-
await
|
|
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
|
+
})
|
|
66
79
|
);
|
|
67
80
|
},
|
|
68
81
|
/** An OPEN code (expired included) can no longer be redeemed. */
|
|
69
82
|
async cancelJoinCode(e, t) {
|
|
70
|
-
return
|
|
71
|
-
await
|
|
83
|
+
return a(
|
|
84
|
+
await r(e).post("/join-codes/cancel", { joinCodeId: t })
|
|
72
85
|
);
|
|
73
86
|
},
|
|
74
87
|
/** The requesting outlet joins as an ACTIVE stall: answers its member row. */
|
|
75
88
|
async approveJoinRequest(e, t) {
|
|
76
|
-
return
|
|
77
|
-
await
|
|
89
|
+
return a(
|
|
90
|
+
await r(e).post("/join-codes/approve", { joinCodeId: t })
|
|
78
91
|
);
|
|
79
92
|
},
|
|
80
93
|
/** The code is used up; the stall needs a new one to ask again. */
|
|
81
94
|
async declineJoinRequest(e, t) {
|
|
82
|
-
return
|
|
83
|
-
await
|
|
95
|
+
return a(
|
|
96
|
+
await r(e).post("/join-codes/decline", { joinCodeId: t })
|
|
84
97
|
);
|
|
85
98
|
}
|
|
86
|
-
},
|
|
99
|
+
}, p = {
|
|
87
100
|
async getStatus(e) {
|
|
88
|
-
return
|
|
89
|
-
await
|
|
101
|
+
return a(
|
|
102
|
+
await r(e).get("/status")
|
|
90
103
|
);
|
|
91
104
|
},
|
|
92
105
|
/**
|
|
@@ -94,29 +107,29 @@ const n = (e) => o(`/food-court-v2/${e}`), i = {
|
|
|
94
107
|
* or PAYOUT_ACCOUNT_UNAVAILABLE while payment-service is down).
|
|
95
108
|
*/
|
|
96
109
|
async updateStatus(e, t) {
|
|
97
|
-
return
|
|
98
|
-
await
|
|
110
|
+
return a(
|
|
111
|
+
await r(e).put("/status", { status: t })
|
|
99
112
|
);
|
|
100
113
|
}
|
|
101
|
-
},
|
|
114
|
+
}, m = {
|
|
102
115
|
async listOrders(e, t) {
|
|
103
|
-
return
|
|
116
|
+
return a(
|
|
104
117
|
await n(e).get("/orders", {
|
|
105
118
|
params: { ...t, status: t.status.join(",") }
|
|
106
119
|
})
|
|
107
120
|
);
|
|
108
121
|
},
|
|
109
122
|
async getOrder(e, t) {
|
|
110
|
-
return
|
|
123
|
+
return a(
|
|
111
124
|
await n(e).get(`/orders/${t}`)
|
|
112
125
|
);
|
|
113
126
|
}
|
|
114
127
|
};
|
|
115
128
|
export {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
u as F,
|
|
130
|
+
d as a,
|
|
131
|
+
c as b,
|
|
132
|
+
p as c,
|
|
133
|
+
m as d,
|
|
134
|
+
r as f
|
|
122
135
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as M, e as _, w as ce, c as E, i as gc, j as Iu } from "./app-
|
|
2
|
-
import { a as st } from "./index-
|
|
1
|
+
import { k as M, e as _, w as ce, c as E, i as gc, j as Iu } from "./app-qdN8kXAM.js";
|
|
2
|
+
import { a as st } from "./index-BK-RT8YN.js";
|
|
3
3
|
var e = M();
|
|
4
4
|
const pe = e.z.enum([
|
|
5
5
|
"CREATING",
|
package/package.json
CHANGED
|
@@ -95,10 +95,19 @@ export interface FoodCourtRestaurantSummary {
|
|
|
95
95
|
businessName: string
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Who ended a REMOVED row, read by foodcourt-service from who made the step:
|
|
100
|
+
* COURT when the court owner removed the stall, STALL for anyone else (the
|
|
101
|
+
* stall left, or FeedMe staff acted). Null for any other row.
|
|
102
|
+
*/
|
|
103
|
+
export type FoodCourtEndedBy = 'COURT' | 'STALL'
|
|
104
|
+
|
|
98
105
|
/** One row of the owner's member list, with its restaurant (null once deleted). */
|
|
99
106
|
export interface FoodCourtMemberListItem {
|
|
100
107
|
member: FoodCourtMember
|
|
101
108
|
restaurant: FoodCourtRestaurantSummary | null
|
|
109
|
+
/** Absent from a foodcourt-service before KDI-4915's stalls feedback. */
|
|
110
|
+
endedBy?: FoodCourtEndedBy | null
|
|
102
111
|
}
|
|
103
112
|
|
|
104
113
|
export interface FoodCourtUpdateMemberReq {
|
|
@@ -165,16 +174,22 @@ export type FoodCourtJoinCodeStatus =
|
|
|
165
174
|
/**
|
|
166
175
|
* A single-use code the court owner gives a stall (KDI-4915 join by code). The
|
|
167
176
|
* stall redeems it for one of its outlets, which makes it PENDING; the owner
|
|
168
|
-
* then approves (the outlet joins) or declines. The code itself is
|
|
169
|
-
*
|
|
177
|
+
* then approves (the outlet joins) or declines. The code itself is listed
|
|
178
|
+
* while it is unused, so the owner can still hand it out.
|
|
170
179
|
*/
|
|
171
180
|
export interface FoodCourtJoinCode {
|
|
172
181
|
_id: string
|
|
182
|
+
/**
|
|
183
|
+
* `ABCDE-FGHJK` while the code is OPEN; null once a stall entered it or it
|
|
184
|
+
* ended, and for codes created before codes were kept. Absent from an older
|
|
185
|
+
* foodcourt-service.
|
|
186
|
+
*/
|
|
187
|
+
code?: string | null
|
|
173
188
|
status: FoodCourtJoinCodeStatus
|
|
174
189
|
/** The stall number and display name the stall joins with; null = none set. */
|
|
175
190
|
stall: FoodCourtStall | null
|
|
176
191
|
createdAt: string
|
|
177
|
-
/** createdAt + 7
|
|
192
|
+
/** createdAt + 30 days (7 for codes made before KDI-4915). */
|
|
178
193
|
expiresAt: string
|
|
179
194
|
/** The outlet that redeemed the code; null before a request. */
|
|
180
195
|
restaurantId: string | null
|
|
@@ -191,7 +206,7 @@ export interface FoodCourtJoinCodeListItem {
|
|
|
191
206
|
}
|
|
192
207
|
|
|
193
208
|
export interface FoodCourtCreateJoinCodeRes {
|
|
194
|
-
/** `ABCDE-FGHJK`.
|
|
209
|
+
/** `ABCDE-FGHJK`. The list shows it too until a stall uses it. */
|
|
195
210
|
code: string
|
|
196
211
|
joinCode: FoodCourtJoinCode
|
|
197
212
|
}
|
|
@@ -233,6 +248,23 @@ export const FoodCourtJoinCodeApi = {
|
|
|
233
248
|
await foodCourtServiceClientInstance(foodCourtId).post('/join-codes', { count })
|
|
234
249
|
)
|
|
235
250
|
},
|
|
251
|
+
/**
|
|
252
|
+
* Replaces the stall number and display name a code carries (null clears
|
|
253
|
+
* them), while it is unused or its request waits for approval; the stall
|
|
254
|
+
* joins with them when approved. Any other code is 400 JOIN_CODE_NOT_EDITABLE.
|
|
255
|
+
*/
|
|
256
|
+
async updateJoinCode(
|
|
257
|
+
foodCourtId: string,
|
|
258
|
+
joinCodeId: string,
|
|
259
|
+
stall: FoodCourtStall | null
|
|
260
|
+
): Promise<FoodCourtJoinCode> {
|
|
261
|
+
return getData<FoodCourtJoinCode>(
|
|
262
|
+
await foodCourtServiceClientInstance(foodCourtId).post('/join-codes/update', {
|
|
263
|
+
joinCodeId,
|
|
264
|
+
stall
|
|
265
|
+
})
|
|
266
|
+
)
|
|
267
|
+
},
|
|
236
268
|
/** An OPEN code (expired included) can no longer be redeemed. */
|
|
237
269
|
async cancelJoinCode(foodCourtId: string, joinCodeId: string): Promise<FoodCourtJoinCode> {
|
|
238
270
|
return getData<FoodCourtJoinCode>(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { baseClientInstance, getData } from '@/api'
|
|
2
2
|
import {
|
|
3
3
|
foodCourtServiceClientInstance,
|
|
4
|
+
type FoodCourtEndedBy,
|
|
4
5
|
type FoodCourtJoinCode,
|
|
5
6
|
type FoodCourtMember,
|
|
6
7
|
type FoodCourtStall
|
|
@@ -25,6 +26,8 @@ export interface FoodCourtMembership {
|
|
|
25
26
|
foodCourtId: string
|
|
26
27
|
profile: { name?: string | null; address?: FoodCourtAddress | null } | null
|
|
27
28
|
member: FoodCourtMember
|
|
29
|
+
/** For a REMOVED row: the court removed the stall, or the stall left. */
|
|
30
|
+
endedBy?: FoodCourtEndedBy | null
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
/** What a join code opens, before the stall asks to join: the court's name and address only. */
|
package/src/locales/en-US.json
CHANGED
|
@@ -84,6 +84,8 @@
|
|
|
84
84
|
"statusActive": "Active",
|
|
85
85
|
"statusInactive": "Inactive",
|
|
86
86
|
"statusDeclined": "Declined",
|
|
87
|
+
"statusLeft": "Left",
|
|
88
|
+
"statusRemoved": "Removed",
|
|
87
89
|
"actionDeactivate": "Deactivate",
|
|
88
90
|
"actionActivate": "Activate",
|
|
89
91
|
"actionRemove": "Remove",
|
|
@@ -124,18 +126,19 @@
|
|
|
124
126
|
"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.",
|
|
125
127
|
"generateCode": "Generate code",
|
|
126
128
|
"codeTitle": "Join code",
|
|
127
|
-
"codeShareHint": "Share it with the stall. It works once, for
|
|
129
|
+
"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.",
|
|
128
130
|
"codeForStall": "For {stall}",
|
|
129
131
|
"codeDone": "Done",
|
|
130
132
|
"joinCode": "Join code",
|
|
131
133
|
"codeCount": "How many?",
|
|
132
134
|
"codeCountHint": "Up to 50 codes at a time.",
|
|
133
135
|
"generateCodes": "Generate {count} codes",
|
|
134
|
-
"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.",
|
|
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 code in the Stalls list, or each stall once you approve it.",
|
|
135
137
|
"codesTitle": "Join codes",
|
|
136
|
-
"codesShareHint": "Give each stall one code. Each works once, for
|
|
138
|
+
"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.",
|
|
137
139
|
"copyAll": "Copy all",
|
|
138
|
-
"joinCodes": "Join codes"
|
|
140
|
+
"joinCodes": "Join codes",
|
|
141
|
+
"editCodeHint": "The stall joins with this stall number and display name when you approve its request."
|
|
139
142
|
},
|
|
140
143
|
"invitations": {
|
|
141
144
|
"title": "Food Courts",
|
|
@@ -152,6 +155,7 @@
|
|
|
152
155
|
"statusDeclined": "Declined",
|
|
153
156
|
"statusCancelled": "Cancelled",
|
|
154
157
|
"statusLeft": "Left",
|
|
158
|
+
"statusRemoved": "Removed by food court",
|
|
155
159
|
"leave": "Leave food court",
|
|
156
160
|
"leaveTitle": "Leave this food court?",
|
|
157
161
|
"leaveMessage": "You will stop receiving orders from {court}. To rejoin, ask the food court for a new join code.",
|
package/src/locales/ja-JP.json
CHANGED
|
@@ -84,6 +84,8 @@
|
|
|
84
84
|
"statusActive": "有効",
|
|
85
85
|
"statusInactive": "無効",
|
|
86
86
|
"statusDeclined": "辞退",
|
|
87
|
+
"statusLeft": "退出",
|
|
88
|
+
"statusRemoved": "削除済み",
|
|
87
89
|
"actionDeactivate": "無効にする",
|
|
88
90
|
"actionActivate": "有効にする",
|
|
89
91
|
"actionRemove": "削除",
|
|
@@ -124,18 +126,19 @@
|
|
|
124
126
|
"generateIntro": "1つの店舗用のコードを発行します。店舗は「レストラン運営 › フードコート」でコードを入力して参加を申請し、あなたがここで承認します。参加時の店舗番号と表示名は、今でも後からでも設定できます。",
|
|
125
127
|
"generateCode": "コードを発行",
|
|
126
128
|
"codeTitle": "参加コード",
|
|
127
|
-
"codeShareHint": "このコードを店舗に共有してください。1回のみ、
|
|
129
|
+
"codeShareHint": "このコードを店舗に共有してください。1回のみ、30日間有効です。店舗が使用するまでは、店舗一覧から再度コピーできます。",
|
|
128
130
|
"codeForStall": "対象:{stall}",
|
|
129
131
|
"codeDone": "完了",
|
|
130
132
|
"joinCode": "参加コード",
|
|
131
133
|
"codeCount": "発行数",
|
|
132
134
|
"codeCountHint": "一度に50個まで発行できます。",
|
|
133
135
|
"generateCodes": "{count}個のコードを発行",
|
|
134
|
-
"generateIntroMany": "店舗ごとに1つずつコードを発行します。各店舗は「レストラン運営 › フードコート」で自分のコードを入力して参加を申請し、あなたがここで申請を1
|
|
136
|
+
"generateIntroMany": "店舗ごとに1つずつコードを発行します。各店舗は「レストラン運営 › フードコート」で自分のコードを入力して参加を申請し、あなたがここで申請を1件ずつ承認します。まとめて発行したコードには店舗番号と表示名が付きません。店舗一覧で各コードを編集するか、承認後に各店舗を編集して設定してください。",
|
|
135
137
|
"codesTitle": "参加コード",
|
|
136
|
-
"codesShareHint": "各店舗に1つずつコードを渡してください。どのコードも1回のみ、
|
|
138
|
+
"codesShareHint": "各店舗に1つずつコードを渡してください。どのコードも1回のみ、30日間有効です。使用されるまでは、店舗一覧から再度コピーできます。",
|
|
137
139
|
"copyAll": "すべてコピー",
|
|
138
|
-
"joinCodes": "参加コード"
|
|
140
|
+
"joinCodes": "参加コード",
|
|
141
|
+
"editCodeHint": "申請を承認すると、店舗はこの店舗番号と表示名で参加します。"
|
|
139
142
|
},
|
|
140
143
|
"invitations": {
|
|
141
144
|
"title": "フードコート",
|
|
@@ -152,6 +155,7 @@
|
|
|
152
155
|
"statusDeclined": "辞退",
|
|
153
156
|
"statusCancelled": "取り消し",
|
|
154
157
|
"statusLeft": "退出",
|
|
158
|
+
"statusRemoved": "フードコートにより削除",
|
|
155
159
|
"leave": "フードコートから退出",
|
|
156
160
|
"leaveTitle": "このフードコートから退出しますか?",
|
|
157
161
|
"leaveMessage": "{court} からの注文を受け付けなくなります。再参加するには、フードコートに新しい参加コードを依頼してください。",
|
package/src/locales/th-TH.json
CHANGED
|
@@ -84,6 +84,8 @@
|
|
|
84
84
|
"statusActive": "ใช้งาน",
|
|
85
85
|
"statusInactive": "ไม่ใช้งาน",
|
|
86
86
|
"statusDeclined": "ปฏิเสธแล้ว",
|
|
87
|
+
"statusLeft": "ออกแล้ว",
|
|
88
|
+
"statusRemoved": "ถูกนำออก",
|
|
87
89
|
"actionDeactivate": "ปิดใช้งาน",
|
|
88
90
|
"actionActivate": "เปิดใช้งาน",
|
|
89
91
|
"actionRemove": "นำออก",
|
|
@@ -124,18 +126,19 @@
|
|
|
124
126
|
"generateIntro": "สร้างรหัสสำหรับร้านค้าหนึ่งร้าน ร้านค้าป้อนรหัสในเมนู การดำเนินงานร้านอาหาร › ศูนย์อาหาร เพื่อขอเข้าร่วม แล้วคุณอนุมัติคำขอที่นี่ คุณตั้งหมายเลขร้านค้าและชื่อที่แสดงได้ตอนนี้หรือภายหลัง",
|
|
125
127
|
"generateCode": "สร้างรหัส",
|
|
126
128
|
"codeTitle": "รหัสเข้าร่วม",
|
|
127
|
-
"codeShareHint": "แชร์รหัสนี้ให้ร้านค้า ใช้ได้ครั้งเดียวภายใน
|
|
129
|
+
"codeShareHint": "แชร์รหัสนี้ให้ร้านค้า ใช้ได้ครั้งเดียวภายใน 30 วัน คุณคัดลอกรหัสอีกครั้งได้จากรายการร้านค้าจนกว่าร้านค้าจะใช้รหัส",
|
|
128
130
|
"codeForStall": "สำหรับ {stall}",
|
|
129
131
|
"codeDone": "เสร็จสิ้น",
|
|
130
132
|
"joinCode": "รหัสเข้าร่วม",
|
|
131
133
|
"codeCount": "จำนวนรหัส",
|
|
132
134
|
"codeCountHint": "สร้างได้ครั้งละไม่เกิน 50 รหัส",
|
|
133
135
|
"generateCodes": "สร้าง {count} รหัส",
|
|
134
|
-
"generateIntroMany": "สร้างรหัสให้ร้านค้าร้านละหนึ่งรหัส แต่ละร้านป้อนรหัสของตนในเมนู การดำเนินงานร้านอาหาร › ศูนย์อาหาร เพื่อขอเข้าร่วม แล้วคุณอนุมัติแต่ละคำขอที่นี่ รหัสที่สร้างพร้อมกันจะไม่มีหมายเลขร้านค้าและชื่อที่แสดง
|
|
136
|
+
"generateIntroMany": "สร้างรหัสให้ร้านค้าร้านละหนึ่งรหัส แต่ละร้านป้อนรหัสของตนในเมนู การดำเนินงานร้านอาหาร › ศูนย์อาหาร เพื่อขอเข้าร่วม แล้วคุณอนุมัติแต่ละคำขอที่นี่ รหัสที่สร้างพร้อมกันจะไม่มีหมายเลขร้านค้าและชื่อที่แสดง ให้ตั้งค่าโดยแก้ไขแต่ละรหัสในรายการร้านค้า หรือแก้ไขร้านค้าแต่ละร้านหลังจากอนุมัติแล้ว",
|
|
135
137
|
"codesTitle": "รหัสเข้าร่วม",
|
|
136
|
-
"codesShareHint": "ให้รหัสแก่ร้านค้าร้านละหนึ่งรหัส แต่ละรหัสใช้ได้ครั้งเดียวภายใน
|
|
138
|
+
"codesShareHint": "ให้รหัสแก่ร้านค้าร้านละหนึ่งรหัส แต่ละรหัสใช้ได้ครั้งเดียวภายใน 30 วัน คุณคัดลอกรหัสอีกครั้งได้จากรายการร้านค้าจนกว่าจะมีการใช้รหัส",
|
|
137
139
|
"copyAll": "คัดลอกทั้งหมด",
|
|
138
|
-
"joinCodes": "รหัสเข้าร่วม"
|
|
140
|
+
"joinCodes": "รหัสเข้าร่วม",
|
|
141
|
+
"editCodeHint": "ร้านค้าจะเข้าร่วมด้วยหมายเลขร้านค้าและชื่อที่แสดงนี้เมื่อคุณอนุมัติคำขอ"
|
|
139
142
|
},
|
|
140
143
|
"invitations": {
|
|
141
144
|
"title": "ศูนย์อาหาร",
|
|
@@ -152,6 +155,7 @@
|
|
|
152
155
|
"statusDeclined": "ปฏิเสธแล้ว",
|
|
153
156
|
"statusCancelled": "ยกเลิกแล้ว",
|
|
154
157
|
"statusLeft": "ออกแล้ว",
|
|
158
|
+
"statusRemoved": "ถูกนำออกโดยศูนย์อาหาร",
|
|
155
159
|
"leave": "ออกจากศูนย์อาหาร",
|
|
156
160
|
"leaveTitle": "ออกจากศูนย์อาหารนี้หรือไม่",
|
|
157
161
|
"leaveMessage": "คุณจะหยุดรับคำสั่งซื้อจาก {court} หากต้องการกลับเข้าร่วม โปรดขอรหัสเข้าร่วมใหม่จากศูนย์อาหาร",
|
package/src/locales/zh-CN.json
CHANGED
|
@@ -84,6 +84,8 @@
|
|
|
84
84
|
"statusActive": "启用",
|
|
85
85
|
"statusInactive": "停用",
|
|
86
86
|
"statusDeclined": "已拒绝",
|
|
87
|
+
"statusLeft": "已退出",
|
|
88
|
+
"statusRemoved": "已移除",
|
|
87
89
|
"actionDeactivate": "停用",
|
|
88
90
|
"actionActivate": "启用",
|
|
89
91
|
"actionRemove": "移除",
|
|
@@ -124,18 +126,19 @@
|
|
|
124
126
|
"generateIntro": "为一个摊位生成加入码。摊位在「餐厅运营 › 美食广场」中输入加入码申请加入,然后由您在此批准。摊位编号和显示名称可以现在设置,也可以稍后设置。",
|
|
125
127
|
"generateCode": "生成加入码",
|
|
126
128
|
"codeTitle": "加入码",
|
|
127
|
-
"codeShareHint": "请将加入码分享给摊位。仅可使用一次,
|
|
129
|
+
"codeShareHint": "请将加入码分享给摊位。仅可使用一次,30 天内有效。在摊位使用之前,您可以在摊位列表中再次复制。",
|
|
128
130
|
"codeForStall": "适用于:{stall}",
|
|
129
131
|
"codeDone": "完成",
|
|
130
132
|
"joinCode": "加入码",
|
|
131
133
|
"codeCount": "生成数量",
|
|
132
134
|
"codeCountHint": "每次最多生成 50 个。",
|
|
133
135
|
"generateCodes": "生成 {count} 个加入码",
|
|
134
|
-
"generateIntroMany": "为每个摊位各生成一个加入码。每个摊位在「餐厅运营 ›
|
|
136
|
+
"generateIntroMany": "为每个摊位各生成一个加入码。每个摊位在「餐厅运营 › 美食广场」中输入自己的加入码申请加入,然后由您在此逐一批准。一起生成的加入码不带摊位编号和显示名称,请在摊位列表中编辑各加入码进行设置,或在批准后编辑各摊位。",
|
|
135
137
|
"codesTitle": "加入码",
|
|
136
|
-
"codesShareHint": "请给每个摊位一个加入码。每个加入码仅可使用一次,
|
|
138
|
+
"codesShareHint": "请给每个摊位一个加入码。每个加入码仅可使用一次,30 天内有效。在每个加入码被使用之前,您可以在摊位列表中再次复制。",
|
|
137
139
|
"copyAll": "全部复制",
|
|
138
|
-
"joinCodes": "加入码"
|
|
140
|
+
"joinCodes": "加入码",
|
|
141
|
+
"editCodeHint": "批准申请后,摊位将以此摊位编号和显示名称加入。"
|
|
139
142
|
},
|
|
140
143
|
"invitations": {
|
|
141
144
|
"title": "美食广场",
|
|
@@ -152,6 +155,7 @@
|
|
|
152
155
|
"statusDeclined": "已拒绝",
|
|
153
156
|
"statusCancelled": "已取消",
|
|
154
157
|
"statusLeft": "已退出",
|
|
158
|
+
"statusRemoved": "已被美食广场移除",
|
|
155
159
|
"leave": "退出美食广场",
|
|
156
160
|
"leaveTitle": "退出此美食广场?",
|
|
157
161
|
"leaveMessage": "您将不再接收来自 {court} 的订单。如需重新加入,请向美食广场索取新的加入码。",
|
|
@@ -39,12 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
<template v-if="foodCourtId">
|
|
41
41
|
<GenerateJoinCodeSheet v-model="generateOpen" :food-court-id="foodCourtId" @created="load" />
|
|
42
|
-
<EditStallSheet
|
|
43
|
-
v-model="editOpen"
|
|
44
|
-
:food-court-id="foodCourtId"
|
|
45
|
-
:member="editing"
|
|
46
|
-
@saved="load"
|
|
47
|
-
/>
|
|
42
|
+
<EditStallSheet v-model="editOpen" :food-court-id="foodCourtId" :row="editing" @saved="load" />
|
|
48
43
|
</template>
|
|
49
44
|
</template>
|
|
50
45
|
|
|
@@ -78,7 +73,9 @@ import EditStallSheet from './stalls/EditStallSheet.vue'
|
|
|
78
73
|
* declines the stalls' requests to join, pauses (Deactivate = `visible:
|
|
79
74
|
* false`) or removes stalls, and sets each stall's number and display name
|
|
80
75
|
* for this court. Legacy invitations (from before join codes) can only be
|
|
81
|
-
* cancelled.
|
|
76
|
+
* cancelled. An unused code shows its code to copy again, and a code not yet
|
|
77
|
+
* approved can carry the stall number and display name the stall joins with;
|
|
78
|
+
* stalls that left or were removed stay listed last.
|
|
82
79
|
*/
|
|
83
80
|
const { t } = useI18n()
|
|
84
81
|
const { showSuccess, showError } = useSnackbarFunctions()
|
|
@@ -91,7 +88,7 @@ const isLoading = ref(false)
|
|
|
91
88
|
const loadFailed = ref(false)
|
|
92
89
|
const generateOpen = ref(false)
|
|
93
90
|
const editOpen = ref(false)
|
|
94
|
-
const editing = ref<
|
|
91
|
+
const editing = ref<StallRow | null>(null)
|
|
95
92
|
/** A confirm dialog this page opened is showing. */
|
|
96
93
|
const confirmOpen = ref(false)
|
|
97
94
|
|
|
@@ -102,7 +99,10 @@ const filteredRows = computed(() =>
|
|
|
102
99
|
stallName(row),
|
|
103
100
|
row.restaurantName ?? '',
|
|
104
101
|
row.restaurantId ?? '',
|
|
105
|
-
row.kind === 'joinCode' ? (row.businessName ?? '') : ''
|
|
102
|
+
row.kind === 'joinCode' ? (row.businessName ?? '') : '',
|
|
103
|
+
// Stalls read codes out without the dash, so match both forms.
|
|
104
|
+
row.kind === 'joinCode' ? (row.code ?? '') : '',
|
|
105
|
+
row.kind === 'joinCode' ? (row.code?.replace('-', '') ?? '') : ''
|
|
106
106
|
])
|
|
107
107
|
)
|
|
108
108
|
)
|
|
@@ -268,6 +268,10 @@ function onJoinCodeAction(row: JoinCodeStallRow, action: StallAction): void {
|
|
|
268
268
|
if (!courtId) return
|
|
269
269
|
const { joinCodeId } = row
|
|
270
270
|
switch (action) {
|
|
271
|
+
case 'edit':
|
|
272
|
+
editing.value = row
|
|
273
|
+
editOpen.value = true
|
|
274
|
+
return
|
|
271
275
|
case 'approve':
|
|
272
276
|
run(
|
|
273
277
|
courtId,
|
|
@@ -315,7 +319,20 @@ function onAction(row: StallRow, action: StallAction): void {
|
|
|
315
319
|
else onJoinCodeAction(row, action)
|
|
316
320
|
}
|
|
317
321
|
|
|
318
|
-
|
|
322
|
+
async function copyCode(code: string): Promise<void> {
|
|
323
|
+
const label = t('order.foodCourt.stalls.joinCode')
|
|
324
|
+
try {
|
|
325
|
+
await navigator.clipboard.writeText(code)
|
|
326
|
+
showSuccess(t('order.copiedToClipboard', { label }))
|
|
327
|
+
} catch {
|
|
328
|
+
showError(t('order.copyToClipboardFailed', { label }))
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* The Stall cell: the stall's name, and under a join code who asked to join
|
|
334
|
+
* or until when it works. An unused code also shows the code, with Copy.
|
|
335
|
+
*/
|
|
319
336
|
function stallCell(row: StallRow) {
|
|
320
337
|
const name = stallName(row) || t('order.foodCourt.stalls.codeNoStall')
|
|
321
338
|
if (row.kind === 'member') return name
|
|
@@ -325,8 +342,24 @@ function stallCell(row: StallRow) {
|
|
|
325
342
|
: t('order.foodCourt.stalls.codeExpires', {
|
|
326
343
|
date: dayjs(row.expiresAt).format('DD MMM YYYY, h:mm A')
|
|
327
344
|
})
|
|
345
|
+
const code = row.code
|
|
328
346
|
return h('div', { class: 'flex flex-col min-w-0' }, [
|
|
329
347
|
h('span', name),
|
|
348
|
+
code
|
|
349
|
+
? h('div', { class: 'flex items-center gap-4' }, [
|
|
350
|
+
h('span', { class: 'fm-typo-en-body-md-600', 'data-testid': 'stall-join-code' }, code),
|
|
351
|
+
h(components.FmButton, {
|
|
352
|
+
variant: 'tertiary',
|
|
353
|
+
icon: 'content_copy',
|
|
354
|
+
'aria-label': t('order.copy'),
|
|
355
|
+
'data-testid': 'stall-join-code-copy',
|
|
356
|
+
onClick: (event: Event) => {
|
|
357
|
+
event.stopPropagation()
|
|
358
|
+
copyCode(code)
|
|
359
|
+
}
|
|
360
|
+
})
|
|
361
|
+
])
|
|
362
|
+
: null,
|
|
330
363
|
h('span', { class: 'fm-typo-en-body-sm-400 text-fm-color-typo-tertiary' }, detail)
|
|
331
364
|
])
|
|
332
365
|
}
|