@feedmepos/mf-hrm-portal 2.0.12 → 2.0.13
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-Bd00VQx_.js → AuditLogList-BRLWRnMw.js} +4 -4
- package/dist/{EmployeeList-CK7KmG5w.js → EmployeeList-CaZN66DH.js} +171 -168
- package/dist/{Main-BlREdQ9j.js → Main-CFRwFhOp.js} +9 -9
- package/dist/{Main-B_8kCVUX.js → Main-DDJqYruE.js} +4 -4
- package/dist/{Main-DkBOgy7G.js → Main-DX6DtLSq.js} +5 -5
- package/dist/{PermissionSetList-DfDMzjya.js → PermissionSetList-CfKgOGUa.js} +5 -5
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Akov0s-D.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CANjzJpE.js} +855 -855
- package/dist/{RoleList-BxXhMLc4.js → RoleList-DVW9rJKE.js} +7 -7
- package/dist/{TeamMemberList--YzyKgRn.js → TeamMemberList-CZDwbZVL.js} +322 -319
- package/dist/{TimesheetList-K8CKfOu5.js → TimesheetList-DMuID6CQ.js} +7 -7
- package/dist/{app-CDx8kP2V.js → app-jGOQVOD0.js} +4 -4
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-SNComb-n.js → dayjs.min-D2KkLYBN.js} +1 -1
- package/dist/{employee-CGtCzQdZ.js → employee-Bh77woAn.js} +4 -4
- package/dist/{index-qJ7dWPV1.js → index-BpdsYZQZ.js} +2 -2
- package/dist/{index-Ctx7lXyr.js → index-DNRSCsVp.js} +1 -1
- package/dist/{iteration-Df2doI7u.js → iteration-iewRosUH.js} +1 -1
- package/dist/{lodash--VoFIg3j.js → lodash-BuzCumRN.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{timesheet-C8L7eQVO.js → timesheet-D-fS5DjW.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-FR1TO4HT.js → useAppStore-RlI38pvN.js} +1 -1
- package/dist/{useLoading-CKrnW2DY.js → useLoading-CJnGoe22.js} +1 -1
- package/dist/{useReportPermissions-BeiN0ZNJ.js → useReportPermissions-CwzEzTF1.js} +3 -3
- package/package.json +1 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { defineComponent as me, ref as b, resolveComponent as F, createBlock as k, openBlock as
|
|
2
|
-
import { u as
|
|
1
|
+
import { defineComponent as me, ref as b, resolveComponent as F, createBlock as k, openBlock as v, withCtx as T, createElementVNode as c, renderSlot as Pe, createCommentVNode as j, withModifiers as je, nextTick as Ee, createElementBlock as q, normalizeClass as Ae, createTextVNode as Te, toDisplayString as L, computed as I, Fragment as he, renderList as ke, createVNode as p, unref as m, watch as ye, isRef as es, createSlots as ss, onUnmounted as ts } from "vue";
|
|
2
|
+
import { u as as } from "./useDebounce-B8ZPVS5C.js";
|
|
3
3
|
import { useI18n as ge, useCoreStore as _e, baseClientInstance as $e, RestaurantSelector as Ie } from "@feedmepos/mf-common";
|
|
4
|
-
import { useBreakpoints as qe, useSnackbar as Ke, useDialog as
|
|
4
|
+
import { useBreakpoints as qe, useSnackbar as Ke, useDialog as ls, components as Me } from "@feedmepos/ui-library";
|
|
5
5
|
import { _ as ze, S as Ce } from "./SelectFilter-DUj7GBtT.js";
|
|
6
|
-
import { p as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { u as
|
|
9
|
-
import { g as
|
|
10
|
-
import { u as We, c as
|
|
11
|
-
import "./index-
|
|
12
|
-
import { u as Xe } from "./useAppStore-
|
|
6
|
+
import { p as Ne, f as os, k as ns, _ as rs } from "./app-jGOQVOD0.js";
|
|
7
|
+
import { _ as is } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
8
|
+
import { u as us } from "./useLoading-CJnGoe22.js";
|
|
9
|
+
import { g as Be, d as Ge } from "./iteration-iewRosUH.js";
|
|
10
|
+
import { u as We, c as ms, d as Ve, m as ve, j as Je, p as De, k as cs, l as Oe, n as ds, o as ps, s as fs, q as vs, v as bs, t as be } from "./index-BpdsYZQZ.js";
|
|
11
|
+
import "./index-DNRSCsVp.js";
|
|
12
|
+
import { u as Xe } from "./useAppStore-RlI38pvN.js";
|
|
13
13
|
/* empty css */
|
|
14
|
-
import { _ as
|
|
15
|
-
import { u as
|
|
16
|
-
const
|
|
14
|
+
import { _ as ys, a as hs } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CANjzJpE.js";
|
|
15
|
+
import { u as _s } from "./useSearch-B6WK1LBB.js";
|
|
16
|
+
const gs = /* @__PURE__ */ me({
|
|
17
17
|
__name: "BottomSheetMenu",
|
|
18
18
|
setup(a) {
|
|
19
|
-
const
|
|
20
|
-
async function
|
|
21
|
-
await Ee(),
|
|
19
|
+
const y = b(!1);
|
|
20
|
+
async function n() {
|
|
21
|
+
await Ee(), y.value = !y.value;
|
|
22
22
|
}
|
|
23
|
-
return (t,
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
modelValue:
|
|
27
|
-
"onUpdate:modelValue":
|
|
23
|
+
return (t, o) => {
|
|
24
|
+
const E = F("FmButton"), M = F("FmBottomSheet");
|
|
25
|
+
return v(), k(M, {
|
|
26
|
+
modelValue: y.value,
|
|
27
|
+
"onUpdate:modelValue": o[1] || (o[1] = (_) => y.value = _),
|
|
28
28
|
"dismiss-away": "",
|
|
29
29
|
"no-header": "",
|
|
30
30
|
"z-index": 110
|
|
31
31
|
}, {
|
|
32
32
|
"bottom-sheet-button": T(() => [
|
|
33
|
-
t.$slots.button ?
|
|
33
|
+
t.$slots.button ? j("", !0) : (v(), k(E, {
|
|
34
34
|
key: 0,
|
|
35
35
|
icon: "more_vert",
|
|
36
36
|
variant: "tertiary",
|
|
37
|
-
onClick: je(
|
|
37
|
+
onClick: je(n, ["stop"])
|
|
38
38
|
})),
|
|
39
39
|
Pe(t.$slots, "button")
|
|
40
40
|
]),
|
|
41
41
|
default: T(() => [
|
|
42
42
|
c("div", {
|
|
43
|
-
onClick:
|
|
43
|
+
onClick: o[0] || (o[0] = (_) => y.value = !1)
|
|
44
44
|
}, [
|
|
45
45
|
Pe(t.$slots, "default")
|
|
46
46
|
])
|
|
@@ -49,7 +49,7 @@ const Fs = /* @__PURE__ */ me({
|
|
|
49
49
|
}, 8, ["modelValue"]);
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
52
|
+
}), xs = { class: "py-8 px-12 hover:bg-fm-color-neutral-gray-100" }, Fs = /* @__PURE__ */ me({
|
|
53
53
|
__name: "BottomSheetMenuItem",
|
|
54
54
|
props: {
|
|
55
55
|
label: {},
|
|
@@ -58,43 +58,43 @@ const Fs = /* @__PURE__ */ me({
|
|
|
58
58
|
itemClass: {}
|
|
59
59
|
},
|
|
60
60
|
setup(a) {
|
|
61
|
-
const
|
|
62
|
-
return (
|
|
63
|
-
const
|
|
64
|
-
return
|
|
65
|
-
|
|
61
|
+
const y = a;
|
|
62
|
+
return (n, t) => {
|
|
63
|
+
const o = F("FmIcon");
|
|
64
|
+
return v(), q("div", xs, [
|
|
65
|
+
n.$slots.content ? j("", !0) : (v(), q("div", {
|
|
66
66
|
key: 0,
|
|
67
67
|
class: Ae(["flex items-center", {
|
|
68
|
-
"text-fm-color-typo-disabled":
|
|
69
|
-
"cursor-pointer": !
|
|
70
|
-
"cursor-not-allowed":
|
|
71
|
-
[
|
|
68
|
+
"text-fm-color-typo-disabled": y.disabled,
|
|
69
|
+
"cursor-pointer": !y.disabled,
|
|
70
|
+
"cursor-not-allowed": y.disabled,
|
|
71
|
+
[y.itemClass || ""]: y.itemClass && !y.disabled
|
|
72
72
|
}])
|
|
73
73
|
}, [
|
|
74
|
-
a.icon ? (
|
|
74
|
+
a.icon ? (v(), k(o, {
|
|
75
75
|
key: 0,
|
|
76
76
|
name: a.icon
|
|
77
|
-
}, null, 8, ["name"])) :
|
|
78
|
-
Te(" " +
|
|
77
|
+
}, null, 8, ["name"])) : j("", !0),
|
|
78
|
+
Te(" " + L(a.label), 1)
|
|
79
79
|
], 2)),
|
|
80
|
-
Pe(
|
|
80
|
+
Pe(n.$slots, "content")
|
|
81
81
|
]);
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
}),
|
|
84
|
+
}), Us = /* @__PURE__ */ me({
|
|
85
85
|
__name: "ResponsiveContextMenu",
|
|
86
86
|
props: {
|
|
87
87
|
items: {}
|
|
88
88
|
},
|
|
89
89
|
setup(a) {
|
|
90
|
-
const
|
|
91
|
-
return (t,
|
|
92
|
-
const
|
|
93
|
-
return
|
|
90
|
+
const y = qe(), n = I(() => y.breakpoints.value.xs);
|
|
91
|
+
return (t, o) => {
|
|
92
|
+
const E = F("FmButton"), M = F("FmMenuItem"), _ = F("FmMenu");
|
|
93
|
+
return n.value ? (v(), k(gs, { key: 0 }, {
|
|
94
94
|
default: T(() => [
|
|
95
|
-
(
|
|
95
|
+
(v(!0), q(he, null, ke(a.items, ({ icon: h, label: u, disabled: S, itemClass: w, onClick: U }) => (v(), k(Fs, {
|
|
96
96
|
key: u,
|
|
97
|
-
icon:
|
|
97
|
+
icon: h,
|
|
98
98
|
label: u,
|
|
99
99
|
disabled: S,
|
|
100
100
|
itemClass: w,
|
|
@@ -104,13 +104,13 @@ const Fs = /* @__PURE__ */ me({
|
|
|
104
104
|
}, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
|
|
105
105
|
]),
|
|
106
106
|
_: 1
|
|
107
|
-
})) : (
|
|
107
|
+
})) : (v(), k(_, {
|
|
108
108
|
key: 1,
|
|
109
109
|
"stop-click-propagation": "",
|
|
110
110
|
shift: !0
|
|
111
111
|
}, {
|
|
112
112
|
"menu-button": T(() => [
|
|
113
|
-
p(
|
|
113
|
+
p(E, {
|
|
114
114
|
type: "button",
|
|
115
115
|
variant: "tertiary",
|
|
116
116
|
icon: "more_vert",
|
|
@@ -119,10 +119,10 @@ const Fs = /* @__PURE__ */ me({
|
|
|
119
119
|
})
|
|
120
120
|
]),
|
|
121
121
|
default: T(() => [
|
|
122
|
-
(
|
|
123
|
-
key:
|
|
122
|
+
(v(!0), q(he, null, ke(a.items, ({ label: h, disabled: u, itemClass: S, onClick: w }) => (v(), k(M, {
|
|
123
|
+
key: h,
|
|
124
124
|
disabled: u,
|
|
125
|
-
label:
|
|
125
|
+
label: h,
|
|
126
126
|
onClick: () => {
|
|
127
127
|
!u && (w == null || w());
|
|
128
128
|
}
|
|
@@ -130,7 +130,7 @@ const Fs = /* @__PURE__ */ me({
|
|
|
130
130
|
label: T(() => [
|
|
131
131
|
c("span", {
|
|
132
132
|
class: Ae(u ? "text-fm-color-typo-disabled" : S)
|
|
133
|
-
},
|
|
133
|
+
}, L(h), 3)
|
|
134
134
|
]),
|
|
135
135
|
_: 2
|
|
136
136
|
}, 1032, ["disabled", "label", "onClick"]))), 128))
|
|
@@ -141,34 +141,34 @@ const Fs = /* @__PURE__ */ me({
|
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
143
|
var pe = /* @__PURE__ */ ((a) => (a.Update = "Update", a.Remove = "Remove", a))(pe || {});
|
|
144
|
-
const
|
|
144
|
+
const Ss = { class: "w-full flex flex-col gap-16" }, Vs = { class: "flex items-center gap-16" }, ws = { class: "space-y-4 min-w-0 flex-1" }, Ps = { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400" }, ks = { class: "fm-typo-en-body-lg-600 truncate" }, Rs = { class: "w-full flex gap-16 items-center" }, $s = { class: "flex-1 flex flex-col gap-4 min-w-0" }, Is = { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400" }, Ms = { class: "fm-typo-en-body-lg-600 truncate" }, Cs = { class: "flex-1 flex flex-col gap-4 min-w-0" }, Ns = { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400" }, Bs = { class: "fm-typo-en-body-lg-600 truncate" }, Ds = /* @__PURE__ */ me({
|
|
145
145
|
__name: "MemberInfo",
|
|
146
146
|
props: {
|
|
147
147
|
data: {}
|
|
148
148
|
},
|
|
149
149
|
setup(a) {
|
|
150
|
-
const { t:
|
|
151
|
-
return (
|
|
152
|
-
const
|
|
153
|
-
return
|
|
154
|
-
c("div",
|
|
155
|
-
p(
|
|
150
|
+
const { t: y } = ge();
|
|
151
|
+
return (n, t) => {
|
|
152
|
+
const o = F("FmAvatar");
|
|
153
|
+
return v(), q("div", Ss, [
|
|
154
|
+
c("div", Vs, [
|
|
155
|
+
p(o, {
|
|
156
156
|
size: "xl",
|
|
157
157
|
initials: a.data.name
|
|
158
158
|
}, null, 8, ["initials"]),
|
|
159
|
-
c("div",
|
|
160
|
-
c("p",
|
|
161
|
-
c("p",
|
|
159
|
+
c("div", ws, [
|
|
160
|
+
c("p", Ps, L(m(y)("team.memberForm.memberInfo.memberName")), 1),
|
|
161
|
+
c("p", ks, L(a.data.name || "--"), 1)
|
|
162
162
|
])
|
|
163
163
|
]),
|
|
164
|
-
c("div",
|
|
165
|
-
c("div",
|
|
166
|
-
c("p",
|
|
167
|
-
c("p",
|
|
164
|
+
c("div", Rs, [
|
|
165
|
+
c("div", $s, [
|
|
166
|
+
c("p", Is, L(m(y)("team.memberForm.memberInfo.mobileNumber")), 1),
|
|
167
|
+
c("p", Ms, L(a.data.phoneNumber || "--"), 1)
|
|
168
168
|
]),
|
|
169
|
-
c("div",
|
|
170
|
-
c("p",
|
|
171
|
-
c("p",
|
|
169
|
+
c("div", Cs, [
|
|
170
|
+
c("p", Ns, L(m(y)("team.memberForm.memberInfo.emailAddress")), 1),
|
|
171
|
+
c("p", Bs, L(a.data.email || "--"), 1)
|
|
172
172
|
])
|
|
173
173
|
])
|
|
174
174
|
]);
|
|
@@ -176,37 +176,37 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
176
176
|
}
|
|
177
177
|
}), Le = {
|
|
178
178
|
async readPermissionUserByPhoneNo(a) {
|
|
179
|
-
var
|
|
180
|
-
const { currentBusiness:
|
|
181
|
-
return
|
|
182
|
-
await $e("/").get(`/user/b/${(
|
|
179
|
+
var n;
|
|
180
|
+
const { currentBusiness: y } = _e();
|
|
181
|
+
return Be(
|
|
182
|
+
await $e("/").get(`/user/b/${(n = y.value) == null ? void 0 : n._id}/phone/${a}`)
|
|
183
183
|
);
|
|
184
184
|
},
|
|
185
185
|
async readPermissionUserByEmail(a) {
|
|
186
|
-
var
|
|
187
|
-
const { currentBusiness:
|
|
188
|
-
return
|
|
189
|
-
await $e("/").get(`/user/b/${(
|
|
186
|
+
var n;
|
|
187
|
+
const { currentBusiness: y } = _e();
|
|
188
|
+
return Be(
|
|
189
|
+
await $e("/").get(`/user/b/${(n = y.value) == null ? void 0 : n._id}/email/${a}`)
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
|
-
},
|
|
192
|
+
}, Os = { class: "flex flex-col gap-24 w-full" }, Ls = {
|
|
193
193
|
key: 0,
|
|
194
194
|
class: "flex flex-col gap-8"
|
|
195
|
-
},
|
|
195
|
+
}, js = { class: "user-info-icon user-info-icon--lg" }, Es = { class: "flex-1 overflow-hidden" }, As = { class: "profile-displayName" }, Ts = { class: "profile-email" }, qs = { class: "profile-phone" }, Ks = { key: 2 }, zs = /* @__PURE__ */ me({
|
|
196
196
|
__name: "PortalUserSearcher",
|
|
197
197
|
emits: ["invite"],
|
|
198
|
-
setup(a, { emit:
|
|
199
|
-
const
|
|
198
|
+
setup(a, { emit: y }) {
|
|
199
|
+
const n = y, { t } = ge(), o = Ke(), E = _e(), M = b("phone"), _ = b(""), h = b(""), u = b();
|
|
200
200
|
async function S() {
|
|
201
|
-
if (!_.value && !
|
|
202
|
-
|
|
201
|
+
if (!_.value && !h.value) {
|
|
202
|
+
o.open({
|
|
203
203
|
type: "error",
|
|
204
204
|
title: t("team.memberForm.searchUser.emptyError")
|
|
205
205
|
});
|
|
206
206
|
return;
|
|
207
207
|
}
|
|
208
|
-
const g = M.value === "phone" ? await Le.readPermissionUserByPhoneNo(_.value.replace(/ /g, "")) : await Le.readPermissionUserByEmail(
|
|
209
|
-
g ||
|
|
208
|
+
const g = M.value === "phone" ? await Le.readPermissionUserByPhoneNo(_.value.replace(/ /g, "")) : await Le.readPermissionUserByEmail(h.value);
|
|
209
|
+
g || o.open({
|
|
210
210
|
type: "error",
|
|
211
211
|
title: t("team.memberForm.searchUser.userNotFound")
|
|
212
212
|
}), u.value = g;
|
|
@@ -218,17 +218,17 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
218
218
|
const [P, Q] = g.split(" ");
|
|
219
219
|
return Q ? `${P[0]}${Q[0]}` : P.slice(0, 2);
|
|
220
220
|
}), U = b(!1);
|
|
221
|
-
function
|
|
222
|
-
|
|
221
|
+
function A(g) {
|
|
222
|
+
n("invite", g), U.value = !0;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function O() {
|
|
225
225
|
U.value = !1;
|
|
226
226
|
}
|
|
227
227
|
return (g, P) => {
|
|
228
228
|
var R, K, C;
|
|
229
229
|
const Q = F("FmRadio"), se = F("FmPhoneNumber"), le = F("FmTextField"), l = F("FmRadioGroup"), i = F("FmButton");
|
|
230
|
-
return
|
|
231
|
-
U.value ?
|
|
230
|
+
return v(), q("div", Os, [
|
|
231
|
+
U.value ? j("", !0) : (v(), q("div", Ls, [
|
|
232
232
|
p(l, {
|
|
233
233
|
modelValue: M.value,
|
|
234
234
|
"onUpdate:modelValue": P[2] || (P[2] = (V) => M.value = V)
|
|
@@ -238,24 +238,24 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
238
238
|
value: "phone",
|
|
239
239
|
label: m(t)("team.memberForm.searchUser.phoneNumber")
|
|
240
240
|
}, null, 8, ["label"]),
|
|
241
|
-
M.value === "phone" ? (
|
|
241
|
+
M.value === "phone" ? (v(), k(se, {
|
|
242
242
|
key: 0,
|
|
243
243
|
modelValue: _.value,
|
|
244
244
|
"onUpdate:modelValue": P[0] || (P[0] = (V) => _.value = V),
|
|
245
|
-
"extra-country-codes": m(
|
|
245
|
+
"extra-country-codes": m(E).enabledCountries.value,
|
|
246
246
|
class: "ml-8"
|
|
247
|
-
}, null, 8, ["modelValue", "extra-country-codes"])) :
|
|
247
|
+
}, null, 8, ["modelValue", "extra-country-codes"])) : j("", !0),
|
|
248
248
|
p(Q, {
|
|
249
249
|
value: "email",
|
|
250
250
|
label: m(t)("team.memberForm.searchUser.email")
|
|
251
251
|
}, null, 8, ["label"]),
|
|
252
|
-
M.value === "email" ? (
|
|
252
|
+
M.value === "email" ? (v(), k(le, {
|
|
253
253
|
key: 1,
|
|
254
|
-
modelValue:
|
|
255
|
-
"onUpdate:modelValue": P[1] || (P[1] = (V) =>
|
|
254
|
+
modelValue: h.value,
|
|
255
|
+
"onUpdate:modelValue": P[1] || (P[1] = (V) => h.value = V),
|
|
256
256
|
placeholder: m(t)("team.memberForm.searchUser.emailPlaceholder"),
|
|
257
257
|
class: "ml-8"
|
|
258
|
-
}, null, 8, ["modelValue", "placeholder"])) :
|
|
258
|
+
}, null, 8, ["modelValue", "placeholder"])) : j("", !0)
|
|
259
259
|
]),
|
|
260
260
|
_: 1
|
|
261
261
|
}, 8, ["modelValue"]),
|
|
@@ -265,29 +265,29 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
265
265
|
onClick: S
|
|
266
266
|
}, null, 8, ["label"])
|
|
267
267
|
])),
|
|
268
|
-
u.value ? (
|
|
268
|
+
u.value ? (v(), q("div", {
|
|
269
269
|
key: 1,
|
|
270
270
|
class: "profile-menu--profile cursor-pointer hover:bg-fm-color-opacity-sm",
|
|
271
|
-
onClick: P[3] || (P[3] = (V) =>
|
|
271
|
+
onClick: P[3] || (P[3] = (V) => A(u.value))
|
|
272
272
|
}, [
|
|
273
|
-
c("div",
|
|
274
|
-
c("div",
|
|
275
|
-
c("p",
|
|
276
|
-
c("p",
|
|
277
|
-
c("p",
|
|
273
|
+
c("div", js, L(w.value), 1),
|
|
274
|
+
c("div", Es, [
|
|
275
|
+
c("p", As, L((R = u.value) == null ? void 0 : R.displayName), 1),
|
|
276
|
+
c("p", Ts, L((K = u.value) == null ? void 0 : K.email), 1),
|
|
277
|
+
c("p", qs, L((C = u.value) == null ? void 0 : C.phoneNumber), 1)
|
|
278
278
|
])
|
|
279
|
-
])) :
|
|
280
|
-
U.value ? (
|
|
279
|
+
])) : j("", !0),
|
|
280
|
+
U.value ? (v(), q("div", Ks, [
|
|
281
281
|
p(i, {
|
|
282
282
|
label: m(t)("team.memberForm.searchUser.changeUser"),
|
|
283
283
|
variant: "secondary",
|
|
284
|
-
onClick:
|
|
284
|
+
onClick: O
|
|
285
285
|
}, null, 8, ["label"])
|
|
286
|
-
])) :
|
|
286
|
+
])) : j("", !0)
|
|
287
287
|
]);
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
}),
|
|
290
|
+
}), Gs = /* @__PURE__ */ ze(zs, [["__scopeId", "data-v-c2c7ed35"]]), Ws = { class: "flex flex-col gap-40" }, Js = { class: "flex items-center" }, Xs = { class: "flex-1 flex flex-col" }, Zs = { class: "fm-typo-en-title-sm-600" }, Qs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ys = { class: "flex flex-row gap-16" }, Hs = { class: "flex flex-col gap-8" }, et = { class: "fm-typo-en-body-lg-400" }, st = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, we = 4, tt = /* @__PURE__ */ me({
|
|
291
291
|
__name: "TeamMemberMasterUser",
|
|
292
292
|
props: {
|
|
293
293
|
modelValue: {
|
|
@@ -312,44 +312,44 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
312
312
|
}
|
|
313
313
|
},
|
|
314
314
|
emits: ["update:model-value"],
|
|
315
|
-
setup(a, { emit:
|
|
316
|
-
const
|
|
315
|
+
setup(a, { emit: y }) {
|
|
316
|
+
const n = a, t = y, { t: o } = ge(), { searchKey: E, filter: M } = _s(""), _ = b(!0), h = b([]), u = I(() => {
|
|
317
317
|
const l = {};
|
|
318
|
-
return
|
|
318
|
+
return n.roles.forEach((i) => {
|
|
319
319
|
l[i.value] = i.label;
|
|
320
320
|
}), l;
|
|
321
321
|
}), S = I(() => {
|
|
322
322
|
var i;
|
|
323
323
|
const l = {};
|
|
324
|
-
return (i =
|
|
324
|
+
return (i = n.modelValue) == null || i.roles.forEach((R) => {
|
|
325
325
|
l[R.restaurantId] = R.roleId;
|
|
326
326
|
}), l;
|
|
327
|
-
}), w = I(() =>
|
|
327
|
+
}), w = I(() => n.restaurants.filter((l) => M([l.profile.name, l.profile.code, A(l._id)])).map((l) => ({
|
|
328
328
|
label: `${l.profile.code ? l.profile.code + "-" : ""}${l.profile.name}`,
|
|
329
329
|
value: l._id,
|
|
330
330
|
slot: `checkbox-${l._id}-bottom`,
|
|
331
|
-
disable:
|
|
332
|
-
roleOptions:
|
|
331
|
+
disable: n.roles.filter((i) => !i.disabled).length === 0,
|
|
332
|
+
roleOptions: n.roles
|
|
333
333
|
}))), U = I(() => {
|
|
334
|
-
const l =
|
|
334
|
+
const l = n.roles.find((i) => !i.disabled);
|
|
335
335
|
return l ? l.value : null;
|
|
336
336
|
});
|
|
337
|
-
function
|
|
337
|
+
function A(l) {
|
|
338
338
|
const i = S.value[l] ?? "";
|
|
339
339
|
return u.value[i] || "";
|
|
340
340
|
}
|
|
341
|
-
function
|
|
342
|
-
l ?
|
|
341
|
+
function O(l) {
|
|
342
|
+
l ? 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 g(l, i) {
|
|
350
|
-
if (!
|
|
350
|
+
if (!n.modelValue || l === "passcode" && n.modelValue.passcode === i)
|
|
351
351
|
return;
|
|
352
|
-
const R = Ge(
|
|
352
|
+
const R = Ge(n.modelValue);
|
|
353
353
|
R[l] = i, t("update:model-value", R);
|
|
354
354
|
}
|
|
355
355
|
function P(l) {
|
|
@@ -357,7 +357,7 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
357
357
|
"roles",
|
|
358
358
|
l.map((i) => {
|
|
359
359
|
var C, V, W;
|
|
360
|
-
const R = (V = (C = w.value.find((J) => J.value === i)) == null ? void 0 : C.roleOptions.find((J) => !J.disabled)) == null ? void 0 : V.value, K = (W =
|
|
360
|
+
const R = (V = (C = w.value.find((J) => J.value === i)) == null ? void 0 : C.roleOptions.find((J) => !J.disabled)) == null ? void 0 : V.value, K = (W = n.modelValue) == null ? void 0 : W.roles.find((J) => J.restaurantId === i);
|
|
361
361
|
return {
|
|
362
362
|
restaurantId: i,
|
|
363
363
|
roleId: (K == null ? void 0 : K.roleId) || R
|
|
@@ -367,7 +367,7 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
367
367
|
}
|
|
368
368
|
function Q(l, i) {
|
|
369
369
|
g("roles", [
|
|
370
|
-
...
|
|
370
|
+
...n.modelValue.roles.filter(
|
|
371
371
|
(R) => R.restaurantId !== l
|
|
372
372
|
),
|
|
373
373
|
{
|
|
@@ -377,71 +377,71 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
377
377
|
]);
|
|
378
378
|
}
|
|
379
379
|
function se() {
|
|
380
|
-
_.value && (_.value = !1,
|
|
380
|
+
_.value && (_.value = !1, h.value = [], g("passcode", ""));
|
|
381
381
|
}
|
|
382
|
-
|
|
382
|
+
ye(
|
|
383
383
|
() => {
|
|
384
384
|
var l;
|
|
385
|
-
return (l =
|
|
385
|
+
return (l = n.modelValue) == null ? void 0 : l.passcode;
|
|
386
386
|
},
|
|
387
387
|
(l) => {
|
|
388
|
-
l && l.length === we ? (
|
|
388
|
+
l && l.length === we ? (h.value = l.split(""), _.value = !0) : (h.value = [], _.value = !1);
|
|
389
389
|
},
|
|
390
390
|
{ immediate: !0 }
|
|
391
391
|
);
|
|
392
392
|
const le = I({
|
|
393
393
|
get: () => {
|
|
394
394
|
var l;
|
|
395
|
-
return ((l =
|
|
395
|
+
return ((l = n.modelValue) == null ? void 0 : l.roles) ?? [];
|
|
396
396
|
},
|
|
397
397
|
set: () => {
|
|
398
398
|
}
|
|
399
399
|
});
|
|
400
400
|
return (l, i) => {
|
|
401
401
|
const R = F("FmSwitch"), K = F("FmTextField"), C = F("FmPinField"), V = F("FmFormGroup"), W = F("FmSearch"), J = F("FmSelect");
|
|
402
|
-
return
|
|
403
|
-
c("div",
|
|
404
|
-
c("div",
|
|
405
|
-
c("div",
|
|
406
|
-
c("div",
|
|
402
|
+
return v(), q("div", Ws, [
|
|
403
|
+
c("div", Js, [
|
|
404
|
+
c("div", Xs, [
|
|
405
|
+
c("div", Zs, L(m(o)("team.memberForm.masterUser.title")), 1),
|
|
406
|
+
c("div", Qs, L(m(o)("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": O
|
|
413
413
|
}, null, 8, ["model-value"])
|
|
414
414
|
])
|
|
415
415
|
]),
|
|
416
|
-
a.modelValue ? (
|
|
417
|
-
c("div",
|
|
416
|
+
a.modelValue ? (v(), q(he, { key: 0 }, [
|
|
417
|
+
c("div", Ys, [
|
|
418
418
|
p(K, {
|
|
419
419
|
"model-value": a.modelValue.code,
|
|
420
|
-
label: m(
|
|
420
|
+
label: m(o)("team.memberForm.masterUser.code"),
|
|
421
421
|
"onUpdate:modelValue": i[0] || (i[0] = (d) => g("code", d))
|
|
422
422
|
}, null, 8, ["model-value", "label"]),
|
|
423
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(o)("team.memberForm.masterUser.name"),
|
|
427
|
+
rules: [(d) => !!d || m(o)("team.memberForm.masterUser.nameEmptyError")],
|
|
428
428
|
"onUpdate:modelValue": i[1] || (i[1] = (d) => g("name", d))
|
|
429
429
|
}, null, 8, ["model-value", "label", "rules"])
|
|
430
430
|
]),
|
|
431
|
-
c("div",
|
|
432
|
-
c("div",
|
|
431
|
+
c("div", Hs, [
|
|
432
|
+
c("div", et, L(m(o)("team.memberForm.masterUser.passcode")), 1),
|
|
433
433
|
p(V, {
|
|
434
|
-
modelValue:
|
|
435
|
-
"onUpdate:modelValue": i[4] || (i[4] = (d) =>
|
|
434
|
+
modelValue: h.value,
|
|
435
|
+
"onUpdate:modelValue": i[4] || (i[4] = (d) => h.value = d),
|
|
436
436
|
rules: [
|
|
437
|
-
(d) => (d == null ? void 0 : d.filter((X) => !!X).length) !== we ? m(
|
|
437
|
+
(d) => (d == null ? void 0 : d.filter((X) => !!X).length) !== we ? m(o)("team.memberForm.masterUser.passcodeRequired") : !0
|
|
438
438
|
]
|
|
439
439
|
}, {
|
|
440
440
|
default: T(() => [
|
|
441
|
-
(
|
|
441
|
+
(v(), k(C, {
|
|
442
442
|
key: `pin-field-${_.value}`,
|
|
443
|
-
modelValue:
|
|
444
|
-
"onUpdate:modelValue": i[2] || (i[2] = (d) =>
|
|
443
|
+
modelValue: h.value,
|
|
444
|
+
"onUpdate:modelValue": i[2] || (i[2] = (d) => h.value = d),
|
|
445
445
|
length: we,
|
|
446
446
|
masked: _.value,
|
|
447
447
|
onComplete: i[3] || (i[3] = (d) => g("passcode", d)),
|
|
@@ -455,22 +455,22 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
455
455
|
modelValue: le.value,
|
|
456
456
|
"onUpdate:modelValue": i[6] || (i[6] = (d) => le.value = d),
|
|
457
457
|
rules: [
|
|
458
|
-
(d) => !d || d.length === 0 ? m(
|
|
458
|
+
(d) => !d || d.length === 0 ? m(o)("team.memberForm.masterUser.restaurantRequired") : d.some((X) => !X.roleId) ? m(o)("team.memberForm.masterUser.roleRequired") : !0
|
|
459
459
|
]
|
|
460
460
|
}, {
|
|
461
461
|
default: T(() => [
|
|
462
|
-
c("div",
|
|
462
|
+
c("div", st, [
|
|
463
463
|
p(W, {
|
|
464
|
-
modelValue: m(
|
|
465
|
-
"onUpdate:modelValue": i[5] || (i[5] = (d) => es(
|
|
466
|
-
placeholder: m(
|
|
464
|
+
modelValue: m(E),
|
|
465
|
+
"onUpdate:modelValue": i[5] || (i[5] = (d) => es(E) ? E.value = d : null),
|
|
466
|
+
placeholder: m(o)("team.memberForm.posRole.placeholder"),
|
|
467
467
|
class: "mb-16"
|
|
468
468
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
469
|
-
p(
|
|
469
|
+
p(ys, {
|
|
470
470
|
"model-value": a.modelValue.roles.map((d) => d.restaurantId),
|
|
471
471
|
options: w.value,
|
|
472
472
|
min: 1,
|
|
473
|
-
title: m(
|
|
473
|
+
title: m(o)("team.memberForm.masterUser.role"),
|
|
474
474
|
"onUpdate:modelValue": P
|
|
475
475
|
}, ss({ _: 2 }, [
|
|
476
476
|
ke(w.value, (d) => ({
|
|
@@ -480,9 +480,9 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
480
480
|
return [
|
|
481
481
|
c("div", null, [
|
|
482
482
|
p(J, {
|
|
483
|
-
"model-value": ((X = a.modelValue.roles.find((
|
|
483
|
+
"model-value": ((X = a.modelValue.roles.find((N) => N.restaurantId === d.value)) == null ? void 0 : X.roleId) || U.value,
|
|
484
484
|
items: d.roleOptions,
|
|
485
|
-
"onUpdate:modelValue": (
|
|
485
|
+
"onUpdate:modelValue": (N) => Q(d.value, N)
|
|
486
486
|
}, null, 8, ["model-value", "items", "onUpdate:modelValue"])
|
|
487
487
|
])
|
|
488
488
|
];
|
|
@@ -493,14 +493,14 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
493
493
|
]),
|
|
494
494
|
_: 1
|
|
495
495
|
}, 8, ["modelValue", "rules"])
|
|
496
|
-
], 64)) :
|
|
496
|
+
], 64)) : j("", !0)
|
|
497
497
|
]);
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
|
-
}),
|
|
500
|
+
}), at = { class: "flex flex-col gap-32" }, lt = { class: "flex w-full" }, ot = {
|
|
501
501
|
key: 2,
|
|
502
502
|
class: "flex items-center justify-center py-24"
|
|
503
|
-
},
|
|
503
|
+
}, nt = /* @__PURE__ */ me({
|
|
504
504
|
__name: "AddMemberForm",
|
|
505
505
|
props: {
|
|
506
506
|
initialValue: {
|
|
@@ -515,85 +515,85 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
515
515
|
default: !1
|
|
516
516
|
}
|
|
517
517
|
},
|
|
518
|
-
setup(a, { expose:
|
|
518
|
+
setup(a, { expose: y }) {
|
|
519
519
|
var xe, Fe, oe;
|
|
520
|
-
const
|
|
521
|
-
() =>
|
|
520
|
+
const n = a, { t } = ge(), o = b(), E = We(), M = I(
|
|
521
|
+
() => E.permissionSets.value.map((r) => ({
|
|
522
522
|
label: r.name,
|
|
523
523
|
value: r.id
|
|
524
524
|
}))
|
|
525
|
-
), _ = b(((xe =
|
|
526
|
-
() =>
|
|
527
|
-
), u = b((Fe =
|
|
525
|
+
), _ = b(((xe = n.initialValue) == null ? void 0 : xe.permissionSetIds) || []), h = I(
|
|
526
|
+
() => ms(_.value, E.permissionSets.value)
|
|
527
|
+
), u = b((Fe = n.initialValue) == null ? void 0 : Fe.posUser), S = b(!1), w = b(!1), U = b(
|
|
528
528
|
Ve(
|
|
529
|
-
|
|
530
|
-
((oe =
|
|
529
|
+
ve(h.value),
|
|
530
|
+
((oe = n.initialValue) == null ? void 0 : oe.permissions) || []
|
|
531
531
|
)
|
|
532
|
-
), { customReportPermissions:
|
|
533
|
-
|
|
532
|
+
), { customReportPermissions: A, isLoaded: O } = Je(), g = new Set(
|
|
533
|
+
De.filter((r) => r.subject.startsWith(cs)).map((r) => r.subject)
|
|
534
534
|
), P = I(() => {
|
|
535
535
|
const r = new Set(g);
|
|
536
|
-
for (const
|
|
536
|
+
for (const f of A.value) r.add(f.subject);
|
|
537
537
|
return r;
|
|
538
538
|
}), Q = I(() => {
|
|
539
539
|
const r = /* @__PURE__ */ new Set();
|
|
540
|
-
for (const
|
|
541
|
-
|
|
542
|
-
for (const
|
|
543
|
-
|
|
540
|
+
for (const f of De)
|
|
541
|
+
f.category === Ne.reports && r.add(f.subject);
|
|
542
|
+
for (const f of A.value)
|
|
543
|
+
f.category === Ne.reports && r.add(f.subject);
|
|
544
544
|
return r;
|
|
545
545
|
}), { restaurants: se } = _e(), le = Xe().roles, l = I(() => Oe(U.value)), i = I(() => {
|
|
546
546
|
const r = l.value;
|
|
547
547
|
return le.value.map(
|
|
548
|
-
(
|
|
549
|
-
label:
|
|
550
|
-
value:
|
|
551
|
-
disabled: !!r && !r.includes(
|
|
548
|
+
(f) => ({
|
|
549
|
+
label: f.name,
|
|
550
|
+
value: f._id,
|
|
551
|
+
disabled: !!r && !r.includes(f._id)
|
|
552
552
|
})
|
|
553
553
|
);
|
|
554
554
|
});
|
|
555
555
|
function R(r) {
|
|
556
|
-
|
|
556
|
+
o.value = r;
|
|
557
557
|
}
|
|
558
558
|
function K(r) {
|
|
559
559
|
w.value = !0;
|
|
560
|
-
const
|
|
561
|
-
|
|
560
|
+
const f = d(u.value, r);
|
|
561
|
+
f !== u.value && (S.value = !0), u.value = f;
|
|
562
562
|
}
|
|
563
563
|
function C() {
|
|
564
|
-
const r =
|
|
565
|
-
return
|
|
564
|
+
const r = ve(h.value), f = O.value ? P.value : g, Y = ds(U.value, f), Z = ps(Y, Q.value), H = fs(Z);
|
|
565
|
+
return vs(r, H);
|
|
566
566
|
}
|
|
567
567
|
function V() {
|
|
568
|
-
var Y, Z, H,
|
|
569
|
-
const r = C(),
|
|
568
|
+
var Y, Z, H, B, z, ne, re, ce, te, G;
|
|
569
|
+
const r = C(), f = U.value.filter((ae) => !ae.inverted);
|
|
570
570
|
return {
|
|
571
|
-
email: ((Y =
|
|
572
|
-
phoneNumber: ((Z =
|
|
571
|
+
email: ((Y = o.value) == null ? void 0 : Y.email) ?? void 0,
|
|
572
|
+
phoneNumber: ((Z = o.value) == null ? void 0 : Z.phoneNumber) ?? void 0,
|
|
573
573
|
customPermissions: r,
|
|
574
574
|
// Deprecated: keep for backward compatibility, will be removed in the future
|
|
575
|
-
permissions:
|
|
576
|
-
...
|
|
577
|
-
subject:
|
|
575
|
+
permissions: f.map((ae) => ({
|
|
576
|
+
...ae,
|
|
577
|
+
subject: os(ae.subject)
|
|
578
578
|
})),
|
|
579
579
|
permissionSetIds: _.value,
|
|
580
|
-
name: ((H =
|
|
581
|
-
posUser: !
|
|
580
|
+
name: ((H = o.value) == null ? void 0 : H.displayName) || ((B = n.initialValue) == null ? void 0 : B.name) || "",
|
|
581
|
+
posUser: !n.initialValue || S.value ? u.value != null ? {
|
|
582
582
|
...u.value,
|
|
583
|
-
name: u.value.name || ((ne = (z =
|
|
584
|
-
code: u.value.code || ((G = (
|
|
583
|
+
name: u.value.name || ((ne = (z = n.initialValue) == null ? void 0 : z.posUser) == null ? void 0 : ne.name) || ((re = n.initialValue) == null ? void 0 : re.name) || ((ce = o.value) == null ? void 0 : ce.displayName) || "",
|
|
584
|
+
code: u.value.code || ((G = (te = n.initialValue) == null ? void 0 : te.posUser) == null ? void 0 : G.code) || "",
|
|
585
585
|
passcode: u.value.passcode,
|
|
586
|
-
roles: u.value.roles.filter((
|
|
586
|
+
roles: u.value.roles.filter((ae) => !!ae.roleId)
|
|
587
587
|
} : u.value : void 0
|
|
588
588
|
// update mode, POS not touched → signal no change to backend
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
591
|
const W = b();
|
|
592
|
-
|
|
593
|
-
() =>
|
|
592
|
+
ye(
|
|
593
|
+
() => n.initialValue,
|
|
594
594
|
(r) => {
|
|
595
595
|
if (!r) {
|
|
596
|
-
_.value = [], u.value = void 0, S.value = !1, w.value = !1, U.value = Ve(
|
|
596
|
+
_.value = [], u.value = void 0, S.value = !1, w.value = !1, U.value = Ve(ve([]), []);
|
|
597
597
|
return;
|
|
598
598
|
}
|
|
599
599
|
if (w.value) {
|
|
@@ -601,60 +601,60 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
603
|
_.value = r.permissionSetIds || [], (!S.value || r.posUser !== void 0) && (u.value = r.posUser), U.value = Ve(
|
|
604
|
-
|
|
604
|
+
ve(h.value),
|
|
605
605
|
r.permissions || []
|
|
606
606
|
), S.value = !1;
|
|
607
607
|
},
|
|
608
608
|
{ immediate: !0 }
|
|
609
609
|
);
|
|
610
610
|
function J() {
|
|
611
|
-
U.value =
|
|
611
|
+
U.value = ve(h.value), w.value = !0;
|
|
612
612
|
const r = d(u.value, U.value);
|
|
613
613
|
r !== u.value && (S.value = !0), u.value = r;
|
|
614
614
|
}
|
|
615
|
-
function d(r,
|
|
615
|
+
function d(r, f) {
|
|
616
616
|
if (!r) return r;
|
|
617
|
-
const Y = Oe(
|
|
617
|
+
const Y = Oe(f);
|
|
618
618
|
if (!Y) return r;
|
|
619
619
|
const Z = Ge(r);
|
|
620
|
-
return Z.roles = Z.roles.reduce((H,
|
|
620
|
+
return Z.roles = Z.roles.reduce((H, B) => (Y.includes(B.roleId) && H.push(B), H), []), Z;
|
|
621
621
|
}
|
|
622
622
|
async function X() {
|
|
623
623
|
await Ee(), W.value && W.value.$el.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
624
624
|
}
|
|
625
|
-
const
|
|
626
|
-
async function
|
|
627
|
-
return (await
|
|
625
|
+
const N = b();
|
|
626
|
+
async function Ue() {
|
|
627
|
+
return (await N.value.validateInputsWithoutSubmit()).length ? null : V();
|
|
628
628
|
}
|
|
629
|
-
return
|
|
629
|
+
return y({
|
|
630
630
|
readFormData: V,
|
|
631
|
-
validate:
|
|
632
|
-
}), (r,
|
|
631
|
+
validate: Ue
|
|
632
|
+
}), (r, f) => {
|
|
633
633
|
const Y = F("FmSelect"), Z = F("FmCircularProgress"), H = F("FmForm");
|
|
634
|
-
return
|
|
634
|
+
return v(), k(H, {
|
|
635
635
|
ref_key: "formRef",
|
|
636
|
-
ref:
|
|
636
|
+
ref: N,
|
|
637
637
|
class: "mx-4"
|
|
638
638
|
}, {
|
|
639
639
|
default: T(() => {
|
|
640
|
-
var
|
|
640
|
+
var B, z, ne, re, ce, te;
|
|
641
641
|
return [
|
|
642
|
-
c("div",
|
|
643
|
-
c("div",
|
|
644
|
-
a.initialValue ? (
|
|
642
|
+
c("div", at, [
|
|
643
|
+
c("div", lt, [
|
|
644
|
+
a.initialValue ? (v(), k(Ds, {
|
|
645
645
|
key: 1,
|
|
646
646
|
data: a.initialValue
|
|
647
|
-
}, null, 8, ["data"])) : (
|
|
647
|
+
}, null, 8, ["data"])) : (v(), k(Gs, {
|
|
648
648
|
key: 0,
|
|
649
|
-
onInvite:
|
|
649
|
+
onInvite: f[0] || (f[0] = (G) => R(G))
|
|
650
650
|
}))
|
|
651
651
|
]),
|
|
652
|
-
|
|
653
|
-
(
|
|
652
|
+
o.value || a.initialValue ? (v(), q(he, { key: 0 }, [
|
|
653
|
+
(B = a.initialValue) != null && B.isOwner ? j("", !0) : (v(), k(Y, {
|
|
654
654
|
key: 0,
|
|
655
655
|
modelValue: _.value,
|
|
656
656
|
"onUpdate:modelValue": [
|
|
657
|
-
|
|
657
|
+
f[1] || (f[1] = (G) => _.value = G),
|
|
658
658
|
J
|
|
659
659
|
],
|
|
660
660
|
multiselect: "",
|
|
@@ -664,29 +664,29 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
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
|
-
(z = a.initialValue) != null && z.isOwner ?
|
|
667
|
+
(z = a.initialValue) != null && z.isOwner ? j("", !0) : (v(), k(hs, {
|
|
668
668
|
key: 1,
|
|
669
669
|
modelValue: U.value,
|
|
670
|
-
"onUpdate:modelValue":
|
|
671
|
-
"inherit-permissions":
|
|
670
|
+
"onUpdate:modelValue": f[2] || (f[2] = (G) => U.value = G),
|
|
671
|
+
"inherit-permissions": h.value,
|
|
672
672
|
onPermissionChanged: K
|
|
673
673
|
}, null, 8, ["modelValue", "inherit-permissions"])),
|
|
674
|
-
a.isLoadingMasterUser ? (
|
|
674
|
+
a.isLoadingMasterUser ? (v(), q("div", ot, [
|
|
675
675
|
p(Z)
|
|
676
|
-
])) : (
|
|
676
|
+
])) : (v(), k(tt, {
|
|
677
677
|
key: 3,
|
|
678
678
|
ref_key: "masterUserContentRef",
|
|
679
679
|
ref: W,
|
|
680
680
|
"model-value": u.value,
|
|
681
|
-
"fallback-name": ((ne = a.initialValue) == null ? void 0 : ne.name) || ((re =
|
|
682
|
-
"fallback-passcode": (
|
|
681
|
+
"fallback-name": ((ne = a.initialValue) == null ? void 0 : ne.name) || ((re = o.value) == null ? void 0 : re.displayName) || "",
|
|
682
|
+
"fallback-passcode": (te = (ce = a.initialValue) == null ? void 0 : ce.posUser) == null ? void 0 : te.passcode,
|
|
683
683
|
roles: i.value,
|
|
684
684
|
restaurants: m(se),
|
|
685
|
-
"onUpdate:modelValue":
|
|
685
|
+
"onUpdate:modelValue": f[3] || (f[3] = (G) => {
|
|
686
686
|
u.value = G, S.value = !0, w.value = !0, X();
|
|
687
687
|
})
|
|
688
688
|
}, null, 8, ["model-value", "fallback-name", "fallback-passcode", "roles", "restaurants"]))
|
|
689
|
-
], 64)) :
|
|
689
|
+
], 64)) : j("", !0)
|
|
690
690
|
])
|
|
691
691
|
];
|
|
692
692
|
}),
|
|
@@ -694,36 +694,36 @@ const ws = { class: "w-full flex flex-col gap-16" }, Ps = { class: "flex items-c
|
|
|
694
694
|
}, 512);
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
}),
|
|
697
|
+
}), rt = {
|
|
698
698
|
class: "space-y-24"
|
|
699
|
-
},
|
|
699
|
+
}, it = {
|
|
700
700
|
class: "space-y-8"
|
|
701
|
-
},
|
|
701
|
+
}, ut = {
|
|
702
702
|
class: "xs:hidden flex w-full items-start justify-between px-16"
|
|
703
|
-
},
|
|
703
|
+
}, mt = {
|
|
704
704
|
class: "flex items-start gap-8"
|
|
705
|
-
},
|
|
705
|
+
}, ct = {
|
|
706
706
|
class: "space-y-4 sm:hidden md:hidden lg:hidden px-16"
|
|
707
|
-
},
|
|
707
|
+
}, dt = {
|
|
708
708
|
class: "flex items-start gap-8"
|
|
709
|
-
},
|
|
709
|
+
}, pt = {
|
|
710
710
|
class: "flex h-full flex-col"
|
|
711
|
-
},
|
|
711
|
+
}, ft = {
|
|
712
712
|
class: "flex items-center justify-start gap-8"
|
|
713
713
|
}, de = 100;
|
|
714
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
|
-
const
|
|
717
|
+
const vt = /* @__PURE__ */ me({
|
|
718
718
|
__name: "TeamMemberList",
|
|
719
719
|
setup(a, {
|
|
720
|
-
expose:
|
|
720
|
+
expose: y
|
|
721
721
|
}) {
|
|
722
722
|
const {
|
|
723
|
-
fetchCustomReportPermissions:
|
|
723
|
+
fetchCustomReportPermissions: n
|
|
724
724
|
} = Je(), {
|
|
725
725
|
t
|
|
726
|
-
} = ge(),
|
|
726
|
+
} = ge(), o = _e(), E = Xe(), M = Ke(), _ = us(M), h = We(), u = bs(), S = b(!0), w = b(o.restaurants.value.length === 0), U = b([]), A = b(0), O = b(1), g = b(""), P = b(""), Q = ye(o.restaurants, (e) => {
|
|
727
727
|
e.length > 0 && (w.value = !1, Q());
|
|
728
728
|
}), se = ({
|
|
729
729
|
member: e,
|
|
@@ -732,18 +732,18 @@ const ht = /* @__PURE__ */ me({
|
|
|
732
732
|
const x = {
|
|
733
733
|
label: t("common.update"),
|
|
734
734
|
onClick: () => W(pe.Update, e)
|
|
735
|
-
},
|
|
735
|
+
}, D = {
|
|
736
736
|
label: t("common.remove"),
|
|
737
737
|
onClick: () => W(pe.Remove, e),
|
|
738
738
|
itemClass: "text-fm-color-typo-error"
|
|
739
|
-
}, ie = e.doc.isOwner ? [x] : [x,
|
|
740
|
-
return p(
|
|
739
|
+
}, ie = e.doc.isOwner ? [x] : [x, D];
|
|
740
|
+
return p(Us, {
|
|
741
741
|
class: s,
|
|
742
742
|
items: ie
|
|
743
743
|
}, null);
|
|
744
744
|
}, le = (e) => e.doc.isOwner ? t("team.labels.businessOwner") : e.managableRestaurantIds.map((s) => {
|
|
745
745
|
var x;
|
|
746
|
-
return ((x =
|
|
746
|
+
return ((x = o.restaurants.value.find((D) => D._id === s)) == null ? void 0 : x.profile.name) ?? "";
|
|
747
747
|
}).filter(Boolean).sort().join(", "), l = [{
|
|
748
748
|
accessorKey: "name",
|
|
749
749
|
header: () => t("team.table.columns.name"),
|
|
@@ -767,8 +767,8 @@ const ht = /* @__PURE__ */ me({
|
|
|
767
767
|
header: () => t("team.table.columns.assignedRoles"),
|
|
768
768
|
enableSorting: !1,
|
|
769
769
|
cell(e) {
|
|
770
|
-
const s = e.row.original, x = u.getPermissionAssignmentByUserId(s.id),
|
|
771
|
-
return
|
|
770
|
+
const s = e.row.original, x = u.getPermissionAssignmentByUserId(s.id), D = (x == null ? void 0 : x.permissionSetIds) || s.doc.permissionSetIds || [];
|
|
771
|
+
return h.permissionSets.value.filter((ue) => D.includes(ue.id)).map((ue) => ue.name).join(", ");
|
|
772
772
|
}
|
|
773
773
|
}, {
|
|
774
774
|
accessorKey: "permission",
|
|
@@ -816,8 +816,8 @@ const ht = /* @__PURE__ */ me({
|
|
|
816
816
|
})]), e.permissionLabels.length > 0 && s]);
|
|
817
817
|
}
|
|
818
818
|
function R(e) {
|
|
819
|
-
var ie, ue,
|
|
820
|
-
const s = u.getPermissionAssignmentByUserId(e.id), x = (s == null ? void 0 : s.customPermissions) || e.permissions || [],
|
|
819
|
+
var ie, ue, fe, $;
|
|
820
|
+
const s = u.getPermissionAssignmentByUserId(e.id), x = (s == null ? void 0 : s.customPermissions) || e.permissions || [], D = (s == null ? void 0 : s.permissionSetIds) || [];
|
|
821
821
|
return {
|
|
822
822
|
id: e.id,
|
|
823
823
|
isOwner: e.doc.isOwner,
|
|
@@ -825,17 +825,17 @@ const ht = /* @__PURE__ */ me({
|
|
|
825
825
|
phoneNumber: e.phoneNumber,
|
|
826
826
|
email: e.email,
|
|
827
827
|
permissions: x,
|
|
828
|
-
permissionSetIds:
|
|
828
|
+
permissionSetIds: D,
|
|
829
829
|
posUser: e.doc.posUser ? {
|
|
830
830
|
code: ((ie = e.doc.posUser) == null ? void 0 : ie.code) ?? "",
|
|
831
831
|
name: ((ue = e.doc.posUser) == null ? void 0 : ue.name) ?? e.name,
|
|
832
|
-
passcode: ((
|
|
832
|
+
passcode: ((fe = e.doc.posUser) == null ? void 0 : fe.passcode) ?? "",
|
|
833
833
|
roles: (($ = e.doc.posUser) == null ? void 0 : $.roles) ?? []
|
|
834
834
|
} : void 0
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
837
|
function K(e) {
|
|
838
|
-
const s = u.getPermissionAssignmentByUserId(e.id), x = (s == null ? void 0 : s.customPermissions) || e.permissions || [],
|
|
838
|
+
const s = u.getPermissionAssignmentByUserId(e.id), x = (s == null ? void 0 : s.customPermissions) || e.permissions || [], D = (s == null ? void 0 : s.permissionSetIds) || [];
|
|
839
839
|
return {
|
|
840
840
|
id: e.id,
|
|
841
841
|
isOwner: e.doc.isOwner,
|
|
@@ -843,7 +843,7 @@ const ht = /* @__PURE__ */ me({
|
|
|
843
843
|
phoneNumber: e.phoneNumber,
|
|
844
844
|
email: e.email,
|
|
845
845
|
permissions: x,
|
|
846
|
-
permissionSetIds:
|
|
846
|
+
permissionSetIds: D,
|
|
847
847
|
posUser: void 0
|
|
848
848
|
};
|
|
849
849
|
}
|
|
@@ -852,28 +852,28 @@ const ht = /* @__PURE__ */ me({
|
|
|
852
852
|
const W = async (e, s) => {
|
|
853
853
|
if (e == pe.Update) {
|
|
854
854
|
const x = ++V;
|
|
855
|
-
oe.value = K(s),
|
|
855
|
+
oe.value = K(s), N.value = ee.UPDATE, C.value = s.doc.hasPosUser === !0;
|
|
856
856
|
try {
|
|
857
|
-
const
|
|
857
|
+
const D = await be.readTeamMember(s.id);
|
|
858
858
|
if (x !== V) return;
|
|
859
|
-
oe.value = R(
|
|
859
|
+
oe.value = R(D);
|
|
860
860
|
} catch {
|
|
861
861
|
if (x !== V) return;
|
|
862
862
|
M.open({
|
|
863
863
|
message: t("common.error"),
|
|
864
864
|
type: "error"
|
|
865
|
-
}),
|
|
865
|
+
}), f();
|
|
866
866
|
} finally {
|
|
867
867
|
x === V && (C.value = !1);
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
870
|
e == pe.Remove && Z(s);
|
|
871
|
-
}, J =
|
|
871
|
+
}, J = ls(), d = b(!1), X = b(!1), N = b(ee.CLOSED), Ue = I(() => N.value !== ee.CLOSED), xe = I(() => N.value === ee.ADD ? t("common.add") : t("common.update")), Fe = I(() => N.value === ee.ADD ? t("team.actions.addMember") : t("team.actions.updateMember")), oe = b();
|
|
872
872
|
function r(e) {
|
|
873
|
-
e || (V++, C.value = !1,
|
|
873
|
+
e || (V++, C.value = !1, N.value = ee.CLOSED);
|
|
874
874
|
}
|
|
875
|
-
function
|
|
876
|
-
V++, C.value = !1,
|
|
875
|
+
function f() {
|
|
876
|
+
V++, C.value = !1, N.value = ee.CLOSED;
|
|
877
877
|
}
|
|
878
878
|
const {
|
|
879
879
|
breakpoints: Y
|
|
@@ -906,53 +906,53 @@ const ht = /* @__PURE__ */ me({
|
|
|
906
906
|
}), J.close());
|
|
907
907
|
});
|
|
908
908
|
}, H = () => {
|
|
909
|
-
oe.value = null,
|
|
910
|
-
},
|
|
909
|
+
oe.value = null, N.value = ee.ADD;
|
|
910
|
+
}, B = b(), z = b(), ne = I(() => {
|
|
911
911
|
var e;
|
|
912
912
|
return JSON.stringify({
|
|
913
|
-
businessId: ((e =
|
|
913
|
+
businessId: ((e = o.currentBusiness.value) == null ? void 0 : e._id) ?? "",
|
|
914
914
|
search: P.value.trim(),
|
|
915
|
-
restaurantIds: [...
|
|
915
|
+
restaurantIds: [...B.value ?? []].sort(),
|
|
916
916
|
permissionSubjects: [...z.value ?? []].sort()
|
|
917
917
|
});
|
|
918
|
-
}), re = I(() => Object.values(
|
|
918
|
+
}), re = I(() => Object.values(ns).map((e) => ({
|
|
919
919
|
label: e.label,
|
|
920
920
|
value: e.subject
|
|
921
921
|
})));
|
|
922
922
|
async function ce() {
|
|
923
|
-
await
|
|
923
|
+
await E.readRoles();
|
|
924
924
|
}
|
|
925
|
-
async function
|
|
925
|
+
async function te(e = O.value) {
|
|
926
926
|
var s, x;
|
|
927
927
|
S.value = !0;
|
|
928
928
|
try {
|
|
929
|
-
const
|
|
929
|
+
const D = await be.readTeamMembersPage({
|
|
930
930
|
limit: de,
|
|
931
931
|
offset: (e - 1) * de,
|
|
932
932
|
search: P.value.trim() || void 0,
|
|
933
|
-
restaurantIds: (s =
|
|
933
|
+
restaurantIds: (s = B.value) != null && s.length ? B.value : void 0,
|
|
934
934
|
permissionSubjects: (x = z.value) != null && x.length ? z.value : void 0
|
|
935
935
|
});
|
|
936
|
-
U.value =
|
|
936
|
+
U.value = D.items, A.value = D.total;
|
|
937
937
|
} finally {
|
|
938
938
|
S.value = !1;
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
941
|
async function G() {
|
|
942
942
|
var s;
|
|
943
|
-
if (!((s =
|
|
944
|
-
await
|
|
945
|
-
const e = Math.max(1, Math.ceil(
|
|
946
|
-
|
|
943
|
+
if (!((s = o.currentBusiness.value) != null && s._id)) return;
|
|
944
|
+
await te(O.value);
|
|
945
|
+
const e = Math.max(1, Math.ceil(A.value / de));
|
|
946
|
+
O.value > e && (O.value = e, await te(O.value));
|
|
947
947
|
}
|
|
948
|
-
const
|
|
948
|
+
const ae = b();
|
|
949
949
|
async function Ze() {
|
|
950
|
-
if (!
|
|
951
|
-
const e = await
|
|
950
|
+
if (!ae.value) return;
|
|
951
|
+
const e = await ae.value.validate();
|
|
952
952
|
if (!e) return;
|
|
953
|
-
const s =
|
|
953
|
+
const s = N.value === ee.ADD;
|
|
954
954
|
await _.minor(async () => {
|
|
955
|
-
await (s ? be.createTeamMember(e) : be.updateTeamMember(oe.value.id, e)),
|
|
955
|
+
await (s ? be.createTeamMember(e) : be.updateTeamMember(oe.value.id, e)), f(), await Re(), await G();
|
|
956
956
|
}, {
|
|
957
957
|
isLoading: d,
|
|
958
958
|
successMessage: s ? t("team.addMember.successMessage", {
|
|
@@ -960,46 +960,49 @@ const ht = /* @__PURE__ */ me({
|
|
|
960
960
|
}) : t("team.updateMember.successMessage", {
|
|
961
961
|
memberName: e.name
|
|
962
962
|
})
|
|
963
|
-
}),
|
|
963
|
+
}), N.value = ee.CLOSED;
|
|
964
964
|
}
|
|
965
965
|
async function Qe() {
|
|
966
|
-
await
|
|
966
|
+
await h.readPermissionSets();
|
|
967
967
|
}
|
|
968
968
|
async function Re() {
|
|
969
969
|
await u.readPermissionAssignments();
|
|
970
970
|
}
|
|
971
|
-
let
|
|
971
|
+
let Se = !1;
|
|
972
972
|
async function Ye({
|
|
973
973
|
pageIndex: e
|
|
974
974
|
}) {
|
|
975
975
|
var s;
|
|
976
|
-
if ((s =
|
|
977
|
-
|
|
976
|
+
if ((s = o.currentBusiness.value) != null && s._id && !Se && !(e === 0 && O.value === 1 && U.value.length > 0)) {
|
|
977
|
+
Se = !0, O.value = e + 1;
|
|
978
978
|
try {
|
|
979
|
-
await
|
|
979
|
+
await te(O.value);
|
|
980
980
|
} finally {
|
|
981
|
-
|
|
981
|
+
Se = !1;
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
|
-
const He =
|
|
985
|
+
const He = as(g, () => {
|
|
986
986
|
P.value = g.value;
|
|
987
987
|
});
|
|
988
|
-
return ts(He),
|
|
989
|
-
|
|
990
|
-
|
|
988
|
+
return ts(He), ye(ne, async () => {
|
|
989
|
+
var e;
|
|
990
|
+
O.value = 1, (e = o.currentBusiness.value) != null && e._id && await te(1);
|
|
991
|
+
}, {
|
|
992
|
+
immediate: !0
|
|
993
|
+
}), ye(o.currentBusiness, async () => {
|
|
991
994
|
var e;
|
|
992
|
-
(e =
|
|
995
|
+
(e = o.currentBusiness.value) != null && e._id && (await Promise.all([Qe(), Re(), n(), o.restaurants.value.length === 0 ? o.readRestaurants() : Promise.resolve()]), ce());
|
|
993
996
|
}, {
|
|
994
997
|
immediate: !0
|
|
995
|
-
}),
|
|
998
|
+
}), y({
|
|
996
999
|
create: H
|
|
997
1000
|
}), (e, s) => {
|
|
998
|
-
var
|
|
999
|
-
const x = F("FmSearch"),
|
|
1000
|
-
return
|
|
1001
|
-
modelValue:
|
|
1002
|
-
"onUpdate:modelValue": s[0] || (s[0] = ($) =>
|
|
1001
|
+
var fe;
|
|
1002
|
+
const x = F("FmSearch"), D = F("FmTable"), ie = F("FmButton"), ue = F("FmSideSheet");
|
|
1003
|
+
return v(), q(he, null, [c("div", rt, [c("div", it, [c("div", ut, [c("div", mt, [p(m(Ie), {
|
|
1004
|
+
modelValue: B.value,
|
|
1005
|
+
"onUpdate:modelValue": s[0] || (s[0] = ($) => B.value = $),
|
|
1003
1006
|
"managable-only": !1,
|
|
1004
1007
|
multiple: "",
|
|
1005
1008
|
variant: "dark",
|
|
@@ -1018,15 +1021,15 @@ const ht = /* @__PURE__ */ me({
|
|
|
1018
1021
|
class: "w-[320px] xs:w-full xs:mt-8",
|
|
1019
1022
|
autofocus: "",
|
|
1020
1023
|
placeholder: m(t)("team.search.placeholder")
|
|
1021
|
-
}, null, 8, ["modelValue", "placeholder"])]), c("div",
|
|
1024
|
+
}, null, 8, ["modelValue", "placeholder"])]), c("div", ct, [p(x, {
|
|
1022
1025
|
modelValue: g.value,
|
|
1023
1026
|
"onUpdate:modelValue": s[3] || (s[3] = ($) => g.value = $),
|
|
1024
1027
|
class: "w-[320px] xs:w-full xs:mt-8",
|
|
1025
1028
|
autofocus: "",
|
|
1026
1029
|
placeholder: m(t)("team.search.placeholder")
|
|
1027
|
-
}, null, 8, ["modelValue", "placeholder"]), c("div",
|
|
1028
|
-
modelValue:
|
|
1029
|
-
"onUpdate:modelValue": s[4] || (s[4] = ($) =>
|
|
1030
|
+
}, null, 8, ["modelValue", "placeholder"]), c("div", dt, [p(m(Ie), {
|
|
1031
|
+
modelValue: B.value,
|
|
1032
|
+
"onUpdate:modelValue": s[4] || (s[4] = ($) => B.value = $),
|
|
1030
1033
|
"managable-only": !1,
|
|
1031
1034
|
multiple: "",
|
|
1032
1035
|
variant: "dark",
|
|
@@ -1039,38 +1042,38 @@ const ht = /* @__PURE__ */ me({
|
|
|
1039
1042
|
items: re.value,
|
|
1040
1043
|
"selected-prefix": m(t)("team.filter.selected_permission_prefix"),
|
|
1041
1044
|
placeholder: m(t)("team.filter.permission_placeholder")
|
|
1042
|
-
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), (
|
|
1045
|
+
}, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), (fe = m(o).currentBusiness.value) != null && fe._id ? (v(), k(rs, {
|
|
1043
1046
|
key: 0
|
|
1044
1047
|
}, {
|
|
1045
|
-
default: T(() => [c("div",
|
|
1048
|
+
default: T(() => [c("div", pt, [A.value === 0 && !S.value ? (v(), k(m(is), {
|
|
1046
1049
|
key: 0,
|
|
1047
1050
|
title: m(t)("team.emptyState.title"),
|
|
1048
1051
|
subtitle: m(t)("team.emptyState.description")
|
|
1049
|
-
}, null, 8, ["title", "subtitle"])) :
|
|
1052
|
+
}, null, 8, ["title", "subtitle"])) : j("", !0), A.value > 0 || S.value ? (v(), k(D, {
|
|
1050
1053
|
key: ne.value,
|
|
1051
1054
|
"column-defs": l,
|
|
1052
1055
|
"row-data": U.value,
|
|
1053
1056
|
"page-size": de,
|
|
1054
|
-
"page-count": Math.ceil(
|
|
1055
|
-
"row-count":
|
|
1057
|
+
"page-count": Math.ceil(A.value / de),
|
|
1058
|
+
"row-count": A.value,
|
|
1056
1059
|
"fetch-fn": Ye,
|
|
1057
|
-
"hide-footer":
|
|
1060
|
+
"hide-footer": A.value <= de,
|
|
1058
1061
|
virtual: !1,
|
|
1059
1062
|
loading: S.value,
|
|
1060
1063
|
class: "team-member-list-table min-h-0 flex-1",
|
|
1061
1064
|
"pin-header-row": "",
|
|
1062
1065
|
onRowClick: s[6] || (s[6] = ($) => W(m(pe).Update, $.original))
|
|
1063
|
-
}, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading"]))
|
|
1066
|
+
}, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading"])) : j("", !0)])]),
|
|
1064
1067
|
_: 1
|
|
1065
|
-
})) :
|
|
1068
|
+
})) : j("", !0)])]), p(ue, {
|
|
1066
1069
|
header: Fe.value,
|
|
1067
|
-
"model-value":
|
|
1070
|
+
"model-value": Ue.value,
|
|
1068
1071
|
"max-width": 560,
|
|
1069
1072
|
"dismiss-away": "",
|
|
1070
1073
|
class: "absolute",
|
|
1071
1074
|
"onUpdate:modelValue": s[7] || (s[7] = ($) => r($))
|
|
1072
1075
|
}, {
|
|
1073
|
-
"side-sheet-footer": T(() => [c("div",
|
|
1076
|
+
"side-sheet-footer": T(() => [c("div", ft, [p(ie, {
|
|
1074
1077
|
label: xe.value,
|
|
1075
1078
|
size: "md",
|
|
1076
1079
|
variant: "primary",
|
|
@@ -1081,11 +1084,11 @@ const ht = /* @__PURE__ */ me({
|
|
|
1081
1084
|
size: "md",
|
|
1082
1085
|
variant: "secondary",
|
|
1083
1086
|
disabled: d.value,
|
|
1084
|
-
onClick:
|
|
1087
|
+
onClick: f
|
|
1085
1088
|
}, null, 8, ["label", "disabled"])])]),
|
|
1086
|
-
default: T(() => [p(
|
|
1089
|
+
default: T(() => [p(nt, {
|
|
1087
1090
|
ref_key: "memberForm",
|
|
1088
|
-
ref:
|
|
1091
|
+
ref: ae,
|
|
1089
1092
|
initialValue: oe.value,
|
|
1090
1093
|
"is-loading-master-user": C.value
|
|
1091
1094
|
}, null, 8, ["initialValue", "is-loading-master-user"])]),
|
|
@@ -1093,7 +1096,7 @@ const ht = /* @__PURE__ */ me({
|
|
|
1093
1096
|
}, 8, ["header", "model-value"])], 64);
|
|
1094
1097
|
};
|
|
1095
1098
|
}
|
|
1096
|
-
}),
|
|
1099
|
+
}), It = /* @__PURE__ */ ze(vt, [["__scopeId", "data-v-fbf88967"]]);
|
|
1097
1100
|
export {
|
|
1098
|
-
|
|
1101
|
+
It as default
|
|
1099
1102
|
};
|