@feedmepos/mf-hrm-portal 1.1.0-dev → 1.1.2-dev

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.
Files changed (101) hide show
  1. package/dist/AuditLogList-CjrocQS2.js +316 -0
  2. package/dist/{EmployeeList-tmUqs5a6.js → EmployeeList-CKHgrdAO.js} +157 -150
  3. package/dist/Main-HzplGv-e.js +85 -0
  4. package/dist/{main-DOtgCRZe.js → Main-YQ5f-v03.js} +1501 -1532
  5. package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-DuwNwJDM.js → PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js} +2 -2
  6. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-xQ4fjIxa.js +3050 -0
  7. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +38 -0
  8. package/dist/{RoleList-C5xG7LHg.js → RoleList-Bef-7IhW.js} +52 -50
  9. package/dist/RolePermissionList-BzwpQFeO.js +285 -0
  10. package/dist/{useSearch-C25VELOk.js → SelectFilter-NbXrJ4iH.js} +90 -101
  11. package/dist/TeamMemberList-D2Xey_w9.js +949 -0
  12. package/dist/{TimesheetList-CZfo4Dua.js → TimesheetList-DVIk0Tis.js} +30 -29
  13. package/dist/api/audit-log/index.d.ts +10 -0
  14. package/dist/api/index.d.ts +1 -3
  15. package/dist/api/permission-assignment/index.d.ts +10 -0
  16. package/dist/api/permission-set/index.d.ts +8 -0
  17. package/dist/api/team/index.d.ts +5 -1
  18. package/dist/app-DUs516v0.js +2592 -0
  19. package/dist/app.js +4 -4
  20. package/dist/components/AppForm.vue.d.ts +3 -2
  21. package/dist/components/CheckboxInput.vue.d.ts +10 -4
  22. package/dist/components/CollapsibleWrapper.vue.d.ts +3 -2
  23. package/dist/components/form/SelectFilter.vue.d.ts +3 -2
  24. package/dist/components/layout/FormColumn.vue.d.ts +6 -3
  25. package/dist/components/layout/FormItem.vue.d.ts +2 -1
  26. package/dist/components/layout/FormSection.vue.d.ts +2 -1
  27. package/dist/components/layout/FullWrapper.vue.d.ts +6 -3
  28. package/dist/components/layout/PageLayout.vue.d.ts +2 -1
  29. package/dist/components/menu/BottomSheetMenu.vue.d.ts +2 -1
  30. package/dist/components/menu/BottomSheetMenuItem.vue.d.ts +6 -3
  31. package/dist/components/table/EmptyDataTemplate/index.vue.d.ts +6 -3
  32. package/dist/composables/useAppStore.d.ts +6 -6
  33. package/dist/composables/useDateRange.d.ts +1 -1
  34. package/dist/composables/useRestaurantMap.d.ts +4 -8
  35. package/dist/composables/useSheet.d.ts +1 -1
  36. package/dist/dayjs.min-DVb8OkTL.js +282 -0
  37. package/dist/employee-jH7EJnhi.js +172 -0
  38. package/dist/helpers/permission-set.d.ts +32 -0
  39. package/dist/helpers/portal-user.d.ts +8 -0
  40. package/dist/helpers/rule.d.ts +4 -3
  41. package/dist/index-CicR1-Jp.js +8411 -0
  42. package/dist/{empty-placeholder-ey8LJtN1.js → index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js} +43 -2
  43. package/dist/{lodash-DNzKT_gG.js → lodash-DpoPPi_j.js} +326 -343
  44. package/dist/router/shared.d.ts +3 -1
  45. package/dist/stores/employee.d.ts +4 -4
  46. package/dist/stores/permission-assignment.d.ts +277 -0
  47. package/dist/stores/permission-set.d.ts +250 -0
  48. package/dist/stores/role.d.ts +4 -4
  49. package/dist/stores/team.d.ts +288 -0
  50. package/dist/stores/timesheet.d.ts +19 -19
  51. package/dist/team-CiZSNUQW.js +26 -0
  52. package/dist/timesheet-BRQvljNj.js +56 -0
  53. package/dist/tsconfig.app.tsbuildinfo +1 -1
  54. package/dist/types/audit-log.d.ts +19 -0
  55. package/dist/types/permission-assignment.d.ts +20 -0
  56. package/dist/types/permission-set.d.ts +20 -0
  57. package/dist/types/permission.d.ts +1 -4
  58. package/dist/types/team.d.ts +13 -3
  59. package/dist/useAppStore-RzLLN5d9.js +180 -0
  60. package/dist/useLoading-1OqFn86y.js +99 -0
  61. package/dist/useRestaurantMap-D5BNPLKh.js +107 -0
  62. package/dist/useSearch-B6WK1LBB.js +15 -0
  63. package/dist/views/audit-log/locales/index.d.ts +211 -0
  64. package/dist/views/hr/employee/{components/EmployeeForm.vue.d.ts → EmployeeForm.vue.d.ts} +10 -7
  65. package/dist/views/hr/locales/index.d.ts +0 -214
  66. package/dist/views/team/components/BasePermission.vue.d.ts +64 -0
  67. package/dist/views/team/components/{TeamMemberConditionPermission.vue.d.ts → ConditionPermission.vue.d.ts} +14 -1
  68. package/dist/views/team/components/InheritPermissionTooltip.vue.d.ts +14 -0
  69. package/dist/views/team/components/PermissionWithTooltip.vue.d.ts +14 -0
  70. package/dist/views/team/components/PortalPermissionEditor.vue.d.ts +68 -28
  71. package/dist/views/team/components/{TeamMemberRolePermission.vue.d.ts → PosRolePermission.vue.d.ts} +14 -1
  72. package/dist/views/team/locales/index.d.ts +176 -4
  73. package/dist/views/team/{components → member}/AddMemberForm.vue.d.ts +1 -0
  74. package/dist/views/team/member/TeamMemberList.vue.d.ts +4 -0
  75. package/dist/views/team/member/TeamMemberMasterUser.vue.d.ts +55 -0
  76. package/dist/views/team/role/RolePermissionForm.vue.d.ts +19 -0
  77. package/dist/views/{hr/grant-user/GrantUserList.vue.d.ts → team/role/RolePermissionList.vue.d.ts} +0 -12
  78. package/package.json +14 -9
  79. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BY9VGOoM.js +0 -71
  80. package/dist/HorizontalSplitter-B9DVYJIM.js +0 -12
  81. package/dist/Main-ebQsujY3.js +0 -600
  82. package/dist/TeamMemberList-09_3YTHe.js +0 -1509
  83. package/dist/api/grant-user/index.d.ts +0 -8
  84. package/dist/app-B4KDGOw1.js +0 -1432
  85. package/dist/employee-BQc7Wgpu.js +0 -450
  86. package/dist/index-CSG8t9Dl.js +0 -58
  87. package/dist/role-DGAu9X1X.js +0 -9728
  88. package/dist/rule-CSj0p2P3.js +0 -450
  89. package/dist/stores/grant-user.d.ts +0 -86
  90. package/dist/timesheet-B4M1nCIm.js +0 -57
  91. package/dist/types/grant-user.d.ts +0 -17
  92. package/dist/useAppStore-CKmMR-gI.js +0 -93
  93. package/dist/useLoading-v4m-6mEy.js +0 -141
  94. package/dist/useRestaurantMap-e9fQJiLC.js +0 -39
  95. package/dist/views/hr/grant-user/components/GrantUserForm.vue.d.ts +0 -14
  96. package/dist/views/team/components/TeamMemberBasePermission.vue.d.ts +0 -36
  97. package/dist/views/team/components/TeamMemberMasterUser.vue.d.ts +0 -718
  98. /package/dist/views/{hr/grant-user/Main.vue.d.ts → audit-log/AuditLogList.vue.d.ts} +0 -0
  99. /package/dist/views/hr/{main.vue.d.ts → Main.vue.d.ts} +0 -0
  100. /package/dist/views/team/{TeamMemberList.vue.d.ts → Main.vue.d.ts} +0 -0
  101. /package/dist/views/team/{components → member}/MemberInfo.vue.d.ts +0 -0
