@feedmepos/mf-settings 0.0.50-prod → 0.0.52
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/{App-ccc37fd9.js → App-22950de9.js} +152 -143
- package/dist/Business-c9b59843.js +3893 -0
- package/dist/{CreateBusiness-ec365db8.js → CreateBusiness-0850150d.js} +86 -86
- package/dist/{FoodCourt-652c44f9.js → FoodCourt-ad9640e4.js} +60 -61
- package/dist/{actionButton-cc6bcf01.js → FormSection.vue_vue_type_script_setup_true_lang-6aab82f2.js} +25 -25
- package/dist/{ResponsiveFabButton.vue_vue_type_script_setup_true_lang-977372d5.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-e9712a4d.js} +63 -63
- package/dist/{Tagging-798e2bb7.js → Tagging-55538d2b.js} +6402 -6404
- package/dist/TemplateBuilder-54a34178.js +27 -0
- package/dist/{app-bd3cfc9c.js → app-b66ea7e1.js} +358 -40
- package/dist/app.js +2 -2
- package/dist/apps/mf-settings/src/api/foodCourt.d.ts +1 -1
- package/dist/apps/mf-settings/src/api/restaurant.d.ts +2 -2
- package/dist/apps/mf-settings/src/app.d.ts +1 -0
- package/dist/apps/mf-settings/src/components/business/RestaurantForm.vue.d.ts +1 -1
- package/dist/apps/mf-settings/src/components/foodcourt/foodCourt.d.ts +1 -1
- package/dist/apps/mf-settings/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{business-93826a8c.js → business-906742ba.js} +1 -1
- package/dist/{loading-6ee8ebc9.js → index-72d7bc88.js} +465 -466
- package/dist/{tslib.es6-449ce8af.js → map-695afd6f.js} +444 -561
- package/dist/{createForm-681e977a.js → object-8ac0c0d8.js} +18 -19
- package/dist/packages/shared/src/components/form/DynamicSheet.vue.d.ts +19 -0
- package/dist/packages/shared/src/components/layout/ListLayout.vue.d.ts +2 -0
- package/dist/packages/shared/src/composable/prompt.d.ts +9 -0
- package/dist/packages/shared/src/composable/sheet.d.ts +17 -0
- package/dist/packages/shared/src/helpers/browser.d.ts +1 -0
- package/dist/packages/shared/src/helpers/string.d.ts +12 -0
- package/package.json +3 -3
- package/dist/Business-edf5bd92.js +0 -11975
- package/dist/TemplateBuilder-3e34e9e8.js +0 -27
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { unref as n, defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { b as w } from "./business-93826a8c.js";
|
|
1
|
+
import { unref as n, defineComponent as M, openBlock as g, createElementBlock as y, ref as f, computed as L, watch as G, watchEffect as P, onBeforeUnmount as W, resolveComponent as h, createVNode as v, withCtx as z, createElementVNode as s, toDisplayString as b, Fragment as R, renderList as Z, normalizeClass as q, createBlock as Q, createCommentVNode as Y } from "vue";
|
|
2
|
+
import { useRouter as J } from "vue-router";
|
|
3
|
+
import { u as K, F as X } from "./index-72d7bc88.js";
|
|
5
4
|
import "./index-f1e5e565.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { useCoreStore as ee, useI18n as te, CountryOptions as se } from "@feedmepos/mf-common";
|
|
6
|
+
import { useSnackbar as ne } from "@feedmepos/ui-library";
|
|
7
|
+
import { _ as oe, r as le } from "./rules-c9fa22f8.js";
|
|
8
|
+
import { b as w } from "./business-906742ba.js";
|
|
9
9
|
import "pinia";
|
|
10
|
-
function
|
|
10
|
+
function S(r) {
|
|
11
11
|
return typeof r == "function" ? r() : n(r);
|
|
12
12
|
}
|
|
13
13
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
14
|
-
const
|
|
14
|
+
const A = () => {
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function ie(r, e) {
|
|
17
17
|
function o(...t) {
|
|
18
|
-
return new Promise((c,
|
|
19
|
-
Promise.resolve(r(() => e.apply(this, t), { fn: e, thisArg: this, args: t })).then(c).catch(
|
|
18
|
+
return new Promise((c, d) => {
|
|
19
|
+
Promise.resolve(r(() => e.apply(this, t), { fn: e, thisArg: this, args: t })).then(c).catch(d);
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
return o;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
let o, t, c =
|
|
26
|
-
const
|
|
27
|
-
clearTimeout(_), c(), c =
|
|
24
|
+
function ae(r, e = {}) {
|
|
25
|
+
let o, t, c = A;
|
|
26
|
+
const d = (_) => {
|
|
27
|
+
clearTimeout(_), c(), c = A;
|
|
28
28
|
};
|
|
29
29
|
return (_) => {
|
|
30
|
-
const l =
|
|
31
|
-
return o &&
|
|
32
|
-
c = e.rejectOnCancel ? C :
|
|
33
|
-
o &&
|
|
30
|
+
const l = S(r), i = S(e.maxWait);
|
|
31
|
+
return o && d(o), l <= 0 || i !== void 0 && i <= 0 ? (t && (d(t), t = null), Promise.resolve(_())) : new Promise((p, C) => {
|
|
32
|
+
c = e.rejectOnCancel ? C : p, i && !t && (t = setTimeout(() => {
|
|
33
|
+
o && d(o), t = null, p(_());
|
|
34
34
|
}, i)), o = setTimeout(() => {
|
|
35
|
-
t &&
|
|
35
|
+
t && d(t), t = null, p(_());
|
|
36
36
|
}, l);
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
42
|
-
|
|
40
|
+
function re(r, e = 200, o = {}) {
|
|
41
|
+
return ie(
|
|
42
|
+
ae(e, o),
|
|
43
43
|
r
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
const
|
|
46
|
+
const ce = `<svg width="388" height="388" viewBox="0 0 388 388" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
47
47
|
<path d="M239.449 0H148.553C66.5106 0 0.00195312 66.5086 0.00195312 148.551V239.447C0.00195312 321.489 66.5106 387.998 148.553 387.998H239.449C321.491 387.998 388 321.489 388 239.447V148.551C388 66.5086 321.491 0 239.449 0Z" fill="url(#paint0_linear_8849_557)" style=""/>
|
|
48
48
|
<mask id="mask0_8849_557" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="388" height="388">
|
|
49
49
|
<path d="M239.447 0H148.551C66.5086 0 0 66.5086 0 148.551V239.447C0 321.489 66.5086 387.998 148.551 387.998H239.447C321.49 387.998 387.998 321.489 387.998 239.447V148.551C387.998 66.5086 321.49 0 239.447 0Z" fill="white" style="fill:white;fill:white;fill-opacity:1;"/>
|
|
@@ -58,57 +58,57 @@ const re = `<svg width="388" height="388" viewBox="0 0 388 388" fill="none" xmln
|
|
|
58
58
|
</linearGradient>
|
|
59
59
|
</defs>
|
|
60
60
|
</svg>
|
|
61
|
-
`,
|
|
61
|
+
`, ue = ["innerHTML"], de = /* @__PURE__ */ M({
|
|
62
62
|
__name: "FeedmeLogo",
|
|
63
63
|
setup(r) {
|
|
64
|
-
return (e, o) => (
|
|
64
|
+
return (e, o) => (g(), y("div", {
|
|
65
65
|
class: "logo",
|
|
66
66
|
style: { width: "54px", height: "54px" },
|
|
67
|
-
innerHTML: n(
|
|
68
|
-
}, null, 8,
|
|
67
|
+
innerHTML: n(ce)
|
|
68
|
+
}, null, 8, ue));
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
-
const
|
|
71
|
+
const me = /* @__PURE__ */ oe(de, [["__scopeId", "data-v-c0191534"]]), pe = { class: "flex flex-col justify-center items-center bg-fm-color-neutral-white py-24" }, _e = { class: "space-y-32" }, fe = { class: "space-y-8" }, ve = { class: "fm-typo-en-title-lg-600" }, ge = { class: "space-y-8" }, he = { class: "fm-typo-en-title-sm-600" }, be = { class: "flex gap-16" }, ye = ["onClick"], Ce = { class: "space-y-8" }, we = { class: "m-8 w-[33px]" }, xe = ["innerHTML"], Fe = { class: "fm-typo-en-body-sm-600" }, Ve = { class: "space-y-16" }, Ie = /* @__PURE__ */ M({
|
|
72
72
|
__name: "CreateBusiness",
|
|
73
73
|
setup(r) {
|
|
74
74
|
var V;
|
|
75
|
-
|
|
76
|
-
const e =
|
|
77
|
-
|
|
75
|
+
J();
|
|
76
|
+
const e = ee(), o = f(""), t = f(""), c = f(""), d = f(!0), x = ne(), _ = K(x), { t: l } = te(), i = f(((V = e.currentCountry.value) == null ? void 0 : V.toUpperCase()) || "MY"), p = f([]), C = L(() => se.filter((u) => e.enabledCountries.value.includes(u.code)));
|
|
77
|
+
G(
|
|
78
78
|
i,
|
|
79
|
-
(
|
|
80
|
-
w.readBusinesses(i.value).then((
|
|
81
|
-
|
|
79
|
+
(u) => {
|
|
80
|
+
w.readBusinesses(i.value).then((m) => {
|
|
81
|
+
p.value = m;
|
|
82
82
|
});
|
|
83
83
|
},
|
|
84
84
|
{ immediate: !0 }
|
|
85
85
|
);
|
|
86
|
-
async function
|
|
86
|
+
async function D() {
|
|
87
87
|
try {
|
|
88
|
-
const
|
|
89
|
-
c.value =
|
|
88
|
+
const u = await w.readAgentByCode(t.value);
|
|
89
|
+
c.value = u ? u.id : "";
|
|
90
90
|
} catch {
|
|
91
91
|
c.value = "";
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
d.value = !!c.value;
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
async function
|
|
95
|
+
const I = re(D, 500), O = L(() => !!(F.value || p.value.length > 0 || t.value && !c.value)), F = f(!1);
|
|
96
|
+
async function E() {
|
|
97
97
|
_.minor(
|
|
98
98
|
async () => {
|
|
99
|
-
var
|
|
100
|
-
const
|
|
99
|
+
var m;
|
|
100
|
+
const u = await w.createBusiness(
|
|
101
101
|
{
|
|
102
102
|
name: o.value,
|
|
103
103
|
restaurantQuota: 1,
|
|
104
104
|
warehouseQuota: 0,
|
|
105
105
|
internal: !1,
|
|
106
|
-
ownerId: (
|
|
106
|
+
ownerId: (m = e.sessionUser.value) == null ? void 0 : m.id,
|
|
107
107
|
agentId: c.value || void 0
|
|
108
108
|
},
|
|
109
109
|
i.value
|
|
110
110
|
);
|
|
111
|
-
|
|
111
|
+
u._id && (e.setCachedBusiness(u._id), e.setCachedCountry(i.value)), setTimeout(() => {
|
|
112
112
|
window.location.href = "/";
|
|
113
113
|
}, 500);
|
|
114
114
|
},
|
|
@@ -117,102 +117,102 @@ const de = /* @__PURE__ */ X(ue, [["__scopeId", "data-v-c0191534"]]), me = { cla
|
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
-
async function
|
|
120
|
+
async function N() {
|
|
121
121
|
await e.signOut(), setTimeout(() => {
|
|
122
|
-
window.location.href = `${
|
|
122
|
+
window.location.href = `${X.baseUrl}/login?fm_redirect=${encodeURIComponent(window.location.protocol + "//" + window.location.host)}`;
|
|
123
123
|
}, 500);
|
|
124
124
|
}
|
|
125
|
-
return
|
|
125
|
+
return P(() => {
|
|
126
126
|
e.hideSidebar.value || e.hideSidebarToggle(!0);
|
|
127
|
-
}),
|
|
127
|
+
}), W(() => {
|
|
128
128
|
e.hideSidebarToggle(!1);
|
|
129
|
-
}), (
|
|
130
|
-
const k = h("FmTextField"),
|
|
131
|
-
return
|
|
132
|
-
|
|
129
|
+
}), (u, m) => {
|
|
130
|
+
const k = h("FmTextField"), $ = h("FmSnackbar"), T = h("FmButton"), j = h("FmForm");
|
|
131
|
+
return g(), y("div", pe, [
|
|
132
|
+
v(j, {
|
|
133
133
|
class: "w-[540px] xs:w-full xs:px-16 space-y-24",
|
|
134
134
|
"blame-form-child-on-validation-failed": "",
|
|
135
|
-
"on-validation-success":
|
|
135
|
+
"on-validation-success": E
|
|
136
136
|
}, {
|
|
137
|
-
default:
|
|
137
|
+
default: z(() => {
|
|
138
138
|
var B, H, U;
|
|
139
139
|
return [
|
|
140
140
|
s("div", null, [
|
|
141
|
-
|
|
141
|
+
v(me)
|
|
142
142
|
]),
|
|
143
|
-
s("div",
|
|
144
|
-
s("div",
|
|
145
|
-
s("div",
|
|
143
|
+
s("div", _e, [
|
|
144
|
+
s("div", fe, [
|
|
145
|
+
s("div", ve, b(n(l)("settings.create_business.welcome", {
|
|
146
146
|
name: (H = (B = n(e).sessionUser) == null ? void 0 : B.value) == null ? void 0 : H.displayName
|
|
147
147
|
})), 1),
|
|
148
148
|
s("div", null, b(n(l)("settings.create_business.subtitle")), 1)
|
|
149
149
|
]),
|
|
150
150
|
s("div", null, [
|
|
151
|
-
|
|
151
|
+
v(k, {
|
|
152
152
|
label: n(l)("settings.create_business.business_name.label"),
|
|
153
153
|
"label-mark": "required",
|
|
154
|
-
rules: [n(
|
|
154
|
+
rules: [n(le)],
|
|
155
155
|
modelValue: o.value,
|
|
156
|
-
"onUpdate:modelValue":
|
|
156
|
+
"onUpdate:modelValue": m[0] || (m[0] = (a) => o.value = a)
|
|
157
157
|
}, null, 8, ["label", "rules", "modelValue"])
|
|
158
158
|
]),
|
|
159
159
|
s("div", null, [
|
|
160
|
-
|
|
160
|
+
v(k, {
|
|
161
161
|
label: n(l)("settings.create_business.agent.label"),
|
|
162
162
|
modelValue: t.value,
|
|
163
163
|
"onUpdate:modelValue": [
|
|
164
|
-
|
|
165
|
-
n(
|
|
164
|
+
m[1] || (m[1] = (a) => t.value = a),
|
|
165
|
+
n(I)
|
|
166
166
|
],
|
|
167
|
-
rules: [(a) => !a ||
|
|
167
|
+
rules: [(a) => !a || d.value || n(l)("settings.create_business.agent.invalid")]
|
|
168
168
|
}, null, 8, ["label", "modelValue", "onUpdate:modelValue", "rules"])
|
|
169
169
|
]),
|
|
170
170
|
s("div", ge, [
|
|
171
|
-
s("div",
|
|
172
|
-
s("div",
|
|
173
|
-
(
|
|
171
|
+
s("div", he, b(n(l)("settings.create_business.country.title")), 1),
|
|
172
|
+
s("div", be, [
|
|
173
|
+
(g(!0), y(R, null, Z(C.value, (a) => (g(), y("div", {
|
|
174
174
|
key: a.code,
|
|
175
|
-
class:
|
|
175
|
+
class: q(["flex-1 h-[124px] flex justify-center items-center border-2 fm-corner-radius-md cursor-pointer", [
|
|
176
176
|
i.value === a.code ? "border-fm-color-primary" : "border-fm-color-neutral-gray-200",
|
|
177
177
|
i.value === a.code ? "bg-fm-color-system-warning-100" : "bg-fm-color-neutral-white"
|
|
178
178
|
]]),
|
|
179
|
-
onClick: (
|
|
179
|
+
onClick: (ke) => i.value = a.code.toUpperCase()
|
|
180
180
|
}, [
|
|
181
|
-
s("div",
|
|
182
|
-
s("div",
|
|
181
|
+
s("div", Ce, [
|
|
182
|
+
s("div", we, [
|
|
183
183
|
s("span", {
|
|
184
184
|
innerHTML: a.flag
|
|
185
|
-
}, null, 8,
|
|
185
|
+
}, null, 8, xe)
|
|
186
186
|
]),
|
|
187
|
-
s("div",
|
|
187
|
+
s("div", Fe, b(a.name), 1)
|
|
188
188
|
])
|
|
189
|
-
], 10,
|
|
189
|
+
], 10, ye))), 128))
|
|
190
190
|
])
|
|
191
191
|
]),
|
|
192
|
-
|
|
192
|
+
p.value.length > 0 ? (g(), Q($, {
|
|
193
193
|
key: 0,
|
|
194
194
|
variant: "info",
|
|
195
195
|
title: n(l)("settings.create_business.country.exists.title"),
|
|
196
|
-
description: n(l)("settings.create_business.country.exists.message", { name: (U =
|
|
197
|
-
}, null, 8, ["title", "description"])) :
|
|
198
|
-
s("div",
|
|
196
|
+
description: n(l)("settings.create_business.country.exists.message", { name: (U = p.value[0]) == null ? void 0 : U.name })
|
|
197
|
+
}, null, 8, ["title", "description"])) : Y("", !0),
|
|
198
|
+
s("div", Ve, [
|
|
199
199
|
s("div", null, [
|
|
200
|
-
|
|
200
|
+
v(T, {
|
|
201
201
|
label: n(l)("settings.create_business.submit"),
|
|
202
202
|
variant: "primary",
|
|
203
203
|
size: "lg",
|
|
204
204
|
class: "w-full",
|
|
205
|
-
disabled:
|
|
205
|
+
disabled: O.value,
|
|
206
206
|
type: "submit"
|
|
207
207
|
}, null, 8, ["label", "disabled"])
|
|
208
208
|
]),
|
|
209
209
|
s("div", null, [
|
|
210
|
-
|
|
210
|
+
v(T, {
|
|
211
211
|
label: n(l)("settings.create_business.logout"),
|
|
212
212
|
variant: "secondary",
|
|
213
213
|
size: "lg",
|
|
214
214
|
class: "w-full",
|
|
215
|
-
onClick:
|
|
215
|
+
onClick: N
|
|
216
216
|
}, null, 8, ["label"])
|
|
217
217
|
])
|
|
218
218
|
])
|
|
@@ -226,5 +226,5 @@ const de = /* @__PURE__ */ X(ue, [["__scopeId", "data-v-c0191534"]]), me = { cla
|
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
228
|
export {
|
|
229
|
-
|
|
229
|
+
Ie as default
|
|
230
230
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var Yg = Object.defineProperty;
|
|
2
2
|
var Kg = (u, l, c) => l in u ? Yg(u, l, { enumerable: !0, configurable: !0, writable: !0, value: c }) : u[l] = c;
|
|
3
3
|
var Hi = (u, l, c) => (Kg(u, typeof l != "symbol" ? l + "" : l, c), c);
|
|
4
|
-
import { defineComponent as hl, ref as Rt, resolveComponent as wt, openBlock as Dt, createElementBlock as Kn, Fragment as Vr, renderSlot as Gf, createVNode as gt, unref as zt, withCtx as Jt, createElementVNode as He, computed as Rn, watch as Vf, withKeys as Hg, toDisplayString as un, renderList as nl, createBlock as Ur, createCommentVNode as rl,
|
|
5
|
-
import {
|
|
4
|
+
import { h as Su, defineComponent as hl, ref as Rt, resolveComponent as wt, openBlock as Dt, createElementBlock as Kn, Fragment as Vr, renderSlot as Gf, createVNode as gt, unref as zt, withCtx as Jt, createElementVNode as He, computed as Rn, watch as Vf, withKeys as Hg, toDisplayString as un, renderList as nl, createBlock as Ur, createCommentVNode as rl, getCurrentInstance as Wg, withModifiers as Jg } from "vue";
|
|
5
|
+
import { useCoreStore as ml, useI18n as Sc } from "@feedmepos/mf-common";
|
|
6
|
+
import { l as q, c as V, d as ze, a as Oc, e as Ei, b as Yf } from "./index-f1e5e565.js";
|
|
6
7
|
import { c as Qg, a as zd } from "./index-1eb3cc0a.js";
|
|
7
|
-
import { d as Xg, _ as hc, u as Zg, a as xg } from "./
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { c as Hf, _ as np, a as C$ } from "./createForm-681e977a.js";
|
|
8
|
+
import { d as Xg, _ as hc, u as Zg, a as xg } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-e9712a4d.js";
|
|
9
|
+
import { components as so, useSnackbar as gl, useDialogChild as ep, useDialog as Kf, useBreakpoints as tp } from "@feedmepos/ui-library";
|
|
10
|
+
import { c as Hf, _ as np, a as C$ } from "./object-8ac0c0d8.js";
|
|
11
|
+
import { g as Gn, r as la, b as Fd, u as Tc } from "./index-72d7bc88.js";
|
|
12
12
|
import "pinia";
|
|
13
13
|
var wd = {}, fn = {}, pl = {};
|
|
14
14
|
Object.defineProperty(pl, "__esModule", { value: !0 });
|
|
@@ -1158,7 +1158,7 @@ ea.F_ADJUSTMENT_CAUSE = Op.z.enum([
|
|
|
1158
1158
|
var mn = {}, zn = {};
|
|
1159
1159
|
Object.defineProperty(zn, "__esModule", { value: !0 });
|
|
1160
1160
|
zn.F_CHECKOUT_TYPE = zn.F_PAYMENT_ISSUER = zn.F_PAYMENT_NAME = zn.F_ONLINE_PAYMENT_CHANNEL_TYPE = void 0;
|
|
1161
|
-
const Dl = q, U$ =
|
|
1161
|
+
const Dl = q, U$ = Oc;
|
|
1162
1162
|
zn.F_ONLINE_PAYMENT_CHANNEL_TYPE = Dl.z.enum([
|
|
1163
1163
|
"Internet Banking",
|
|
1164
1164
|
"Credit Card",
|
|
@@ -5316,7 +5316,7 @@ var Wc = {};
|
|
|
5316
5316
|
var Jc = {}, jn = {};
|
|
5317
5317
|
Object.defineProperty(jn, "__esModule", { value: !0 });
|
|
5318
5318
|
jn.RM_PAYMENT_TRANSACTION_ITEM_STATUS = jn.RM_PAYMENY_METHOD = jn.RM_REGION = jn.RM_CURRENCY_TYPE = void 0;
|
|
5319
|
-
const es = q, Qc =
|
|
5319
|
+
const es = q, Qc = Oc;
|
|
5320
5320
|
jn.RM_CURRENCY_TYPE = es.z.nativeEnum(Qc.RM.CurrencyType);
|
|
5321
5321
|
jn.RM_REGION = es.z.enum([
|
|
5322
5322
|
"MALAYSIA",
|
|
@@ -7839,7 +7839,7 @@ Qn.F_PAYMENT_TRANSACTION_GROUP = gs.z.enum([
|
|
|
7839
7839
|
var dm = {}, Xn = {};
|
|
7840
7840
|
Object.defineProperty(Xn, "__esModule", { value: !0 });
|
|
7841
7841
|
Xn.RMPaymentTransactionItemStatus = Xn.RMMethod = Xn.RMRegion = Xn.RMCurrencyType = void 0;
|
|
7842
|
-
const ps = q, l$ =
|
|
7842
|
+
const ps = q, l$ = Oc;
|
|
7843
7843
|
Xn.RMCurrencyType = ps.z.nativeEnum(l$.RM.CurrencyType);
|
|
7844
7844
|
Xn.RMRegion = ps.z.enum(["MALAYSIA", "CHINA"]);
|
|
7845
7845
|
Xn.RMMethod = ps.z.nativeEnum(l$.RM.Method);
|
|
@@ -46879,6 +46879,44 @@ function Lg() {
|
|
|
46879
46879
|
}(wd)), wd;
|
|
46880
46880
|
}
|
|
46881
46881
|
var tt = Lg();
|
|
46882
|
+
function Gg(u) {
|
|
46883
|
+
return Su(
|
|
46884
|
+
so.FmMenu,
|
|
46885
|
+
{
|
|
46886
|
+
trigger: "click",
|
|
46887
|
+
stopClickPropagation: !0,
|
|
46888
|
+
disabled: (u == null ? void 0 : u.length) === 0,
|
|
46889
|
+
zIndex: 200
|
|
46890
|
+
},
|
|
46891
|
+
{
|
|
46892
|
+
"menu-button": () => Su(so.FmButton, {
|
|
46893
|
+
type: "button",
|
|
46894
|
+
variant: "tertiary",
|
|
46895
|
+
icon: "more_vert",
|
|
46896
|
+
iconColor: "#000000",
|
|
46897
|
+
size: "md",
|
|
46898
|
+
disabled: (u == null ? void 0 : u.length) === 0
|
|
46899
|
+
}),
|
|
46900
|
+
default: () => u.map(({ label: l, color: c, onClick: m }) => Su(
|
|
46901
|
+
so.FmMenuItem,
|
|
46902
|
+
{
|
|
46903
|
+
onClick() {
|
|
46904
|
+
m == null || m();
|
|
46905
|
+
}
|
|
46906
|
+
},
|
|
46907
|
+
{
|
|
46908
|
+
label: () => Su(
|
|
46909
|
+
"span",
|
|
46910
|
+
{
|
|
46911
|
+
class: c
|
|
46912
|
+
},
|
|
46913
|
+
l
|
|
46914
|
+
)
|
|
46915
|
+
}
|
|
46916
|
+
))
|
|
46917
|
+
}
|
|
46918
|
+
);
|
|
46919
|
+
}
|
|
46882
46920
|
function Wz(u, l = []) {
|
|
46883
46921
|
const c = JSON.parse(JSON.stringify(u));
|
|
46884
46922
|
return l.length > 0 && l.forEach((m) => {
|
|
@@ -46888,7 +46926,7 @@ function Wz(u, l = []) {
|
|
|
46888
46926
|
function qf(u, l) {
|
|
46889
46927
|
return l === void 0 ? u : typeof l == "function" ? l(u) : `${u[l]}`;
|
|
46890
46928
|
}
|
|
46891
|
-
function
|
|
46929
|
+
function Vg(u, l) {
|
|
46892
46930
|
return Wz(u).sort((m, y) => {
|
|
46893
46931
|
let _ = qf(m, l == null ? void 0 : l.selector), z = qf(y, l == null ? void 0 : l.selector);
|
|
46894
46932
|
if (l != null && l.descending) {
|
|
@@ -46948,7 +46986,7 @@ const _r = {
|
|
|
46948
46986
|
},
|
|
46949
46987
|
setup(u, { expose: l }) {
|
|
46950
46988
|
var X;
|
|
46951
|
-
const c = u, m =
|
|
46989
|
+
const c = u, m = ml(), y = gl(), _ = Tc(y), z = Rt(""), w = Rt(((X = m.currentRestaurant.value) == null ? void 0 : X._id) ?? ""), K = Rt(!1), ie = Rt(!1), ue = (L) => {
|
|
46952
46990
|
ie.value = !ie.value;
|
|
46953
46991
|
}, oe = async () => {
|
|
46954
46992
|
await _.minor(
|
|
@@ -47133,7 +47171,7 @@ const Zz = { class: "space-y-24" }, xz = { class: "flex gap-8" }, eF = { class:
|
|
|
47133
47171
|
}
|
|
47134
47172
|
},
|
|
47135
47173
|
setup(u) {
|
|
47136
|
-
const { t: l } =
|
|
47174
|
+
const { t: l } = Sc(), { emitData: c } = ep(), m = u, y = ml(), _ = gl(), z = Rn(() => {
|
|
47137
47175
|
var M;
|
|
47138
47176
|
return (M = y.currentRestaurant.value) == null ? void 0 : M._id;
|
|
47139
47177
|
});
|
|
@@ -47265,53 +47303,14 @@ const Zz = { class: "space-y-24" }, xz = { class: "flex gap-8" }, eF = { class:
|
|
|
47265
47303
|
], 64);
|
|
47266
47304
|
};
|
|
47267
47305
|
}
|
|
47268
|
-
})
|
|
47269
|
-
function Vg(u) {
|
|
47270
|
-
return Su(
|
|
47271
|
-
so.FmMenu,
|
|
47272
|
-
{
|
|
47273
|
-
trigger: "click",
|
|
47274
|
-
stopClickPropagation: !0,
|
|
47275
|
-
disabled: (u == null ? void 0 : u.length) === 0,
|
|
47276
|
-
zIndex: 200
|
|
47277
|
-
},
|
|
47278
|
-
{
|
|
47279
|
-
"menu-button": () => Su(so.FmButton, {
|
|
47280
|
-
type: "button",
|
|
47281
|
-
variant: "tertiary",
|
|
47282
|
-
icon: "more_vert",
|
|
47283
|
-
iconColor: "#000000",
|
|
47284
|
-
size: "md",
|
|
47285
|
-
disabled: (u == null ? void 0 : u.length) === 0
|
|
47286
|
-
}),
|
|
47287
|
-
default: () => u.map(({ label: l, color: c, onClick: m }) => Su(
|
|
47288
|
-
so.FmMenuItem,
|
|
47289
|
-
{
|
|
47290
|
-
onClick() {
|
|
47291
|
-
m == null || m();
|
|
47292
|
-
}
|
|
47293
|
-
},
|
|
47294
|
-
{
|
|
47295
|
-
label: () => Su(
|
|
47296
|
-
"span",
|
|
47297
|
-
{
|
|
47298
|
-
class: c
|
|
47299
|
-
},
|
|
47300
|
-
l
|
|
47301
|
-
)
|
|
47302
|
-
}
|
|
47303
|
-
))
|
|
47304
|
-
}
|
|
47305
|
-
);
|
|
47306
|
-
}
|
|
47307
|
-
const cF = { class: "fm-typo-en-title-md-600" }, $F = { class: "pt-8 space-y-24" }, fF = { class: "space-y-8" }, hF = { class: "space-y-12" }, mF = { class: "flex justify-between items-center" }, gF = { class: "fm-typo-en-body-lg-600" }, pF = /* @__PURE__ */ hl({
|
|
47306
|
+
}), cF = { class: "fm-typo-en-title-md-600" }, $F = { class: "pt-8 space-y-24" }, fF = { class: "space-y-8" }, hF = { class: "space-y-12" }, mF = { class: "flex justify-between items-center" }, gF = { class: "fm-typo-en-body-lg-600" }, pF = /* @__PURE__ */ hl({
|
|
47308
47307
|
__name: "EditFoodCourt",
|
|
47309
47308
|
props: {
|
|
47310
47309
|
initialValue: {},
|
|
47311
47310
|
onSuccess: { type: Function }
|
|
47312
47311
|
},
|
|
47313
47312
|
setup(u, { expose: l }) {
|
|
47314
|
-
const c = u, m =
|
|
47313
|
+
const c = u, m = ml(), y = gl(), _ = Tc(y), z = Kf(), { t: w } = Sc(), K = Rn(() => {
|
|
47315
47314
|
var C;
|
|
47316
47315
|
return (C = m.currentRestaurant.value) == null ? void 0 : C._id;
|
|
47317
47316
|
}), ie = Rn(() => K.value === L.value.ownerId), ue = Rn(() => m.restaurants.value.filter((C) => C.managable)), oe = Rn(() => ue.value.some((C) => C._id === L.value.ownerId)), X = Rt(c.initialValue.name), L = Rt(Hf(c.initialValue)), B = Rn(() => {
|
|
@@ -47337,7 +47336,7 @@ const cF = { class: "fm-typo-en-title-md-600" }, $F = { class: "pt-8 space-y-24"
|
|
|
47337
47336
|
}))
|
|
47338
47337
|
};
|
|
47339
47338
|
});
|
|
47340
|
-
return
|
|
47339
|
+
return Vg(C, { selector: "name" });
|
|
47341
47340
|
});
|
|
47342
47341
|
async function k(C, { newStatus: Y, label: ee }) {
|
|
47343
47342
|
const ae = L.value.members.find((de) => de._id === C);
|
|
@@ -47452,7 +47451,7 @@ const cF = { class: "fm-typo-en-title-md-600" }, $F = { class: "pt-8 space-y-24"
|
|
|
47452
47451
|
color: ae.newStatus === tt.F_FOOD_COURT_STATUS.Enum.ACTIVE ? void 0 : "text-fm-color-typo-error",
|
|
47453
47452
|
onClick: () => k(Y.id, ae)
|
|
47454
47453
|
}));
|
|
47455
|
-
return
|
|
47454
|
+
return Gg(ee);
|
|
47456
47455
|
}
|
|
47457
47456
|
}
|
|
47458
47457
|
], H = Rt(!1), M = Rt(!1), I = (C) => {
|
|
@@ -47542,10 +47541,10 @@ const cF = { class: "fm-typo-en-title-md-600" }, $F = { class: "pt-8 space-y-24"
|
|
|
47542
47541
|
}, _F = { class: "flex justify-between" }, vF = { class: "py-8 px-16 space-y-8" }, EF = { class: "flex-1 pb-64 overflow-auto divide-y divide-fm-color-neutral-gray-100" }, zF = ["onClick"], FF = { class: "flex justify-between items-center" }, wF = { class: "fm-typo-en-body-lg-600" }, SF = { class: "flex gap-8" }, OF = { class: "text-fm-color-typo-secondary" }, TF = { class: "text-fm-color-typo-secondary" }, AF = { class: "text-fm-color-typo-secondary" }, UF = /* @__PURE__ */ hl({
|
|
47543
47542
|
__name: "FoodCourt",
|
|
47544
47543
|
setup(u) {
|
|
47545
|
-
const { t: l } =
|
|
47544
|
+
const { t: l } = Sc(), c = Rt([]), m = Rt(""), y = Rn(() => c.value.filter((C) => {
|
|
47546
47545
|
var ee;
|
|
47547
47546
|
return `${C.name} ${(ee = C.pf_owner) == null ? void 0 : ee.profile.name} ${C.status}`.toLowerCase().includes(m.value.toLowerCase());
|
|
47548
|
-
})), _ = Kf(), z =
|
|
47547
|
+
})), _ = Kf(), z = gl(), w = Tc(z), K = Rt(""), ie = [
|
|
47549
47548
|
{
|
|
47550
47549
|
header: () => l("settings.food_court.list.columns.name"),
|
|
47551
47550
|
accessorKey: "name"
|
|
@@ -47577,10 +47576,10 @@ const cF = { class: "fm-typo-en-title-md-600" }, $F = { class: "pt-8 space-y-24"
|
|
|
47577
47576
|
size: 40,
|
|
47578
47577
|
cell: (C) => {
|
|
47579
47578
|
const Y = L(C.row.original);
|
|
47580
|
-
return
|
|
47579
|
+
return Gg(Y);
|
|
47581
47580
|
}
|
|
47582
47581
|
}
|
|
47583
|
-
], ue =
|
|
47582
|
+
], ue = ml(), oe = Rt(!1);
|
|
47584
47583
|
function X(C) {
|
|
47585
47584
|
const Y = ue.restaurants.value.find((ee) => ee._id === C);
|
|
47586
47585
|
ue.changeRestaurant(Y);
|
|
@@ -47619,7 +47618,7 @@ const cF = { class: "fm-typo-en-title-md-600" }, $F = { class: "pt-8 space-y-24"
|
|
|
47619
47618
|
oe.value = !0;
|
|
47620
47619
|
try {
|
|
47621
47620
|
const Y = await _r.read(ue.currentRestaurant.value._id);
|
|
47622
|
-
c.value =
|
|
47621
|
+
c.value = Vg(Y, { selector: "name" }), K.value = ((C = c.value[0]) == null ? void 0 : C._id) || "";
|
|
47623
47622
|
} finally {
|
|
47624
47623
|
oe.value = !1;
|
|
47625
47624
|
}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
import { defineComponent as p, openBlock as t, createElementBlock as o, normalizeClass as m, renderSlot as l, createElementVNode as
|
|
1
|
+
import { h as r, withModifiers as u, defineComponent as p, openBlock as t, createElementBlock as o, normalizeClass as m, renderSlot as l, createElementVNode as i, toDisplayString as a, createCommentVNode as c, createVNode as d, withCtx as f } from "vue";
|
|
2
2
|
import { components as h } from "@feedmepos/ui-library";
|
|
3
|
+
function w(s) {
|
|
4
|
+
return r(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
class: "flex justify-end"
|
|
8
|
+
},
|
|
9
|
+
s.map(({ name: e, onClick: n }) => r(h.FmButton, {
|
|
10
|
+
icon: e,
|
|
11
|
+
outline: !0,
|
|
12
|
+
variant: "tertiary",
|
|
13
|
+
iconColor: "neutral-gray-400",
|
|
14
|
+
onClick: u(n, ["stop", "prevent"])
|
|
15
|
+
}))
|
|
16
|
+
);
|
|
17
|
+
}
|
|
3
18
|
const y = /* @__PURE__ */ p({
|
|
4
19
|
__name: "FormColumn",
|
|
5
20
|
props: {
|
|
@@ -18,7 +33,7 @@ const y = /* @__PURE__ */ p({
|
|
|
18
33
|
}, b = { class: "space-y-4" }, k = { class: "fm-typo-en-title-sm-600" }, C = {
|
|
19
34
|
key: 0,
|
|
20
35
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
21
|
-
},
|
|
36
|
+
}, $ = /* @__PURE__ */ p({
|
|
22
37
|
__name: "FormSection",
|
|
23
38
|
props: {
|
|
24
39
|
title: {},
|
|
@@ -30,14 +45,14 @@ const y = /* @__PURE__ */ p({
|
|
|
30
45
|
class: m(["flex flex-col space-y-16", { "min-h-0": e.shrinkable }])
|
|
31
46
|
}, [
|
|
32
47
|
e.title ? (t(), o("div", _, [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
e.subTitle ? (t(), o("p", C,
|
|
48
|
+
i("div", b, [
|
|
49
|
+
i("p", k, a(e.title), 1),
|
|
50
|
+
e.subTitle ? (t(), o("p", C, a(e.subTitle), 1)) : c("", !0)
|
|
36
51
|
]),
|
|
37
52
|
l(e.$slots, "append-title")
|
|
38
|
-
])) :
|
|
39
|
-
|
|
40
|
-
default:
|
|
53
|
+
])) : c("", !0),
|
|
54
|
+
d(y, { shrinkable: e.shrinkable }, {
|
|
55
|
+
default: f(() => [
|
|
41
56
|
l(e.$slots, "default")
|
|
42
57
|
]),
|
|
43
58
|
_: 3
|
|
@@ -45,22 +60,7 @@ const y = /* @__PURE__ */ p({
|
|
|
45
60
|
], 2));
|
|
46
61
|
}
|
|
47
62
|
});
|
|
48
|
-
function $(s) {
|
|
49
|
-
return c(
|
|
50
|
-
"div",
|
|
51
|
-
{
|
|
52
|
-
class: "flex justify-end"
|
|
53
|
-
},
|
|
54
|
-
s.map(({ name: e, onClick: n }) => c(h.FmButton, {
|
|
55
|
-
icon: e,
|
|
56
|
-
outline: !0,
|
|
57
|
-
variant: "tertiary",
|
|
58
|
-
iconColor: "neutral-gray-400",
|
|
59
|
-
onClick: f(n, ["stop", "prevent"])
|
|
60
|
-
}))
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
63
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
$ as _,
|
|
65
|
+
w as c
|
|
66
66
|
};
|