@feedmepos/mf-hrm-portal 2.0.15-dev → 2.0.15-dev.3
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/{AuditLogList-DBIsI4YF.js → AuditLogList-eyzJecZc.js} +4 -4
- package/dist/EmployeeList-QibdsTN-.js +736 -0
- package/dist/{Main-BAZAQTWi.js → Main-B_QCpWOx.js} +4 -4
- package/dist/{Main-D7yzD5SW.js → Main-Bjfm9a6M.js} +5 -5
- package/dist/{Main-B3YiMuFq.js → Main-DX1aet8y.js} +1298 -1294
- package/dist/{PermissionSetList-DBT9LtfT.js → PermissionSetList-fE9Zfrl6.js} +30 -30
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BfqnjeTK.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-JpCfRxA9.js} +500 -500
- package/dist/RoleList-ByXZemFz.js +528 -0
- package/dist/{TeamMemberList-BCv5Vixx.js → TeamMemberList-D-_icv19.js} +327 -324
- package/dist/{TimesheetList-DpMBgVtY.js → TimesheetList-DVvz6id4.js} +7 -7
- package/dist/{app-pvHHFjbx.js → app-DJG3HGqG.js} +220 -261
- package/dist/app.js +2 -2
- package/dist/{dayjs.min-BK_bM9xY.js → dayjs.min-CN6o-ax9.js} +1 -1
- package/dist/{employee-DhkixwiI.js → employee-CU-G-rAZ.js} +71 -74
- package/dist/{index-DK4fVbTF.js → index-ynxje0mm.js} +1 -1
- package/dist/{iteration-Bk3cnP07.js → iteration-C6Km_Rno.js} +1 -1
- package/dist/{lodash-TrOlqj07.js → lodash-DZvG4gEx.js} +1 -1
- package/dist/rule-X41LxaES.js +991 -0
- package/dist/src/helpers/rule.d.ts +1 -1
- package/dist/src/stores/employee.d.ts +124 -19
- package/dist/src/types/employee.d.ts +3 -0
- package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/{timesheet-DSQeCVfL.js → timesheet-DUtxTIA4.js} +9 -9
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useAppStore-CrUYEAtX.js +171 -0
- package/dist/useDiscardConfirm-BHni0LNu.js +28 -0
- package/dist/{useLoading-fEAOlgoV.js → useLoading-hGUqfW4U.js} +1 -1
- package/dist/{useReportPermissions-CkOk_2tl.js → useReportPermissions-BgTdISQy.js} +3 -3
- package/dist/utils-BZkjJbju.js +17 -0
- package/package.json +1 -1
- package/dist/EmployeeList-BOSxLZbY.js +0 -702
- package/dist/RoleList-DeE5tN-5.js +0 -519
- package/dist/index-Bckj5jnu.js +0 -998
- package/dist/useAppStore-DwfwjZpc.js +0 -168
- package/dist/useRestaurantMap-e9fQJiLC.js +0 -39
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { defineComponent as me, ref as
|
|
1
|
+
import { defineComponent as me, ref as v, resolveComponent as x, createBlock as k, openBlock as f, withCtx as j, createElementVNode as c, renderSlot as ke, createCommentVNode as O, withModifiers as Ee, nextTick as Ae, createElementBlock as E, normalizeClass as Te, createTextVNode as Ke, toDisplayString as B, computed as I, Fragment as he, renderList as Re, createVNode as p, unref as m, watch as ye, isRef as ss, createSlots as ts, onUnmounted as as } from "vue";
|
|
2
2
|
import { u as ls } from "./useDebounce-B8ZPVS5C.js";
|
|
3
3
|
import { useI18n as ge, useCoreStore as _e, baseClientInstance as Ie, RestaurantSelector as Me } from "@feedmepos/mf-common";
|
|
4
|
-
import { useBreakpoints as
|
|
4
|
+
import { useBreakpoints as qe, useSnackbar as ze, useDialog as os, components as Ce } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as Ge, S as De } from "./SelectFilter-DUj7GBtT.js";
|
|
6
|
-
import {
|
|
6
|
+
import { p as Ne, f as ns, C as rs, _ as is, a as us } from "./app-DJG3HGqG.js";
|
|
7
7
|
import { _ as ms } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
8
|
-
import { u as cs } from "./useLoading-
|
|
9
|
-
import { g as Be, d as We } from "./iteration-
|
|
10
|
-
import { u as Je, c as ds,
|
|
11
|
-
import "./index-
|
|
12
|
-
import { u as Ze } from "./useAppStore-
|
|
8
|
+
import { u as cs } from "./useLoading-hGUqfW4U.js";
|
|
9
|
+
import { g as Be, d as We } from "./iteration-C6Km_Rno.js";
|
|
10
|
+
import { u as Je, c as ds, b as we, m as ve, d as Xe, p as Oe, i as ps, j as Le, k as fs, l as vs, s as bs, n as ys, o as hs, t as be } from "./rule-X41LxaES.js";
|
|
11
|
+
import "./index-ynxje0mm.js";
|
|
12
|
+
import { u as Ze } from "./useAppStore-CrUYEAtX.js";
|
|
13
13
|
/* empty css */
|
|
14
|
-
import { _ as _s, a as gs } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { _ as _s, a as gs } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-JpCfRxA9.js";
|
|
15
15
|
import { u as xs } from "./useSearch-B6WK1LBB.js";
|
|
16
16
|
const Fs = /* @__PURE__ */ me({
|
|
17
17
|
__name: "BottomSheetMenu",
|
|
18
18
|
setup(a) {
|
|
19
|
-
const y =
|
|
20
|
-
async function
|
|
19
|
+
const y = v(!1);
|
|
20
|
+
async function n() {
|
|
21
21
|
await Ae(), y.value = !y.value;
|
|
22
22
|
}
|
|
23
|
-
return (t,
|
|
24
|
-
const L =
|
|
25
|
-
return
|
|
23
|
+
return (t, r) => {
|
|
24
|
+
const L = x("FmButton"), C = x("FmBottomSheet");
|
|
25
|
+
return f(), k(C, {
|
|
26
26
|
modelValue: y.value,
|
|
27
|
-
"onUpdate:modelValue":
|
|
27
|
+
"onUpdate:modelValue": r[1] || (r[1] = (g) => y.value = g),
|
|
28
28
|
"dismiss-away": "",
|
|
29
29
|
"no-header": "",
|
|
30
30
|
"z-index": 110
|
|
31
31
|
}, {
|
|
32
32
|
"bottom-sheet-button": j(() => [
|
|
33
|
-
t.$slots.button ? O("", !0) : (
|
|
33
|
+
t.$slots.button ? O("", !0) : (f(), k(L, {
|
|
34
34
|
key: 0,
|
|
35
35
|
icon: "more_vert",
|
|
36
36
|
variant: "tertiary",
|
|
37
|
-
onClick: Ee(
|
|
37
|
+
onClick: Ee(n, ["stop"])
|
|
38
38
|
})),
|
|
39
39
|
ke(t.$slots, "button")
|
|
40
40
|
]),
|
|
41
41
|
default: j(() => [
|
|
42
42
|
c("div", {
|
|
43
|
-
onClick:
|
|
43
|
+
onClick: r[0] || (r[0] = (g) => y.value = !1)
|
|
44
44
|
}, [
|
|
45
45
|
ke(t.$slots, "default")
|
|
46
46
|
])
|
|
@@ -59,10 +59,10 @@ const Fs = /* @__PURE__ */ me({
|
|
|
59
59
|
},
|
|
60
60
|
setup(a) {
|
|
61
61
|
const y = a;
|
|
62
|
-
return (
|
|
63
|
-
const
|
|
64
|
-
return
|
|
65
|
-
|
|
62
|
+
return (n, t) => {
|
|
63
|
+
const r = x("FmIcon");
|
|
64
|
+
return f(), E("div", Us, [
|
|
65
|
+
n.$slots.content ? O("", !0) : (f(), E("div", {
|
|
66
66
|
key: 0,
|
|
67
67
|
class: Te(["flex items-center", {
|
|
68
68
|
"text-fm-color-typo-disabled": y.disabled,
|
|
@@ -71,13 +71,13 @@ const Fs = /* @__PURE__ */ me({
|
|
|
71
71
|
[y.itemClass || ""]: y.itemClass && !y.disabled
|
|
72
72
|
}])
|
|
73
73
|
}, [
|
|
74
|
-
a.icon ? (
|
|
74
|
+
a.icon ? (f(), k(r, {
|
|
75
75
|
key: 0,
|
|
76
76
|
name: a.icon
|
|
77
77
|
}, null, 8, ["name"])) : O("", !0),
|
|
78
|
-
|
|
78
|
+
Ke(" " + B(a.label), 1)
|
|
79
79
|
], 2)),
|
|
80
|
-
ke(
|
|
80
|
+
ke(n.$slots, "content")
|
|
81
81
|
]);
|
|
82
82
|
};
|
|
83
83
|
}
|
|
@@ -87,24 +87,24 @@ const Fs = /* @__PURE__ */ me({
|
|
|
87
87
|
items: {}
|
|
88
88
|
},
|
|
89
89
|
setup(a) {
|
|
90
|
-
const y =
|
|
91
|
-
return (t,
|
|
92
|
-
const L =
|
|
93
|
-
return
|
|
90
|
+
const y = qe(), n = I(() => y.breakpoints.value.xs);
|
|
91
|
+
return (t, r) => {
|
|
92
|
+
const L = x("FmButton"), C = x("FmMenuItem"), g = x("FmMenu");
|
|
93
|
+
return n.value ? (f(), k(Fs, { key: 0 }, {
|
|
94
94
|
default: j(() => [
|
|
95
|
-
(
|
|
95
|
+
(f(!0), E(he, null, Re(a.items, ({ icon: _, label: u, disabled: P, itemClass: S, onClick: U }) => (f(), k(Ss, {
|
|
96
96
|
key: u,
|
|
97
97
|
icon: _,
|
|
98
98
|
label: u,
|
|
99
|
-
disabled:
|
|
100
|
-
itemClass:
|
|
99
|
+
disabled: P,
|
|
100
|
+
itemClass: S,
|
|
101
101
|
onClick: () => {
|
|
102
|
-
!
|
|
102
|
+
!P && (U == null || U());
|
|
103
103
|
}
|
|
104
104
|
}, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
|
|
105
105
|
]),
|
|
106
106
|
_: 1
|
|
107
|
-
})) : (
|
|
107
|
+
})) : (f(), k(g, {
|
|
108
108
|
key: 1,
|
|
109
109
|
"stop-click-propagation": "",
|
|
110
110
|
shift: !0
|
|
@@ -119,17 +119,17 @@ const Fs = /* @__PURE__ */ me({
|
|
|
119
119
|
})
|
|
120
120
|
]),
|
|
121
121
|
default: j(() => [
|
|
122
|
-
(
|
|
122
|
+
(f(!0), E(he, null, Re(a.items, ({ label: _, disabled: u, itemClass: P, onClick: S }) => (f(), k(C, {
|
|
123
123
|
key: _,
|
|
124
124
|
disabled: u,
|
|
125
125
|
label: _,
|
|
126
126
|
onClick: () => {
|
|
127
|
-
!u && (
|
|
127
|
+
!u && (S == null || S());
|
|
128
128
|
}
|
|
129
129
|
}, {
|
|
130
130
|
label: j(() => [
|
|
131
131
|
c("span", {
|
|
132
|
-
class: Te(u ? "text-fm-color-typo-disabled" :
|
|
132
|
+
class: Te(u ? "text-fm-color-typo-disabled" : P)
|
|
133
133
|
}, B(_), 3)
|
|
134
134
|
]),
|
|
135
135
|
_: 2
|
|
@@ -148,11 +148,11 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
148
148
|
},
|
|
149
149
|
setup(a) {
|
|
150
150
|
const { t: y } = ge();
|
|
151
|
-
return (
|
|
152
|
-
const
|
|
153
|
-
return
|
|
151
|
+
return (n, t) => {
|
|
152
|
+
const r = x("FmAvatar");
|
|
153
|
+
return f(), E("div", ws, [
|
|
154
154
|
c("div", Ps, [
|
|
155
|
-
p(
|
|
155
|
+
p(r, {
|
|
156
156
|
size: "xl",
|
|
157
157
|
initials: a.data.name
|
|
158
158
|
}, null, 8, ["initials"]),
|
|
@@ -176,83 +176,83 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
176
176
|
}
|
|
177
177
|
}), je = {
|
|
178
178
|
async readPermissionUserByPhoneNo(a) {
|
|
179
|
-
var
|
|
179
|
+
var n;
|
|
180
180
|
const { currentBusiness: y } = _e();
|
|
181
181
|
return Be(
|
|
182
|
-
await Ie("/").get(`/user/b/${(
|
|
182
|
+
await Ie("/").get(`/user/b/${(n = y.value) == null ? void 0 : n._id}/phone/${a}`)
|
|
183
183
|
);
|
|
184
184
|
},
|
|
185
185
|
async readPermissionUserByEmail(a) {
|
|
186
|
-
var
|
|
186
|
+
var n;
|
|
187
187
|
const { currentBusiness: y } = _e();
|
|
188
188
|
return Be(
|
|
189
|
-
await Ie("/").get(`/user/b/${(
|
|
189
|
+
await Ie("/").get(`/user/b/${(n = y.value) == null ? void 0 : n._id}/email/${a}`)
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
192
|
}, js = { class: "flex flex-col gap-24 w-full" }, Es = {
|
|
193
193
|
key: 0,
|
|
194
194
|
class: "flex flex-col gap-8"
|
|
195
|
-
}, As = { class: "user-info-icon user-info-icon--lg" }, Ts = { class: "flex-1 overflow-hidden" },
|
|
195
|
+
}, As = { class: "user-info-icon user-info-icon--lg" }, Ts = { class: "flex-1 overflow-hidden" }, Ks = { class: "profile-displayName" }, qs = { class: "profile-email" }, zs = { class: "profile-phone" }, Gs = { key: 2 }, Ws = /* @__PURE__ */ me({
|
|
196
196
|
__name: "PortalUserSearcher",
|
|
197
197
|
emits: ["invite"],
|
|
198
198
|
setup(a, { emit: y }) {
|
|
199
|
-
const
|
|
200
|
-
async function
|
|
199
|
+
const n = y, { t } = ge(), r = ze(), L = _e(), C = v("phone"), g = v(""), _ = v(""), u = v();
|
|
200
|
+
async function P() {
|
|
201
201
|
if (!g.value && !_.value) {
|
|
202
|
-
|
|
202
|
+
r.open({
|
|
203
203
|
type: "error",
|
|
204
204
|
title: t("team.memberForm.searchUser.emptyError")
|
|
205
205
|
});
|
|
206
206
|
return;
|
|
207
207
|
}
|
|
208
|
-
const h =
|
|
209
|
-
h ||
|
|
208
|
+
const h = C.value === "phone" ? await je.readPermissionUserByPhoneNo(g.value.replace(/ /g, "")) : await je.readPermissionUserByEmail(_.value);
|
|
209
|
+
h || r.open({
|
|
210
210
|
type: "error",
|
|
211
211
|
title: t("team.memberForm.searchUser.userNotFound")
|
|
212
212
|
}), u.value = h;
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const S = I(() => {
|
|
215
215
|
var se;
|
|
216
216
|
let h = ((se = u.value) == null ? void 0 : se.displayName) ?? "";
|
|
217
217
|
h || (h = "Feed Me");
|
|
218
|
-
const [
|
|
219
|
-
return
|
|
220
|
-
}),
|
|
221
|
-
function
|
|
222
|
-
|
|
218
|
+
const [V, T] = h.split(" ");
|
|
219
|
+
return T ? `${V[0]}${T[0]}` : V.slice(0, 2);
|
|
220
|
+
}), U = v(!1);
|
|
221
|
+
function A(h) {
|
|
222
|
+
n("invite", h), U.value = !0;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
|
|
224
|
+
function J() {
|
|
225
|
+
U.value = !1;
|
|
226
226
|
}
|
|
227
|
-
return (h,
|
|
228
|
-
var R,
|
|
229
|
-
const
|
|
230
|
-
return
|
|
231
|
-
|
|
227
|
+
return (h, V) => {
|
|
228
|
+
var R, K, Q;
|
|
229
|
+
const T = x("FmRadio"), se = x("FmPhoneNumber"), ne = x("FmTextField"), o = x("FmRadioGroup"), i = x("FmButton");
|
|
230
|
+
return f(), E("div", js, [
|
|
231
|
+
U.value ? O("", !0) : (f(), E("div", Es, [
|
|
232
232
|
p(o, {
|
|
233
|
-
modelValue:
|
|
234
|
-
"onUpdate:modelValue":
|
|
233
|
+
modelValue: C.value,
|
|
234
|
+
"onUpdate:modelValue": V[2] || (V[2] = (w) => C.value = w)
|
|
235
235
|
}, {
|
|
236
236
|
default: j(() => [
|
|
237
|
-
p(
|
|
237
|
+
p(T, {
|
|
238
238
|
value: "phone",
|
|
239
239
|
label: m(t)("team.memberForm.searchUser.phoneNumber")
|
|
240
240
|
}, null, 8, ["label"]),
|
|
241
|
-
|
|
241
|
+
C.value === "phone" ? (f(), k(se, {
|
|
242
242
|
key: 0,
|
|
243
243
|
modelValue: g.value,
|
|
244
|
-
"onUpdate:modelValue":
|
|
244
|
+
"onUpdate:modelValue": V[0] || (V[0] = (w) => g.value = w),
|
|
245
245
|
"extra-country-codes": m(L).enabledCountries.value,
|
|
246
246
|
class: "ml-8"
|
|
247
247
|
}, null, 8, ["modelValue", "extra-country-codes"])) : O("", !0),
|
|
248
|
-
p(
|
|
248
|
+
p(T, {
|
|
249
249
|
value: "email",
|
|
250
250
|
label: m(t)("team.memberForm.searchUser.email")
|
|
251
251
|
}, null, 8, ["label"]),
|
|
252
|
-
|
|
252
|
+
C.value === "email" ? (f(), k(ne, {
|
|
253
253
|
key: 1,
|
|
254
254
|
modelValue: _.value,
|
|
255
|
-
"onUpdate:modelValue":
|
|
255
|
+
"onUpdate:modelValue": V[1] || (V[1] = (w) => _.value = w),
|
|
256
256
|
placeholder: m(t)("team.memberForm.searchUser.emailPlaceholder"),
|
|
257
257
|
class: "ml-8"
|
|
258
258
|
}, null, 8, ["modelValue", "placeholder"])) : O("", !0)
|
|
@@ -262,26 +262,26 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
262
262
|
p(i, {
|
|
263
263
|
label: m(t)("team.memberForm.searchUser.search"),
|
|
264
264
|
variant: "secondary",
|
|
265
|
-
onClick:
|
|
265
|
+
onClick: P
|
|
266
266
|
}, null, 8, ["label"])
|
|
267
267
|
])),
|
|
268
|
-
u.value ? (
|
|
268
|
+
u.value ? (f(), E("div", {
|
|
269
269
|
key: 1,
|
|
270
270
|
class: "profile-menu--profile cursor-pointer hover:bg-fm-color-opacity-sm",
|
|
271
|
-
onClick:
|
|
271
|
+
onClick: V[3] || (V[3] = (w) => A(u.value))
|
|
272
272
|
}, [
|
|
273
|
-
c("div", As, B(
|
|
273
|
+
c("div", As, B(S.value), 1),
|
|
274
274
|
c("div", Ts, [
|
|
275
|
-
c("p",
|
|
276
|
-
c("p",
|
|
277
|
-
c("p", zs, B((
|
|
275
|
+
c("p", Ks, B((R = u.value) == null ? void 0 : R.displayName), 1),
|
|
276
|
+
c("p", qs, B((K = u.value) == null ? void 0 : K.email), 1),
|
|
277
|
+
c("p", zs, B((Q = u.value) == null ? void 0 : Q.phoneNumber), 1)
|
|
278
278
|
])
|
|
279
279
|
])) : O("", !0),
|
|
280
|
-
|
|
280
|
+
U.value ? (f(), E("div", Gs, [
|
|
281
281
|
p(i, {
|
|
282
282
|
label: m(t)("team.memberForm.searchUser.changeUser"),
|
|
283
283
|
variant: "secondary",
|
|
284
|
-
onClick:
|
|
284
|
+
onClick: J
|
|
285
285
|
}, null, 8, ["label"])
|
|
286
286
|
])) : O("", !0)
|
|
287
287
|
]);
|
|
@@ -313,61 +313,61 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
313
313
|
},
|
|
314
314
|
emits: ["update:model-value"],
|
|
315
315
|
setup(a, { emit: y }) {
|
|
316
|
-
const
|
|
316
|
+
const n = a, t = y, { t: r } = ge(), { searchKey: L, filter: C } = xs(""), g = v(!0), _ = v([]), u = I(() => {
|
|
317
317
|
const o = {};
|
|
318
|
-
return
|
|
318
|
+
return n.roles.forEach((i) => {
|
|
319
319
|
o[i.value] = i.label;
|
|
320
320
|
}), o;
|
|
321
|
-
}),
|
|
321
|
+
}), P = I(() => {
|
|
322
322
|
var i;
|
|
323
323
|
const o = {};
|
|
324
|
-
return (i =
|
|
324
|
+
return (i = n.modelValue) == null || i.roles.forEach((R) => {
|
|
325
325
|
o[R.restaurantId] = R.roleId;
|
|
326
326
|
}), o;
|
|
327
|
-
}),
|
|
327
|
+
}), S = I(() => n.restaurants.filter((o) => C([o.profile.name, o.profile.code, A(o._id)])).map((o) => ({
|
|
328
328
|
label: `${o.profile.code ? o.profile.code + "-" : ""}${o.profile.name}`,
|
|
329
329
|
value: o._id,
|
|
330
330
|
slot: `checkbox-${o._id}-bottom`,
|
|
331
|
-
disable:
|
|
332
|
-
roleOptions:
|
|
333
|
-
}))),
|
|
334
|
-
const o =
|
|
331
|
+
disable: n.roles.filter((i) => !i.disabled).length === 0,
|
|
332
|
+
roleOptions: n.roles
|
|
333
|
+
}))), U = I(() => {
|
|
334
|
+
const o = n.roles.find((i) => !i.disabled);
|
|
335
335
|
return o ? o.value : null;
|
|
336
336
|
});
|
|
337
|
-
function
|
|
338
|
-
const i =
|
|
337
|
+
function A(o) {
|
|
338
|
+
const i = P.value[o] ?? "";
|
|
339
339
|
return u.value[i] || "";
|
|
340
340
|
}
|
|
341
|
-
function
|
|
342
|
-
o ?
|
|
341
|
+
function J(o) {
|
|
342
|
+
o ? n.modelValue || t("update:model-value", {
|
|
343
343
|
code: "",
|
|
344
|
-
name:
|
|
344
|
+
name: n.fallbackName,
|
|
345
345
|
roles: [],
|
|
346
|
-
passcode:
|
|
346
|
+
passcode: n.fallbackPasscode || ""
|
|
347
347
|
}) : t("update:model-value", null);
|
|
348
348
|
}
|
|
349
349
|
function h(o, i) {
|
|
350
|
-
if (!
|
|
350
|
+
if (!n.modelValue || o === "passcode" && n.modelValue.passcode === i)
|
|
351
351
|
return;
|
|
352
|
-
const R = We(
|
|
352
|
+
const R = We(n.modelValue);
|
|
353
353
|
R[o] = i, t("update:model-value", R);
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function V(o) {
|
|
356
356
|
h(
|
|
357
357
|
"roles",
|
|
358
358
|
o.map((i) => {
|
|
359
|
-
var
|
|
360
|
-
const R = (
|
|
359
|
+
var Q, w, D;
|
|
360
|
+
const R = (w = (Q = S.value.find((q) => q.value === i)) == null ? void 0 : Q.roleOptions.find((q) => !q.disabled)) == null ? void 0 : w.value, K = (D = n.modelValue) == null ? void 0 : D.roles.find((q) => q.restaurantId === i);
|
|
361
361
|
return {
|
|
362
362
|
restaurantId: i,
|
|
363
|
-
roleId: (
|
|
363
|
+
roleId: (K == null ? void 0 : K.roleId) || R
|
|
364
364
|
};
|
|
365
365
|
})
|
|
366
366
|
);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function T(o, i) {
|
|
369
369
|
h("roles", [
|
|
370
|
-
...
|
|
370
|
+
...n.modelValue.roles.filter(
|
|
371
371
|
(R) => R.restaurantId !== o
|
|
372
372
|
),
|
|
373
373
|
{
|
|
@@ -382,63 +382,63 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
382
382
|
ye(
|
|
383
383
|
() => {
|
|
384
384
|
var o;
|
|
385
|
-
return (o =
|
|
385
|
+
return (o = n.modelValue) == null ? void 0 : o.passcode;
|
|
386
386
|
},
|
|
387
387
|
(o) => {
|
|
388
388
|
o && o.length === Pe ? (_.value = o.split(""), g.value = !0) : (_.value = [], g.value = !1);
|
|
389
389
|
},
|
|
390
390
|
{ immediate: !0 }
|
|
391
391
|
);
|
|
392
|
-
const
|
|
392
|
+
const ne = I({
|
|
393
393
|
get: () => {
|
|
394
394
|
var o;
|
|
395
|
-
return ((o =
|
|
395
|
+
return ((o = n.modelValue) == null ? void 0 : o.roles) ?? [];
|
|
396
396
|
},
|
|
397
397
|
set: () => {
|
|
398
398
|
}
|
|
399
399
|
});
|
|
400
400
|
return (o, i) => {
|
|
401
|
-
const R =
|
|
402
|
-
return
|
|
401
|
+
const R = x("FmSwitch"), K = x("FmTextField"), Q = x("FmPinField"), w = x("FmFormGroup"), D = x("FmSearch"), q = x("FmSelect");
|
|
402
|
+
return f(), E("div", Xs, [
|
|
403
403
|
c("div", Zs, [
|
|
404
404
|
c("div", Qs, [
|
|
405
|
-
c("div", Ys, B(m(
|
|
406
|
-
c("div", Hs, B(m(
|
|
405
|
+
c("div", Ys, B(m(r)("team.memberForm.masterUser.title")), 1),
|
|
406
|
+
c("div", Hs, B(m(r)("team.memberForm.masterUser.sublabel")), 1)
|
|
407
407
|
]),
|
|
408
408
|
c("div", null, [
|
|
409
409
|
p(R, {
|
|
410
410
|
"model-value": !!a.modelValue,
|
|
411
411
|
value: "master-user",
|
|
412
|
-
"onUpdate:modelValue":
|
|
412
|
+
"onUpdate:modelValue": J
|
|
413
413
|
}, null, 8, ["model-value"])
|
|
414
414
|
])
|
|
415
415
|
]),
|
|
416
|
-
a.modelValue ? (
|
|
416
|
+
a.modelValue ? (f(), E(he, { key: 0 }, [
|
|
417
417
|
c("div", et, [
|
|
418
|
-
p(
|
|
418
|
+
p(K, {
|
|
419
419
|
"model-value": a.modelValue.code,
|
|
420
|
-
label: m(
|
|
420
|
+
label: m(r)("team.memberForm.masterUser.code"),
|
|
421
421
|
"onUpdate:modelValue": i[0] || (i[0] = (d) => h("code", d))
|
|
422
422
|
}, null, 8, ["model-value", "label"]),
|
|
423
|
-
p(
|
|
423
|
+
p(K, {
|
|
424
424
|
"model-value": a.modelValue.name,
|
|
425
425
|
class: "w-full",
|
|
426
|
-
label: m(
|
|
427
|
-
rules: [(d) => !!d || m(
|
|
426
|
+
label: m(r)("team.memberForm.masterUser.name"),
|
|
427
|
+
rules: [(d) => !!d || m(r)("team.memberForm.masterUser.nameEmptyError")],
|
|
428
428
|
"onUpdate:modelValue": i[1] || (i[1] = (d) => h("name", d))
|
|
429
429
|
}, null, 8, ["model-value", "label", "rules"])
|
|
430
430
|
]),
|
|
431
431
|
c("div", st, [
|
|
432
|
-
c("div", tt, B(m(
|
|
433
|
-
p(
|
|
432
|
+
c("div", tt, B(m(r)("team.memberForm.masterUser.passcode")), 1),
|
|
433
|
+
p(w, {
|
|
434
434
|
modelValue: _.value,
|
|
435
435
|
"onUpdate:modelValue": i[4] || (i[4] = (d) => _.value = d),
|
|
436
436
|
rules: [
|
|
437
|
-
(d) => (d == null ? void 0 : d.filter((
|
|
437
|
+
(d) => (d == null ? void 0 : d.filter((X) => !!X).length) !== Pe ? m(r)("team.memberForm.masterUser.passcodeRequired") : !0
|
|
438
438
|
]
|
|
439
439
|
}, {
|
|
440
440
|
default: j(() => [
|
|
441
|
-
(
|
|
441
|
+
(f(), k(Q, {
|
|
442
442
|
key: `pin-field-${g.value}`,
|
|
443
443
|
modelValue: _.value,
|
|
444
444
|
"onUpdate:modelValue": i[2] || (i[2] = (d) => _.value = d),
|
|
@@ -451,11 +451,11 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
451
451
|
_: 1
|
|
452
452
|
}, 8, ["modelValue", "rules"])
|
|
453
453
|
]),
|
|
454
|
-
p(
|
|
455
|
-
modelValue:
|
|
456
|
-
"onUpdate:modelValue": i[6] || (i[6] = (d) =>
|
|
454
|
+
p(w, {
|
|
455
|
+
modelValue: ne.value,
|
|
456
|
+
"onUpdate:modelValue": i[6] || (i[6] = (d) => ne.value = d),
|
|
457
457
|
rules: [
|
|
458
|
-
(d) => !d || d.length === 0 ? m(
|
|
458
|
+
(d) => !d || d.length === 0 ? m(r)("team.memberForm.masterUser.restaurantRequired") : d.some((X) => !X.roleId) ? m(r)("team.memberForm.masterUser.roleRequired") : !0
|
|
459
459
|
]
|
|
460
460
|
}, {
|
|
461
461
|
default: j(() => [
|
|
@@ -463,26 +463,26 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
463
463
|
p(D, {
|
|
464
464
|
modelValue: m(L),
|
|
465
465
|
"onUpdate:modelValue": i[5] || (i[5] = (d) => ss(L) ? L.value = d : null),
|
|
466
|
-
placeholder: m(
|
|
466
|
+
placeholder: m(r)("team.memberForm.posRole.placeholder"),
|
|
467
467
|
class: "mb-16"
|
|
468
468
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
469
469
|
p(_s, {
|
|
470
470
|
"model-value": a.modelValue.roles.map((d) => d.restaurantId),
|
|
471
|
-
options:
|
|
471
|
+
options: S.value,
|
|
472
472
|
min: 1,
|
|
473
|
-
title: m(
|
|
474
|
-
"onUpdate:modelValue":
|
|
473
|
+
title: m(r)("team.memberForm.masterUser.role"),
|
|
474
|
+
"onUpdate:modelValue": V
|
|
475
475
|
}, ts({ _: 2 }, [
|
|
476
|
-
Re(
|
|
476
|
+
Re(S.value, (d) => ({
|
|
477
477
|
name: d.slot,
|
|
478
478
|
fn: j(() => {
|
|
479
|
-
var
|
|
479
|
+
var X;
|
|
480
480
|
return [
|
|
481
481
|
c("div", null, [
|
|
482
482
|
p(q, {
|
|
483
|
-
"model-value": ((
|
|
483
|
+
"model-value": ((X = a.modelValue.roles.find((te) => te.restaurantId === d.value)) == null ? void 0 : X.roleId) || U.value,
|
|
484
484
|
items: d.roleOptions,
|
|
485
|
-
"onUpdate:modelValue": (te) =>
|
|
485
|
+
"onUpdate:modelValue": (te) => T(d.value, te)
|
|
486
486
|
}, null, 8, ["model-value", "items", "onUpdate:modelValue"])
|
|
487
487
|
])
|
|
488
488
|
];
|
|
@@ -517,34 +517,34 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
517
517
|
},
|
|
518
518
|
setup(a, { expose: y }) {
|
|
519
519
|
var xe, Fe, Ue;
|
|
520
|
-
const
|
|
520
|
+
const n = a, { t } = ge(), r = v(), L = Je(), C = I(
|
|
521
521
|
() => L.permissionSets.value.map((l) => ({
|
|
522
522
|
label: l.name,
|
|
523
523
|
value: l.id
|
|
524
524
|
}))
|
|
525
|
-
), g =
|
|
525
|
+
), g = v(((xe = n.initialValue) == null ? void 0 : xe.permissionSetIds) || []), _ = I(
|
|
526
526
|
() => ds(g.value, L.permissionSets.value)
|
|
527
|
-
), u =
|
|
527
|
+
), u = v((Fe = n.initialValue) == null ? void 0 : Fe.posUser), P = v(!1), S = v(!1), U = v(
|
|
528
528
|
we(
|
|
529
|
-
|
|
530
|
-
((Ue =
|
|
529
|
+
ve(_.value),
|
|
530
|
+
((Ue = n.initialValue) == null ? void 0 : Ue.permissions) || []
|
|
531
531
|
)
|
|
532
|
-
), { customReportPermissions:
|
|
532
|
+
), { customReportPermissions: A, isLoaded: J } = Xe(), h = new Set(
|
|
533
533
|
Oe.filter((l) => l.subject.startsWith(ps)).map((l) => l.subject)
|
|
534
|
-
),
|
|
534
|
+
), V = I(() => {
|
|
535
535
|
const l = new Set(h);
|
|
536
|
-
for (const b of
|
|
536
|
+
for (const b of A.value) l.add(b.subject);
|
|
537
537
|
return l;
|
|
538
|
-
}),
|
|
538
|
+
}), T = I(() => {
|
|
539
539
|
const l = /* @__PURE__ */ new Set();
|
|
540
540
|
for (const b of Oe)
|
|
541
541
|
b.category === Ne.reports && l.add(b.subject);
|
|
542
|
-
for (const b of
|
|
542
|
+
for (const b of A.value)
|
|
543
543
|
b.category === Ne.reports && l.add(b.subject);
|
|
544
544
|
return l;
|
|
545
|
-
}), { restaurants: se } = _e(),
|
|
545
|
+
}), { restaurants: se } = _e(), ne = Ze().roles, o = I(() => Le(U.value)), i = I(() => {
|
|
546
546
|
const l = o.value;
|
|
547
|
-
return
|
|
547
|
+
return ne.value.map(
|
|
548
548
|
(b) => ({
|
|
549
549
|
label: b.name,
|
|
550
550
|
value: b._id,
|
|
@@ -553,104 +553,104 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
553
553
|
);
|
|
554
554
|
});
|
|
555
555
|
function R(l) {
|
|
556
|
-
|
|
556
|
+
r.value = l;
|
|
557
557
|
}
|
|
558
|
-
function
|
|
559
|
-
|
|
558
|
+
function K(l) {
|
|
559
|
+
S.value = !0;
|
|
560
560
|
const b = d(u.value, l);
|
|
561
|
-
b !== u.value && (
|
|
561
|
+
b !== u.value && (P.value = !0), u.value = b;
|
|
562
562
|
}
|
|
563
|
-
function
|
|
564
|
-
const l =
|
|
565
|
-
return ys(l,
|
|
563
|
+
function Q() {
|
|
564
|
+
const l = ve(_.value), b = J.value ? V.value : h, z = fs(U.value, b), Z = vs(z, T.value), H = bs(Z);
|
|
565
|
+
return ys(l, H);
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
var
|
|
569
|
-
const l =
|
|
567
|
+
function w() {
|
|
568
|
+
var z, Z, H, ae, G, W, re, ie, ce, N;
|
|
569
|
+
const l = Q(), b = U.value.filter((oe) => !oe.inverted);
|
|
570
570
|
return {
|
|
571
|
-
email: ((
|
|
572
|
-
phoneNumber: ((
|
|
571
|
+
email: ((z = r.value) == null ? void 0 : z.email) ?? void 0,
|
|
572
|
+
phoneNumber: ((Z = r.value) == null ? void 0 : Z.phoneNumber) ?? void 0,
|
|
573
573
|
customPermissions: l,
|
|
574
574
|
// Deprecated: keep for backward compatibility, will be removed in the future
|
|
575
|
-
permissions: b.map((
|
|
576
|
-
...
|
|
577
|
-
subject: ns(
|
|
575
|
+
permissions: b.map((oe) => ({
|
|
576
|
+
...oe,
|
|
577
|
+
subject: ns(oe.subject)
|
|
578
578
|
})),
|
|
579
579
|
permissionSetIds: g.value,
|
|
580
|
-
name: ((
|
|
581
|
-
posUser: !
|
|
580
|
+
name: ((H = r.value) == null ? void 0 : H.displayName) || ((ae = n.initialValue) == null ? void 0 : ae.name) || "",
|
|
581
|
+
posUser: !n.initialValue || P.value ? u.value != null ? {
|
|
582
582
|
...u.value,
|
|
583
|
-
name: u.value.name || ((
|
|
584
|
-
code: u.value.code || ((N = (ce =
|
|
583
|
+
name: u.value.name || ((W = (G = n.initialValue) == null ? void 0 : G.posUser) == null ? void 0 : W.name) || ((re = n.initialValue) == null ? void 0 : re.name) || ((ie = r.value) == null ? void 0 : ie.displayName) || "",
|
|
584
|
+
code: u.value.code || ((N = (ce = n.initialValue) == null ? void 0 : ce.posUser) == null ? void 0 : N.code) || "",
|
|
585
585
|
passcode: u.value.passcode,
|
|
586
|
-
roles: u.value.roles.filter((
|
|
586
|
+
roles: u.value.roles.filter((oe) => !!oe.roleId)
|
|
587
587
|
} : u.value : void 0
|
|
588
588
|
// update mode, POS not touched → signal no change to backend
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
|
-
const D =
|
|
591
|
+
const D = v();
|
|
592
592
|
ye(
|
|
593
|
-
() =>
|
|
593
|
+
() => n.initialValue,
|
|
594
594
|
(l) => {
|
|
595
595
|
if (!l) {
|
|
596
|
-
g.value = [], u.value = void 0,
|
|
596
|
+
g.value = [], u.value = void 0, P.value = !1, S.value = !1, U.value = we(ve([]), []);
|
|
597
597
|
return;
|
|
598
598
|
}
|
|
599
|
-
if (
|
|
600
|
-
!
|
|
599
|
+
if (S.value) {
|
|
600
|
+
!P.value && l.posUser !== void 0 && (u.value = l.posUser);
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
|
-
g.value = l.permissionSetIds || [], (!
|
|
604
|
-
|
|
603
|
+
g.value = l.permissionSetIds || [], (!P.value || l.posUser !== void 0) && (u.value = l.posUser), U.value = we(
|
|
604
|
+
ve(_.value),
|
|
605
605
|
l.permissions || []
|
|
606
|
-
),
|
|
606
|
+
), P.value = !1;
|
|
607
607
|
},
|
|
608
608
|
{ immediate: !0 }
|
|
609
609
|
);
|
|
610
610
|
function q() {
|
|
611
|
-
|
|
612
|
-
const l = d(u.value,
|
|
613
|
-
l !== u.value && (
|
|
611
|
+
U.value = ve(_.value), S.value = !0;
|
|
612
|
+
const l = d(u.value, U.value);
|
|
613
|
+
l !== u.value && (P.value = !0), u.value = l;
|
|
614
614
|
}
|
|
615
615
|
function d(l, b) {
|
|
616
616
|
if (!l) return l;
|
|
617
|
-
const
|
|
618
|
-
if (!
|
|
619
|
-
const
|
|
620
|
-
return
|
|
617
|
+
const z = Le(b);
|
|
618
|
+
if (!z) return l;
|
|
619
|
+
const Z = We(l);
|
|
620
|
+
return Z.roles = Z.roles.reduce((H, ae) => (z.includes(ae.roleId) && H.push(ae), H), []), Z;
|
|
621
621
|
}
|
|
622
|
-
async function
|
|
622
|
+
async function X() {
|
|
623
623
|
await Ae(), D.value && D.value.$el.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
624
624
|
}
|
|
625
|
-
const te =
|
|
626
|
-
async function
|
|
627
|
-
return (await te.value.validateInputsWithoutSubmit()).length ? null :
|
|
625
|
+
const te = v();
|
|
626
|
+
async function Y() {
|
|
627
|
+
return (await te.value.validateInputsWithoutSubmit()).length ? null : w();
|
|
628
628
|
}
|
|
629
629
|
return y({
|
|
630
|
-
readFormData:
|
|
631
|
-
validate:
|
|
630
|
+
readFormData: w,
|
|
631
|
+
validate: Y
|
|
632
632
|
}), (l, b) => {
|
|
633
|
-
const
|
|
634
|
-
return
|
|
633
|
+
const z = x("FmSelect"), Z = x("FmCircularProgress"), H = x("FmForm");
|
|
634
|
+
return f(), k(H, {
|
|
635
635
|
ref_key: "formRef",
|
|
636
636
|
ref: te,
|
|
637
637
|
class: "mx-4"
|
|
638
638
|
}, {
|
|
639
639
|
default: j(() => {
|
|
640
|
-
var ae,
|
|
640
|
+
var ae, G, W, re, ie, ce;
|
|
641
641
|
return [
|
|
642
642
|
c("div", ot, [
|
|
643
643
|
c("div", nt, [
|
|
644
|
-
a.initialValue ? (
|
|
644
|
+
a.initialValue ? (f(), k(Ls, {
|
|
645
645
|
key: 1,
|
|
646
646
|
data: a.initialValue
|
|
647
|
-
}, null, 8, ["data"])) : (
|
|
647
|
+
}, null, 8, ["data"])) : (f(), k(Js, {
|
|
648
648
|
key: 0,
|
|
649
649
|
onInvite: b[0] || (b[0] = (N) => R(N))
|
|
650
650
|
}))
|
|
651
651
|
]),
|
|
652
|
-
|
|
653
|
-
(ae = a.initialValue) != null && ae.isOwner ? O("", !0) : (
|
|
652
|
+
r.value || a.initialValue ? (f(), E(he, { key: 0 }, [
|
|
653
|
+
(ae = a.initialValue) != null && ae.isOwner ? O("", !0) : (f(), k(z, {
|
|
654
654
|
key: 0,
|
|
655
655
|
modelValue: g.value,
|
|
656
656
|
"onUpdate:modelValue": [
|
|
@@ -660,30 +660,30 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
660
660
|
multiselect: "",
|
|
661
661
|
searchable: "",
|
|
662
662
|
"search-debounce": 300,
|
|
663
|
-
items:
|
|
663
|
+
items: C.value,
|
|
664
664
|
label: m(t)("team.memberForm.permissionSet.title"),
|
|
665
665
|
placeholder: m(t)("team.memberForm.permissionSet.selectPlaceholder")
|
|
666
666
|
}, null, 8, ["modelValue", "items", "label", "placeholder"])),
|
|
667
|
-
(
|
|
667
|
+
(G = a.initialValue) != null && G.isOwner ? O("", !0) : (f(), k(gs, {
|
|
668
668
|
key: 1,
|
|
669
|
-
modelValue:
|
|
670
|
-
"onUpdate:modelValue": b[2] || (b[2] = (N) =>
|
|
669
|
+
modelValue: U.value,
|
|
670
|
+
"onUpdate:modelValue": b[2] || (b[2] = (N) => U.value = N),
|
|
671
671
|
"inherit-permissions": _.value,
|
|
672
|
-
onPermissionChanged:
|
|
672
|
+
onPermissionChanged: K
|
|
673
673
|
}, null, 8, ["modelValue", "inherit-permissions"])),
|
|
674
|
-
a.isLoadingMasterUser ? (
|
|
675
|
-
p(
|
|
676
|
-
])) : (
|
|
674
|
+
a.isLoadingMasterUser ? (f(), E("div", rt, [
|
|
675
|
+
p(Z)
|
|
676
|
+
])) : (f(), k(lt, {
|
|
677
677
|
key: 3,
|
|
678
678
|
ref_key: "masterUserContentRef",
|
|
679
679
|
ref: D,
|
|
680
680
|
"model-value": u.value,
|
|
681
|
-
"fallback-name": ((
|
|
682
|
-
"fallback-passcode": (ce = (
|
|
681
|
+
"fallback-name": ((W = a.initialValue) == null ? void 0 : W.name) || ((re = r.value) == null ? void 0 : re.displayName) || "",
|
|
682
|
+
"fallback-passcode": (ce = (ie = a.initialValue) == null ? void 0 : ie.posUser) == null ? void 0 : ce.passcode,
|
|
683
683
|
roles: i.value,
|
|
684
684
|
restaurants: m(se),
|
|
685
685
|
"onUpdate:modelValue": b[3] || (b[3] = (N) => {
|
|
686
|
-
u.value = N,
|
|
686
|
+
u.value = N, P.value = !0, S.value = !0, X();
|
|
687
687
|
})
|
|
688
688
|
}, null, 8, ["model-value", "fallback-name", "fallback-passcode", "roles", "restaurants"]))
|
|
689
689
|
], 64)) : O("", !0)
|
|
@@ -704,47 +704,50 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
704
704
|
class: "flex items-start gap-8"
|
|
705
705
|
}, pt = {
|
|
706
706
|
class: "space-y-4 sm:hidden md:hidden lg:hidden px-16"
|
|
707
|
-
}, vt = {
|
|
708
|
-
class: "flex items-start gap-8"
|
|
709
707
|
}, ft = {
|
|
708
|
+
class: "flex items-start gap-8"
|
|
709
|
+
}, vt = {
|
|
710
710
|
class: "flex h-full flex-col"
|
|
711
711
|
}, bt = {
|
|
712
712
|
class: "flex items-center justify-start gap-8"
|
|
713
713
|
}, de = 100;
|
|
714
|
-
var
|
|
714
|
+
var ee = /* @__PURE__ */ function(a) {
|
|
715
715
|
return a[a.ADD = 0] = "ADD", a[a.UPDATE = 1] = "UPDATE", a[a.CLOSED = 2] = "CLOSED", a;
|
|
716
|
-
}(
|
|
716
|
+
}(ee || {});
|
|
717
717
|
const yt = /* @__PURE__ */ me({
|
|
718
718
|
__name: "TeamMemberList",
|
|
719
719
|
setup(a, {
|
|
720
720
|
expose: y
|
|
721
721
|
}) {
|
|
722
722
|
const {
|
|
723
|
-
fetchCustomReportPermissions:
|
|
723
|
+
fetchCustomReportPermissions: n
|
|
724
724
|
} = Xe(), {
|
|
725
725
|
t
|
|
726
|
-
} = ge(),
|
|
727
|
-
e.length > 0 && (
|
|
728
|
-
|
|
726
|
+
} = ge(), r = _e(), L = Ze(), C = ze(), g = cs(C), _ = Je(), u = hs(), P = v(!0), S = v(!1), U = v(r.restaurants.value.length === 0), A = v([]), J = v(0), h = v(1), V = v(""), T = v(""), se = ye(r.restaurants, (e) => {
|
|
727
|
+
e.length > 0 && (U.value = !1, A.value.length > 0 && (A.value = A.value.map((s) => ({
|
|
728
|
+
...s,
|
|
729
|
+
restaurants: s.doc.isOwner ? s.restaurants : s.managableRestaurantIds.map((F) => {
|
|
730
|
+
var M;
|
|
731
|
+
return ((M = e.find((le) => le._id === F)) == null ? void 0 : M.profile.name) ?? "";
|
|
732
|
+
}).filter(Boolean).sort()
|
|
733
|
+
}))), se());
|
|
734
|
+
}), ne = ({
|
|
729
735
|
member: e,
|
|
730
736
|
className: s = ""
|
|
731
737
|
}) => {
|
|
732
|
-
const
|
|
738
|
+
const F = {
|
|
733
739
|
label: t("common.update"),
|
|
734
740
|
onClick: () => q(pe.Update, e)
|
|
735
|
-
},
|
|
741
|
+
}, M = {
|
|
736
742
|
label: t("common.remove"),
|
|
737
743
|
onClick: () => q(pe.Remove, e),
|
|
738
744
|
itemClass: "text-fm-color-typo-error"
|
|
739
|
-
},
|
|
745
|
+
}, le = e.doc.isOwner ? [F] : [F, M];
|
|
740
746
|
return p(Vs, {
|
|
741
747
|
class: s,
|
|
742
|
-
items:
|
|
748
|
+
items: le
|
|
743
749
|
}, null);
|
|
744
|
-
}, o = (e) => e.doc.isOwner ? t("team.labels.businessOwner") : e.
|
|
745
|
-
var x;
|
|
746
|
-
return ((x = n.restaurants.value.find((C) => C._id === s)) == null ? void 0 : x.profile.name) ?? "";
|
|
747
|
-
}).filter(Boolean).sort().join(", "), i = [{
|
|
750
|
+
}, o = (e) => e.doc.isOwner ? t("team.labels.businessOwner") : e.restaurants.join(", "), i = [{
|
|
748
751
|
accessorKey: "name",
|
|
749
752
|
header: () => t("team.table.columns.name"),
|
|
750
753
|
enableSorting: !1
|
|
@@ -758,7 +761,7 @@ const yt = /* @__PURE__ */ me({
|
|
|
758
761
|
enableSorting: !1,
|
|
759
762
|
cell(e) {
|
|
760
763
|
const s = e.row.original;
|
|
761
|
-
return
|
|
764
|
+
return U.value && !s.doc.isOwner ? p("div", {
|
|
762
765
|
class: "h-16 w-[120px] animate-pulse rounded bg-fm-color-neutral-gray-200"
|
|
763
766
|
}, null) : o(s);
|
|
764
767
|
}
|
|
@@ -767,8 +770,8 @@ const yt = /* @__PURE__ */ me({
|
|
|
767
770
|
header: () => t("team.table.columns.assignedRoles"),
|
|
768
771
|
enableSorting: !1,
|
|
769
772
|
cell(e) {
|
|
770
|
-
const s = e.row.original,
|
|
771
|
-
return _.permissionSets.value.filter((ue) =>
|
|
773
|
+
const s = e.row.original, F = u.getPermissionAssignmentByUserId(s.id), M = (F == null ? void 0 : F.permissionSetIds) || s.doc.permissionSetIds || [];
|
|
774
|
+
return _.permissionSets.value.filter((ue) => M.includes(ue.id)).map((ue) => ue.name).join(", ");
|
|
772
775
|
}
|
|
773
776
|
}, {
|
|
774
777
|
accessorKey: "permission",
|
|
@@ -789,7 +792,7 @@ const yt = /* @__PURE__ */ me({
|
|
|
789
792
|
},
|
|
790
793
|
cell(e) {
|
|
791
794
|
const s = e.row.original;
|
|
792
|
-
return
|
|
795
|
+
return ne({
|
|
793
796
|
member: s,
|
|
794
797
|
className: "flex justify-end w-full"
|
|
795
798
|
});
|
|
@@ -807,7 +810,7 @@ const yt = /* @__PURE__ */ me({
|
|
|
807
810
|
name: "info",
|
|
808
811
|
class: "cursor-pointer text-fm-color-neutral-gray-300"
|
|
809
812
|
}, null),
|
|
810
|
-
content: () => p("div", null, [t("team.labels.permission"), e.permissionLabels.map((
|
|
813
|
+
content: () => p("div", null, [t("team.labels.permission"), e.permissionLabels.map((F) => p("div", null, [Ke("- "), F]))])
|
|
811
814
|
});
|
|
812
815
|
return p("div", {
|
|
813
816
|
class: "flex flex-row items-center gap-8"
|
|
@@ -815,75 +818,75 @@ const yt = /* @__PURE__ */ me({
|
|
|
815
818
|
count: e.permissionLabels.length
|
|
816
819
|
})]), e.permissionLabels.length > 0 && s]);
|
|
817
820
|
}
|
|
818
|
-
function
|
|
819
|
-
var
|
|
820
|
-
const s = u.getPermissionAssignmentByUserId(e.id),
|
|
821
|
+
function K(e) {
|
|
822
|
+
var le, ue, fe, $;
|
|
823
|
+
const s = u.getPermissionAssignmentByUserId(e.id), F = (s == null ? void 0 : s.customPermissions) || e.permissions || [], M = (s == null ? void 0 : s.permissionSetIds) || [];
|
|
821
824
|
return {
|
|
822
825
|
id: e.id,
|
|
823
826
|
isOwner: e.doc.isOwner,
|
|
824
827
|
name: e.name,
|
|
825
828
|
phoneNumber: e.phoneNumber,
|
|
826
829
|
email: e.email,
|
|
827
|
-
permissions:
|
|
828
|
-
permissionSetIds:
|
|
830
|
+
permissions: F,
|
|
831
|
+
permissionSetIds: M,
|
|
829
832
|
posUser: e.doc.posUser ? {
|
|
830
|
-
code: ((
|
|
833
|
+
code: ((le = e.doc.posUser) == null ? void 0 : le.code) ?? "",
|
|
831
834
|
name: ((ue = e.doc.posUser) == null ? void 0 : ue.name) ?? e.name,
|
|
832
|
-
passcode: ((
|
|
835
|
+
passcode: ((fe = e.doc.posUser) == null ? void 0 : fe.passcode) ?? "",
|
|
833
836
|
roles: (($ = e.doc.posUser) == null ? void 0 : $.roles) ?? []
|
|
834
837
|
} : void 0
|
|
835
838
|
};
|
|
836
839
|
}
|
|
837
|
-
function
|
|
838
|
-
const s = u.getPermissionAssignmentByUserId(e.id),
|
|
840
|
+
function Q(e) {
|
|
841
|
+
const s = u.getPermissionAssignmentByUserId(e.id), F = (s == null ? void 0 : s.customPermissions) || e.permissions || [], M = (s == null ? void 0 : s.permissionSetIds) || [];
|
|
839
842
|
return {
|
|
840
843
|
id: e.id,
|
|
841
844
|
isOwner: e.doc.isOwner,
|
|
842
845
|
name: e.name,
|
|
843
846
|
phoneNumber: e.phoneNumber,
|
|
844
847
|
email: e.email,
|
|
845
|
-
permissions:
|
|
846
|
-
permissionSetIds:
|
|
848
|
+
permissions: F,
|
|
849
|
+
permissionSetIds: M,
|
|
847
850
|
posUser: void 0
|
|
848
851
|
};
|
|
849
852
|
}
|
|
850
|
-
const
|
|
853
|
+
const w = v(!1);
|
|
851
854
|
let D = 0;
|
|
852
855
|
const q = async (e, s) => {
|
|
853
856
|
if (e == pe.Update) {
|
|
854
|
-
const
|
|
855
|
-
l.value =
|
|
857
|
+
const F = ++D;
|
|
858
|
+
l.value = Q(s), Y.value = ee.UPDATE, w.value = s.doc.hasPosUser === !0;
|
|
856
859
|
try {
|
|
857
|
-
const
|
|
858
|
-
if (
|
|
859
|
-
l.value =
|
|
860
|
+
const M = await be.readTeamMember(s.id);
|
|
861
|
+
if (F !== D) return;
|
|
862
|
+
l.value = K(M);
|
|
860
863
|
} catch {
|
|
861
|
-
if (
|
|
862
|
-
|
|
864
|
+
if (F !== D) return;
|
|
865
|
+
C.open({
|
|
863
866
|
message: t("common.error"),
|
|
864
867
|
type: "error"
|
|
865
|
-
}),
|
|
868
|
+
}), z();
|
|
866
869
|
} finally {
|
|
867
|
-
|
|
870
|
+
F === D && (w.value = !1);
|
|
868
871
|
}
|
|
869
872
|
}
|
|
870
|
-
e == pe.Remove &&
|
|
871
|
-
}, d = os(),
|
|
873
|
+
e == pe.Remove && H(s);
|
|
874
|
+
}, d = os(), X = v(!1), te = v(!1), Y = v(ee.CLOSED), xe = I(() => Y.value !== ee.CLOSED), Fe = I(() => Y.value === ee.ADD ? t("common.add") : t("common.update")), Ue = I(() => Y.value === ee.ADD ? t("team.actions.addMember") : t("team.actions.updateMember")), l = v();
|
|
872
875
|
function b(e) {
|
|
873
|
-
e || (D++,
|
|
876
|
+
e || (D++, w.value = !1, Y.value = ee.CLOSED);
|
|
874
877
|
}
|
|
875
|
-
function
|
|
876
|
-
D++,
|
|
878
|
+
function z() {
|
|
879
|
+
D++, w.value = !1, Y.value = ee.CLOSED;
|
|
877
880
|
}
|
|
878
881
|
const {
|
|
879
|
-
breakpoints:
|
|
880
|
-
} =
|
|
882
|
+
breakpoints: Z
|
|
883
|
+
} = qe(), H = (e) => {
|
|
881
884
|
d.open({
|
|
882
885
|
title: t("team.actions.removeMember"),
|
|
883
886
|
message: t("team.removeMember.confirmationMessage", {
|
|
884
887
|
memberName: e.name
|
|
885
888
|
}),
|
|
886
|
-
minWidth:
|
|
889
|
+
minWidth: Z.value.lg ? 588 : 0,
|
|
887
890
|
primaryActions: {
|
|
888
891
|
text: "Remove",
|
|
889
892
|
close: !1,
|
|
@@ -896,7 +899,7 @@ const yt = /* @__PURE__ */ me({
|
|
|
896
899
|
}
|
|
897
900
|
}).onPrimary(async () => {
|
|
898
901
|
te.value || (await g.minor(async () => {
|
|
899
|
-
await be.deleteTeamMember(e.id), await
|
|
902
|
+
await be.deleteTeamMember(e.id), await oe();
|
|
900
903
|
}, {
|
|
901
904
|
isLoading: te,
|
|
902
905
|
successMessage: t("team.removeMember.successMessage", {
|
|
@@ -906,16 +909,16 @@ const yt = /* @__PURE__ */ me({
|
|
|
906
909
|
}), d.close());
|
|
907
910
|
});
|
|
908
911
|
}, ae = () => {
|
|
909
|
-
l.value = null,
|
|
910
|
-
},
|
|
912
|
+
l.value = null, Y.value = ee.ADD;
|
|
913
|
+
}, G = v(), W = v(), re = I(() => {
|
|
911
914
|
var e;
|
|
912
915
|
return JSON.stringify({
|
|
913
|
-
businessId: ((e =
|
|
914
|
-
search:
|
|
915
|
-
restaurantIds: [...
|
|
916
|
-
permissionSubjects: [...
|
|
916
|
+
businessId: ((e = r.currentBusiness.value) == null ? void 0 : e._id) ?? "",
|
|
917
|
+
search: T.value.trim(),
|
|
918
|
+
restaurantIds: [...G.value ?? []].sort(),
|
|
919
|
+
permissionSubjects: [...W.value ?? []].sort()
|
|
917
920
|
});
|
|
918
|
-
}),
|
|
921
|
+
}), ie = I(() => Object.values(rs).map((e) => ({
|
|
919
922
|
label: e.label,
|
|
920
923
|
value: e.subject
|
|
921
924
|
})));
|
|
@@ -923,44 +926,44 @@ const yt = /* @__PURE__ */ me({
|
|
|
923
926
|
await L.readRoles();
|
|
924
927
|
}
|
|
925
928
|
async function N(e = h.value) {
|
|
926
|
-
var s,
|
|
927
|
-
|
|
929
|
+
var s, F;
|
|
930
|
+
P.value = !0;
|
|
928
931
|
try {
|
|
929
|
-
const
|
|
932
|
+
const M = await be.readTeamMembersPage({
|
|
930
933
|
limit: de,
|
|
931
934
|
offset: (e - 1) * de,
|
|
932
|
-
search:
|
|
933
|
-
restaurantIds: (s =
|
|
934
|
-
permissionSubjects: (
|
|
935
|
+
search: T.value.trim() || void 0,
|
|
936
|
+
restaurantIds: (s = G.value) != null && s.length ? G.value : void 0,
|
|
937
|
+
permissionSubjects: (F = W.value) != null && F.length ? W.value : void 0
|
|
935
938
|
});
|
|
936
|
-
|
|
939
|
+
A.value = M.items, J.value = M.total;
|
|
937
940
|
} finally {
|
|
938
|
-
|
|
941
|
+
P.value = !1;
|
|
939
942
|
}
|
|
940
943
|
}
|
|
941
|
-
async function
|
|
944
|
+
async function oe() {
|
|
942
945
|
var s;
|
|
943
|
-
if (!((s =
|
|
946
|
+
if (!((s = r.currentBusiness.value) != null && s._id)) return;
|
|
944
947
|
await N(h.value);
|
|
945
|
-
const e = Math.max(1, Math.ceil(
|
|
948
|
+
const e = Math.max(1, Math.ceil(J.value / de));
|
|
946
949
|
h.value > e && (h.value = e, await N(h.value));
|
|
947
950
|
}
|
|
948
|
-
const Se =
|
|
951
|
+
const Se = v();
|
|
949
952
|
async function Qe() {
|
|
950
953
|
if (!Se.value) return;
|
|
951
954
|
const e = await Se.value.validate();
|
|
952
955
|
if (!e) return;
|
|
953
|
-
const s =
|
|
956
|
+
const s = Y.value === ee.ADD;
|
|
954
957
|
await g.minor(async () => {
|
|
955
|
-
await (s ? be.createTeamMember(e) : be.updateTeamMember(l.value.id, e)),
|
|
958
|
+
await (s ? be.createTeamMember(e) : be.updateTeamMember(l.value.id, e)), z(), await $e(), await oe();
|
|
956
959
|
}, {
|
|
957
|
-
isLoading:
|
|
960
|
+
isLoading: X,
|
|
958
961
|
successMessage: s ? t("team.addMember.successMessage", {
|
|
959
962
|
memberName: e.name
|
|
960
963
|
}) : t("team.updateMember.successMessage", {
|
|
961
964
|
memberName: e.name
|
|
962
965
|
})
|
|
963
|
-
}),
|
|
966
|
+
}), Y.value = ee.CLOSED;
|
|
964
967
|
}
|
|
965
968
|
async function Ye() {
|
|
966
969
|
await _.readPermissionSets();
|
|
@@ -973,7 +976,7 @@ const yt = /* @__PURE__ */ me({
|
|
|
973
976
|
pageIndex: e
|
|
974
977
|
}) {
|
|
975
978
|
var s;
|
|
976
|
-
if ((s =
|
|
979
|
+
if ((s = r.currentBusiness.value) != null && s._id && !Ve && !(e === 0 && h.value === 1 && A.value.length > 0)) {
|
|
977
980
|
Ve = !0, h.value = e + 1;
|
|
978
981
|
try {
|
|
979
982
|
await N(h.value);
|
|
@@ -982,86 +985,86 @@ const yt = /* @__PURE__ */ me({
|
|
|
982
985
|
}
|
|
983
986
|
}
|
|
984
987
|
}
|
|
985
|
-
const es = ls(
|
|
986
|
-
|
|
988
|
+
const es = ls(V, () => {
|
|
989
|
+
T.value = V.value;
|
|
987
990
|
});
|
|
988
|
-
return as(es), ye(
|
|
991
|
+
return as(es), ye(re, async () => {
|
|
989
992
|
var e;
|
|
990
|
-
h.value = 1,
|
|
993
|
+
h.value = 1, S.value = !1, (e = r.currentBusiness.value) != null && e._id && (await N(1), S.value = !0);
|
|
991
994
|
}, {
|
|
992
995
|
immediate: !0
|
|
993
|
-
}), ye(
|
|
996
|
+
}), ye(r.currentBusiness, async () => {
|
|
994
997
|
var e;
|
|
995
|
-
(e =
|
|
998
|
+
(e = r.currentBusiness.value) != null && e._id && (await Promise.all([Ye(), $e(), n(), r.restaurants.value.length === 0 ? r.readRestaurants() : Promise.resolve()]), ce());
|
|
996
999
|
}, {
|
|
997
1000
|
immediate: !0
|
|
998
1001
|
}), y({
|
|
999
1002
|
create: ae
|
|
1000
1003
|
}), (e, s) => {
|
|
1001
|
-
var
|
|
1002
|
-
const
|
|
1003
|
-
return
|
|
1004
|
-
modelValue:
|
|
1005
|
-
"onUpdate:modelValue": s[0] || (s[0] = ($) =>
|
|
1004
|
+
var fe;
|
|
1005
|
+
const F = x("FmSearch"), M = x("FmTable"), le = x("FmButton"), ue = x("FmSideSheet");
|
|
1006
|
+
return f(), E(he, null, [c("div", ut, [c("div", mt, [c("div", ct, [c("div", dt, [p(m(Me), {
|
|
1007
|
+
modelValue: G.value,
|
|
1008
|
+
"onUpdate:modelValue": s[0] || (s[0] = ($) => G.value = $),
|
|
1006
1009
|
"managable-only": !1,
|
|
1007
1010
|
multiple: "",
|
|
1008
1011
|
variant: "dark",
|
|
1009
1012
|
class: "!w-auto"
|
|
1010
1013
|
}, null, 8, ["modelValue"]), p(De, {
|
|
1011
|
-
modelValue:
|
|
1012
|
-
"onUpdate:modelValue": s[1] || (s[1] = ($) =>
|
|
1014
|
+
modelValue: W.value,
|
|
1015
|
+
"onUpdate:modelValue": s[1] || (s[1] = ($) => W.value = $),
|
|
1013
1016
|
multiple: "",
|
|
1014
1017
|
variant: "dark",
|
|
1015
|
-
items:
|
|
1018
|
+
items: ie.value,
|
|
1016
1019
|
"selected-prefix": m(t)("team.filter.selected_permission_prefix"),
|
|
1017
1020
|
placeholder: m(t)("team.filter.permission_placeholder")
|
|
1018
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), p(
|
|
1019
|
-
modelValue:
|
|
1020
|
-
"onUpdate:modelValue": s[2] || (s[2] = ($) =>
|
|
1021
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), p(F, {
|
|
1022
|
+
modelValue: V.value,
|
|
1023
|
+
"onUpdate:modelValue": s[2] || (s[2] = ($) => V.value = $),
|
|
1021
1024
|
class: "w-[320px] xs:w-full xs:mt-8",
|
|
1022
1025
|
autofocus: "",
|
|
1023
1026
|
placeholder: m(t)("team.search.placeholder")
|
|
1024
|
-
}, null, 8, ["modelValue", "placeholder"])]), c("div", pt, [p(
|
|
1025
|
-
modelValue:
|
|
1026
|
-
"onUpdate:modelValue": s[3] || (s[3] = ($) =>
|
|
1027
|
+
}, null, 8, ["modelValue", "placeholder"])]), c("div", pt, [p(F, {
|
|
1028
|
+
modelValue: V.value,
|
|
1029
|
+
"onUpdate:modelValue": s[3] || (s[3] = ($) => V.value = $),
|
|
1027
1030
|
class: "w-[320px] xs:w-full xs:mt-8",
|
|
1028
1031
|
autofocus: "",
|
|
1029
1032
|
placeholder: m(t)("team.search.placeholder")
|
|
1030
|
-
}, null, 8, ["modelValue", "placeholder"]), c("div",
|
|
1031
|
-
modelValue:
|
|
1032
|
-
"onUpdate:modelValue": s[4] || (s[4] = ($) =>
|
|
1033
|
+
}, null, 8, ["modelValue", "placeholder"]), c("div", ft, [p(m(Me), {
|
|
1034
|
+
modelValue: G.value,
|
|
1035
|
+
"onUpdate:modelValue": s[4] || (s[4] = ($) => G.value = $),
|
|
1033
1036
|
"managable-only": !1,
|
|
1034
1037
|
multiple: "",
|
|
1035
1038
|
variant: "dark",
|
|
1036
1039
|
class: "!w-auto"
|
|
1037
1040
|
}, null, 8, ["modelValue"]), p(De, {
|
|
1038
|
-
modelValue:
|
|
1039
|
-
"onUpdate:modelValue": s[5] || (s[5] = ($) =>
|
|
1041
|
+
modelValue: W.value,
|
|
1042
|
+
"onUpdate:modelValue": s[5] || (s[5] = ($) => W.value = $),
|
|
1040
1043
|
multiple: "",
|
|
1041
1044
|
variant: "dark",
|
|
1042
|
-
items:
|
|
1045
|
+
items: ie.value,
|
|
1043
1046
|
"selected-prefix": m(t)("team.filter.selected_permission_prefix"),
|
|
1044
1047
|
placeholder: m(t)("team.filter.permission_placeholder")
|
|
1045
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), (
|
|
1048
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), (fe = m(r).currentBusiness.value) != null && fe._id ? (f(), k(is, {
|
|
1046
1049
|
key: 0
|
|
1047
1050
|
}, {
|
|
1048
|
-
default: j(() => [c("div",
|
|
1049
|
-
key: 0
|
|
1050
|
-
})) : !U.value || W.value === 0 ? (v(), k(m(ms), {
|
|
1051
|
+
default: j(() => [c("div", vt, [S.value ? J.value === 0 ? (f(), k(m(ms), {
|
|
1051
1052
|
key: 1,
|
|
1052
1053
|
title: m(t)("team.emptyState.title"),
|
|
1053
1054
|
subtitle: m(t)("team.emptyState.description")
|
|
1054
|
-
}, null, 8, ["title", "subtitle"])) : O("", !0)
|
|
1055
|
-
key:
|
|
1055
|
+
}, null, 8, ["title", "subtitle"])) : O("", !0) : (f(), k(us, {
|
|
1056
|
+
key: 0
|
|
1057
|
+
})), S.value ? (f(), k(M, {
|
|
1058
|
+
key: re.value,
|
|
1056
1059
|
"column-defs": i,
|
|
1057
|
-
"row-data":
|
|
1060
|
+
"row-data": A.value,
|
|
1058
1061
|
"page-size": de,
|
|
1059
|
-
"page-count": Math.ceil(
|
|
1060
|
-
"row-count":
|
|
1062
|
+
"page-count": Math.ceil(J.value / de),
|
|
1063
|
+
"row-count": J.value,
|
|
1061
1064
|
"fetch-fn": He,
|
|
1062
|
-
"hide-footer":
|
|
1065
|
+
"hide-footer": J.value <= de,
|
|
1063
1066
|
virtual: !1,
|
|
1064
|
-
loading:
|
|
1067
|
+
loading: P.value,
|
|
1065
1068
|
class: "team-member-list-table min-h-0 flex-1",
|
|
1066
1069
|
"pin-header-row": "",
|
|
1067
1070
|
onRowClick: s[6] || (s[6] = ($) => q(m(pe).Update, $.original))
|
|
@@ -1075,30 +1078,30 @@ const yt = /* @__PURE__ */ me({
|
|
|
1075
1078
|
class: "absolute",
|
|
1076
1079
|
"onUpdate:modelValue": s[7] || (s[7] = ($) => b($))
|
|
1077
1080
|
}, {
|
|
1078
|
-
"side-sheet-footer": j(() => [c("div", bt, [p(
|
|
1081
|
+
"side-sheet-footer": j(() => [c("div", bt, [p(le, {
|
|
1079
1082
|
label: Fe.value,
|
|
1080
1083
|
size: "md",
|
|
1081
1084
|
variant: "primary",
|
|
1082
|
-
disabled:
|
|
1085
|
+
disabled: X.value || w.value,
|
|
1083
1086
|
onClick: Ee(Qe, ["prevent"])
|
|
1084
|
-
}, null, 8, ["label", "disabled"]), p(
|
|
1087
|
+
}, null, 8, ["label", "disabled"]), p(le, {
|
|
1085
1088
|
label: m(t)("common.cancel"),
|
|
1086
1089
|
size: "md",
|
|
1087
1090
|
variant: "secondary",
|
|
1088
|
-
disabled:
|
|
1089
|
-
onClick:
|
|
1091
|
+
disabled: X.value,
|
|
1092
|
+
onClick: z
|
|
1090
1093
|
}, null, 8, ["label", "disabled"])])]),
|
|
1091
1094
|
default: j(() => [p(it, {
|
|
1092
1095
|
ref_key: "memberForm",
|
|
1093
1096
|
ref: Se,
|
|
1094
1097
|
initialValue: l.value,
|
|
1095
|
-
"is-loading-master-user":
|
|
1098
|
+
"is-loading-master-user": w.value
|
|
1096
1099
|
}, null, 8, ["initialValue", "is-loading-master-user"])]),
|
|
1097
1100
|
_: 1
|
|
1098
1101
|
}, 8, ["header", "model-value"])], 64);
|
|
1099
1102
|
};
|
|
1100
1103
|
}
|
|
1101
|
-
}), Ct = /* @__PURE__ */ Ge(yt, [["__scopeId", "data-v-
|
|
1104
|
+
}), Ct = /* @__PURE__ */ Ge(yt, [["__scopeId", "data-v-d77998ca"]]);
|
|
1102
1105
|
export {
|
|
1103
1106
|
Ct as default
|
|
1104
1107
|
};
|