@@ -0,0 +1,949 @@
1
+ import { defineComponent as se, ref as F, resolveComponent as h, createBlock as M, openBlock as v, withCtx as z, createElementVNode as r, renderSlot as de, createCommentVNode as Q, withModifiers as $e, nextTick as Pe, createElementBlock as K, normalizeClass as Ie, createTextVNode as Me, toDisplayString as O, computed as I, Fragment as re, renderList as pe, createVNode as i, unref as n, watch as Ce, isRef as fe, createSlots as je } from "vue";
2
+ import { useI18n as me, useCoreStore as ie, baseClientInstance as xe, RestaurantSelector as Fe } from "@feedmepos/mf-common";
3
+ import { useBreakpoints as Ne, useSnackbar as Re, useDialog as Te, components as Ve } from "@feedmepos/ui-library";
4
+ import { _ as ze, S as Se } from "./SelectFilter-NbXrJ4iH.js";
5
+ import { s as Ke, r as qe, _ as Ge } from "./app-DUs516v0.js";
6
+ import { _ as We } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
+ import { u as Be } from "./useSearch-B6WK1LBB.js";
8
+ import { u as Je } from "./useLoading-1OqFn86y.js";
9
+ import { g as Ue, l as De, u as Oe, m as we, n as ve, o as Qe, p as Xe, t as ue, q as Ye } from "./index-CicR1-Jp.js";
10
+ import { u as Ae } from "./useAppStore-RzLLN5d9.js";
11
+ /* empty css */
12
+ import { _ as Ze, a as He } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-xQ4fjIxa.js";
13
+ import { u as es } from "./team-CiZSNUQW.js";
14
+ const ss = /* @__PURE__ */ se({
15
+ __name: "BottomSheetMenu",
16
+ setup(t) {
17
+ const p = F(!1);
18
+ async function e() {
19
+ await Pe(), p.value = !p.value;
20
+ }
21
+ return (_, u) => {
22
+ const A = h("FmButton"), k = h("FmBottomSheet");
23
+ return v(), M(k, {
24
+ modelValue: p.value,
25
+ "onUpdate:modelValue": u[1] || (u[1] = (y) => p.value = y),
26
+ "dismiss-away": "",
27
+ "no-header": "",
28
+ "z-index": 110
29
+ }, {
30
+ "bottom-sheet-button": z(() => [
31
+ _.$slots.button ? Q("", !0) : (v(), M(A, {
32
+ key: 0,
33
+ icon: "more_vert",
34
+ variant: "tertiary",
35
+ onClick: $e(e, ["stop"])
36
+ })),
37
+ de(_.$slots, "button")
38
+ ]),
39
+ default: z(() => [
40
+ r("div", {
41
+ onClick: u[0] || (u[0] = (y) => p.value = !1)
42
+ }, [
43
+ de(_.$slots, "default")
44
+ ])
45
+ ]),
46
+ _: 3
47
+ }, 8, ["modelValue"]);
48
+ };
49
+ }
50
+ }), ts = { class: "py-8 px-12 hover:bg-fm-color-neutral-gray-100" }, as = /* @__PURE__ */ se({
51
+ __name: "BottomSheetMenuItem",
52
+ props: {
53
+ label: {},
54
+ icon: {},
55
+ disabled: { type: Boolean },
56
+ itemClass: {}
57
+ },
58
+ setup(t) {
59
+ const p = t;
60
+ return (e, _) => {
61
+ const u = h("FmIcon");
62
+ return v(), K("div", ts, [
63
+ e.$slots.content ? Q("", !0) : (v(), K("div", {
64
+ key: 0,
65
+ class: Ie(["flex items-center", {
66
+ "text-fm-color-typo-disabled": p.disabled,
67
+ "cursor-pointer": !p.disabled,
68
+ "cursor-not-allowed": p.disabled,
69
+ [p.itemClass || ""]: p.itemClass && !p.disabled
70
+ }])
71
+ }, [
72
+ t.icon ? (v(), M(u, {
73
+ key: 0,
74
+ name: t.icon
75
+ }, null, 8, ["name"])) : Q("", !0),
76
+ Me(" " + O(t.label), 1)
77
+ ], 2)),
78
+ de(e.$slots, "content")
79
+ ]);
80
+ };
81
+ }
82
+ }), ls = /* @__PURE__ */ se({
83
+ __name: "ResponsiveContextMenu",
84
+ props: {
85
+ items: {}
86
+ },
87
+ setup(t) {
88
+ const p = Ne(), e = I(() => p.breakpoints.value.xs);
89
+ return (_, u) => {
90
+ const A = h("FmButton"), k = h("FmMenuItem"), y = h("FmMenu");
91
+ return e.value ? (v(), M(ss, { key: 0 }, {
92
+ default: z(() => [
93
+ (v(!0), K(re, null, pe(t.items, ({ icon: m, label: b, disabled: C, itemClass: N, onClick: R }) => (v(), M(as, {
94
+ key: b,
95
+ icon: m,
96
+ label: b,
97
+ disabled: C,
98
+ itemClass: N,
99
+ onClick: () => {
100
+ !C && (R == null || R());
101
+ }
102
+ }, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
103
+ ]),
104
+ _: 1
105
+ })) : (v(), M(y, {
106
+ key: 1,
107
+ "stop-click-propagation": "",
108
+ shift: !0
109
+ }, {
110
+ "menu-button": z(() => [
111
+ i(A, {
112
+ type: "button",
113
+ variant: "tertiary",
114
+ icon: "more_vert",
115
+ "text-color": "neutral-gray-400",
116
+ size: "md"
117
+ })
118
+ ]),
119
+ default: z(() => [
120
+ (v(!0), K(re, null, pe(t.items, ({ label: m, disabled: b, itemClass: C, onClick: N }) => (v(), M(k, {
121
+ key: m,
122
+ disabled: b,
123
+ label: m,
124
+ onClick: () => {
125
+ !b && (N == null || N());
126
+ }
127
+ }, {
128
+ label: z(() => [
129
+ r("span", {
130
+ class: Ie(b ? "text-fm-color-typo-disabled" : C)
131
+ }, O(m), 3)
132
+ ]),
133
+ _: 2
134
+ }, 1032, ["disabled", "label", "onClick"]))), 128))
135
+ ]),
136
+ _: 1
137
+ }));
138
+ };
139
+ }
140
+ });
141
+ var ne = /* @__PURE__ */ ((t) => (t.Update = "Update", t.Remove = "Remove", t))(ne || {});
142
+ const os = { class: "w-full flex flex-col gap-16" }, ns = { class: "flex items-center gap-16" }, rs = { class: "space-y-4 min-w-0 flex-1" }, is = { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400" }, ms = { class: "fm-typo-en-body-lg-600 truncate" }, us = { class: "w-full flex gap-16 items-center" }, cs = { class: "flex-1 flex flex-col gap-4 min-w-0" }, ds = { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400" }, ps = { class: "fm-typo-en-body-lg-600 truncate" }, fs = { class: "flex-1 flex flex-col gap-4 min-w-0" }, vs = { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400" }, bs = { class: "fm-typo-en-body-lg-600 truncate" }, ys = /* @__PURE__ */ se({
143
+ __name: "MemberInfo",
144
+ props: {
145
+ data: {}
146
+ },
147
+ setup(t) {
148
+ const { t: p } = me();
149
+ return (e, _) => {
150
+ const u = h("FmAvatar");
151
+ return v(), K("div", os, [
152
+ r("div", ns, [
153
+ i(u, {
154
+ size: "xl",
155
+ initials: t.data.name
156
+ }, null, 8, ["initials"]),
157
+ r("div", rs, [
158
+ r("p", is, O(n(p)("team.memberForm.memberInfo.memberName")), 1),
159
+ r("p", ms, O(t.data.name || "--"), 1)
160
+ ])
161
+ ]),
162
+ r("div", us, [
163
+ r("div", cs, [
164
+ r("p", ds, O(n(p)("team.memberForm.memberInfo.mobileNumber")), 1),
165
+ r("p", ps, O(t.data.phoneNumber || "--"), 1)
166
+ ]),
167
+ r("div", fs, [
168
+ r("p", vs, O(n(p)("team.memberForm.memberInfo.emailAddress")), 1),
169
+ r("p", bs, O(t.data.email || "--"), 1)
170
+ ])
171
+ ])
172
+ ]);
173
+ };
174
+ }
175
+ }), ke = {
176
+ async readPermissionUserByPhoneNo(t) {
177
+ var e;
178
+ const { currentBusiness: p } = ie();
179
+ return Ue(
180
+ await xe("/").get(`/user/b/${(e = p.value) == null ? void 0 : e._id}/phone/${t}`)
181
+ );
182
+ },
183
+ async readPermissionUserByEmail(t) {
184
+ var e;
185
+ const { currentBusiness: p } = ie();
186
+ return Ue(
187
+ await xe("/").get(`/user/b/${(e = p.value) == null ? void 0 : e._id}/email/${t}`)
188
+ );
189
+ }
190
+ }, _s = { class: "flex flex-col gap-24 w-full" }, hs = {
191
+ key: 0,
192
+ class: "flex flex-col gap-8"
193
+ }, gs = { class: "user-info-icon user-info-icon--lg" }, xs = { class: "flex-1 overflow-hidden" }, Fs = { class: "profile-displayName" }, Vs = { class: "profile-email" }, Ss = { class: "profile-phone" }, Us = { key: 2 }, ws = /* @__PURE__ */ se({
194
+ __name: "PortalUserSearcher",
195
+ emits: ["invite"],
196
+ setup(t, { emit: p }) {
197
+ const e = p, { t: _ } = me(), u = Re(), A = ie(), k = F("phone"), y = F(""), m = F(""), b = F();
198
+ async function C() {
199
+ if (!y.value && !m.value) {
200
+ u.open({
201
+ type: "error",
202
+ title: _("team.memberForm.searchUser.emptyError")
203
+ });
204
+ return;
205
+ }
206
+ const g = k.value === "phone" ? await ke.readPermissionUserByPhoneNo(y.value.replace(/ /g, "")) : await ke.readPermissionUserByEmail(m.value);
207
+ g || u.open({
208
+ type: "error",
209
+ title: _("team.memberForm.searchUser.userNotFound")
210
+ }), b.value = g;
211
+ }
212
+ const N = I(() => {
213
+ var x;
214
+ let g = ((x = b.value) == null ? void 0 : x.displayName) ?? "";
215
+ g || (g = "Feed Me");
216
+ const [V, E] = g.split(" ");
217
+ return E ? `${V[0]}${E[0]}` : V.slice(0, 2);
218
+ }), R = F(!1);
219
+ function te(g) {
220
+ e("invite", g), R.value = !0;
221
+ }
222
+ function ae() {
223
+ R.value = !1;
224
+ }
225
+ return (g, V) => {
226
+ var $, q, G;
227
+ const E = h("FmRadio"), x = h("FmPhoneNumber"), a = h("FmTextField"), o = h("FmRadioGroup"), S = h("FmButton");
228
+ return v(), K("div", _s, [
229
+ R.value ? Q("", !0) : (v(), K("div", hs, [
230
+ i(o, {
231
+ modelValue: k.value,
232
+ "onUpdate:modelValue": V[2] || (V[2] = (P) => k.value = P)
233
+ }, {
234
+ default: z(() => [
235
+ i(E, {
236
+ value: "phone",
237
+ label: n(_)("team.memberForm.searchUser.phoneNumber")
238
+ }, null, 8, ["label"]),
239
+ k.value === "phone" ? (v(), M(x, {
240
+ key: 0,
241
+ modelValue: y.value,
242
+ "onUpdate:modelValue": V[0] || (V[0] = (P) => y.value = P),
243
+ "extra-country-codes": n(A).enabledCountries.value,
244
+ class: "ml-8"
245
+ }, null, 8, ["modelValue", "extra-country-codes"])) : Q("", !0),
246
+ i(E, {
247
+ value: "email",
248
+ label: n(_)("team.memberForm.searchUser.email")
249
+ }, null, 8, ["label"]),
250
+ k.value === "email" ? (v(), M(a, {
251
+ key: 1,
252
+ modelValue: m.value,
253
+ "onUpdate:modelValue": V[1] || (V[1] = (P) => m.value = P),
254
+ placeholder: n(_)("team.memberForm.searchUser.emailPlaceholder"),
255
+ class: "ml-8"
256
+ }, null, 8, ["modelValue", "placeholder"])) : Q("", !0)
257
+ ]),
258
+ _: 1
259
+ }, 8, ["modelValue"]),
260
+ i(S, {
261
+ label: n(_)("team.memberForm.searchUser.search"),
262
+ variant: "secondary",
263
+ onClick: C
264
+ }, null, 8, ["label"])
265
+ ])),
266
+ b.value ? (v(), K("div", {
267
+ key: 1,
268
+ class: "profile-menu--profile cursor-pointer hover:bg-fm-color-opacity-sm",
269
+ onClick: V[3] || (V[3] = (P) => te(b.value))
270
+ }, [
271
+ r("div", gs, O(N.value), 1),
272
+ r("div", xs, [
273
+ r("p", Fs, O(($ = b.value) == null ? void 0 : $.displayName), 1),
274
+ r("p", Vs, O((q = b.value) == null ? void 0 : q.email), 1),
275
+ r("p", Ss, O((G = b.value) == null ? void 0 : G.phoneNumber), 1)
276
+ ])
277
+ ])) : Q("", !0),
278
+ R.value ? (v(), K("div", Us, [
279
+ i(S, {
280
+ label: n(_)("team.memberForm.searchUser.changeUser"),
281
+ variant: "secondary",
282
+ onClick: ae
283
+ }, null, 8, ["label"])
284
+ ])) : Q("", !0)
285
+ ]);
286
+ };
287
+ }
288
+ }), ks = /* @__PURE__ */ ze(ws, [["__scopeId", "data-v-c2c7ed35"]]), $s = { class: "flex flex-col gap-40" }, Ps = { class: "flex items-center" }, Is = { class: "flex-1 flex flex-col" }, Ms = { class: "fm-typo-en-title-sm-600" }, Cs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ns = { class: "flex flex-row gap-16" }, Rs = { class: "flex flex-col gap-8" }, Bs = { class: "fm-typo-en-body-lg-400" }, Ds = { class: "p-16 fm-corner-radius-lg border border-fm-color-neutral-gray-200" }, ce = 4, Os = /* @__PURE__ */ se({
289
+ __name: "TeamMemberMasterUser",
290
+ props: {
291
+ modelValue: {
292
+ type: Object,
293
+ default: void 0
294
+ },
295
+ fallbackName: {
296
+ type: String,
297
+ required: !0
298
+ },
299
+ fallbackPasscode: {
300
+ type: String,
301
+ default: void 0
302
+ },
303
+ restaurants: {
304
+ type: Array,
305
+ required: !0
306
+ },
307
+ roles: {
308
+ type: Array,
309
+ required: !0
310
+ }
311
+ },
312
+ emits: ["update:model-value"],
313
+ setup(t, { emit: p }) {
314
+ const e = t, _ = p, { t: u } = me(), { searchKey: A, filter: k } = Be(""), y = F(!0), m = F([]), b = I(() => {
315
+ const a = {};
316
+ return e.roles.forEach((o) => {
317
+ a[o.value] = o.label;
318
+ }), a;
319
+ }), C = I(() => {
320
+ var o;
321
+ const a = {};
322
+ return (o = e.modelValue) == null || o.roles.forEach((S) => {
323
+ a[S.restaurantId] = S.roleId;
324
+ }), a;
325
+ }), N = I(() => e.restaurants.filter((a) => k([a.profile.name, a.profile.code, te(a._id)])).map((a) => ({
326
+ label: `${a.profile.code ? a.profile.code + "-" : ""}${a.profile.name}`,
327
+ value: a._id,
328
+ slot: `checkbox-${a._id}-bottom`,
329
+ disable: e.roles.filter((o) => !o.disabled).length === 0,
330
+ roleOptions: e.roles
331
+ }))), R = I(() => {
332
+ const a = e.roles.find((o) => !o.disabled);
333
+ return a ? a.value : null;
334
+ });
335
+ function te(a) {
336
+ const o = C.value[a] ?? "";
337
+ return b.value[o] || "";
338
+ }
339
+ function ae(a) {
340
+ a ? e.modelValue || _("update:model-value", {
341
+ code: "",
342
+ name: e.fallbackName,
343
+ roles: [],
344
+ passcode: e.fallbackPasscode || ""
345
+ }) : _("update:model-value", void 0);
346
+ }
347
+ function g(a, o) {
348
+ if (!e.modelValue || a === "passcode" && e.modelValue.passcode === o)
349
+ return;
350
+ const S = De(e.modelValue);
351
+ S[a] = o, _("update:model-value", S);
352
+ }
353
+ function V(a) {
354
+ g(
355
+ "roles",
356
+ a.map((o) => {
357
+ var q, G, P;
358
+ const S = (G = (q = N.value.find((W) => W.value === o)) == null ? void 0 : q.roleOptions.find((W) => !W.disabled)) == null ? void 0 : G.value, $ = (P = e.modelValue) == null ? void 0 : P.roles.find((W) => W.restaurantId === o);
359
+ return {
360
+ restaurantId: o,
361
+ roleId: ($ == null ? void 0 : $.roleId) || S
362
+ };
363
+ })
364
+ );
365
+ }
366
+ function E(a, o) {
367
+ g("roles", [
368
+ ...e.modelValue.roles.filter(
369
+ (S) => S.restaurantId !== a
370
+ ),
371
+ {
372
+ restaurantId: a,
373
+ roleId: o
374
+ }
375
+ ]);
376
+ }
377
+ function x() {
378
+ y.value && (y.value = !1, m.value = [], g("passcode", ""));
379
+ }
380
+ return Ce(
381
+ () => {
382
+ var a;
383
+ return (a = e.modelValue) == null ? void 0 : a.passcode;
384
+ },
385
+ (a) => {
386
+ a && a.length === ce ? (m.value = a.split(""), y.value = !0) : (m.value = [], y.value = !1);
387
+ },
388
+ { immediate: !0 }
389
+ ), (a, o) => {
390
+ const S = h("FmSwitch"), $ = h("FmTextField"), q = h("FmPinField"), G = h("FmFormGroup"), P = h("FmSearch"), W = h("FmSelect");
391
+ return v(), K("div", $s, [
392
+ r("div", Ps, [
393
+ r("div", Is, [
394
+ r("div", Ms, O(n(u)("team.memberForm.masterUser.title")), 1),
395
+ r("div", Cs, O(n(u)("team.memberForm.masterUser.sublabel")), 1)
396
+ ]),
397
+ r("div", null, [
398
+ i(S, {
399
+ "model-value": !!t.modelValue,
400
+ value: "master-user",
401
+ "onUpdate:modelValue": ae
402
+ }, null, 8, ["model-value"])
403
+ ])
404
+ ]),
405
+ t.modelValue ? (v(), K(re, { key: 0 }, [
406
+ r("div", Ns, [
407
+ i($, {
408
+ "model-value": t.modelValue.code,
409
+ label: n(u)("team.memberForm.masterUser.code"),
410
+ "onUpdate:modelValue": o[0] || (o[0] = (f) => g("code", f))
411
+ }, null, 8, ["model-value", "label"]),
412
+ i($, {
413
+ "model-value": t.modelValue.name,
414
+ class: "w-full",
415
+ label: n(u)("team.memberForm.masterUser.name"),
416
+ rules: [(f) => !!f || n(u)("team.memberForm.masterUser.nameEmptyError")],
417
+ "onUpdate:modelValue": o[1] || (o[1] = (f) => g("name", f))
418
+ }, null, 8, ["model-value", "label", "rules"])
419
+ ]),
420
+ r("div", Rs, [
421
+ r("div", Bs, O(n(u)("team.memberForm.masterUser.passcode")), 1),
422
+ i(G, {
423
+ modelValue: m.value,
424
+ "onUpdate:modelValue": o[4] || (o[4] = (f) => m.value = f),
425
+ rules: [
426
+ (f) => (f == null ? void 0 : f.filter((c) => !!c).length) !== ce ? n(u)("team.memberForm.masterUser.passcodeRequired") : !0
427
+ ]
428
+ }, {
429
+ default: z(() => [
430
+ (v(), M(q, {
431
+ key: `pin-field-${y.value}`,
432
+ modelValue: m.value,
433
+ "onUpdate:modelValue": o[2] || (o[2] = (f) => m.value = f),
434
+ length: ce,
435
+ masked: y.value,
436
+ onComplete: o[3] || (o[3] = (f) => g("passcode", f)),
437
+ onFocus: x
438
+ }, null, 8, ["modelValue", "masked"]))
439
+ ]),
440
+ _: 1
441
+ }, 8, ["modelValue", "rules"])
442
+ ]),
443
+ r("div", Ds, [
444
+ i(P, {
445
+ modelValue: n(A),
446
+ "onUpdate:modelValue": o[5] || (o[5] = (f) => fe(A) ? A.value = f : null),
447
+ placeholder: n(u)("team.memberForm.posRole.placeholder"),
448
+ class: "mb-16"
449
+ }, null, 8, ["modelValue", "placeholder"]),
450
+ i(Ze, {
451
+ "model-value": t.modelValue.roles.map((f) => f.restaurantId),
452
+ options: N.value,
453
+ min: 1,
454
+ title: n(u)("team.memberForm.masterUser.role"),
455
+ "onUpdate:modelValue": V
456
+ }, je({ _: 2 }, [
457
+ pe(N.value, (f) => ({
458
+ name: f.slot,
459
+ fn: z(() => {
460
+ var c;
461
+ return [
462
+ r("div", null, [
463
+ i(W, {
464
+ "model-value": ((c = t.modelValue.roles.find((d) => d.restaurantId === f.value)) == null ? void 0 : c.roleId) || R.value,
465
+ items: f.roleOptions,
466
+ "onUpdate:modelValue": (d) => E(f.value, d)
467
+ }, null, 8, ["model-value", "items", "onUpdate:modelValue"])
468
+ ])
469
+ ];
470
+ })
471
+ }))
472
+ ]), 1032, ["model-value", "options", "title"])
473
+ ])
474
+ ], 64)) : Q("", !0)
475
+ ]);
476
+ };
477
+ }
478
+ }), As = { class: "flex flex-col gap-32" }, Ls = { class: "flex w-full" }, Es = /* @__PURE__ */ se({
479
+ __name: "AddMemberForm",
480
+ props: {
481
+ initialValue: {
482
+ type: Object
483
+ },
484
+ roleErrorMessage: {
485
+ type: String,
486
+ default: ""
487
+ }
488
+ },
489
+ setup(t, { expose: p }) {
490
+ var P, W, f;
491
+ const e = t, { t: _ } = me(), u = F(), A = Oe(), k = I(
492
+ () => A.permissionSets.value.map((c) => ({
493
+ label: c.name,
494
+ value: c.id
495
+ }))
496
+ ), y = F(((P = e.initialValue) == null ? void 0 : P.permissionSetIds) || []), m = F((W = e.initialValue) == null ? void 0 : W.posUser), b = F(
497
+ ((f = e.initialValue) == null ? void 0 : f.permissions) || []
498
+ ), { restaurants: C } = ie(), N = Ae().roles, R = I(() => we(b.value)), te = I(() => {
499
+ const c = R.value;
500
+ return N.value.map(
501
+ (d) => ({
502
+ label: d.name,
503
+ value: d._id,
504
+ disabled: !!c && !c.includes(d._id)
505
+ })
506
+ );
507
+ });
508
+ function ae(c) {
509
+ u.value = c;
510
+ }
511
+ function g(c) {
512
+ m.value = S(m.value, c);
513
+ }
514
+ function V() {
515
+ const c = ve(x.value).map(
516
+ ({ setNames: B, ...j }) => j
517
+ );
518
+ return Qe(c, b.value);
519
+ }
520
+ function E() {
521
+ var c, d, B, j, D, X, ee, le, H, L;
522
+ return {
523
+ email: ((c = u.value) == null ? void 0 : c.email) ?? void 0,
524
+ phoneNumber: ((d = u.value) == null ? void 0 : d.phoneNumber) ?? void 0,
525
+ customPermissions: V(),
526
+ // Deprecated: keep for backward compatibility, will be removed in the future
527
+ permissions: b.value.map((oe) => ({
528
+ ...oe,
529
+ subject: Ke(oe.subject)
530
+ })),
531
+ permissionSetIds: y.value,
532
+ name: ((B = u.value) == null ? void 0 : B.displayName) || ((j = e.initialValue) == null ? void 0 : j.name) || "",
533
+ posUser: m.value ? {
534
+ ...m.value,
535
+ name: m.value.name || ((X = (D = e.initialValue) == null ? void 0 : D.posUser) == null ? void 0 : X.name) || ((ee = e.initialValue) == null ? void 0 : ee.name) || ((le = u.value) == null ? void 0 : le.displayName) || "",
536
+ code: m.value.code || ((L = (H = e.initialValue) == null ? void 0 : H.posUser) == null ? void 0 : L.code) || "",
537
+ passcode: m.value.passcode,
538
+ roles: m.value.roles.filter((oe) => !!oe.roleId)
539
+ } : void 0
540
+ };
541
+ }
542
+ const x = I(
543
+ () => A.permissionSets.value.filter(
544
+ (c) => y.value.includes(c.id)
545
+ )
546
+ ), a = F();
547
+ function o() {
548
+ b.value = ve(x.value).map(
549
+ ({ setNames: c, ...d }) => d
550
+ );
551
+ }
552
+ function S(c, d) {
553
+ if (!c) return;
554
+ const B = we(d);
555
+ if (!B) return c;
556
+ const j = De(c);
557
+ return j.roles = j.roles.reduce((D, X) => (B.includes(X.roleId) && D.push(X), D), []), j;
558
+ }
559
+ async function $() {
560
+ await Pe(), a.value && a.value.$el.scrollIntoView({ behavior: "smooth", block: "start" });
561
+ }
562
+ const q = F();
563
+ async function G() {
564
+ return (await q.value.validateInputsWithoutSubmit()).length ? null : E();
565
+ }
566
+ return p({
567
+ readFormData: E,
568
+ validate: G
569
+ }), (c, d) => {
570
+ const B = h("FmSelect"), j = h("FmForm");
571
+ return v(), M(j, {
572
+ ref_key: "formRef",
573
+ ref: q,
574
+ class: "mx-4"
575
+ }, {
576
+ default: z(() => {
577
+ var D, X, ee, le, H;
578
+ return [
579
+ r("div", As, [
580
+ r("div", Ls, [
581
+ t.initialValue ? (v(), M(ys, {
582
+ key: 1,
583
+ data: t.initialValue
584
+ }, null, 8, ["data"])) : (v(), M(ks, {
585
+ key: 0,
586
+ onInvite: d[0] || (d[0] = (L) => ae(L))
587
+ }))
588
+ ]),
589
+ u.value || t.initialValue ? (v(), K(re, { key: 0 }, [
590
+ i(B, {
591
+ modelValue: y.value,
592
+ "onUpdate:modelValue": [
593
+ d[1] || (d[1] = (L) => y.value = L),
594
+ o
595
+ ],
596
+ multiselect: "",
597
+ searchable: "",
598
+ "search-debounce": 300,
599
+ items: k.value,
600
+ label: n(_)("team.memberForm.permissionSet.title"),
601
+ placeholder: n(_)("team.memberForm.permissionSet.selectPlaceholder")
602
+ }, null, 8, ["modelValue", "items", "label", "placeholder"]),
603
+ (D = t.initialValue) != null && D.isOwner ? Q("", !0) : (v(), M(He, {
604
+ key: 0,
605
+ modelValue: b.value,
606
+ "onUpdate:modelValue": d[2] || (d[2] = (L) => b.value = L),
607
+ "inherit-permissions": x.value,
608
+ onPermissionChanged: g
609
+ }, null, 8, ["modelValue", "inherit-permissions"])),
610
+ i(Os, {
611
+ ref_key: "masterUserContentRef",
612
+ ref: a,
613
+ modelValue: m.value,
614
+ "onUpdate:modelValue": [
615
+ d[3] || (d[3] = (L) => m.value = L),
616
+ $
617
+ ],
618
+ "fallback-name": ((X = t.initialValue) == null ? void 0 : X.name) || ((ee = u.value) == null ? void 0 : ee.displayName) || "",
619
+ "fallback-passcode": (H = (le = t.initialValue) == null ? void 0 : le.posUser) == null ? void 0 : H.passcode,
620
+ roles: te.value,
621
+ restaurants: n(C)
622
+ }, null, 8, ["modelValue", "fallback-name", "fallback-passcode", "roles", "restaurants"])
623
+ ], 64)) : Q("", !0)
624
+ ])
625
+ ];
626
+ }),
627
+ _: 1
628
+ }, 512);
629
+ };
630
+ }
631
+ }), js = {
632
+ class: "space-y-24"
633
+ }, Ts = {
634
+ class: "space-y-8"
635
+ }, zs = {
636
+ class: "xs:hidden flex w-full items-start justify-between px-16"
637
+ }, Ks = {
638
+ class: "flex items-start gap-8"
639
+ }, qs = {
640
+ class: "space-y-4 hidden xs:block px-16"
641
+ }, Gs = {
642
+ class: "flex items-start gap-8"
643
+ }, Ws = {
644
+ class: "flex items-center justify-start gap-8"
645
+ };
646
+ var J = /* @__PURE__ */ function(t) {
647
+ return t[t.ADD = 0] = "ADD", t[t.UPDATE = 1] = "UPDATE", t[t.CLOSED = 2] = "CLOSED", t;
648
+ }(J || {});
649
+ const it = /* @__PURE__ */ se({
650
+ __name: "TeamMemberList",
651
+ setup(t, {
652
+ expose: p
653
+ }) {
654
+ const {
655
+ t: e
656
+ } = me(), _ = ie(), u = Ae(), A = Re(), k = Je(A), y = Oe(), m = Xe(), b = es(), C = F(!0), N = ({
657
+ member: s,
658
+ className: l = ""
659
+ }) => {
660
+ const w = {
661
+ label: e("common.update"),
662
+ onClick: () => V(ne.Update, s)
663
+ }, Y = {
664
+ label: e("common.remove"),
665
+ onClick: () => V(ne.Remove, s),
666
+ itemClass: "text-fm-color-typo-error"
667
+ }, Z = s.doc.isOwner ? [w] : [w, Y];
668
+ return i(ls, {
669
+ class: l,
670
+ items: Z
671
+ }, null);
672
+ }, R = (s) => s.doc.isOwner ? e("team.labels.businessOwner") : s.restaurants.join(", "), te = [{
673
+ accessorKey: "name",
674
+ header: () => e("team.table.columns.name"),
675
+ enableSorting: !1
676
+ }, {
677
+ accessorKey: "phoneNumber",
678
+ header: () => e("team.table.columns.phoneNumber"),
679
+ enableSorting: !1
680
+ }, {
681
+ accessorKey: "restaurant",
682
+ header: () => e("team.table.columns.restaurant"),
683
+ enableSorting: !1,
684
+ cell(s) {
685
+ const l = s.row.original;
686
+ return R(l);
687
+ }
688
+ }, {
689
+ accessorKey: "assignedRoles",
690
+ header: () => e("team.table.columns.assignedRoles"),
691
+ enableSorting: !1,
692
+ cell(s) {
693
+ const l = s.row.original, w = m.getPermissionAssignmentByUserId(l.id), Y = (w == null ? void 0 : w.permissionSetIds) || l.doc.permissionSetIds || [];
694
+ return y.permissionSets.value.filter((T) => Y.includes(T.id)).map((T) => T.name).join(", ");
695
+ }
696
+ }, {
697
+ accessorKey: "permission",
698
+ header: () => e("team.table.columns.permission"),
699
+ enableSorting: !1,
700
+ cell(s) {
701
+ const l = s.row.original;
702
+ return ae(l);
703
+ },
704
+ meta: {
705
+ width: "200px"
706
+ }
707
+ }, {
708
+ id: "action",
709
+ meta: {
710
+ cellClass: "pl-16",
711
+ headerContentClass: "-mx-16"
712
+ },
713
+ cell(s) {
714
+ const l = s.row.original;
715
+ return N({
716
+ member: l,
717
+ className: "flex justify-end w-full"
718
+ });
719
+ },
720
+ enableSorting: !1
721
+ }];
722
+ function ae(s) {
723
+ if (s.doc.isOwner)
724
+ return e("team.labels.businessOwner");
725
+ const l = i(Ve.FmTooltip, {
726
+ variant: "plain",
727
+ placement: "top"
728
+ }, {
729
+ default: () => i(Ve.FmIcon, {
730
+ name: "info",
731
+ class: "cursor-pointer text-fm-color-neutral-gray-300"
732
+ }, null),
733
+ content: () => i("div", null, [e("team.labels.permission"), s.permissionLabels.map((w) => i("div", null, [Me("- "), w]))])
734
+ });
735
+ return i("div", {
736
+ class: "flex flex-row items-center gap-8"
737
+ }, [i("span", null, [e("team.labels.allowed", {
738
+ count: s.permissionLabels.length
739
+ })]), s.permissionLabels.length > 0 && l]);
740
+ }
741
+ function g(s) {
742
+ var U, ye, _e, he;
743
+ const l = m.getPermissionAssignmentByUserId(s.id), w = (l == null ? void 0 : l.customPermissions) || s.permissions || [], Y = (l == null ? void 0 : l.permissionSetIds) || [], Z = y.permissionSets.value.filter((ge) => Y.includes(ge.id)), T = Ye(ve(Z).map(({
744
+ setNames: ge,
745
+ setId: Js,
746
+ ...Ee
747
+ }) => Ee), w);
748
+ return {
749
+ id: s.id,
750
+ isOwner: s.doc.isOwner,
751
+ name: s.name,
752
+ phoneNumber: s.phoneNumber,
753
+ email: s.email,
754
+ permissions: T,
755
+ permissionSetIds: Y,
756
+ posUser: s.doc.posUser ? {
757
+ code: ((U = s.doc.posUser) == null ? void 0 : U.code) ?? "",
758
+ name: ((ye = s.doc.posUser) == null ? void 0 : ye.name) ?? s.name,
759
+ passcode: ((_e = s.doc.posUser) == null ? void 0 : _e.passcode) ?? "",
760
+ roles: ((he = s.doc.posUser) == null ? void 0 : he.roles) ?? []
761
+ } : void 0
762
+ };
763
+ }
764
+ const V = (s, l) => {
765
+ if (s == ne.Update) {
766
+ const w = g(l);
767
+ $.value = w, x.value = J.UPDATE;
768
+ }
769
+ s == ne.Remove && W(l);
770
+ }, E = Te(), x = F(J.CLOSED), a = I(() => x.value !== J.CLOSED), o = I(() => x.value === J.ADD ? e("common.add") : e("common.update")), S = I(() => x.value === J.ADD ? e("team.actions.addMember") : e("team.actions.updateMember")), $ = F();
771
+ function q(s) {
772
+ s || (x.value = J.CLOSED);
773
+ }
774
+ function G() {
775
+ x.value = J.CLOSED;
776
+ }
777
+ const {
778
+ breakpoints: P
779
+ } = Ne(), W = (s) => {
780
+ E.open({
781
+ title: e("team.actions.removeMember"),
782
+ message: e("team.removeMember.confirmationMessage", {
783
+ memberName: s.name
784
+ }),
785
+ minWidth: P.value.lg ? 588 : 0,
786
+ primaryActions: {
787
+ text: "Remove",
788
+ close: !1,
789
+ variant: "destructive"
790
+ },
791
+ secondaryActions: {
792
+ text: "Cancel",
793
+ close: !0
794
+ }
795
+ }).onPrimary(async () => {
796
+ await k.minor(async () => {
797
+ await ue.deleteTeamMember(s.id), await H();
798
+ }, {
799
+ successMessage: e("team.removeMember.successMessage", {
800
+ memberName: s.name
801
+ })
802
+ }), E.close();
803
+ });
804
+ }, f = () => {
805
+ $.value = null, x.value = J.ADD;
806
+ }, c = I(() => b.members), d = F(), B = F(), j = I(() => Object.values(qe).map((s) => ({
807
+ label: s.label,
808
+ value: s.subject
809
+ }))), {
810
+ searchKey: D,
811
+ filter: X
812
+ } = Be(""), ee = I(() => c.value.filter((s) => {
813
+ var Z;
814
+ const l = !d.value || s.managableRestaurantIds.some((T) => d.value.includes(T)), w = ((Z = s.permissions) == null ? void 0 : Z.map((T) => T.subject).flat().filter(Boolean)) || [], Y = !B.value || w.some((T) => B.value.includes(T));
815
+ return l && Y && X([s.name, s.phoneNumber, R(s)]);
816
+ }));
817
+ async function le() {
818
+ await u.readRoles();
819
+ }
820
+ async function H() {
821
+ C.value = !0;
822
+ try {
823
+ await b.readTeamMembers();
824
+ } finally {
825
+ C.value = !1;
826
+ }
827
+ }
828
+ const L = F();
829
+ async function oe() {
830
+ if (!L.value) return;
831
+ const s = await L.value.validate();
832
+ if (!s) return;
833
+ const l = x.value === J.ADD;
834
+ await k.minor(async () => {
835
+ await (l ? ue.createTeamMember(s) : ue.updateTeamMember($.value.id, s)), G(), await be(), await H();
836
+ }, {
837
+ successMessage: l ? e("team.addMember.successMessage", {
838
+ memberName: s.name
839
+ }) : e("team.updateMember.successMessage", {
840
+ memberName: s.name
841
+ })
842
+ }), x.value = J.CLOSED;
843
+ }
844
+ async function Le() {
845
+ await y.readPermissionSets();
846
+ }
847
+ async function be() {
848
+ await m.readPermissionAssignments();
849
+ }
850
+ return Ce(_.currentBusiness, async () => {
851
+ var s;
852
+ (s = _.currentBusiness.value) != null && s._id && (await Le(), await be(), H(), le());
853
+ }, {
854
+ immediate: !0
855
+ }), p({
856
+ create: f
857
+ }), (s, l) => {
858
+ const w = h("FmSearch"), Y = h("FmTable"), Z = h("FmButton"), T = h("FmSideSheet");
859
+ return v(), K(re, null, [r("div", js, [r("div", Ts, [r("div", zs, [r("div", Ks, [i(n(Fe), {
860
+ modelValue: d.value,
861
+ "onUpdate:modelValue": l[0] || (l[0] = (U) => d.value = U),
862
+ "managable-only": !1,
863
+ multiple: "",
864
+ variant: "dark",
865
+ class: "!w-auto"
866
+ }, null, 8, ["modelValue"]), i(Se, {
867
+ modelValue: B.value,
868
+ "onUpdate:modelValue": l[1] || (l[1] = (U) => B.value = U),
869
+ multiple: "",
870
+ variant: "dark",
871
+ items: j.value,
872
+ "selected-prefix": n(e)("team.filter.selected_permission_prefix"),
873
+ placeholder: n(e)("team.filter.permission_placeholder")
874
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), i(w, {
875
+ modelValue: n(D),
876
+ "onUpdate:modelValue": l[2] || (l[2] = (U) => fe(D) ? D.value = U : null),
877
+ class: "w-[320px] xs:w-full xs:mt-8",
878
+ autofocus: "",
879
+ placeholder: n(e)("team.search.placeholder")
880
+ }, null, 8, ["modelValue", "placeholder"])]), r("div", qs, [i(w, {
881
+ modelValue: n(D),
882
+ "onUpdate:modelValue": l[3] || (l[3] = (U) => fe(D) ? D.value = U : null),
883
+ class: "w-[320px] xs:w-full xs:mt-8",
884
+ autofocus: "",
885
+ placeholder: n(e)("team.search.placeholder")
886
+ }, null, 8, ["modelValue", "placeholder"]), r("div", Gs, [i(n(Fe), {
887
+ modelValue: d.value,
888
+ "onUpdate:modelValue": l[4] || (l[4] = (U) => d.value = U),
889
+ "managable-only": !1,
890
+ multiple: "",
891
+ variant: "dark",
892
+ class: "!w-auto"
893
+ }, null, 8, ["modelValue"]), i(Se, {
894
+ modelValue: B.value,
895
+ "onUpdate:modelValue": l[5] || (l[5] = (U) => B.value = U),
896
+ multiple: "",
897
+ variant: "dark",
898
+ items: j.value,
899
+ "selected-prefix": n(e)("team.filter.selected_permission_prefix"),
900
+ placeholder: n(e)("team.filter.permission_placeholder")
901
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), c.value.length === 0 && !C.value ? (v(), M(n(We), {
902
+ key: 0,
903
+ title: n(e)("team.emptyState.title"),
904
+ subtitle: n(e)("team.emptyState.description")
905
+ }, null, 8, ["title", "subtitle"])) : (v(), M(Ge, {
906
+ key: 1
907
+ }, {
908
+ default: z(() => [i(Y, {
909
+ "column-defs": te,
910
+ "row-data": ee.value,
911
+ "page-size": ee.value.length,
912
+ loading: C.value,
913
+ "pin-header-row": "",
914
+ "hide-footer": "",
915
+ onRowClick: l[6] || (l[6] = (U) => V(n(ne).Update, U.original))
916
+ }, null, 8, ["row-data", "page-size", "loading"])]),
917
+ _: 1
918
+ }))])]), i(T, {
919
+ header: S.value,
920
+ "model-value": a.value,
921
+ "max-width": 560,
922
+ "dismiss-away": "",
923
+ "onUpdate:modelValue": l[7] || (l[7] = (U) => q(U))
924
+ }, {
925
+ "side-sheet-footer": z(() => [r("div", Ws, [i(Z, {
926
+ label: o.value,
927
+ size: "md",
928
+ variant: "primary",
929
+ onClick: $e(oe, ["prevent"])
930
+ }, null, 8, ["label"]), i(Z, {
931
+ label: n(e)("common.cancel"),
932
+ size: "md",
933
+ variant: "secondary",
934
+ onClick: G
935
+ }, null, 8, ["label"])])]),
936
+ default: z(() => [i(Es, {
937
+ ref_key: "memberForm",
938
+ ref: L,
939
+ initialValue: $.value,
940
+ class: "gap-8"
941
+ }, null, 8, ["initialValue"])]),
942
+ _: 1
943
+ }, 8, ["header", "model-value"])], 64);
944
+ };
945
+ }
946
+ });
947
+ export {
948
+ it as default
949
+ };