@feedmepos/mf-hrm-portal 2.3.3-dev → 2.3.4-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 (41) hide show
  1. package/dist/{ApprovalCodeList-D8ZVkmrF.js → ApprovalCodeList-C_F98cwM.js} +5 -5
  2. package/dist/{AuditLogList-Fby1fcGU.js → AuditLogList-CRQjG28b.js} +3 -3
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-B1uS6T3r.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BA4pgKNh.js} +2 -2
  4. package/dist/{EmployeeList-DY2Y-FtT.js → EmployeeList-DurHeTfl.js} +6 -6
  5. package/dist/{GrantUserList-RK38DjjY.js → GrantUserList-BZGwZLsp.js} +6 -6
  6. package/dist/{Main-424HHE7m.js → Main-CvVhcEJ-.js} +5 -5
  7. package/dist/{Main-BuJe2QNl.js → Main-DZ_LJKco.js} +10 -10
  8. package/dist/{Main-Pv9x678t.js → Main-iG516Bly.js} +11 -11
  9. package/dist/{MyPosProfile-Rc2ZTeQR.js → MyPosProfile-C8iBUFAt.js} +1 -1
  10. package/dist/{PermissionSetList-BT1oUm8M.js → PermissionSetList-COn_Nrzd.js} +6 -6
  11. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BRrhFF3y.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C1k42T7U.js} +870 -870
  12. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DAbgu49T.js +1831 -0
  13. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-DS4eMJ6w.js → RoleForm.vue_vue_type_script_setup_true_lang-CoWKz1qm.js} +9 -9
  14. package/dist/{RoleList-CrLxn4_K.js → RoleList-C5f_ulk9.js} +7 -7
  15. package/dist/{TeamMemberList-D32ZtSLP.js → TeamMemberList-DCSbXFdg.js} +530 -505
  16. package/dist/{TimesheetList-ByUp0yfA.js → TimesheetList-DoNzT6xQ.js} +7 -7
  17. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-9x0jnL2P.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-n8cnb0Zw.js} +3 -3
  18. package/dist/{app-BsAwRWj0.js → app-BYPvZve5.js} +7 -7
  19. package/dist/app.js +1 -1
  20. package/dist/{approval-code-BUuYtJAO.js → approval-code-CeijALXj.js} +1 -1
  21. package/dist/{dayjs.min-C9xnIrg1.js → dayjs.min-CS0wjvq4.js} +1 -1
  22. package/dist/{employee-DAwBQ0bc.js → employee-DH4Wibqh.js} +5 -5
  23. package/dist/{grant-user-D-PdX5g-.js → grant-user-C0ko4LW8.js} +1 -1
  24. package/dist/{iteration-Dat4Ismm.js → iteration-Cnj0KTDr.js} +1 -1
  25. package/dist/{lodash-DjYVoggD.js → lodash-DAd2V4v-.js} +1 -1
  26. package/dist/{member-grant-CQHFGo-k.js → member-grant-BaABegLK.js} +2 -2
  27. package/dist/{restaurant-dbllb9m8.js → restaurant-CNsV-2OE.js} +1 -1
  28. package/dist/{role-DN-jiQnS.js → role-DSu9cpI6.js} +3 -3
  29. package/dist/{rule-Bgcb9R7I.js → rule-BmRzz26L.js} +3 -3
  30. package/dist/src/api/sso-provider/index.d.ts +5 -0
  31. package/dist/src/api/staff-invite/index.d.ts +1 -2
  32. package/dist/src/composables/useSsoProviders.d.ts +19 -0
  33. package/dist/src/composables/useStaffInviteProviders.d.ts +1 -12
  34. package/dist/src/helpers/staff-invite.d.ts +3 -0
  35. package/dist/src/types/sso-provider.d.ts +10 -0
  36. package/dist/tsconfig.app.tsbuildinfo +1 -1
  37. package/dist/{useAppStore-BABlZnfR.js → useAppStore-BL4Iv-0s.js} +1 -1
  38. package/dist/{useLoading-B47q5dVg.js → useLoading-BEIlprgm.js} +1 -1
  39. package/dist/{useReportPermissions-D-nbQAm5.js → useReportPermissions-BhiSxQCh.js} +3 -3
  40. package/package.json +1 -1
  41. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CD3d4RX6.js +0 -1840
@@ -1,29 +1,29 @@
1
- import { defineComponent as oe, mergeModels as Qt, useModel as es, createElementBlock as M, openBlock as m, Fragment as de, renderList as Vt, normalizeClass as st, toDisplayString as E, unref as s, computed as I, resolveComponent as G, createElementVNode as p, createBlock as q, createCommentVNode as L, createVNode as i, ref as c, watch as ue, onUnmounted as Pt, createSlots as ct, withCtx as te, renderSlot as ts, withModifiers as Rt, nextTick as Mt, h as ss, createTextVNode as as } from "vue";
2
- import { useI18n as ce, useCoreStore as ze } from "@feedmepos/mf-common";
3
- import { useSnackbar as at, useDialog as Ft, useBreakpoints as $t, components as Je, SnackbarPosition as Ze } from "@feedmepos/ui-library";
1
+ import { defineComponent as oe, mergeModels as Qt, useModel as es, createElementBlock as M, openBlock as m, Fragment as de, renderList as Vt, normalizeClass as lt, toDisplayString as E, unref as s, computed as I, resolveComponent as G, createElementVNode as p, createBlock as q, createCommentVNode as T, createVNode as i, ref as c, watch as ue, onUnmounted as Pt, createSlots as vt, withCtx as te, renderSlot as ts, withModifiers as Rt, nextTick as Mt, h as ss, createTextVNode as as } from "vue";
2
+ import { useI18n as ce, useCoreStore as He } from "@feedmepos/mf-common";
3
+ import { useSnackbar as ot, useDialog as Ft, useBreakpoints as $t, components as Qe, SnackbarPosition as et } from "@feedmepos/ui-library";
4
4
  import { u as ls } from "./useDebounce-B8ZPVS5C.js";
5
5
  import { _ as Ct, S as ie } from "./SelectFilter-ATOm0hdn.js";
6
- import { k as pt, g as vt, b as ft, O as os, _ as rs, a as ns } from "./app-BsAwRWj0.js";
6
+ import { g as be, b as ye, k as ft, O as os, _ as rs, a as ns } from "./app-BYPvZve5.js";
7
7
  import { u as is, _ as bt } from "./useDiscardConfirm-DPhEV6v0.js";
8
8
  import { _ as us } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
9
9
  import { s as ms, _ as ds, d as cs, e as ps } from "./PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js";
