@feedmepos/mf-hrm-portal 2.3.2-dev.14 → 2.3.2-dev.16

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