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