10
- import { u as Dt } from "./useLoading-B47q5dVg.js";
11
- import { w as vs, h as fs, b as bs, E as ys, t as gs } from "./member-grant-CQHFGo-k.js";
12
- import { a as Xe, i as lt, t as Ve, b as We, S as De, D as Nt, E as Et, h as Oe, u as hs, s as yt, c as Ke, d as xs, e as gt } from "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CD3d4RX6.js";
13
- import { n as ot } from "./string-DZQ1uNjn.js";
14
- import { c as we } from "./iteration-Dat4Ismm.js";
15
- import { l as Ae } from "./lodash-DjYVoggD.js";
16
- import { _ as ht } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BRrhFF3y.js";
17
- import { t as Se, u as At, c as Qe, g as xt, m as et, a as Ot, p as _t, R as _s, b as Ut, d as Us } from "./rule-Bgcb9R7I.js";
18
- import { t as Is, s as ks, a as It, c as ws, r as Ss, b as Vs, d as kt, _ as Ps, p as Rs } from "./RoleForm.vue_vue_type_script_setup_true_lang-DS4eMJ6w.js";
19
- import { u as Lt } from "./restaurant-dbllb9m8.js";
20
- import { u as Tt } from "./role-DN-jiQnS.js";
21
- var Ne = /* @__PURE__ */ ((o) => (o.Update = "Update", o.Remove = "Remove", o))(Ne || {});
22
- const Le = "__unassigned__";
23
- function wt(o) {
24
- if (!(o != null && o.length) || o[0] === Le) return o;
25
- const T = o.filter((f) => f !== Le);
26
- return T.length === o.length ? o : [Le, ...T];
10
+ import { u as Dt } from "./useLoading-BEIlprgm.js";
11
+ import { w as vs, h as fs, b as bs, E as ys, t as gs } from "./member-grant-BaABegLK.js";
12
+ import { a as Ye, i as rt, t as Re, b as Xe, D as Nt, E as Et, h as Te, u as hs, s as yt, c as ze, d as xs, e as gt } from "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DAbgu49T.js";
13
+ import { n as nt } from "./string-DZQ1uNjn.js";
14
+ import { c as Ve } from "./iteration-Cnj0KTDr.js";
15
+ import { l as Le } from "./lodash-DAd2V4v-.js";
16
+ import { _ as ht } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C1k42T7U.js";
17
+ import { t as Pe, u as At, c as tt, g as xt, m as st, a as Ot, p as _t, R as _s, b as Ut, d as Us } from "./rule-BmRzz26L.js";
18
+ import { t as Is, s as ws, a as It, c as ks, r as Ss, b as Vs, d as wt, _ as Ps, p as Rs } from "./RoleForm.vue_vue_type_script_setup_true_lang-CoWKz1qm.js";
19
+ import { u as Lt } from "./restaurant-CNsV-2OE.js";
20
+ import { u as Tt } from "./role-DSu9cpI6.js";
21
+ var Ee = /* @__PURE__ */ ((l) => (l.Update = "Update", l.Remove = "Remove", l))(Ee || {});
22
+ const Be = "__unassigned__";
23
+ function kt(l) {
24
+ if (!(l != null && l.length) || l[0] === Be) return l;
25
+ const A = l.filter((v) => v !== Be);
26
+ return A.length === l.length ? l : [Be, ...A];
27
27
  }
28
28
  const Ms = {
29
29
  role: "tablist",
@@ -38,36 +38,36 @@ const Ms = {
38
38
  modelModifiers: {}
39
39
  }),
40
40
  emits: ["update:modelValue"],
41
- setup(o) {
42
- const T = es(o, "modelValue");
43
- return (f, t) => (m(), M("div", Ms, [
44
- (m(!0), M(de, null, Vt(o.items, (v) => (m(), M("button", {
45
- key: v.value,
41
+ setup(l) {
42
+ const A = es(l, "modelValue");
43
+ return (v, t) => (m(), M("div", Ms, [
44
+ (m(!0), M(de, null, Vt(l.items, (f) => (m(), M("button", {
45
+ key: f.value,
46
46
  type: "button",
47
47
  role: "tab",
48
- "aria-selected": T.value === v.value,
49
- disabled: o.disabled,
50
- class: st([
48
+ "aria-selected": A.value === f.value,
49
+ disabled: l.disabled,
50
+ class: lt([
51
51
  "flex-1 rounded-[8px] px-12 py-8 text-center text-[16px] leading-[24px] tracking-[0.04px] transition-colors disabled:cursor-not-allowed",
52
- T.value === v.value ? "border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white font-semibold text-fm-color-typo-primary shadow-[0px_1px_2px_0px_rgba(28,28,30,0.04)]" : "border border-transparent font-medium text-fm-color-typo-tertiary hover:bg-fm-color-opacity-sm"
52
+ A.value === f.value ? "border border-fm-color-neutral-gray-100 bg-fm-color-neutral-white font-semibold text-fm-color-typo-primary shadow-[0px_1px_2px_0px_rgba(28,28,30,0.04)]" : "border border-transparent font-medium text-fm-color-typo-tertiary hover:bg-fm-color-opacity-sm"
53
53
  ]),
54
- onClick: (u) => T.value = v.value
55
- }, E(v.label), 11, Fs))), 128))
54
+ onClick: (u) => A.value = f.value
55
+ }, E(f.label), 11, Fs))), 128))
56
56
  ]));
57
57
  }
58
- }), rt = /* @__PURE__ */ oe({
58
+ }), it = /* @__PURE__ */ oe({
59
59
  __name: "MemberStatusBadge",
60
60
  props: {
61
61
  status: {}
62
62
  },
63
- setup(o) {
64
- const { t: T } = ce();
65
- return (f, t) => (m(), M("span", {
66
- class: st([
63
+ setup(l) {
64
+ const { t: A } = ce();
65
+ return (v, t) => (m(), M("span", {
66
+ class: lt([
67
67
  "inline-flex items-center rounded-[4px] px-4 py-[2px] text-[10px] font-medium leading-[14px] tracking-[0.2px] whitespace-nowrap",
68
- o.status === "active" ? "bg-fm-color-system-success-100 text-fm-color-typo-success" : "bg-fm-color-system-warning-100 text-fm-color-typo-warning"
68
+ l.status === "active" ? "bg-fm-color-system-success-100 text-fm-color-typo-success" : "bg-fm-color-system-warning-100 text-fm-color-typo-warning"
69
69
  ])
70
- }, E(s(T)(`team.status.${o.status}`)), 3));
70
+ }, E(s(A)(`team.status.${l.status}`)), 3));
71
71
  }
72
72
  }), Cs = {
73
73
  class: "flex items-center gap-12 rounded-[16px] border border-[#995900] bg-fm-color-system-warning-100 p-16",
@@ -80,34 +80,59 @@ const Ms = {
80
80
  match: {}
81
81
  },
82
82
  emits: ["update"],
83
- setup(o, { emit: T }) {
84
- const f = o, t = T, { t: v } = ce(), u = I(() => f.existing.kind === "member" ? "active" : "invited"), $ = I(
85
- () => f.existing.restaurantCount === 1 ? v("team.existingMember.restaurantCount.one") : v("team.existingMember.restaurantCount.other", { count: f.existing.restaurantCount })
86
- ), K = I(() => f.existing.kind !== "member" || !f.existing.isOwner);
87
- return (R, A) => {
88
- const w = G("FmButton");
83
+ setup(l, { emit: A }) {
84
+ const v = l, t = A, { t: f } = ce(), u = I(() => v.existing.kind === "member" ? "active" : "invited"), $ = I(
85
+ () => v.existing.restaurantCount === 1 ? f("team.existingMember.restaurantCount.one") : f("team.existingMember.restaurantCount.other", { count: v.existing.restaurantCount })
86
+ ), K = I(() => v.existing.kind !== "member" || !v.existing.isOwner);
87
+ return (R, O) => {
88
+ const k = G("FmButton");
89
89
  return m(), M("div", Cs, [
90
- p("div", Ds, E(s(ot)(o.existing.name)), 1),
90
+ p("div", Ds, E(s(nt)(l.existing.name)), 1),
91
91
  p("div", Ns, [
92
92
  p("div", Es, [
93
- p("p", As, E(o.existing.name), 1),
94
- i(rt, { status: u.value }, null, 8, ["status"])
93
+ p("p", As, E(l.existing.name), 1),
94
+ i(it, { status: u.value }, null, 8, ["status"])
95
95
  ]),
96
- p("p", Os, E(s(v)(`team.existingMember.alreadyUses.${o.match}`, { restaurants: $.value })), 1),
97
- p("p", Ls, E(K.value ? s(v)("team.existingMember.updateInstead") : s(v)("team.existingMember.isOwner")), 1)
96
+ p("p", Os, E(s(f)(`team.existingMember.alreadyUses.${l.match}`, { restaurants: $.value })), 1),
97
+ p("p", Ls, E(K.value ? s(f)("team.existingMember.updateInstead") : s(f)("team.existingMember.isOwner")), 1)
98
98
  ]),
99
- K.value ? (m(), q(w, {
99
+ K.value ? (m(), q(k, {
100
100
  key: 0,
101
- label: s(v)("team.existingMember.updateAccess"),
101
+ label: s(f)("team.existingMember.updateAccess"),
102
102
  size: "md",
103
103
  variant: "primary",
104
104
  class: "shrink-0",
105
- onClick: A[0] || (A[0] = (P) => t("update"))
106
- }, null, 8, ["label"])) : L("", !0)
105
+ onClick: O[0] || (O[0] = (P) => t("update"))
106
+ }, null, 8, ["label"])) : T("", !0)
107
107
  ]);
108
108
  };
109
109
  }
110
- }), Bs = {
110
+ }), Ae = {
111
+ async readInvites(l = "pending") {
112
+ return be(
113
+ await ye("staff-invites").get("", { params: { status: l } })
114
+ );
115
+ },
116
+ async lookup(l, A) {
117
+ return be(
118
+ await ye("staff-invites").get("/lookup", {
119
+ params: { ...l, provider: A }
120
+ })
121
+ ) || null;
122
+ },
123
+ async createInvite(l) {
124
+ return be(await ye("staff-invites").post("", l));
125
+ },
126
+ async updateInvite(l, A) {
127
+ return be(await ye("staff-invites").put(`/${l}`, A));
128
+ },
129
+ async revokeInvite(l) {
130
+ return be(await ye("staff-invites").delete(`/${l}`));
131
+ },
132
+ async resendInvite(l) {
133
+ return be(await ye("staff-invites").post(`/${l}/resend`));
134
+ }
135
+ }, Bs = {
111
136
  class: "flex flex-col gap-16 rounded-[16px] border border-fm-color-neutral-gray-300 bg-fm-color-neutral-white p-16",
112
137
  "data-testid": "member-details-card"
113
138
  }, js = { class: "flex flex-col gap-8" }, qs = { class: "fm-typo-en-title-sm-600" }, Gs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ks = { class: "flex flex-col gap-[6px]" }, Ws = { class: "fm-typo-en-body-sm-600" }, zs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Xs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Hs = { class: "grid grid-cols-2 gap-[14px] xs:grid-cols-1" }, Ys = { class: "grid grid-cols-2 gap-[14px] xs:grid-cols-1" }, Js = 400, Zs = /* @__PURE__ */ oe({
@@ -119,13 +144,13 @@ const Ms = {
119
144
  }
120
145
  },
121
146
  emits: ["update-existing"],
122
- setup(o, { expose: T, emit: f }) {
147
+ setup(l, { expose: A, emit: v }) {
123
148
  var ne, Q;
124
- const t = o, v = f, { t: u } = ce(), $ = ze(), { supportedCountries: K, ready: R } = Xe(), A = I(() => {
125
- var l;
126
- const D = (l = $.currentCountry.value) == null ? void 0 : l.toUpperCase();
127
- return D && lt(D) ? D : void 0;
128
- }), w = c(((ne = t.providers[0]) == null ? void 0 : ne.slug) ?? ""), P = I(() => t.providers.find((D) => D.slug === w.value)), _ = I(() => {
149
+ const t = l, f = v, { t: u } = ce(), $ = He(), { supportedCountries: K, ready: R } = Ye(), O = I(() => {
150
+ var o;
151
+ const D = (o = $.currentCountry.value) == null ? void 0 : o.toUpperCase();
152
+ return D && rt(D) ? D : void 0;
153
+ }), k = c(((ne = t.providers[0]) == null ? void 0 : ne.slug) ?? ""), P = I(() => t.providers.find((D) => D.slug === k.value)), _ = I(() => {
129
154
  var D;
130
155
  return ((D = P.value) == null ? void 0 : D.label) ?? "";
131
156
  }), X = I(
@@ -135,21 +160,21 @@ const Ms = {
135
160
  { label: u("team.memberDetails.emailAddress"), value: "email" }
136
161
  ]), b = I(() => {
137
162
  if (C.value === "mobile") {
138
- const D = Ve(V.value);
163
+ const D = Re(V.value);
139
164
  return D ? { mobile: D } : null;
140
165
  }
141
- return We(B.value) ? { email: B.value.trim().toLowerCase() } : null;
166
+ return Xe(B.value) ? { email: B.value.trim().toLowerCase() } : null;
142
167
  }), r = c(null);
143
168
  let U, j = 0;
144
169
  ue(
145
- [b, w],
170
+ [b, k],
146
171
  ([D]) => {
147
172
  clearTimeout(U);
148
- const l = ++j;
173
+ const o = ++j;
149
174
  r.value = null, D && (U = setTimeout(async () => {
150
175
  try {
151
- const S = await De.lookup(D, w.value || void 0);
152
- l === j && (r.value = S);
176
+ const S = await Ae.lookup(D, k.value || void 0);
177
+ o === j && (r.value = S);
153
178
  } catch {
154
179
  }
155
180
  }, Js));
@@ -157,43 +182,43 @@ const Ms = {
157
182
  { deep: !0 }
158
183
  ), Pt(() => clearTimeout(U));
159
184
  function W() {
160
- const D = Oe(V.value) ? Ve(V.value) ?? "" : "", l = B.value.trim().toLowerCase();
185
+ const D = Te(V.value) ? Re(V.value) ?? "" : "", o = B.value.trim().toLowerCase();
161
186
  return {
162
- provider: w.value,
187
+ provider: k.value,
163
188
  match: C.value,
164
- ...C.value === "mobile" ? { mobile: Ve(V.value) ?? "", ...l ? { email: l } : {} } : { email: l, ...D ? { mobile: D } : {} },
189
+ ...C.value === "mobile" ? { mobile: Re(V.value) ?? "", ...o ? { email: o } : {} } : { email: o, ...D ? { mobile: D } : {} },
165
190
  displayName: y.value.trim(),
166
191
  ...d.value.trim() ? { employeeId: d.value.trim() } : {}
167
192
  };
168
193
  }
169
194
  function re() {
170
- return Oe(V.value) || !!B.value.trim() || !!y.value.trim() || !!d.value.trim();
195
+ return Te(V.value) || !!B.value.trim() || !!y.value.trim() || !!d.value.trim();
171
196
  }
172
- return T({
197
+ return A({
173
198
  readDetails: W,
174
199
  isModified: re,
175
200
  /** Add is blocked while the key belongs to someone already. */
176
201
  hasExisting: I(() => !!r.value),
177
202
  providerLabel: _
178
- }), (D, l) => {
203
+ }), (D, o) => {
179
204
  const S = G("FmSelect"), z = G("FmPhoneNumber"), se = G("FmCircularProgress"), H = G("FmTextField");
180
205
  return m(), M("div", Bs, [
181
206
  p("div", js, [
182
207
  p("p", qs, E(s(u)("team.memberDetails.title")), 1),
183
208
  p("p", Gs, E(s(u)("team.memberDetails.ssoNotice", { label: _.value })), 1)
184
209
  ]),
185
- o.providers.length > 1 ? (m(), q(S, {
210
+ l.providers.length > 1 ? (m(), q(S, {
186
211
  key: 0,
187
- modelValue: w.value,
188
- "onUpdate:modelValue": l[0] || (l[0] = (x) => w.value = x),
212
+ modelValue: k.value,
213
+ "onUpdate:modelValue": o[0] || (o[0] = (x) => k.value = x),
189
214
  label: s(u)("team.memberDetails.provider"),
190
215
  items: X.value
191
- }, null, 8, ["modelValue", "label", "items"])) : L("", !0),
216
+ }, null, 8, ["modelValue", "label", "items"])) : T("", !0),
192
217
  p("div", Ks, [
193
218
  p("p", Ws, E(s(u)("team.memberDetails.signInUsing")), 1),
194
219
  i($s, {
195
220
  modelValue: C.value,
196
- "onUpdate:modelValue": l[1] || (l[1] = (x) => C.value = x),
221
+ "onUpdate:modelValue": o[1] || (o[1] = (x) => C.value = x),
197
222
  items: h.value
198
223
  }, null, 8, ["modelValue", "items"])
199
224
  ]),
@@ -201,12 +226,12 @@ const Ms = {
201
226
  s(R) ? (m(), q(z, {
202
227
  key: 0,
203
228
  modelValue: V.value,
204
- "onUpdate:modelValue": l[2] || (l[2] = (x) => V.value = x),
229
+ "onUpdate:modelValue": o[2] || (o[2] = (x) => V.value = x),
205
230
  label: s(u)("team.memberDetails.phoneNumber"),
206
- "default-country": A.value,
231
+ "default-country": O.value,
207
232
  "extra-country-codes": s(K),
208
- rules: [(x) => !!s(Ve)(x) || s(u)("team.memberDetails.errors.mobileInvalid")]
209
- }, ct({ _: 2 }, [
233
+ rules: [(x) => !!s(Re)(x) || s(u)("team.memberDetails.errors.mobileInvalid")]
234
+ }, vt({ _: 2 }, [
210
235
  b.value ? {
211
236
  name: "helper-text",
212
237
  fn: te(() => [
@@ -218,11 +243,11 @@ const Ms = {
218
243
  ], 64)) : (m(), q(H, {
219
244
  key: 2,
220
245
  modelValue: B.value,
221
- "onUpdate:modelValue": l[3] || (l[3] = (x) => B.value = x),
246
+ "onUpdate:modelValue": o[3] || (o[3] = (x) => B.value = x),
222
247
  label: s(u)("team.memberDetails.emailAddress"),
223
248
  placeholder: s(u)("team.memberDetails.emailPlaceholder"),
224
- rules: [(x) => s(We)(x) || s(u)("team.memberDetails.errors.emailInvalid")]
225
- }, ct({ _: 2 }, [
249
+ rules: [(x) => s(Xe)(x) || s(u)("team.memberDetails.errors.emailInvalid")]
250
+ }, vt({ _: 2 }, [
226
251
  b.value ? {
227
252
  name: "helper-text",
228
253
  fn: te(() => [
@@ -235,12 +260,12 @@ const Ms = {
235
260
  key: 3,
236
261
  existing: r.value,
237
262
  match: C.value,
238
- onUpdate: l[4] || (l[4] = (x) => v("update-existing", r.value))
239
- }, null, 8, ["existing", "match"])) : L("", !0),
263
+ onUpdate: o[4] || (o[4] = (x) => f("update-existing", r.value))
264
+ }, null, 8, ["existing", "match"])) : T("", !0),
240
265
  p("div", Hs, [
241
266
  i(H, {
242
267
  modelValue: y.value,
243
- "onUpdate:modelValue": l[5] || (l[5] = (x) => y.value = x),
268
+ "onUpdate:modelValue": o[5] || (o[5] = (x) => y.value = x),
244
269
  label: s(u)("team.memberDetails.name"),
245
270
  placeholder: s(u)("team.memberDetails.namePlaceholder"),
246
271
  rules: [
@@ -250,7 +275,7 @@ const Ms = {
250
275
  }, null, 8, ["modelValue", "label", "placeholder", "rules"]),
251
276
  i(H, {
252
277
  modelValue: d.value,
253
- "onUpdate:modelValue": l[6] || (l[6] = (x) => d.value = x),
278
+ "onUpdate:modelValue": o[6] || (o[6] = (x) => d.value = x),
254
279
  label: s(u)("team.memberDetails.employeeId"),
255
280
  "label-mark": "optional",
256
281
  placeholder: s(u)("team.memberDetails.employeeIdPlaceholder"),
@@ -263,26 +288,26 @@ const Ms = {
263
288
  C.value === "mobile" ? (m(), q(H, {
264
289
  key: 0,
265
290
  modelValue: B.value,
266
- "onUpdate:modelValue": l[7] || (l[7] = (x) => B.value = x),
291
+ "onUpdate:modelValue": o[7] || (o[7] = (x) => B.value = x),
267
292
  label: s(u)("team.memberDetails.emailAddress"),
268
293
  "label-mark": "optional",
269
294
  placeholder: s(u)("team.memberDetails.emailPlaceholder"),
270
295
  rules: [
271
- (x) => !x.trim() || s(We)(x) || s(u)("team.memberDetails.errors.emailInvalid")
296
+ (x) => !x.trim() || s(Xe)(x) || s(u)("team.memberDetails.errors.emailInvalid")
272
297
  ]
273
298
  }, null, 8, ["modelValue", "label", "placeholder", "rules"])) : (m(), M(de, { key: 1 }, [
274
299
  s(R) ? (m(), q(z, {
275
300
  key: 0,
276
301
  modelValue: V.value,
277
- "onUpdate:modelValue": l[8] || (l[8] = (x) => V.value = x),
302
+ "onUpdate:modelValue": o[8] || (o[8] = (x) => V.value = x),
278
303
  label: s(u)("team.memberDetails.phoneNumber"),
279
304
  "label-mark": "optional",
280
- "default-country": A.value,
305
+ "default-country": O.value,
281
306
  "extra-country-codes": s(K),
282
307
  rules: [
283
- (x) => !s(Oe)(x) || !!s(Ve)(x) || s(u)("team.memberDetails.errors.mobileInvalid")
308
+ (x) => !s(Te)(x) || !!s(Re)(x) || s(u)("team.memberDetails.errors.mobileInvalid")
284
309
  ]
285
- }, null, 8, ["modelValue", "label", "default-country", "extra-country-codes", "rules"])) : L("", !0)
310
+ }, null, 8, ["modelValue", "label", "default-country", "extra-country-codes", "rules"])) : T("", !0)
286
311
  ], 64))
287
312
  ])
288
313
  ]);
@@ -305,18 +330,18 @@ const Ms = {
305
330
  email: {},
306
331
  phoneNumber: {}
307
332
  },
308
- setup(o) {
309
- const T = o, f = I(() => ot(T.name));
310
- return (t, v) => (m(), M("div", Qs, [
333
+ setup(l) {
334
+ const A = l, v = I(() => nt(A.name));
335
+ return (t, f) => (m(), M("div", Qs, [
311
336
  p("div", ea, [
312
- p("div", ta, E(f.value), 1),
337
+ p("div", ta, E(v.value), 1),
313
338
  p("div", sa, [
314
339
  p("div", aa, [
315
- p("p", la, E(o.name), 1),
316
- i(rt, { status: o.status }, null, 8, ["status"])
340
+ p("p", la, E(l.name), 1),
341
+ i(it, { status: l.status }, null, 8, ["status"])
317
342
  ]),
318
- o.email ? (m(), M("p", oa, E(o.email), 1)) : L("", !0),
319
- o.phoneNumber ? (m(), M("p", ra, E(o.phoneNumber), 1)) : L("", !0)
343
+ l.email ? (m(), M("p", oa, E(l.email), 1)) : T("", !0),
344
+ l.phoneNumber ? (m(), M("p", ra, E(l.phoneNumber), 1)) : T("", !0)
320
345
  ])
321
346
  ]),
322
347
  ts(t.$slots, "default")
@@ -343,16 +368,16 @@ const Ms = {
343
368
  }
344
369
  },
345
370
  emits: ["update:modelValue"],
346
- setup(o, { emit: T }) {
347
- const f = o, t = T, { t: v } = ce(), u = c($(f.modelValue));
371
+ setup(l, { emit: A }) {
372
+ const v = l, t = A, { t: f } = ce(), u = c($(v.modelValue));
348
373
  function $(d) {
349
374
  const h = Is(d);
350
375
  return h.length > 0 ? h : [{ restaurantIds: [], roleId: "" }];
351
376
  }
352
377
  ue(
353
- () => f.modelValue,
378
+ () => v.modelValue,
354
379
  (d) => {
355
- ks(d, It(u.value)) || (u.value = $(d));
380
+ ws(d, It(u.value)) || (u.value = $(d));
356
381
  },
357
382
  { deep: !0 }
358
383
  );
@@ -363,21 +388,21 @@ const Ms = {
363
388
  const b = u.value.map((r, U) => {
364
389
  if (U !== d) return r;
365
390
  const j = { ...r, restaurantIds: h };
366
- return { ...j, roleId: Rs(f.roles, j, f.isRoleUsable) };
391
+ return { ...j, roleId: Rs(v.roles, j, v.isRoleUsable) };
367
392
  });
368
393
  K(b);
369
394
  }
370
- function A(d, h) {
395
+ function O(d, h) {
371
396
  K(u.value.map((b, r) => r === d ? { ...b, roleId: h } : b));
372
397
  }
373
- function w() {
398
+ function k() {
374
399
  K([...u.value, { restaurantIds: [], roleId: "" }]);
375
400
  }
376
401
  function P(d, h) {
377
402
  var b;
378
403
  h || u.value.length < 2 || (b = u.value[d]) != null && b.restaurantIds.length || K(u.value.filter((r, U) => U !== d));
379
404
  }
380
- const _ = I(() => ws(f.restaurants, u.value)), X = c(), C = c(!1), V = c(null);
405
+ const _ = I(() => ks(v.restaurants, u.value)), X = c(), C = c(!1), V = c(null);
381
406
  async function B(d) {
382
407
  var h;
383
408
  V.value = d, C.value = !0, await Mt(), (h = X.value) == null || h.trigger();
@@ -387,17 +412,17 @@ const Ms = {
387
412
  V.value = null;
388
413
  const b = h === null ? void 0 : u.value[h];
389
414
  if (h === null || !b) return;
390
- kt(f.roles, b, f.isRoleUsable).some(
415
+ wt(v.roles, b, v.isRoleUsable).some(
391
416
  (U) => U.value === d && !U.disabled
392
- ) && A(h, d);
417
+ ) && O(h, d);
393
418
  }
394
419
  return (d, h) => {
395
420
  var r;
396
421
  const b = G("FmSelect");
397
422
  return m(), M("div", ia, [
398
423
  p("div", ua, [
399
- p("p", ma, E(s(v)("team.posAccess.restaurants")), 1),
400
- p("p", da, E(s(v)("team.posAccess.posRole")), 1)
424
+ p("p", ma, E(s(f)("team.posAccess.restaurants")), 1),
425
+ p("p", da, E(s(f)("team.posAccess.posRole")), 1)
401
426
  ]),
402
427
  (m(!0), M(de, null, Vt(u.value, (U, j) => (m(), M("div", {
403
428
  key: j,
@@ -405,24 +430,24 @@ const Ms = {
405
430
  "data-testid": "pos-assignment-row"
406
431
  }, [
407
432
  i(b, {
408
- class: st(["min-w-0 pos-restaurant-select", { "pos-restaurant-select--filled": U.restaurantIds.length > 0 }]),
433
+ class: lt(["min-w-0 pos-restaurant-select", { "pos-restaurant-select--filled": U.restaurantIds.length > 0 }]),
409
434
  "model-value": U.restaurantIds,
410
- items: s(Vs)(o.restaurants, u.value, j),
435
+ items: s(Vs)(l.restaurants, u.value, j),
411
436
  multiselect: "",
412
437
  searchable: "",
413
438
  "hide-chips": "",
414
439
  "search-debounce": 300,
415
- placeholder: s(Ss)(o.restaurants, U) || s(v)("team.posAccess.selectRestaurants"),
440
+ placeholder: s(Ss)(l.restaurants, U) || s(f)("team.posAccess.selectRestaurants"),
416
441
  "onUpdate:modelValue": (W) => R(j, W),
417
442
  onDropdownChanged: (W) => P(j, W)
418
443
  }, null, 8, ["class", "model-value", "items", "placeholder", "onUpdate:modelValue", "onDropdownChanged"]),
419
444
  i(b, {
420
445
  class: "min-w-0",
421
446
  "model-value": U.roleId,
422
- items: s(kt)(o.roles, U, o.isRoleUsable),
423
- placeholder: s(v)("team.posAccess.selectRole"),
447
+ items: s(wt)(l.roles, U, l.isRoleUsable),
448
+ placeholder: s(f)("team.posAccess.selectRole"),
424
449
  disabled: U.restaurantIds.length === 0,
425
- "onUpdate:modelValue": (W) => A(j, W)
450
+ "onUpdate:modelValue": (W) => O(j, W)
426
451
  }, {
427
452
  "append-menu": te(() => [
428
453
  p("button", {
@@ -430,7 +455,7 @@ const Ms = {
430
455
  class: "w-full px-12 py-8 text-left text-[12px] font-semibold text-fm-color-primary",
431
456
  "data-testid": "create-pos-role",
432
457
  onClick: (W) => B(j)
433
- }, " + " + E(s(v)("team.posAccess.createRole")), 9, ca)
458
+ }, " + " + E(s(f)("team.posAccess.createRole")), 9, ca)
434
459
  ]),
435
460
  _: 2
436
461
  }, 1032, ["model-value", "items", "placeholder", "disabled", "onUpdate:modelValue"])
@@ -440,8 +465,8 @@ const Ms = {
440
465
  class: "self-start fm-typo-en-body-md-600 text-fm-color-primary disabled:cursor-not-allowed disabled:text-fm-color-typo-disabled",
441
466
  disabled: !_.value,
442
467
  "data-testid": "add-pos-row",
443
- onClick: Rt(w, ["stop"])
444
- }, " + " + E(s(v)("team.posAccess.addRestaurant")), 9, pa),
468
+ onClick: Rt(k, ["stop"])
469
+ }, " + " + E(s(f)("team.posAccess.addRestaurant")), 9, pa),
445
470
  C.value ? (m(), q(Ps, {
446
471
  key: 0,
447
472
  ref_key: "roleFormRef",
@@ -449,7 +474,7 @@ const Ms = {
449
474
  "show-back": "",
450
475
  "restaurant-ids": V.value === null ? [] : ((r = u.value[V.value]) == null ? void 0 : r.restaurantIds) ?? [],
451
476
  onCreated: y
452
- }, null, 8, ["restaurant-ids"])) : L("", !0)
477
+ }, null, 8, ["restaurant-ids"])) : T("", !0)
453
478
  ]);
454
479
  };
455
480
  }
@@ -459,7 +484,7 @@ const Ms = {
459
484
  }, ya = { class: "flex items-center gap-8" }, ga = { class: "flex flex-1 flex-col gap-8" }, ha = { class: "fm-typo-en-title-sm-600" }, xa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _a = {
460
485
  key: 0,
461
486
  class: "flex flex-col gap-24"
462
- }, Ua = { class: "flex flex-col gap-12" }, Ia = { class: "fm-typo-en-body-lg-600" }, ka = { class: "flex flex-col items-start gap-16" }, tt = 4, wa = /* @__PURE__ */ oe({
487
+ }, Ua = { class: "flex flex-col gap-12" }, Ia = { class: "fm-typo-en-body-lg-600" }, wa = { class: "flex flex-col items-start gap-16" }, at = 4, ka = /* @__PURE__ */ oe({
463
488
  __name: "TeamMemberMasterUser",
464
489
  props: {
465
490
  modelValue: {
@@ -492,35 +517,35 @@ const Ms = {
492
517
  }
493
518
  },
494
519
  emits: ["update:model-value"],
495
- setup(o, { emit: T }) {
496
- const f = o, t = T, { t: v } = ce(), u = at(), $ = Dt(u), K = c(!1), R = c([]), A = I(() => {
520
+ setup(l, { emit: A }) {
521
+ const v = l, t = A, { t: f } = ce(), u = ot(), $ = Dt(u), K = c(!1), R = c([]), O = I(() => {
497
522
  var y;
498
- return ms(((y = f.modelValue) == null ? void 0 : y.roles) ?? []);
523
+ return ms(((y = v.modelValue) == null ? void 0 : y.roles) ?? []);
499
524
  });
500
- function w(y) {
501
- return f.usableRoleIds === null || f.usableRoleIds.includes(y._id);
525
+ function k(y) {
526
+ return v.usableRoleIds === null || v.usableRoleIds.includes(y._id);
502
527
  }
503
528
  function P(y) {
504
- y ? f.modelValue || t("update:model-value", {
529
+ y ? v.modelValue || t("update:model-value", {
505
530
  code: "",
506
- name: f.fallbackName,
531
+ name: v.fallbackName,
507
532
  roles: [],
508
- passcode: f.fallbackPasscode || ""
533
+ passcode: v.fallbackPasscode || ""
509
534
  }) : t("update:model-value", null);
510
535
  }
511
536
  function _(y, d) {
512
- if (!f.modelValue || y === "passcode" && f.modelValue.passcode === d) return;
513
- const h = we(f.modelValue);
537
+ if (!v.modelValue || y === "passcode" && v.modelValue.passcode === d) return;
538
+ const h = Ve(v.modelValue);
514
539
  h[y] = d, t("update:model-value", h);
515
540
  }
516
- const X = c(!1), C = I(() => A.value.length > 0);
541
+ const X = c(!1), C = I(() => O.value.length > 0);
517
542
  async function V() {
518
543
  if (C.value)
519
544
  try {
520
545
  const y = await $.custom(
521
- () => Se.generateMasterUserPasscode({
522
- restaurantIds: A.value,
523
- excludePosUserId: f.posUserId
546
+ () => Pe.generateMasterUserPasscode({
547
+ restaurantIds: O.value,
548
+ excludePosUserId: v.posUserId
524
549
  }),
525
550
  { isLoading: X }
526
551
  );
@@ -531,18 +556,18 @@ const Ms = {
531
556
  ue(
532
557
  () => {
533
558
  var y;
534
- return (y = f.modelValue) == null ? void 0 : y.passcode;
559
+ return (y = v.modelValue) == null ? void 0 : y.passcode;
535
560
  },
536
561
  (y) => {
537
562
  const d = R.value.join("");
538
- y !== d && (y && y.length === tt ? (R.value = y.split(""), K.value = !0) : (R.value = [], K.value = !1));
563
+ y !== d && (y && y.length === at ? (R.value = y.split(""), K.value = !0) : (R.value = [], K.value = !1));
539
564
  },
540
565
  { immediate: !0 }
541
566
  );
542
567
  const B = I({
543
568
  get: () => {
544
569
  var y;
545
- return ((y = f.modelValue) == null ? void 0 : y.roles) ?? [];
570
+ return ((y = v.modelValue) == null ? void 0 : y.roles) ?? [];
546
571
  },
547
572
  set: () => {
548
573
  }
@@ -552,43 +577,43 @@ const Ms = {
552
577
  return m(), M("div", ba, [
553
578
  p("div", ya, [
554
579
  p("div", ga, [
555
- p("p", ha, E(s(v)("team.posAccess.title")), 1),
556
- p("p", xa, E(s(v)("team.posAccess.subtitle")), 1)
580
+ p("p", ha, E(s(f)("team.posAccess.title")), 1),
581
+ p("p", xa, E(s(f)("team.posAccess.subtitle")), 1)
557
582
  ]),
558
583
  i(h, {
559
- "model-value": !!o.modelValue,
584
+ "model-value": !!l.modelValue,
560
585
  value: "master-user",
561
586
  "onUpdate:modelValue": P
562
587
  }, null, 8, ["model-value"])
563
588
  ]),
564
- o.modelValue ? (m(), M("div", _a, [
589
+ l.modelValue ? (m(), M("div", _a, [
565
590
  i(b, {
566
591
  modelValue: B.value,
567
592
  "onUpdate:modelValue": d[1] || (d[1] = (r) => B.value = r),
568
593
  tag: "div",
569
594
  rules: [
570
- (r) => !r || r.length === 0 ? s(v)("team.memberForm.masterUser.restaurantRequired") : r.some((U) => !U.roleId) ? s(v)("team.memberForm.masterUser.roleRequired") : !0
595
+ (r) => !r || r.length === 0 ? s(f)("team.memberForm.masterUser.restaurantRequired") : r.some((U) => !U.roleId) ? s(f)("team.memberForm.masterUser.roleRequired") : !0
571
596
  ]
572
597
  }, {
573
598
  default: te(() => [
574
599
  i(fa, {
575
- "model-value": o.modelValue.roles,
576
- restaurants: o.restaurants,
577
- roles: o.roles,
578
- "is-role-usable": w,
600
+ "model-value": l.modelValue.roles,
601
+ restaurants: l.restaurants,
602
+ roles: l.roles,
603
+ "is-role-usable": k,
579
604
  "onUpdate:modelValue": d[0] || (d[0] = (r) => _("roles", r))
580
605
  }, null, 8, ["model-value", "restaurants", "roles"])
581
606
  ]),
582
607
  _: 1
583
608
  }, 8, ["modelValue", "rules"]),
584
609
  p("div", Ua, [
585
- p("p", Ia, E(s(v)("team.posAccess.passcode")), 1),
586
- p("div", ka, [
610
+ p("p", Ia, E(s(f)("team.posAccess.passcode")), 1),
611
+ p("div", wa, [
587
612
  i(b, {
588
613
  modelValue: R.value,
589
614
  "onUpdate:modelValue": d[5] || (d[5] = (r) => R.value = r),
590
615
  rules: [
591
- (r) => (r == null ? void 0 : r.filter((U) => !!U).length) !== tt ? s(v)("team.memberForm.masterUser.passcodeRequired") : !0
616
+ (r) => (r == null ? void 0 : r.filter((U) => !!U).length) !== at ? s(f)("team.memberForm.masterUser.passcodeRequired") : !0
592
617
  ]
593
618
  }, {
594
619
  default: te(() => [
@@ -597,23 +622,23 @@ const Ms = {
597
622
  "onUpdate:modelValue": d[2] || (d[2] = (r) => R.value = r),
598
623
  masked: K.value,
599
624
  "onUpdate:masked": d[3] || (d[3] = (r) => K.value = r),
600
- length: tt,
601
- "toggle-label": s(v)("team.memberForm.masterUser.passcodeToggleVisibility"),
625
+ length: at,
626
+ "toggle-label": s(f)("team.memberForm.masterUser.passcodeToggleVisibility"),
602
627
  onComplete: d[4] || (d[4] = (r) => _("passcode", r))
603
628
  }, null, 8, ["modelValue", "masked", "toggle-label"])
604
629
  ]),
605
630
  _: 1
606
631
  }, 8, ["modelValue", "rules"]),
607
632
  i(cs, {
608
- label: s(v)("team.memberForm.masterUser.passcodeGenerate"),
609
- hint: s(v)("team.memberForm.masterUser.passcodeSelectOutletFirst"),
633
+ label: s(f)("team.memberForm.masterUser.passcodeGenerate"),
634
+ hint: s(f)("team.memberForm.masterUser.passcodeSelectOutletFirst"),
610
635
  loading: X.value,
611
636
  disabled: !C.value,
612
637
  onClick: V
613
638
  }, null, 8, ["label", "hint", "loading", "disabled"])
614
639
  ])
615
640
  ])
616
- ])) : L("", !0)
641
+ ])) : T("", !0)
617
642
  ]);
618
643
  };
619
644
  }
@@ -644,19 +669,19 @@ const Ms = {
644
669
  default: !1
645
670
  }
646
671
  },
647
- setup(o, { expose: T }) {
648
- var Be, be, ee;
649
- const f = o, { t } = ce(), v = Ft(), { breakpoints: u } = $t(), $ = At(), K = I(
672
+ setup(l, { expose: A }) {
673
+ var qe, ge, ee;
674
+ const v = l, { t } = ce(), f = Ft(), { breakpoints: u } = $t(), $ = At(), K = I(
650
675
  () => $.permissionSets.value.map((n) => ({
651
676
  label: n.name,
652
677
  value: n.id
653
678
  }))
654
- ), R = c(((Be = f.initialValue) == null ? void 0 : Be.permissionSetIds) || []), A = I(
655
- () => Qe(R.value, $.permissionSets.value)
656
- ), w = c((be = f.initialValue) == null ? void 0 : be.posUser), P = c(
679
+ ), R = c(((qe = v.initialValue) == null ? void 0 : qe.permissionSetIds) || []), O = I(
680
+ () => tt(R.value, $.permissionSets.value)
681
+ ), k = c((ge = v.initialValue) == null ? void 0 : ge.posUser), P = c(
657
682
  xt(
658
- et(A.value),
659
- ((ee = f.initialValue) == null ? void 0 : ee.permissions) || []
683
+ st(O.value),
684
+ ((ee = v.initialValue) == null ? void 0 : ee.permissions) || []
660
685
  )
661
686
  ), { customReportPermissions: _, isLoaded: X } = Ot(), C = new Set(
662
687
  _t.filter((n) => n.subject.startsWith(_s)).map((n) => n.subject)
@@ -667,13 +692,13 @@ const Ms = {
667
692
  }), B = I(() => {
668
693
  const n = /* @__PURE__ */ new Set();
669
694
  for (const F of _t)
670
- F.category === pt.reports && n.add(F.subject);
695
+ F.category === ft.reports && n.add(F.subject);
671
696
  for (const F of _.value)
672
- F.category === pt.reports && n.add(F.subject);
697
+ F.category === ft.reports && n.add(F.subject);
673
698
  return n;
674
699
  }), y = I(() => {
675
700
  var n;
676
- return !!((n = f.initialValue) != null && n.isOwner);
701
+ return !!((n = v.initialValue) != null && n.isOwner);
677
702
  }), d = I(
678
703
  () => Ut(P.value, { isOwner: y.value })
679
704
  ), h = Lt(), b = Tt().roles, r = I(() => {
@@ -686,45 +711,45 @@ const Ms = {
686
711
  const W = c({ permissionSetIds: [], userPermissions: [], posUser: void 0 });
687
712
  function re(n) {
688
713
  R.value = [...(n == null ? void 0 : n.permissionSetIds) ?? []], P.value = xt(
689
- et(
690
- Qe(
714
+ st(
715
+ tt(
691
716
  R.value,
692
717
  $.permissionSets.value
693
718
  )
694
719
  ),
695
720
  (n == null ? void 0 : n.permissions) || []
696
- ), w.value = n != null && n.posUser ? H(we(n.posUser), P.value) : void 0, x.value = !!w.value, U.value = fs(P.value, R.value), W.value = {
721
+ ), k.value = n != null && n.posUser ? H(Ve(n.posUser), P.value) : void 0, x.value = !!k.value, U.value = fs(P.value, R.value), W.value = {
697
722
  permissionSetIds: [...R.value],
698
- userPermissions: we(P.value),
699
- posUser: w.value ? we(w.value) : void 0
723
+ userPermissions: Ve(P.value),
724
+ posUser: k.value ? Ve(k.value) : void 0
700
725
  };
701
726
  }
702
727
  function ne() {
703
- return !Ae.isEqual(R.value, W.value.permissionSetIds) || !Ae.isEqual(P.value, W.value.userPermissions) || !Ae.isEqual(w.value, W.value.posUser);
728
+ return !Le.isEqual(R.value, W.value.permissionSetIds) || !Le.isEqual(P.value, W.value.userPermissions) || !Le.isEqual(k.value, W.value.posUser);
704
729
  }
705
730
  function Q(n) {
706
- w.value = H(w.value, n);
731
+ k.value = H(k.value, n);
707
732
  }
708
733
  function D(n) {
709
- return et(
710
- Qe(n, $.permissionSets.value)
734
+ return st(
735
+ tt(n, $.permissionSets.value)
711
736
  );
712
737
  }
713
- function l(n) {
738
+ function o(n) {
714
739
  P.value = D(n);
715
740
  }
716
741
  function S(n) {
717
742
  const F = [...n ?? []];
718
- if (Ae.isEqual(F, R.value)) return;
719
- const J = !Ae.isEqual(
743
+ if (Le.isEqual(F, R.value)) return;
744
+ const J = !Le.isEqual(
720
745
  P.value,
721
746
  D(R.value)
722
747
  );
723
748
  if (R.value = F, !J) {
724
- l(F);
749
+ o(F);
725
750
  return;
726
751
  }
727
- v.open({
752
+ f.open({
728
753
  title: t("permissionSet.form.overrideInherited.title"),
729
754
  message: t("permissionSet.form.overrideInherited.message"),
730
755
  minWidth: u.value.lg ? 588 : 0,
@@ -737,96 +762,96 @@ const Ms = {
737
762
  close: !0
738
763
  }
739
764
  }).onPrimary(() => {
740
- l(F), v.close();
765
+ o(F), f.close();
741
766
  });
742
767
  }
743
768
  function z() {
744
769
  var n, F;
745
770
  return bs({
746
771
  userPermissions: P.value,
747
- inheritedPermissions: A.value,
772
+ inheritedPermissions: O.value,
748
773
  permissionSetIds: R.value,
749
- posUser: w.value,
774
+ posUser: k.value,
750
775
  reportSubjects: X.value ? V.value : C,
751
776
  defaultReportSubjects: B.value,
752
- savedPosUser: (n = f.initialValue) == null ? void 0 : n.posUser,
753
- fallbackName: ((F = f.initialValue) == null ? void 0 : F.name) || f.fallbackName
777
+ savedPosUser: (n = v.initialValue) == null ? void 0 : n.posUser,
778
+ fallbackName: ((F = v.initialValue) == null ? void 0 : F.name) || v.fallbackName
754
779
  });
755
780
  }
756
781
  const se = c();
757
782
  function H(n, F) {
758
783
  if (!n) return n;
759
- const J = Ut(F, { isOwner: y.value }), { roleIds: pe, restaurantIds: ye } = J;
760
- if (pe === null && ye === null) return n;
761
- const ve = we(n);
784
+ const J = Ut(F, { isOwner: y.value }), { roleIds: pe, restaurantIds: he } = J;
785
+ if (pe === null && he === null) return n;
786
+ const ve = Ve(n);
762
787
  return ve.roles = ve.roles.filter(
763
- (Z) => (pe === null || pe.includes(Z.roleId)) && (ye === null || ye.includes(Z.restaurantId))
788
+ (Z) => (pe === null || pe.includes(Z.roleId)) && (he === null || he.includes(Z.restaurantId))
764
789
  ), ve;
765
790
  }
766
- const x = c(!!w.value), N = c(!1);
767
- function Te(n) {
768
- w.value = n, N.value = !0;
791
+ const x = c(!!k.value), N = c(!1);
792
+ function je(n) {
793
+ k.value = n, N.value = !0;
769
794
  }
770
795
  return ue(
771
- () => !!w.value,
796
+ () => !!k.value,
772
797
  async (n) => {
773
798
  n && !x.value && N.value && (await Mt(), se.value && se.value.$el.scrollIntoView({ behavior: "smooth", block: "start" })), x.value = n;
774
799
  }
775
800
  ), ue(
776
- () => f.initialValue,
801
+ () => v.initialValue,
777
802
  (n, F) => {
778
803
  if (!F || !n || F.id !== n.id) {
779
804
  N.value = !1, re(n);
780
805
  return;
781
806
  }
782
- n.posUser !== void 0 && !N.value && (w.value = n.posUser ? H(we(n.posUser), P.value) : void 0, W.value = {
807
+ n.posUser !== void 0 && !N.value && (k.value = n.posUser ? H(Ve(n.posUser), P.value) : void 0, W.value = {
783
808
  ...W.value,
784
- posUser: w.value ? we(w.value) : void 0
809
+ posUser: k.value ? Ve(k.value) : void 0
785
810
  });
786
811
  },
787
812
  { immediate: !0 }
788
813
  ), ue(
789
814
  P,
790
815
  (n) => {
791
- w.value = H(w.value, n);
816
+ k.value = H(k.value, n);
792
817
  },
793
818
  { deep: !0 }
794
- ), T({
819
+ ), A({
795
820
  readGrantData: z,
796
821
  isModified: ne
797
822
  }), (n, F) => {
798
- var ve, Z, ge, Pe, Re, je;
799
- const J = G("FmCircularProgress"), pe = G("FmSwitch"), ye = G("FmSelect");
823
+ var ve, Z, xe, Me, Fe, Ge;
824
+ const J = G("FmCircularProgress"), pe = G("FmSwitch"), he = G("FmSelect");
800
825
  return m(), M("div", Sa, [
801
- (ve = o.initialValue) != null && ve.isOwner ? L("", !0) : (m(), M("section", Va, [
826
+ (ve = l.initialValue) != null && ve.isOwner ? T("", !0) : (m(), M("section", Va, [
802
827
  p("div", Pa, [
803
828
  p("p", Ra, E(s(t)("team.whereTheyWork.title")), 1),
804
829
  p("p", Ma, E(s(t)("team.whereTheyWork.subtitle")), 1)
805
830
  ]),
806
831
  i(ht, {
807
832
  modelValue: P.value,
808
- "onUpdate:modelValue": F[0] || (F[0] = (he) => P.value = he),
833
+ "onUpdate:modelValue": F[0] || (F[0] = (_e) => P.value = _e),
809
834
  part: "workplace",
810
- "inherit-permissions": A.value,
835
+ "inherit-permissions": O.value,
811
836
  onPermissionChanged: Q
812
837
  }, null, 8, ["modelValue", "inherit-permissions"])
813
838
  ])),
814
- o.loading ? (m(), M("div", Fa, [
839
+ l.loading ? (m(), M("div", Fa, [
815
840
  i(J, { size: "xl" })
816
- ])) : (m(), q(wa, {
841
+ ])) : (m(), q(ka, {
817
842
  key: 2,
818
843
  ref_key: "masterUserContentRef",
819
844
  ref: se,
820
- "model-value": w.value,
821
- "fallback-name": ((Z = o.initialValue) == null ? void 0 : Z.name) || o.fallbackName,
822
- "fallback-passcode": (Pe = (ge = o.initialValue) == null ? void 0 : ge.posUser) == null ? void 0 : Pe.passcode,
845
+ "model-value": k.value,
846
+ "fallback-name": ((Z = l.initialValue) == null ? void 0 : Z.name) || l.fallbackName,
847
+ "fallback-passcode": (Me = (xe = l.initialValue) == null ? void 0 : xe.posUser) == null ? void 0 : Me.passcode,
823
848
  roles: s(b),
824
849
  "usable-role-ids": d.value.roleIds,
825
850
  restaurants: r.value,
826
- "pos-user-id": (Re = o.initialValue) == null ? void 0 : Re.posUserId,
827
- "onUpdate:modelValue": Te
851
+ "pos-user-id": (Fe = l.initialValue) == null ? void 0 : Fe.posUserId,
852
+ "onUpdate:modelValue": je
828
853
  }, null, 8, ["model-value", "fallback-name", "fallback-passcode", "roles", "usable-role-ids", "restaurants", "pos-user-id"])),
829
- (je = o.initialValue) != null && je.isOwner ? L("", !0) : (m(), M("section", $a, [
854
+ (Ge = l.initialValue) != null && Ge.isOwner ? T("", !0) : (m(), M("section", $a, [
830
855
  p("div", Ca, [
831
856
  p("div", Da, [
832
857
  p("p", Na, E(s(t)("team.portalAccess.title")), 1),
@@ -839,7 +864,7 @@ const Ms = {
839
864
  }, null, 8, ["model-value"])
840
865
  ]),
841
866
  U.value ? (m(), M(de, { key: 0 }, [
842
- i(ye, {
867
+ i(he, {
843
868
  "model-value": R.value,
844
869
  multiselect: "",
845
870
  searchable: "",
@@ -851,28 +876,28 @@ const Ms = {
851
876
  }, null, 8, ["model-value", "label", "items", "placeholder"]),
852
877
  i(ht, {
853
878
  modelValue: P.value,
854
- "onUpdate:modelValue": F[1] || (F[1] = (he) => P.value = he),
879
+ "onUpdate:modelValue": F[1] || (F[1] = (_e) => P.value = _e),
855
880
  part: "portal",
856
- "inherit-permissions": A.value,
881
+ "inherit-permissions": O.value,
857
882
  onPermissionChanged: Q
858
883
  }, null, 8, ["modelValue", "inherit-permissions"])
859
- ], 64)) : L("", !0)
884
+ ], 64)) : T("", !0)
860
885
  ]))
861
886
  ]);
862
887
  };
863
888
  }
864
889
  }), St = {
865
- async readPermissionUserByPhoneNo(o) {
866
- return vt(
867
- await ft().get(
868
- `/portal-users/search-by-phone/${encodeURIComponent(o)}`
890
+ async readPermissionUserByPhoneNo(l) {
891
+ return be(
892
+ await ye().get(
893
+ `/portal-users/search-by-phone/${encodeURIComponent(l)}`
869
894
  )
870
895
  );
871
896
  },
872
- async readPermissionUserByEmail(o) {
873
- return vt(
874
- await ft().get(
875
- `/portal-users/search-by-email/${encodeURIComponent(o)}`
897
+ async readPermissionUserByEmail(l) {
898
+ return be(
899
+ await ye().get(
900
+ `/portal-users/search-by-email/${encodeURIComponent(l)}`
876
901
  )
877
902
  );
878
903
  }
@@ -882,43 +907,43 @@ const Ms = {
882
907
  }, Ta = { class: "user-info-icon user-info-icon--lg" }, Ba = { class: "flex-1 overflow-hidden" }, ja = { class: "profile-displayName" }, qa = { class: "profile-email" }, Ga = { class: "profile-phone" }, Ka = { key: 2 }, Wa = /* @__PURE__ */ oe({
883
908
  __name: "PortalUserSearcher",
884
909
  emits: ["invite"],
885
- setup(o, { emit: T }) {
886
- const f = T, { t } = ce(), v = at(), u = ze(), { supportedCountries: $, ready: K } = Xe(), R = I(() => {
910
+ setup(l, { emit: A }) {
911
+ const v = A, { t } = ce(), f = ot(), u = He(), { supportedCountries: $, ready: K } = Ye(), R = I(() => {
887
912
  var r;
888
913
  const b = (r = u.currentCountry.value) == null ? void 0 : r.toUpperCase();
889
- return b && lt(b) ? b : void 0;
890
- }), A = c("phone"), w = c(""), P = c(""), _ = c(), X = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, C = I(() => X.test(P.value.trim()));
914
+ return b && rt(b) ? b : void 0;
915
+ }), O = c("phone"), k = c(""), P = c(""), _ = c(), X = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, C = I(() => X.test(P.value.trim()));
891
916
  async function V() {
892
- const b = A.value === "phone" ? w.value.replace(/ /g, "") : P.value.trim();
917
+ const b = O.value === "phone" ? k.value.replace(/ /g, "") : P.value.trim();
893
918
  if (!b) {
894
- v.open({
919
+ f.open({
895
920
  type: "error",
896
921
  title: t("team.memberForm.searchUser.emptyError")
897
922
  });
898
923
  return;
899
924
  }
900
- if (A.value === "email" && !C.value) {
901
- v.open({
925
+ if (O.value === "email" && !C.value) {
926
+ f.open({
902
927
  type: "error",
903
928
  title: t("team.memberForm.searchUser.invalidEmail")
904
929
  });
905
930
  return;
906
931
  }
907
932
  const r = () => {
908
- _.value = void 0, v.open({
933
+ _.value = void 0, f.open({
909
934
  type: "error",
910
935
  title: t("team.memberForm.searchUser.userNotFound")
911
936
  });
912
937
  };
913
938
  try {
914
- const U = A.value === "phone" ? await St.readPermissionUserByPhoneNo(b) : await St.readPermissionUserByEmail(b);
939
+ const U = O.value === "phone" ? await St.readPermissionUserByPhoneNo(b) : await St.readPermissionUserByEmail(b);
915
940
  if (!U) {
916
941
  r();
917
942
  return;
918
943
  }
919
944
  _.value = U;
920
945
  } catch {
921
- _.value = void 0, v.open({
946
+ _.value = void 0, f.open({
922
947
  type: "error",
923
948
  title: t("team.memberForm.searchUser.searchFailed")
924
949
  });
@@ -932,41 +957,41 @@ const Ms = {
932
957
  return U ? `${r[0]}${U[0]}` : r.slice(0, 2);
933
958
  }), y = c(!1);
934
959
  function d(b) {
935
- f("invite", b), y.value = !0;
960
+ v("invite", b), y.value = !0;
936
961
  }
937
962
  function h() {
938
963
  y.value = !1;
939
964
  }
940
965
  return (b, r) => {
941
- var D, l, S;
966
+ var D, o, S;
942
967
  const U = G("FmRadio"), j = G("FmPhoneNumber"), W = G("FmCircularProgress"), re = G("FmTextField"), ne = G("FmRadioGroup"), Q = G("FmButton");
943
968
  return m(), M("div", Oa, [
944
- y.value ? L("", !0) : (m(), M("div", La, [
969
+ y.value ? T("", !0) : (m(), M("div", La, [
945
970
  i(ne, {
946
- modelValue: A.value,
947
- "onUpdate:modelValue": r[2] || (r[2] = (z) => A.value = z)
971
+ modelValue: O.value,
972
+ "onUpdate:modelValue": r[2] || (r[2] = (z) => O.value = z)
948
973
  }, {
949
974
  default: te(() => [
950
975
  i(U, {
951
976
  value: "phone",
952
977
  label: s(t)("team.memberForm.searchUser.phoneNumber")
953
978
  }, null, 8, ["label"]),
954
- A.value === "phone" && s(K) ? (m(), q(j, {
979
+ O.value === "phone" && s(K) ? (m(), q(j, {
955
980
  key: 0,
956
- modelValue: w.value,
957
- "onUpdate:modelValue": r[0] || (r[0] = (z) => w.value = z),
981
+ modelValue: k.value,
982
+ "onUpdate:modelValue": r[0] || (r[0] = (z) => k.value = z),
958
983
  "default-country": R.value,
959
984
  "extra-country-codes": s($),
960
985
  class: "ml-8"
961
- }, null, 8, ["modelValue", "default-country", "extra-country-codes"])) : A.value === "phone" ? (m(), q(W, {
986
+ }, null, 8, ["modelValue", "default-country", "extra-country-codes"])) : O.value === "phone" ? (m(), q(W, {
962
987
  key: 1,
963
988
  class: "ml-8"
964
- })) : L("", !0),
989
+ })) : T("", !0),
965
990
  i(U, {
966
991
  value: "email",
967
992
  label: s(t)("team.memberForm.searchUser.email")
968
993
  }, null, 8, ["label"]),
969
- A.value === "email" ? (m(), q(re, {
994
+ O.value === "email" ? (m(), q(re, {
970
995
  key: 2,
971
996
  modelValue: P.value,
972
997
  "onUpdate:modelValue": r[1] || (r[1] = (z) => P.value = z),
@@ -975,7 +1000,7 @@ const Ms = {
975
1000
  (z) => !z || C.value || s(t)("team.memberForm.searchUser.invalidEmail")
976
1001
  ],
977
1002
  class: "ml-8"
978
- }, null, 8, ["modelValue", "placeholder", "rules"])) : L("", !0)
1003
+ }, null, 8, ["modelValue", "placeholder", "rules"])) : T("", !0)
979
1004
  ]),
980
1005
  _: 1
981
1006
  }, 8, ["modelValue"]),
@@ -993,17 +1018,17 @@ const Ms = {
993
1018
  p("div", Ta, E(B.value), 1),
994
1019
  p("div", Ba, [
995
1020
  p("p", ja, E((D = _.value) == null ? void 0 : D.displayName), 1),
996
- p("p", qa, E((l = _.value) == null ? void 0 : l.email), 1),
1021
+ p("p", qa, E((o = _.value) == null ? void 0 : o.email), 1),
997
1022
  p("p", Ga, E((S = _.value) == null ? void 0 : S.phoneNumber), 1)
998
1023
  ])
999
- ])) : L("", !0),
1024
+ ])) : T("", !0),
1000
1025
  y.value ? (m(), M("div", Ka, [
1001
1026
  i(Q, {
1002
1027
  label: s(t)("team.memberForm.searchUser.changeUser"),
1003
1028
  variant: "secondary",
1004
1029
  onClick: h
1005
1030
  }, null, 8, ["label"])
1006
- ])) : L("", !0)
1031
+ ])) : T("", !0)
1007
1032
  ]);
1008
1033
  };
1009
1034
  }
@@ -1038,60 +1063,60 @@ const Ms = {
1038
1063
  }
1039
1064
  },
1040
1065
  emits: ["update-existing"],
1041
- setup(o, { expose: T, emit: f }) {
1042
- const t = o, v = f, u = I(() => !t.initialValue && t.providers.length > 0), { t: $ } = ce(), K = ze(), { supportedCountries: R, ready: A } = Xe(), w = I(() => {
1066
+ setup(l, { expose: A, emit: v }) {
1067
+ const t = l, f = v, u = I(() => !t.initialValue && t.providers.length > 0), { t: $ } = ce(), K = He(), { supportedCountries: R, ready: O } = Ye(), k = I(() => {
1043
1068
  var S;
1044
- const l = (S = K.currentCountry.value) == null ? void 0 : S.toUpperCase();
1045
- return l && lt(l) ? l : void 0;
1069
+ const o = (S = K.currentCountry.value) == null ? void 0 : S.toUpperCase();
1070
+ return o && rt(o) ? o : void 0;
1046
1071
  }), P = I(() => {
1047
- var l;
1048
- return ((l = t.initialValue) == null ? void 0 : l.status) === "invited";
1072
+ var o;
1073
+ return ((o = t.initialValue) == null ? void 0 : o.status) === "invited";
1049
1074
  }), _ = I(() => !!t.initialValue && !t.initialValue.isOwner), X = c(""), C = c(""), V = c("");
1050
- function B(l) {
1051
- X.value = (l == null ? void 0 : l.displayName) ?? (l == null ? void 0 : l.name) ?? "", C.value = (l == null ? void 0 : l.employeeId) ?? "", V.value = (l == null ? void 0 : l.contact) ?? "";
1075
+ function B(o) {
1076
+ X.value = (o == null ? void 0 : o.displayName) ?? (o == null ? void 0 : o.name) ?? "", C.value = (o == null ? void 0 : o.employeeId) ?? "", V.value = (o == null ? void 0 : o.contact) ?? "";
1052
1077
  }
1053
1078
  B(t.initialValue);
1054
1079
  function y() {
1055
1080
  var S;
1056
1081
  if (!_.value) return null;
1057
- const l = ((S = t.initialValue) == null ? void 0 : S.match) === "email" ? Oe(V.value) ? Ve(V.value) ?? "" : "" : V.value.trim().toLowerCase();
1082
+ const o = ((S = t.initialValue) == null ? void 0 : S.match) === "email" ? Te(V.value) ? Re(V.value) ?? "" : "" : V.value.trim().toLowerCase();
1058
1083
  return {
1059
1084
  displayName: X.value.trim(),
1060
1085
  employeeId: C.value.trim(),
1061
- contact: l
1086
+ contact: o
1062
1087
  };
1063
1088
  }
1064
1089
  function d() {
1065
- const l = t.initialValue;
1066
- return !l || !_.value ? !1 : C.value.trim() !== (l.employeeId ?? "") || P.value && (X.value.trim() !== (l.displayName ?? l.name) || V.value.trim() !== (l.contact ?? ""));
1090
+ const o = t.initialValue;
1091
+ return !o || !_.value ? !1 : C.value.trim() !== (o.employeeId ?? "") || P.value && (X.value.trim() !== (o.displayName ?? o.name) || V.value.trim() !== (o.contact ?? ""));
1067
1092
  }
1068
1093
  const h = c(), b = c(), r = c();
1069
1094
  function U() {
1070
- var l, S;
1071
- return u.value && ((l = r.value) != null && l.isModified()) || d() || !t.initialValue && h.value ? !0 : ((S = b.value) == null ? void 0 : S.isModified()) ?? !1;
1095
+ var o, S;
1096
+ return u.value && ((o = r.value) != null && o.isModified()) || d() || !t.initialValue && h.value ? !0 : ((S = b.value) == null ? void 0 : S.isModified()) ?? !1;
1072
1097
  }
1073
- function j(l) {
1074
- h.value = l;
1098
+ function j(o) {
1099
+ h.value = o;
1075
1100
  }
1076
- function W(l) {
1077
- return X.value === (l.displayName ?? l.name) && C.value === (l.employeeId ?? "") && V.value === (l.contact ?? "");
1101
+ function W(o) {
1102
+ return X.value === (o.displayName ?? o.name) && C.value === (o.employeeId ?? "") && V.value === (o.contact ?? "");
1078
1103
  }
1079
1104
  function re() {
1080
1105
  var S, z, se, H, x;
1081
- const l = ((S = b.value) == null ? void 0 : S.readGrantData()) ?? ys;
1106
+ const o = ((S = b.value) == null ? void 0 : S.readGrantData()) ?? ys;
1082
1107
  return {
1083
1108
  email: ((z = h.value) == null ? void 0 : z.email) ?? void 0,
1084
1109
  phoneNumber: ((se = h.value) == null ? void 0 : se.phoneNumber) ?? void 0,
1085
- customPermissions: l.customPermissions,
1086
- permissions: l.permissions,
1087
- permissionSetIds: l.permissionSetIds,
1110
+ customPermissions: o.customPermissions,
1111
+ permissions: o.permissions,
1112
+ permissionSetIds: o.permissionSetIds,
1088
1113
  name: ((H = h.value) == null ? void 0 : H.displayName) || ((x = t.initialValue) == null ? void 0 : x.name) || "",
1089
- posUser: l.posUser
1114
+ posUser: o.posUser
1090
1115
  };
1091
1116
  }
1092
1117
  function ne() {
1093
- var l;
1094
- return u.value ? ((l = r.value) == null ? void 0 : l.readDetails()) ?? null : null;
1118
+ var o;
1119
+ return u.value ? ((o = r.value) == null ? void 0 : o.readDetails()) ?? null : null;
1095
1120
  }
1096
1121
  const Q = c();
1097
1122
  async function D() {
@@ -1099,10 +1124,10 @@ const Ms = {
1099
1124
  }
1100
1125
  return ue(
1101
1126
  () => t.initialValue,
1102
- (l, S) => {
1103
- (!S || !l || S.id !== l.id) && (h.value = void 0), (!S || !l || S.id !== l.id || W(S)) && B(l);
1127
+ (o, S) => {
1128
+ (!S || !o || S.id !== o.id) && (h.value = void 0), (!S || !o || S.id !== o.id || W(S)) && B(o);
1104
1129
  }
1105
- ), T({
1130
+ ), A({
1106
1131
  readFormData: re,
1107
1132
  readDetails: ne,
1108
1133
  readEdits: y,
@@ -1110,14 +1135,14 @@ const Ms = {
1110
1135
  isModified: U,
1111
1136
  /** Add stays disabled while the sign-in key belongs to someone already (AC4). */
1112
1137
  hasExisting: I(() => {
1113
- var l;
1114
- return !!((l = r.value) != null && l.hasExisting);
1138
+ var o;
1139
+ return !!((o = r.value) != null && o.hasExisting);
1115
1140
  }),
1116
1141
  providerLabel: I(() => {
1117
- var l;
1118
- return ((l = r.value) == null ? void 0 : l.providerLabel) ?? "";
1142
+ var o;
1143
+ return ((o = r.value) == null ? void 0 : o.providerLabel) ?? "";
1119
1144
  })
1120
- }), (l, S) => {
1145
+ }), (o, S) => {
1121
1146
  const z = G("FmTextField"), se = G("FmPhoneNumber"), H = G("FmForm");
1122
1147
  return m(), q(H, {
1123
1148
  ref_key: "formRef",
@@ -1132,14 +1157,14 @@ const Ms = {
1132
1157
  key: 0,
1133
1158
  ref_key: "detailsRef",
1134
1159
  ref: r,
1135
- providers: o.providers,
1136
- onUpdateExisting: S[0] || (S[0] = (N) => v("update-existing", N))
1137
- }, null, 8, ["providers"])) : o.initialValue ? (m(), q(na, {
1160
+ providers: l.providers,
1161
+ onUpdateExisting: S[0] || (S[0] = (N) => f("update-existing", N))
1162
+ }, null, 8, ["providers"])) : l.initialValue ? (m(), q(na, {
1138
1163
  key: 2,
1139
- name: o.initialValue.name,
1140
- status: o.initialValue.status ?? "active",
1141
- email: o.initialValue.email,
1142
- "phone-number": o.initialValue.phoneNumber
1164
+ name: l.initialValue.name,
1165
+ status: l.initialValue.status ?? "active",
1166
+ email: l.initialValue.email,
1167
+ "phone-number": l.initialValue.phoneNumber
1143
1168
  }, {
1144
1169
  default: te(() => [
1145
1170
  _.value ? (m(), M("div", Ya, [
@@ -1153,7 +1178,7 @@ const Ms = {
1153
1178
  (N) => !!N.trim() || s($)("team.memberDetails.errors.nameRequired"),
1154
1179
  (N) => N.trim().length <= s(Nt) || s($)("team.memberDetails.errors.nameTooLong")
1155
1180
  ]
1156
- }, null, 8, ["modelValue", "label", "placeholder", "rules"])) : L("", !0),
1181
+ }, null, 8, ["modelValue", "label", "placeholder", "rules"])) : T("", !0),
1157
1182
  i(z, {
1158
1183
  modelValue: C.value,
1159
1184
  "onUpdate:modelValue": S[3] || (S[3] = (N) => C.value = N),
@@ -1165,7 +1190,7 @@ const Ms = {
1165
1190
  ]
1166
1191
  }, null, 8, ["modelValue", "label", "placeholder", "rules"]),
1167
1192
  P.value ? (m(), M(de, { key: 1 }, [
1168
- o.initialValue.match === "mobile" ? (m(), q(z, {
1193
+ l.initialValue.match === "mobile" ? (m(), q(z, {
1169
1194
  key: 0,
1170
1195
  modelValue: V.value,
1171
1196
  "onUpdate:modelValue": S[4] || (S[4] = (N) => V.value = N),
@@ -1173,22 +1198,22 @@ const Ms = {
1173
1198
  "label-mark": "optional",
1174
1199
  placeholder: s($)("team.memberDetails.emailPlaceholder"),
1175
1200
  rules: [
1176
- (N) => !N.trim() || s(We)(N) || s($)("team.memberDetails.errors.emailInvalid")
1201
+ (N) => !N.trim() || s(Xe)(N) || s($)("team.memberDetails.errors.emailInvalid")
1177
1202
  ]
1178
- }, null, 8, ["modelValue", "label", "placeholder", "rules"])) : s(A) ? (m(), q(se, {
1203
+ }, null, 8, ["modelValue", "label", "placeholder", "rules"])) : s(O) ? (m(), q(se, {
1179
1204
  key: 1,
1180
1205
  modelValue: V.value,
1181
1206
  "onUpdate:modelValue": S[5] || (S[5] = (N) => V.value = N),
1182
1207
  label: s($)("team.memberDetails.phoneNumber"),
1183
1208
  "label-mark": "optional",
1184
- "default-country": w.value,
1209
+ "default-country": k.value,
1185
1210
  "extra-country-codes": s(R),
1186
1211
  rules: [
1187
- (N) => !s(Oe)(N) || !!s(Ve)(N) || s($)("team.memberDetails.errors.mobileInvalid")
1212
+ (N) => !s(Te)(N) || !!s(Re)(N) || s($)("team.memberDetails.errors.mobileInvalid")
1188
1213
  ]
1189
- }, null, 8, ["modelValue", "label", "default-country", "extra-country-codes", "rules"])) : L("", !0)
1190
- ], 64)) : L("", !0)
1191
- ])) : L("", !0)
1214
+ }, null, 8, ["modelValue", "label", "default-country", "extra-country-codes", "rules"])) : T("", !0)
1215
+ ], 64)) : T("", !0)
1216
+ ])) : T("", !0)
1192
1217
  ]),
1193
1218
  _: 1
1194
1219
  }, 8, ["name", "status", "email", "phone-number"])) : (m(), M("div", Ha, [
@@ -1196,14 +1221,14 @@ const Ms = {
1196
1221
  onInvite: S[1] || (S[1] = (N) => j(N))
1197
1222
  })
1198
1223
  ])),
1199
- u.value || h.value || o.initialValue ? (m(), q(Aa, {
1224
+ u.value || h.value || l.initialValue ? (m(), q(Aa, {
1200
1225
  key: 3,
1201
1226
  ref_key: "grantFieldsRef",
1202
1227
  ref: b,
1203
- "initial-value": o.initialValue,
1228
+ "initial-value": l.initialValue,
1204
1229
  "fallback-name": ((x = h.value) == null ? void 0 : x.displayName) || "",
1205
- loading: o.loading
1206
- }, null, 8, ["initial-value", "fallback-name", "loading"])) : L("", !0)
1230
+ loading: l.loading
1231
+ }, null, 8, ["initial-value", "fallback-name", "loading"])) : T("", !0)
1207
1232
  ])
1208
1233
  ];
1209
1234
  }),
@@ -1233,40 +1258,40 @@ const Ms = {
1233
1258
  class: "fm-typo-en-title-md-600"
1234
1259
  }, nl = {
1235
1260
  class: "flex items-center justify-start gap-8"
1236
- }, Ce = 100, il = 2;
1237
- var ae = /* @__PURE__ */ function(o) {
1238
- return o[o.ADD = 0] = "ADD", o[o.UPDATE = 1] = "UPDATE", o[o.CLOSED = 2] = "CLOSED", o;
1261
+ }, Ne = 100, il = 2;
1262
+ var ae = /* @__PURE__ */ function(l) {
1263
+ return l[l.ADD = 0] = "ADD", l[l.UPDATE = 1] = "UPDATE", l[l.CLOSED = 2] = "CLOSED", l;
1239
1264
  }(ae || {});
1240
1265
  const Rl = /* @__PURE__ */ oe({
1241
1266
  __name: "TeamMemberList",
1242
- setup(o, {
1243
- expose: T
1267
+ setup(l, {
1268
+ expose: A
1244
1269
  }) {
1245
1270
  const {
1246
- fetchCustomReportPermissions: f
1271
+ fetchCustomReportPermissions: v
1247
1272
  } = Ot();
1248
- Xe();
1273
+ Ye();
1249
1274
  const {
1250
1275
  t
1251
- } = ce(), v = ze(), {
1276
+ } = ce(), f = He(), {
1252
1277
  providers: u,
1253
1278
  hasProviders: $,
1254
1279
  canInvite: K,
1255
1280
  providerLabel: R
1256
- } = hs(), A = I(() => K.value ? u.value : []), w = Lt(), P = Tt(), _ = at(), X = Dt(_), C = At(), V = Us(), B = c(!0), y = c(!1), d = I(() => w.isLoading.value), h = c([]), b = c(0), r = c(1), U = c(""), j = c("");
1257
- ue(w.restaurants, (e) => {
1281
+ } = hs(), O = I(() => K.value ? u.value : []), k = Lt(), P = Tt(), _ = ot(), X = Dt(_), C = At(), V = Us(), B = c(!0), y = c(!1), d = I(() => k.isLoading.value), h = c([]), b = c(0), r = c(1), U = c(""), j = c("");
1282
+ ue(k.restaurants, (e) => {
1258
1283
  if (e.length > 0 && h.value.length > 0) {
1259
- const a = new Map(e.map((k) => [k._id, k.profile.name])), g = e.map((k) => k.profile.name).sort();
1260
- h.value = h.value.map((k) => ({
1261
- ...k,
1262
- restaurants: k.managableRestaurantIds === null ? g : k.managableRestaurantIds.map((Y) => a.get(Y) ?? "").filter(Boolean).sort()
1284
+ const a = new Map(e.map((w) => [w._id, w.profile.name])), g = e.map((w) => w.profile.name).sort();
1285
+ h.value = h.value.map((w) => ({
1286
+ ...w,
1287
+ restaurants: w.managableRestaurantIds === null ? g : w.managableRestaurantIds.map((Y) => a.get(Y) ?? "").filter(Boolean).sort()
1263
1288
  }));
1264
1289
  }
1265
1290
  });
1266
1291
  const W = I(() => [{
1267
1292
  label: t("team.filter.unassigned_label"),
1268
- value: Le
1269
- }, ...w.restaurants.value.map((e) => ({
1293
+ value: Be
1294
+ }, ...k.restaurants.value.map((e) => ({
1270
1295
  label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
1271
1296
  value: e._id
1272
1297
  }))]), re = ({
@@ -1275,27 +1300,27 @@ const Rl = /* @__PURE__ */ oe({
1275
1300
  }) => {
1276
1301
  const g = {
1277
1302
  label: t("team.actions.updateMember"),
1278
- onClick: () => n(Ne.Update, e)
1279
- }, k = {
1303
+ onClick: () => n(Ee.Update, e)
1304
+ }, w = {
1280
1305
  label: t("team.actions.removeMember"),
1281
- onClick: () => n(Ne.Remove, e),
1306
+ onClick: () => n(Ee.Remove, e),
1282
1307
  itemClass: "text-fm-color-typo-error"
1283
1308
  };
1284
1309
  if (e.status === "invited") {
1285
1310
  const le = {
1286
1311
  label: t("team.staffInvite.actions.resend"),
1287
1312
  onClick: () => qt(e)
1288
- }, $e = {
1313
+ }, De = {
1289
1314
  label: t("team.staffInvite.actions.revoke"),
1290
1315
  onClick: () => jt(e),
1291
1316
  itemClass: "text-fm-color-typo-error"
1292
1317
  };
1293
1318
  return i(bt, {
1294
1319
  class: a,
1295
- items: [g, le, $e]
1320
+ items: [g, le, De]
1296
1321
  }, null);
1297
1322
  }
1298
- const Y = e.doc.isOwner ? [g] : [g, k];
1323
+ const Y = e.doc.isOwner ? [g] : [g, w];
1299
1324
  return i(bt, {
1300
1325
  class: a,
1301
1326
  items: Y
@@ -1305,9 +1330,9 @@ const Rl = /* @__PURE__ */ oe({
1305
1330
  const a = e.restaurants.slice(0, il), g = e.restaurants.length - a.length;
1306
1331
  return i("div", {
1307
1332
  class: "flex flex-col gap-4 py-4"
1308
- }, [a.map((k) => i("span", {
1333
+ }, [a.map((w) => i("span", {
1309
1334
  class: "truncate"
1310
- }, [k])), g > 0 && i("span", {
1335
+ }, [w])), g > 0 && i("span", {
1311
1336
  class: "text-fm-color-primary"
1312
1337
  }, [t("team.labels.moreRestaurants", {
1313
1338
  count: g
@@ -1320,9 +1345,9 @@ const Rl = /* @__PURE__ */ oe({
1320
1345
  const a = e.row.original;
1321
1346
  return i("div", {
1322
1347
  class: "flex items-center gap-8"
1323
- }, [i(Je.FmAvatar, {
1348
+ }, [i(Qe.FmAvatar, {
1324
1349
  name: a.name,
1325
- initials: ot(a.name),
1350
+ initials: nt(a.name),
1326
1351
  size: "sm",
1327
1352
  class: "shrink-0"
1328
1353
  }, null), i("span", {
@@ -1358,8 +1383,8 @@ const Rl = /* @__PURE__ */ oe({
1358
1383
  header: () => t("team.table.columns.assignedRoles"),
1359
1384
  enableSorting: !1,
1360
1385
  cell(e) {
1361
- const a = e.row.original, g = V.getPermissionAssignmentByUserId(a.id), k = (g == null ? void 0 : g.permissionSetIds) || a.doc.permissionSetIds || [];
1362
- return C.permissionSets.value.filter((le) => k.includes(le.id)).map((le) => le.name).join(", ");
1386
+ const a = e.row.original, g = V.getPermissionAssignmentByUserId(a.id), w = (g == null ? void 0 : g.permissionSetIds) || a.doc.permissionSetIds || [];
1387
+ return C.permissionSets.value.filter((le) => w.includes(le.id)).map((le) => le.name).join(", ");
1363
1388
  }
1364
1389
  }, {
1365
1390
  accessorKey: "permission",
@@ -1367,7 +1392,7 @@ const Rl = /* @__PURE__ */ oe({
1367
1392
  enableSorting: !1,
1368
1393
  cell(e) {
1369
1394
  const a = e.row.original;
1370
- return l(a);
1395
+ return o(a);
1371
1396
  },
1372
1397
  meta: {
1373
1398
  width: "200px"
@@ -1384,7 +1409,7 @@ const Rl = /* @__PURE__ */ oe({
1384
1409
  header: () => t("team.table.columns.status"),
1385
1410
  enableSorting: !1,
1386
1411
  cell(e) {
1387
- return i(rt, {
1412
+ return i(it, {
1388
1413
  status: e.row.original.status
1389
1414
  }, null);
1390
1415
  }
@@ -1403,14 +1428,14 @@ const Rl = /* @__PURE__ */ oe({
1403
1428
  },
1404
1429
  enableSorting: !1
1405
1430
  }];
1406
- function l(e) {
1431
+ function o(e) {
1407
1432
  if (e.doc.isOwner)
1408
1433
  return t("team.labels.businessOwner");
1409
- const a = i(Je.FmTooltip, {
1434
+ const a = i(Qe.FmTooltip, {
1410
1435
  variant: "plain",
1411
1436
  placement: "top"
1412
1437
  }, {
1413
- default: () => i(Je.FmIcon, {
1438
+ default: () => i(Qe.FmIcon, {
1414
1439
  name: "info",
1415
1440
  class: "cursor-pointer text-fm-color-neutral-gray-300"
1416
1441
  }, null),
@@ -1423,8 +1448,8 @@ const Rl = /* @__PURE__ */ oe({
1423
1448
  })]), e.permissionLabels.length > 0 && a]);
1424
1449
  }
1425
1450
  function S(e) {
1426
- var Y, le, $e, Ee;
1427
- const a = V.getPermissionAssignmentByUserId(e.id), g = (a == null ? void 0 : a.customPermissions) ?? e.permissions ?? [], k = (a == null ? void 0 : a.permissionSetIds) ?? e.doc.permissionSetIds ?? [];
1451
+ var Y, le, De, Oe;
1452
+ const a = V.getPermissionAssignmentByUserId(e.id), g = (a == null ? void 0 : a.customPermissions) ?? e.permissions ?? [], w = (a == null ? void 0 : a.permissionSetIds) ?? e.doc.permissionSetIds ?? [];
1428
1453
  return {
1429
1454
  id: e.id,
1430
1455
  isOwner: e.doc.isOwner,
@@ -1432,12 +1457,12 @@ const Rl = /* @__PURE__ */ oe({
1432
1457
  phoneNumber: e.phoneNumber,
1433
1458
  email: e.email,
1434
1459
  permissions: g,
1435
- permissionSetIds: k,
1460
+ permissionSetIds: w,
1436
1461
  posUser: e.doc.posUser ? {
1437
1462
  code: ((Y = e.doc.posUser) == null ? void 0 : Y.code) ?? "",
1438
1463
  name: ((le = e.doc.posUser) == null ? void 0 : le.name) ?? e.name,
1439
- passcode: (($e = e.doc.posUser) == null ? void 0 : $e.passcode) ?? "",
1440
- roles: ((Ee = e.doc.posUser) == null ? void 0 : Ee.roles) ?? []
1464
+ passcode: ((De = e.doc.posUser) == null ? void 0 : De.passcode) ?? "",
1465
+ roles: ((Oe = e.doc.posUser) == null ? void 0 : Oe.roles) ?? []
1441
1466
  } : void 0,
1442
1467
  posUserId: e.doc.posUserId,
1443
1468
  status: e.status,
@@ -1445,7 +1470,7 @@ const Rl = /* @__PURE__ */ oe({
1445
1470
  };
1446
1471
  }
1447
1472
  function z(e) {
1448
- const a = V.getPermissionAssignmentByUserId(e.id), g = (a == null ? void 0 : a.customPermissions) ?? e.permissions ?? [], k = (a == null ? void 0 : a.permissionSetIds) ?? e.doc.permissionSetIds ?? [];
1473
+ const a = V.getPermissionAssignmentByUserId(e.id), g = (a == null ? void 0 : a.customPermissions) ?? e.permissions ?? [], w = (a == null ? void 0 : a.permissionSetIds) ?? e.doc.permissionSetIds ?? [];
1449
1474
  return {
1450
1475
  id: e.id,
1451
1476
  isOwner: e.doc.isOwner,
@@ -1453,7 +1478,7 @@ const Rl = /* @__PURE__ */ oe({
1453
1478
  phoneNumber: e.phoneNumber,
1454
1479
  email: e.email,
1455
1480
  permissions: g,
1456
- permissionSetIds: k,
1481
+ permissionSetIds: w,
1457
1482
  posUser: void 0,
1458
1483
  posUserId: e.doc.posUserId,
1459
1484
  status: e.status,
@@ -1461,7 +1486,7 @@ const Rl = /* @__PURE__ */ oe({
1461
1486
  };
1462
1487
  }
1463
1488
  function se(e) {
1464
- var a, g, k, Y;
1489
+ var a, g, w, Y;
1465
1490
  return {
1466
1491
  id: e._id,
1467
1492
  isOwner: !1,
@@ -1476,7 +1501,7 @@ const Rl = /* @__PURE__ */ oe({
1476
1501
  displayName: e.displayName ?? "",
1477
1502
  employeeId: e.employeeId ?? null,
1478
1503
  match: e.match,
1479
- contact: (e.match === "mobile" ? (k = e.contact) == null ? void 0 : k.email : (Y = e.contact) == null ? void 0 : Y.mobile) ?? ""
1504
+ contact: (e.match === "mobile" ? (w = e.contact) == null ? void 0 : w.email : (Y = e.contact) == null ? void 0 : Y.mobile) ?? ""
1480
1505
  };
1481
1506
  }
1482
1507
  const H = c(null);
@@ -1489,13 +1514,13 @@ const Rl = /* @__PURE__ */ oe({
1489
1514
  async function N(e) {
1490
1515
  const a = ++ee;
1491
1516
  try {
1492
- const g = typeof e == "string" ? (await De.readInvites()).find((k) => k._id === e) : e;
1517
+ const g = typeof e == "string" ? (await Ae.readInvites()).find((w) => w._id === e) : e;
1493
1518
  if (a !== ee) return;
1494
1519
  if (!g) {
1495
1520
  _.open({
1496
1521
  type: "error",
1497
1522
  title: t("team.staffInvite.errors.not_pending")
1498
- }), await Ie();
1523
+ }), await ke();
1499
1524
  return;
1500
1525
  }
1501
1526
  H.value = g, Z.value = se(g), J.value = ae.UPDATE;
@@ -1507,11 +1532,11 @@ const Rl = /* @__PURE__ */ oe({
1507
1532
  });
1508
1533
  }
1509
1534
  }
1510
- async function Te(e) {
1535
+ async function je(e) {
1511
1536
  const a = ++ee;
1512
- H.value = null, Z.value = z(e), J.value = ae.UPDATE, be.value = e.doc.hasPosUser === !0;
1537
+ H.value = null, Z.value = z(e), J.value = ae.UPDATE, ge.value = e.doc.hasPosUser === !0;
1513
1538
  try {
1514
- const g = await Se.readTeamMember(e.id);
1539
+ const g = await Pe.readTeamMember(e.id);
1515
1540
  if (a !== ee) return;
1516
1541
  Z.value = S(g);
1517
1542
  } catch {
@@ -1519,21 +1544,21 @@ const Rl = /* @__PURE__ */ oe({
1519
1544
  _.open({
1520
1545
  message: t("common.error"),
1521
1546
  type: "error"
1522
- }), Re();
1547
+ }), Fe();
1523
1548
  } finally {
1524
- a === ee && (be.value = !1);
1549
+ a === ee && (ge.value = !1);
1525
1550
  }
1526
1551
  }
1527
- async function Be(e) {
1528
- if (ge(), e.kind === "invite") {
1552
+ async function qe(e) {
1553
+ if (xe(), e.kind === "invite") {
1529
1554
  await N(e.invite);
1530
1555
  return;
1531
1556
  }
1532
1557
  const a = ++ee;
1533
1558
  try {
1534
- const g = await Se.readTeamMember(e.id);
1559
+ const g = await Pe.readTeamMember(e.id);
1535
1560
  if (a !== ee) return;
1536
- await Te(g);
1561
+ await je(g);
1537
1562
  } catch {
1538
1563
  _.open({
1539
1564
  message: t("common.error"),
@@ -1541,48 +1566,48 @@ const Rl = /* @__PURE__ */ oe({
1541
1566
  });
1542
1567
  }
1543
1568
  }
1544
- const be = c(!1);
1569
+ const ge = c(!1);
1545
1570
  let ee = 0;
1546
1571
  const n = async (e, a) => {
1547
- e == Ne.Update && (a.status === "invited" ? await N(a.id) : await Te(a)), e == Ne.Remove && Bt(a);
1548
- }, F = Ft(), J = c(ae.CLOSED), pe = I(() => J.value !== ae.CLOSED), ye = I(() => J.value === ae.ADD ? t("common.add") : t("common.update")), ve = I(() => J.value === ae.ADD ? t("team.actions.addMember") : t("team.actions.updateMember")), Z = c();
1549
- function ge() {
1550
- ee++, be.value = !1, H.value = null, J.value = ae.CLOSED;
1572
+ e == Ee.Update && (a.status === "invited" ? await N(a.id) : await je(a)), e == Ee.Remove && Bt(a);
1573
+ }, F = Ft(), J = c(ae.CLOSED), pe = I(() => J.value !== ae.CLOSED), he = I(() => J.value === ae.ADD ? t("common.add") : t("common.update")), ve = I(() => J.value === ae.ADD ? t("team.actions.addMember") : t("team.actions.updateMember")), Z = c();
1574
+ function xe() {
1575
+ ee++, ge.value = !1, H.value = null, J.value = ae.CLOSED;
1551
1576
  }
1552
- const Pe = is(() => {
1577
+ const Me = is(() => {
1553
1578
  var e;
1554
1579
  return ((e = me.value) == null ? void 0 : e.isModified()) ?? !1;
1555
- }, ge);
1556
- function Re() {
1557
- Pe();
1580
+ }, xe);
1581
+ function Fe() {
1582
+ Me();
1558
1583
  }
1559
- function je(e) {
1560
- e || Re();
1584
+ function Ge(e) {
1585
+ e || Fe();
1561
1586
  }
1562
1587
  const {
1563
- breakpoints: he
1588
+ breakpoints: _e
1564
1589
  } = $t(), Bt = (e) => {
1565
1590
  F.open({
1566
1591
  title: t("team.actions.removeMember"),
1567
1592
  message: t("team.removeMember.confirmationMessage", {
1568
1593
  memberName: e.name
1569
1594
  }),
1570
- minWidth: he.value.lg ? 588 : 0,
1595
+ minWidth: _e.value.lg ? 588 : 0,
1571
1596
  primaryActions: {
1572
1597
  text: "Remove",
1573
1598
  close: !1,
1574
1599
  variant: "destructive",
1575
- isLoading: ke
1600
+ isLoading: Se
1576
1601
  },
1577
1602
  secondaryActions: {
1578
1603
  text: "Cancel",
1579
1604
  close: !0
1580
1605
  }
1581
1606
  }).onPrimary(async () => {
1582
- ke.value || (await X.minor(async () => {
1583
- await Se.deleteTeamMember(e.id), await Ie();
1607
+ Se.value || (await X.minor(async () => {
1608
+ await Pe.deleteTeamMember(e.id), await ke();
1584
1609
  }, {
1585
- isLoading: ke,
1610
+ isLoading: Se,
1586
1611
  successMessage: t("team.removeMember.successMessage", {
1587
1612
  memberName: e.name
1588
1613
  })
@@ -1595,35 +1620,35 @@ const Rl = /* @__PURE__ */ oe({
1595
1620
  message: t("team.staffInvite.revoke.message", {
1596
1621
  name: e.name
1597
1622
  }),
1598
- minWidth: he.value.lg ? 588 : 0,
1623
+ minWidth: _e.value.lg ? 588 : 0,
1599
1624
  primaryActions: {
1600
1625
  text: t("team.staffInvite.actions.revoke"),
1601
1626
  close: !1,
1602
1627
  variant: "destructive",
1603
- isLoading: ke
1628
+ isLoading: Se
1604
1629
  },
1605
1630
  secondaryActions: {
1606
1631
  text: t("common.cancel"),
1607
1632
  close: !0
1608
1633
  }
1609
1634
  }).onPrimary(async () => {
1610
- if (!ke.value) {
1611
- ke.value = !0;
1635
+ if (!Se.value) {
1636
+ Se.value = !0;
1612
1637
  try {
1613
- await De.revokeInvite(e.id), _.open({
1638
+ await Ae.revokeInvite(e.id), _.open({
1614
1639
  type: "success",
1615
1640
  title: t("team.staffInvite.revoke.successMessage")
1616
1641
  });
1617
1642
  } catch (a) {
1618
1643
  _.open({
1619
1644
  type: "error",
1620
- title: Ke(a, {
1645
+ title: ze(a, {
1621
1646
  label: "",
1622
1647
  match: "mobile"
1623
1648
  }, t)
1624
1649
  });
1625
1650
  } finally {
1626
- ke.value = !1, F.close(), await Ie();
1651
+ Se.value = !1, F.close(), await ke();
1627
1652
  }
1628
1653
  }
1629
1654
  });
@@ -1635,29 +1660,29 @@ const Rl = /* @__PURE__ */ oe({
1635
1660
  match: e.phoneNumber ? "mobile" : "email"
1636
1661
  };
1637
1662
  try {
1638
- const k = await De.resendInvite(e.id);
1639
- k.warnings.length === 0 && _.open({
1663
+ const w = await Ae.resendInvite(e.id);
1664
+ w.warnings.length === 0 && _.open({
1640
1665
  type: "success",
1641
1666
  title: t("team.staffInvite.resend.sent", {
1642
1667
  label: a.label
1643
1668
  })
1644
1669
  });
1645
- for (const Y of yt(k.warnings, a, t))
1670
+ for (const Y of yt(w.warnings, a, t))
1646
1671
  _.open({
1647
1672
  type: "warning",
1648
1673
  message: Y,
1649
- position: Ze.BOTTOM
1674
+ position: et.BOTTOM
1650
1675
  });
1651
- } catch (k) {
1676
+ } catch (w) {
1652
1677
  _.open({
1653
1678
  type: "error",
1654
- title: Ke(k, a, t)
1655
- }), gt(k) && await Ie();
1679
+ title: ze(w, a, t)
1680
+ }), gt(w) && await ke();
1656
1681
  }
1657
1682
  }
1658
1683
  const Gt = () => {
1659
1684
  H.value = null, Z.value = null, J.value = ae.ADD;
1660
- }, Me = c(), xe = c(), Fe = c(), _e = c(), Ue = c(), nt = I(() => [{
1685
+ }, $e = c(), Ue = c(), Ce = c(), Ie = c(), we = c(), ut = I(() => [{
1661
1686
  label: t("team.status.active"),
1662
1687
  value: "active"
1663
1688
  }, {
@@ -1669,29 +1694,29 @@ const Rl = /* @__PURE__ */ oe({
1669
1694
  return e ? /\bSSO\b/i.test(e) ? e : t("team.loginMethod.ssoProvider", {
1670
1695
  label: e
1671
1696
  }) : t("team.loginMethod.sso");
1672
- }), it = I(() => [{
1697
+ }), mt = I(() => [{
1673
1698
  label: Kt.value,
1674
1699
  value: "sso"
1675
1700
  }, {
1676
1701
  label: t("team.loginMethod.feedme"),
1677
1702
  value: "feedme"
1678
- }]), ut = I(() => {
1703
+ }]), dt = I(() => {
1679
1704
  var e;
1680
1705
  return JSON.stringify({
1681
- businessId: ((e = v.currentBusiness.value) == null ? void 0 : e._id) ?? "",
1706
+ businessId: ((e = f.currentBusiness.value) == null ? void 0 : e._id) ?? "",
1682
1707
  search: j.value.trim(),
1683
- restaurantIds: [...Me.value ?? []].sort(),
1684
- permissionSubjects: [...xe.value ?? []].sort(),
1685
- permissionSetIds: [...Fe.value ?? []].sort(),
1686
- statuses: [..._e.value ?? []].sort(),
1687
- loginMethods: [...Ue.value ?? []].sort()
1708
+ restaurantIds: [...$e.value ?? []].sort(),
1709
+ permissionSubjects: [...Ue.value ?? []].sort(),
1710
+ permissionSetIds: [...Ce.value ?? []].sort(),
1711
+ statuses: [...Ie.value ?? []].sort(),
1712
+ loginMethods: [...we.value ?? []].sort()
1688
1713
  });
1689
- }), mt = I(() => Object.values(os).map((e) => ({
1714
+ }), ct = I(() => Object.values(os).map((e) => ({
1690
1715
  label: e.label,
1691
1716
  value: e.subject
1692
- }))), dt = I(() => [{
1717
+ }))), pt = I(() => [{
1693
1718
  label: t("team.filter.unassigned_label"),
1694
- value: Le
1719
+ value: Be
1695
1720
  }, ...C.permissionSets.value.map((e) => ({
1696
1721
  label: e.name,
1697
1722
  value: e.id
@@ -1699,41 +1724,41 @@ const Rl = /* @__PURE__ */ oe({
1699
1724
  async function Wt() {
1700
1725
  await P.readRoles();
1701
1726
  }
1702
- async function qe(e = r.value) {
1703
- var a, g, k;
1727
+ async function Ke(e = r.value) {
1728
+ var a, g, w;
1704
1729
  B.value = !0;
1705
1730
  try {
1706
- const Y = await Se.readTeamMembersPage({
1707
- limit: Ce,
1708
- offset: (e - 1) * Ce,
1731
+ const Y = await Pe.readTeamMembersPage({
1732
+ limit: Ne,
1733
+ offset: (e - 1) * Ne,
1709
1734
  search: j.value.trim() || void 0,
1710
- restaurantIds: wt(Me.value),
1711
- permissionSubjects: (a = xe.value) != null && a.length ? xe.value : void 0,
1712
- permissionSetIds: wt(Fe.value),
1713
- statuses: (g = _e.value) != null && g.length ? _e.value : void 0,
1714
- loginMethods: (k = Ue.value) != null && k.length ? Ue.value : void 0
1735
+ restaurantIds: kt($e.value),
1736
+ permissionSubjects: (a = Ue.value) != null && a.length ? Ue.value : void 0,
1737
+ permissionSetIds: kt(Ce.value),
1738
+ statuses: (g = Ie.value) != null && g.length ? Ie.value : void 0,
1739
+ loginMethods: (w = we.value) != null && w.length ? we.value : void 0
1715
1740
  });
1716
1741
  h.value = Y.items, b.value = Y.total;
1717
1742
  } finally {
1718
1743
  B.value = !1;
1719
1744
  }
1720
1745
  }
1721
- async function Ie() {
1746
+ async function ke() {
1722
1747
  var a;
1723
- if (!((a = v.currentBusiness.value) != null && a._id)) return;
1724
- await qe(r.value);
1725
- const e = Math.max(1, Math.ceil(b.value / Ce));
1726
- r.value > e && (r.value = e, await qe(r.value));
1748
+ if (!((a = f.currentBusiness.value) != null && a._id)) return;
1749
+ await Ke(r.value);
1750
+ const e = Math.max(1, Math.ceil(b.value / Ne));
1751
+ r.value > e && (r.value = e, await Ke(r.value));
1727
1752
  }
1728
- const me = c(), fe = c(!1), ke = c(!1);
1729
- async function He() {
1730
- ge(), await Ge(), await Ie();
1753
+ const me = c(), fe = c(!1), Se = c(!1);
1754
+ async function Je() {
1755
+ xe(), await We(), await ke();
1731
1756
  }
1732
1757
  async function zt(e) {
1733
1758
  const a = me.value.readDetails(), g = x(a);
1734
1759
  fe.value = !0;
1735
1760
  try {
1736
- const k = await De.createInvite({
1761
+ const w = await Ae.createInvite({
1737
1762
  ...a,
1738
1763
  permissions: e.permissions ?? [],
1739
1764
  customPermissions: e.customPermissions,
@@ -1749,19 +1774,19 @@ const Rl = /* @__PURE__ */ oe({
1749
1774
  title: t("team.addMember.successMessage", {
1750
1775
  memberName: a.displayName
1751
1776
  }),
1752
- position: Ze.BOTTOM
1777
+ position: et.BOTTOM
1753
1778
  });
1754
- for (const Y of yt(k.warnings, g, t, k.result))
1779
+ for (const Y of yt(w.warnings, g, t, w.result))
1755
1780
  _.open({
1756
1781
  type: "warning",
1757
1782
  message: Y,
1758
- position: Ze.BOTTOM
1783
+ position: et.BOTTOM
1759
1784
  });
1760
- await He();
1761
- } catch (k) {
1785
+ await Je();
1786
+ } catch (w) {
1762
1787
  _.open({
1763
1788
  type: "error",
1764
- title: Ke(k, g, t)
1789
+ title: ze(w, g, t)
1765
1790
  });
1766
1791
  } finally {
1767
1792
  fe.value = !1;
@@ -1771,7 +1796,7 @@ const Rl = /* @__PURE__ */ oe({
1771
1796
  const g = x(e);
1772
1797
  fe.value = !0;
1773
1798
  try {
1774
- await De.updateInvite(e._id, xs(e, {
1799
+ await Ae.updateInvite(e._id, xs(e, {
1775
1800
  permissions: a.permissions ?? [],
1776
1801
  customPermissions: a.customPermissions,
1777
1802
  permissionSetIds: a.permissionSetIds,
@@ -1781,12 +1806,12 @@ const Rl = /* @__PURE__ */ oe({
1781
1806
  title: t("team.updateMember.successMessage", {
1782
1807
  memberName: Z.value.name
1783
1808
  })
1784
- }), await He();
1785
- } catch (k) {
1809
+ }), await Je();
1810
+ } catch (w) {
1786
1811
  _.open({
1787
1812
  type: "error",
1788
- title: Ke(k, g, t)
1789
- }), gt(k) && await He();
1813
+ title: ze(w, g, t)
1814
+ }), gt(w) && await Je();
1790
1815
  } finally {
1791
1816
  fe.value = !1;
1792
1817
  }
@@ -1796,7 +1821,7 @@ const Rl = /* @__PURE__ */ oe({
1796
1821
  const e = await me.value.validate();
1797
1822
  if (!e) return;
1798
1823
  const a = J.value === ae.ADD;
1799
- if (a && A.value.length > 0) {
1824
+ if (a && O.value.length > 0) {
1800
1825
  me.value.hasExisting || await zt(e);
1801
1826
  return;
1802
1827
  }
@@ -1806,13 +1831,13 @@ const Rl = /* @__PURE__ */ oe({
1806
1831
  }
1807
1832
  const g = a ? null : me.value.readEdits();
1808
1833
  await X.minor(async () => {
1809
- await (a ? Se.createTeamMember(e) : Se.updateTeamMember(Z.value.id, {
1834
+ await (a ? Pe.createTeamMember(e) : Pe.updateTeamMember(Z.value.id, {
1810
1835
  ...gs(e, Z.value.posUser),
1811
1836
  // '' clears it; the owner's sheet has no field, so it is left out
1812
1837
  ...g ? {
1813
1838
  employeeId: g.employeeId
1814
1839
  } : {}
1815
- })), ge(), await Ge(), await Ie();
1840
+ })), xe(), await We(), await ke();
1816
1841
  }, {
1817
1842
  successMessage: a ? t("team.addMember.successMessage", {
1818
1843
  memberName: e.name
@@ -1825,36 +1850,36 @@ const Rl = /* @__PURE__ */ oe({
1825
1850
  async function Yt() {
1826
1851
  await C.readPermissionSets();
1827
1852
  }
1828
- async function Ge() {
1853
+ async function We() {
1829
1854
  await V.readPermissionAssignments();
1830
1855
  }
1831
- let Ye = !1;
1856
+ let Ze = !1;
1832
1857
  async function Jt({
1833
1858
  pageIndex: e
1834
1859
  }) {
1835
1860
  var a;
1836
- if ((a = v.currentBusiness.value) != null && a._id && !Ye && !(e === 0 && r.value === 1 && h.value.length > 0)) {
1837
- Ye = !0, r.value = e + 1;
1861
+ if ((a = f.currentBusiness.value) != null && a._id && !Ze && !(e === 0 && r.value === 1 && h.value.length > 0)) {
1862
+ Ze = !0, r.value = e + 1;
1838
1863
  try {
1839
- await qe(r.value);
1864
+ await Ke(r.value);
1840
1865
  } finally {
1841
- Ye = !1;
1866
+ Ze = !1;
1842
1867
  }
1843
1868
  }
1844
1869
  }
1845
1870
  const Zt = ls(U, () => {
1846
1871
  j.value = U.value;
1847
1872
  });
1848
- return Pt(Zt), ue(ut, async () => {
1873
+ return Pt(Zt), ue(dt, async () => {
1849
1874
  var e;
1850
- r.value = 1, y.value = !1, (e = v.currentBusiness.value) != null && e._id && (await qe(1), y.value = !0);
1875
+ r.value = 1, y.value = !1, (e = f.currentBusiness.value) != null && e._id && (await Ke(1), y.value = !0);
1851
1876
  }, {
1852
1877
  immediate: !0
1853
- }), ue(v.currentBusiness, async () => {
1878
+ }), ue(f.currentBusiness, async () => {
1854
1879
  var e;
1855
- if ((e = v.currentBusiness.value) != null && e._id)
1880
+ if ((e = f.currentBusiness.value) != null && e._id)
1856
1881
  try {
1857
- await Promise.all([w.readRestaurants(), Yt(), Ge(), f(), Wt()]);
1882
+ await Promise.all([k.readRestaurants(), Yt(), We(), v(), Wt()]);
1858
1883
  } catch (a) {
1859
1884
  console.error("Failed to load team member dependencies:", a), _.open({
1860
1885
  message: a instanceof Error ? a.message : String(a),
@@ -1863,22 +1888,22 @@ const Rl = /* @__PURE__ */ oe({
1863
1888
  }
1864
1889
  }, {
1865
1890
  immediate: !0
1866
- }), T({
1891
+ }), A({
1867
1892
  create: Gt,
1868
1893
  refresh: async () => {
1869
- await Ge(), await Ie();
1894
+ await We(), await ke();
1870
1895
  }
1871
1896
  }), (e, a) => {
1872
- var Ee;
1873
- const g = G("FmSearch"), k = G("FmTable"), Y = G("FmIcon"), le = G("FmButton"), $e = G("FmSideSheet");
1874
- return m(), M(de, null, [p("div", Za, [p("div", Qa, [s(he).xs ? (m(), M("div", sl, [i(g, {
1897
+ var Oe;
1898
+ const g = G("FmSearch"), w = G("FmTable"), Y = G("FmIcon"), le = G("FmButton"), De = G("FmSideSheet");
1899
+ return m(), M(de, null, [p("div", Za, [p("div", Qa, [s(_e).xs ? (m(), M("div", sl, [i(g, {
1875
1900
  modelValue: U.value,
1876
- "onUpdate:modelValue": a[6] || (a[6] = (O) => U.value = O),
1901
+ "onUpdate:modelValue": a[6] || (a[6] = (L) => U.value = L),
1877
1902
  class: "w-[320px] xs:w-full xs:mt-8",
1878
1903
  placeholder: s(t)("team.search.placeholder")
1879
1904
  }, null, 8, ["modelValue", "placeholder"]), p("div", al, [i(ie, {
1880
- modelValue: Me.value,
1881
- "onUpdate:modelValue": a[7] || (a[7] = (O) => Me.value = O),
1905
+ modelValue: $e.value,
1906
+ "onUpdate:modelValue": a[7] || (a[7] = (L) => $e.value = L),
1882
1907
  multiple: "",
1883
1908
  items: W.value,
1884
1909
  variant: "dark",
@@ -1887,48 +1912,48 @@ const Rl = /* @__PURE__ */ oe({
1887
1912
  placeholder: s(t)("team.table.columns.restaurant"),
1888
1913
  class: "!w-auto"
1889
1914
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ie, {
1890
- modelValue: Fe.value,
1891
- "onUpdate:modelValue": a[8] || (a[8] = (O) => Fe.value = O),
1915
+ modelValue: Ce.value,
1916
+ "onUpdate:modelValue": a[8] || (a[8] = (L) => Ce.value = L),
1892
1917
  multiple: "",
1893
1918
  variant: "dark",
1894
1919
  "chip-icon": "account_circle",
1895
- items: dt.value,
1920
+ items: pt.value,
1896
1921
  "selected-prefix": s(t)("team.filter.selected_assigned_role_prefix"),
1897
1922
  placeholder: s(t)("team.filter.assigned_role_placeholder")
1898
1923
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ie, {
1899
- modelValue: xe.value,
1900
- "onUpdate:modelValue": a[9] || (a[9] = (O) => xe.value = O),
1924
+ modelValue: Ue.value,
1925
+ "onUpdate:modelValue": a[9] || (a[9] = (L) => Ue.value = L),
1901
1926
  multiple: "",
1902
1927
  variant: "dark",
1903
1928
  "chip-icon": "settings_account_box",
1904
- items: mt.value,
1929
+ items: ct.value,
1905
1930
  "selected-prefix": s(t)("team.filter.selected_permission_prefix"),
1906
1931
  placeholder: s(t)("team.filter.permission_placeholder")
1907
1932
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), s($) ? (m(), M(de, {
1908
1933
  key: 0
1909
1934
  }, [i(ie, {
1910
- modelValue: _e.value,
1911
- "onUpdate:modelValue": a[10] || (a[10] = (O) => _e.value = O),
1935
+ modelValue: Ie.value,
1936
+ "onUpdate:modelValue": a[10] || (a[10] = (L) => Ie.value = L),
1912
1937
  multiple: "",
1913
1938
  variant: "dark",
1914
1939
  "chip-icon": "check_circle",
1915
1940
  searchable: !1,
1916
- items: nt.value,
1941
+ items: ut.value,
1917
1942
  "selected-prefix": s(t)("team.filter.selected_status_prefix"),
1918
1943
  placeholder: s(t)("team.filter.status_placeholder")
1919
1944
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ie, {
1920
- modelValue: Ue.value,
1921
- "onUpdate:modelValue": a[11] || (a[11] = (O) => Ue.value = O),
1945
+ modelValue: we.value,
1946
+ "onUpdate:modelValue": a[11] || (a[11] = (L) => we.value = L),
1922
1947
  multiple: "",
1923
1948
  variant: "dark",
1924
1949
  "chip-icon": "check_circle",
1925
1950
  searchable: !1,
1926
- items: it.value,
1951
+ items: mt.value,
1927
1952
  "selected-prefix": s(t)("team.filter.selected_login_method_prefix"),
1928
1953
  placeholder: s(t)("team.filter.login_method_placeholder")
1929
- }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])], 64)) : L("", !0)])])) : (m(), M("div", el, [p("div", tl, [i(ie, {
1930
- modelValue: Me.value,
1931
- "onUpdate:modelValue": a[0] || (a[0] = (O) => Me.value = O),
1954
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])], 64)) : T("", !0)])])) : (m(), M("div", el, [p("div", tl, [i(ie, {
1955
+ modelValue: $e.value,
1956
+ "onUpdate:modelValue": a[0] || (a[0] = (L) => $e.value = L),
1932
1957
  multiple: "",
1933
1958
  items: W.value,
1934
1959
  variant: "dark",
@@ -1937,55 +1962,55 @@ const Rl = /* @__PURE__ */ oe({
1937
1962
  placeholder: s(t)("team.table.columns.restaurant"),
1938
1963
  class: "!w-auto"
1939
1964
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ie, {
1940
- modelValue: Fe.value,
1941
- "onUpdate:modelValue": a[1] || (a[1] = (O) => Fe.value = O),
1965
+ modelValue: Ce.value,
1966
+ "onUpdate:modelValue": a[1] || (a[1] = (L) => Ce.value = L),
1942
1967
  multiple: "",
1943
1968
  variant: "dark",
1944
1969
  "chip-icon": "account_circle",
1945
- items: dt.value,
1970
+ items: pt.value,
1946
1971
  "selected-prefix": s(t)("team.filter.selected_assigned_role_prefix"),
1947
1972
  placeholder: s(t)("team.filter.assigned_role_placeholder")
1948
1973
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ie, {
1949
- modelValue: xe.value,
1950
- "onUpdate:modelValue": a[2] || (a[2] = (O) => xe.value = O),
1974
+ modelValue: Ue.value,
1975
+ "onUpdate:modelValue": a[2] || (a[2] = (L) => Ue.value = L),
1951
1976
  multiple: "",
1952
1977
  variant: "dark",
1953
1978
  "chip-icon": "settings_account_box",
1954
- items: mt.value,
1979
+ items: ct.value,
1955
1980
  "selected-prefix": s(t)("team.filter.selected_permission_prefix"),
1956
1981
  placeholder: s(t)("team.filter.permission_placeholder")
1957
1982
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), s($) ? (m(), M(de, {
1958
1983
  key: 0
1959
1984
  }, [i(ie, {
1960
- modelValue: _e.value,
1961
- "onUpdate:modelValue": a[3] || (a[3] = (O) => _e.value = O),
1985
+ modelValue: Ie.value,
1986
+ "onUpdate:modelValue": a[3] || (a[3] = (L) => Ie.value = L),
1962
1987
  multiple: "",
1963
1988
  variant: "dark",
1964
1989
  "chip-icon": "check_circle",
1965
1990
  searchable: !1,
1966
- items: nt.value,
1991
+ items: ut.value,
1967
1992
  "selected-prefix": s(t)("team.filter.selected_status_prefix"),
1968
1993
  placeholder: s(t)("team.filter.status_placeholder")
1969
1994
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i(ie, {
1970
- modelValue: Ue.value,
1971
- "onUpdate:modelValue": a[4] || (a[4] = (O) => Ue.value = O),
1995
+ modelValue: we.value,
1996
+ "onUpdate:modelValue": a[4] || (a[4] = (L) => we.value = L),
1972
1997
  multiple: "",
1973
1998
  variant: "dark",
1974
1999
  "chip-icon": "check_circle",
1975
2000
  searchable: !1,
1976
- items: it.value,
2001
+ items: mt.value,
1977
2002
  "selected-prefix": s(t)("team.filter.selected_login_method_prefix"),
1978
2003
  placeholder: s(t)("team.filter.login_method_placeholder")
1979
- }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])], 64)) : L("", !0)]), i(g, {
2004
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])], 64)) : T("", !0)]), i(g, {
1980
2005
  modelValue: U.value,
1981
- "onUpdate:modelValue": a[5] || (a[5] = (O) => U.value = O),
2006
+ "onUpdate:modelValue": a[5] || (a[5] = (L) => U.value = L),
1982
2007
  class: "w-[320px] xs:w-full xs:mt-8",
1983
2008
  autofocus: "",
1984
2009
  placeholder: s(t)("team.search.placeholder")
1985
- }, null, 8, ["modelValue", "placeholder"])])), (Ee = s(v).currentBusiness.value) != null && Ee._id ? (m(), q(rs, {
2010
+ }, null, 8, ["modelValue", "placeholder"])])), (Oe = s(f).currentBusiness.value) != null && Oe._id ? (m(), q(rs, {
1986
2011
  key: 2
1987
2012
  }, {
1988
- default: te(() => [p("div", ll, [y.value ? L("", !0) : (m(), q(ns, {
2013
+ default: te(() => [p("div", ll, [y.value ? T("", !0) : (m(), q(ns, {
1989
2014
  key: 0
1990
2015
  })), y.value ? (m(), q(us, {
1991
2016
  key: 1,
@@ -1994,50 +2019,50 @@ const Rl = /* @__PURE__ */ oe({
1994
2019
  title: s(t)("team.emptyState.title"),
1995
2020
  subtitle: s(t)("team.emptyState.description")
1996
2021
  }, {
1997
- default: te(() => [(m(), q(k, {
1998
- key: ut.value,
2022
+ default: te(() => [(m(), q(w, {
2023
+ key: dt.value,
1999
2024
  "column-defs": D,
2000
2025
  "row-data": h.value,
2001
- "page-size": Ce,
2002
- "page-count": Math.ceil(b.value / Ce),
2026
+ "page-size": Ne,
2027
+ "page-count": Math.ceil(b.value / Ne),
2003
2028
  "row-count": b.value,
2004
2029
  "fetch-fn": Jt,
2005
- "hide-footer": b.value <= Ce,
2030
+ "hide-footer": b.value <= Ne,
2006
2031
  loading: B.value,
2007
2032
  "pin-header-row": "",
2008
- onRowClick: a[12] || (a[12] = (O) => n(s(Ne).Update, O.original))
2033
+ onRowClick: a[12] || (a[12] = (L) => n(s(Ee).Update, L.original))
2009
2034
  }, null, 8, ["row-data", "page-count", "row-count", "hide-footer", "loading"]))]),
2010
2035
  _: 1
2011
- }, 8, ["is-loading", "is-empty", "title", "subtitle"])) : L("", !0)])]),
2036
+ }, 8, ["is-loading", "is-empty", "title", "subtitle"])) : T("", !0)])]),
2012
2037
  _: 1
2013
- })) : L("", !0)])]), i($e, {
2038
+ })) : T("", !0)])]), i(De, {
2014
2039
  "model-value": pe.value,
2015
2040
  "max-width": 960,
2016
2041
  "close-button": !1,
2017
- "onUpdate:modelValue": je,
2018
- "onOn:clickedAway": s(Pe)
2042
+ "onUpdate:modelValue": Ge,
2043
+ "onOn:clickedAway": s(Me)
2019
2044
  }, {
2020
2045
  "side-sheet-header": te(() => [p("div", ol, [p("p", rl, E(ve.value), 1), i(Y, {
2021
2046
  name: "close",
2022
2047
  size: "md",
2023
2048
  class: "cursor-pointer",
2024
- onClick: s(Pe)
2049
+ onClick: s(Me)
2025
2050
  }, null, 8, ["onClick"])])]),
2026
2051
  "side-sheet-footer": te(() => {
2027
- var O;
2052
+ var L;
2028
2053
  return [p("div", nl, [i(le, {
2029
- label: ye.value,
2054
+ label: he.value,
2030
2055
  size: "md",
2031
2056
  variant: "primary",
2032
2057
  "is-loading": fe.value,
2033
- disabled: fe.value || J.value === ae.ADD && ((O = me.value) == null ? void 0 : O.hasExisting),
2058
+ disabled: fe.value || J.value === ae.ADD && ((L = me.value) == null ? void 0 : L.hasExisting),
2034
2059
  onClick: Rt(Ht, ["prevent"])
2035
2060
  }, null, 8, ["label", "is-loading", "disabled"]), i(le, {
2036
2061
  label: s(t)("common.cancel"),
2037
2062
  size: "md",
2038
2063
  variant: "secondary",
2039
2064
  disabled: fe.value,
2040
- onClick: Re
2065
+ onClick: Fe
2041
2066
  }, null, 8, ["label", "disabled"])])];
2042
2067
  }),
2043
2068
  default: te(() => [pe.value ? (m(), q(Ja, {
@@ -2045,11 +2070,11 @@ const Rl = /* @__PURE__ */ oe({
2045
2070
  ref_key: "memberForm",
2046
2071
  ref: me,
2047
2072
  initialValue: Z.value,
2048
- providers: A.value,
2049
- loading: be.value,
2073
+ providers: O.value,
2074
+ loading: ge.value,
2050
2075
  class: "gap-8",
2051
- onUpdateExisting: Be
2052
- }, null, 8, ["initialValue", "providers", "loading"])) : L("", !0)]),
2076
+ onUpdateExisting: qe
2077
+ }, null, 8, ["initialValue", "providers", "loading"])) : T("", !0)]),
2053
2078
  _: 1
2054
2079
  }, 8, ["model-value", "onOn:clickedAway"])], 64);
2055
2080
  };