@feedmepos/mf-hrm-portal 2.3.2-dev.11 → 2.3.2-dev.12

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 (62) hide show
  1. package/dist/{ApprovalCodeList-DoNoFW6w.js → ApprovalCodeList-CCh9mNJh.js} +7 -7
  2. package/dist/AuditLogList-DCADUZ5s.js +2019 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C1dLOPFb.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BZQNDOg7.js} +10 -10
  4. package/dist/{EmployeeList-BX9gy9WG.js → EmployeeList-CRI7XjzX.js} +8 -8
  5. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-iCgTyICI.js → FormSection.vue_vue_type_script_setup_true_lang-y9_hxba6.js} +1 -1
  6. package/dist/{GrantUserList-DNvmmlDI.js → GrantUserList-DbMngkpK.js} +8 -8
  7. package/dist/{Main-BHmY7VHC.js → Main-BsFUfsmP.js} +29 -29
  8. package/dist/{Main-SzU5H5uC.js → Main-CrnM6wr8.js} +623 -629
  9. package/dist/{Main-2NivoQNg.js → Main-D4Zq5AXi.js} +5 -5
  10. package/dist/{MyPosProfile-2W5mT5d5.js → MyPosProfile-B4cE47im.js} +1 -1
  11. package/dist/{PermissionSetList-BCAm8rHm.js → PermissionSetList-D_2x-mDD.js} +112 -113
  12. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BM9Von-l.js +4212 -0
  13. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DYbfmF2P.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-COX-N0k6.js} +33 -33
  14. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-o4mXv2hT.js → RoleForm.vue_vue_type_script_setup_true_lang-D8V8KWiL.js} +41 -41
  15. package/dist/{RoleList-BXkyCeH0.js → RoleList-BC-c7fqn.js} +105 -96
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DOxRdHY1.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DBbuSrXV.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-4hV53-q6.js → ScheduleGeneralPage-eytzOZQr.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-D5jOHLA1.js → ScheduleModal.vue_vue_type_script_setup_true_lang-CP-kToVO.js} +4 -4
  19. package/dist/{SchedulePage-CqNa_p32.js → SchedulePage-B0QirzAk.js} +17 -17
  20. package/dist/{SchedulePositionPage-7xYBe1xd.js → SchedulePositionPage-BAE-NQvL.js} +3 -3
  21. package/dist/{SelectFilter-Dy2Nv1_D.js → SelectFilter-DrLJhxt6.js} +1 -1
  22. package/dist/TeamMemberList-CHkiL_q9.js +2083 -0
  23. package/dist/TimesheetList-BZuddmzy.js +402 -0
  24. package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-LCUO-ogb.js +58 -0
  25. package/dist/{app-C37qvNnc.js → app-B9qAxMj1.js} +3516 -3470
  26. package/dist/app.js +1 -1
  27. package/dist/{approval-code-B7rpc4Oe.js → approval-code-CTgj9q6m.js} +1 -1
  28. package/dist/{dayjs.min-D35yhU4A.js → dayjs.min-giCSI3N8.js} +22 -22
  29. package/dist/employee-BD3NXG8h.js +210 -0
  30. package/dist/{grant-user-CostZ0Md.js → grant-user-jeTFzGU1.js} +1 -1
  31. package/dist/{index-DPiNc7mn.js → iteration-Tyg43nH0.js} +726 -698
  32. package/dist/{lodash-C8MGI_QW.js → lodash-CZsDR_DU.js} +1 -1
  33. package/dist/{member-grant-CktOoicv.js → member-grant-DsEMLN1N.js} +2 -2
  34. package/dist/restaurant-CDJ3VjdH.js +49 -0
  35. package/dist/role-BDRWt87n.js +91 -0
  36. package/dist/{rule-EYBPBkv_.js → rule-EiO87cJJ.js} +309 -313
  37. package/dist/src/api/employee/index.d.ts +2 -1
  38. package/dist/src/api/timesheet/index.d.ts +1 -1
  39. package/dist/src/composables/useTenant.d.ts +11 -0
  40. package/dist/src/router/courtGuard.d.ts +4 -0
  41. package/dist/src/stores/employee.d.ts +7 -1
  42. package/dist/src/stores/restaurant.d.ts +1 -61
  43. package/dist/src/stores/team.d.ts +1 -1
  44. package/dist/src/stores/timesheet.d.ts +51 -66
  45. package/dist/src/types/timesheet.d.ts +0 -3
  46. package/dist/style.css +1 -1
  47. package/dist/tsconfig.app.tsbuildinfo +1 -1
  48. package/dist/{useAppStore-BmBJPo1_.js → useAppStore-CkUZ2H5h.js} +1 -1
  49. package/dist/{useLoading-BtyGXkm_.js → useLoading-DJHJM5E0.js} +1 -1
  50. package/dist/useReportPermissions-2dfIX21b.js +80 -0
  51. package/dist/{useSsoProviders-CZrTNgfp.js → useSsoProviders-BarGHndw.js} +1 -1
  52. package/package.json +2 -2
  53. package/dist/AuditLogList-D5M0cl8g.js +0 -2026
  54. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-e2vu_Mcn.js +0 -4208
  55. package/dist/TeamMemberList-okhiXdLg.js +0 -2087
  56. package/dist/TimesheetList-BKj9OnJW.js +0 -437
  57. package/dist/employee-Bn6HTMxg.js +0 -172
  58. package/dist/iteration-CcXrOMQe.js +0 -30
  59. package/dist/restaurant-BgvuJL8G.js +0 -52
  60. package/dist/role-D8G5QOG1.js +0 -98
  61. package/dist/timesheet-D6jBeR-V.js +0 -76
  62. package/dist/useReportPermissions-C8z7EA7v.js +0 -82
@@ -1,16 +1,16 @@
1
- import { defineComponent as ze, computed as y, ref as D, watch as q, onMounted as Le, resolveComponent as w, createBlock as E, openBlock as h, unref as o, withCtx as V, createElementVNode as c, createVNode as _, toDisplayString as M, createElementBlock as S, Fragment as z, renderList as ee, createCommentVNode as te, normalizeClass as he } from "vue";
2
- import { l as W } from "./lodash-C8MGI_QW.js";
3
- import { e as be } from "./index-DPiNc7mn.js";
1
+ import { defineComponent as ze, computed as y, ref as D, watch as q, onMounted as Le, resolveComponent as w, createBlock as M, openBlock as h, unref as o, withCtx as V, createElementVNode as c, createVNode as _, toDisplayString as O, createElementBlock as S, Fragment as z, renderList as ee, createCommentVNode as te, normalizeClass as he } from "vue";
2
+ import { l as W } from "./lodash-CZsDR_DU.js";
3
+ import { e as be } from "./iteration-Tyg43nH0.js";
4
4
  import { useI18n as Ne } from "@feedmepos/mf-common";
5
5
  import { useBreakpoints as Ke, useSnackbar as Te, components as qe } from "@feedmepos/ui-library";
6
- import { u as We, _ as Ge, a as _e } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C1dLOPFb.js";
6
+ import { u as We, _ as Ge, a as _e } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BZQNDOg7.js";
7
7
  import { u as Je } from "./useDiscardConfirm-CzZSPyvh.js";
8
- import { u as He } from "./useLoading-BtyGXkm_.js";
9
- import { u as Qe } from "./useReportPermissions-C8z7EA7v.js";
10
- import { s as Xe, j as Ye, A as Ze, S as et } from "./app-C37qvNnc.js";
11
- import { r as ae, h as tt, d as at, s as st, g as ge, e as lt } from "./rule-EYBPBkv_.js";
12
- import { u as rt } from "./restaurant-BgvuJL8G.js";
13
- import { u as ot } from "./role-D8G5QOG1.js";
8
+ import { u as He } from "./useLoading-DJHJM5E0.js";
9
+ import { u as Qe } from "./useReportPermissions-2dfIX21b.js";
10
+ import { l as Xe, n as Ye, A as Ze, S as et } from "./app-B9qAxMj1.js";
11
+ import { r as ae, h as tt, d as at, s as st, g as ge, e as lt } from "./rule-EiO87cJJ.js";
12
+ import { u as rt } from "./restaurant-CDJ3VjdH.js";
13
+ import { u as ot } from "./role-BDRWt87n.js";
14
14
  function Tt(d) {
15
15
  const n = [];
16
16
  for (const { restaurantId: m, roleId: a } of d) {
@@ -135,16 +135,16 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
135
135
  }
136
136
  const p = [];
137
137
  for (const C of H) {
138
- const O = U.getDraft({ subject: e, builderKey: C.builderKey });
139
- O && p.push({ builder: C, form: O.formValue });
138
+ const j = U.getDraft({ subject: e, builderKey: C.builderKey });
139
+ j && p.push({ builder: C, form: j.formValue });
140
140
  }
141
141
  if (p.length === 0) {
142
142
  t == null || t();
143
143
  return;
144
144
  }
145
- const j = I.value.get(e), F = et(
146
- j,
147
- p.map(({ builder: C, form: O }) => ({ builder: C, formValue: O }))
145
+ const E = I.value.get(e), F = et(
146
+ E,
147
+ p.map(({ builder: C, form: j }) => ({ builder: C, formValue: j }))
148
148
  ), k = new Map(I.value);
149
149
  Object.keys(F).length === 0 ? k.delete(e) : k.set(e, F), I.value = k, U.clearDraftsForSubject(e), t == null || t();
150
150
  }
@@ -191,11 +191,11 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
191
191
  s.value.restaurantIds = P.value.map((t) => t._id), s.value.permissions = G.value.map((t) => t.value);
192
192
  else if (b.value) {
193
193
  s.value.restaurantIds = b.value.restaurants.map((F) => F.id);
194
- const t = new Set(G.value.map((F) => F.value)), { values: l, passthrough: p, dropped: j } = st(
194
+ const t = new Set(G.value.map((F) => F.value)), { values: l, passthrough: p, dropped: E } = st(
195
195
  b.value.permissions,
196
196
  t
197
197
  );
198
- J.value = p, j.length > 0 && console.warn("Dropping corrupted role permissions (repaired on save):", j), s.value.permissions = X(l), s.value.maxDiscountPercentage = ge(
198
+ J.value = p, E.length > 0 && console.warn("Dropping corrupted role permissions (repaired on save):", E), s.value.permissions = X(l), s.value.maxDiscountPercentage = ge(
199
199
  b.value.permissions
200
200
  );
201
201
  for (const F of b.value.permissions) {
@@ -251,15 +251,15 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
251
251
  ), R.value = !1;
252
252
  }, Y = y(
253
253
  () => s.value.restaurantIds.filter((e) => P.value.some((t) => t._id === e))
254
- ), Z = y(() => P.value.length > 0 && P.value.length === Y.value.length), je = y(() => Y.value.length > 0 && !Z.value), Ee = () => {
254
+ ), Z = y(() => P.value.length > 0 && P.value.length === Y.value.length), Ee = y(() => Y.value.length > 0 && !Z.value), Me = () => {
255
255
  const e = s.value.restaurantIds.filter((t) => !Y.value.includes(t));
256
256
  Z.value === !0 ? s.value.restaurantIds = e : s.value.restaurantIds = P.value.map((t) => t._id);
257
- }, pe = (e) => e.map((l) => l.value).every((l) => s.value.permissions.includes(l)), Me = (e) => {
257
+ }, pe = (e) => e.map((l) => l.value).every((l) => s.value.permissions.includes(l)), Oe = (e) => {
258
258
  const t = e.filter(
259
259
  (l) => s.value.permissions.includes(l.value)
260
260
  ).length;
261
261
  return t === 1 ? a("hr.role.form.permissionAllowed") : a("hr.role.form.permissionsAllowed", { count: t });
262
- }, Oe = (e) => {
262
+ }, je = (e) => {
263
263
  const t = s.value.permissions.filter(
264
264
  (l) => !e.map((p) => p.value).includes(l)
265
265
  );
@@ -287,8 +287,8 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
287
287
  show: R,
288
288
  trigger: we
289
289
  }), (e, t) => {
290
- const l = w("FmButton"), p = w("FmIcon"), j = w("FmTextField"), F = w("FmCircularProgress"), k = w("FmCheckbox"), C = w("FmFormGroup"), O = w("FmBottomSheet"), Ae = w("FmPopover"), ve = w("fm-button"), Be = w("fm-side-sheet");
291
- return h(), E(Be, {
290
+ const l = w("FmButton"), p = w("FmIcon"), E = w("FmTextField"), F = w("FmCircularProgress"), k = w("FmCheckbox"), C = w("FmFormGroup"), j = w("FmBottomSheet"), Ae = w("FmPopover"), ve = w("fm-button"), Be = w("fm-side-sheet");
291
+ return h(), M(Be, {
292
292
  id: "unit-form",
293
293
  modelValue: R.value,
294
294
  "onUpdate:modelValue": t[5] || (t[5] = (f) => R.value = f),
@@ -303,7 +303,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
303
303
  }, {
304
304
  "side-sheet-header": V(() => [
305
305
  c("div", ut, [
306
- d.showBack ? (h(), E(l, {
306
+ d.showBack ? (h(), M(l, {
307
307
  key: 0,
308
308
  icon: "arrow_back",
309
309
  variant: "tertiary",
@@ -312,7 +312,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
312
312
  "data-testid": "role-form-back",
313
313
  onClick: o(T)
314
314
  }, null, 8, ["onClick"])) : te("", !0),
315
- c("p", it, M(Ve.value), 1),
315
+ c("p", it, O(Ve.value), 1),
316
316
  _(p, {
317
317
  name: "close",
318
318
  size: "md",
@@ -341,8 +341,8 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
341
341
  default: V(() => [
342
342
  c("div", dt, [
343
343
  c("section", mt, [
344
- c("p", ct, M(o(a)("hr.role.form.roleDetail")), 1),
345
- _(j, {
344
+ c("p", ct, O(o(a)("hr.role.form.roleDetail")), 1),
345
+ _(E, {
346
346
  modelValue: s.value.name,
347
347
  "onUpdate:modelValue": t[0] || (t[0] = (f) => s.value.name = f),
348
348
  autofocus: "",
@@ -353,10 +353,10 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
353
353
  }, null, 8, ["modelValue", "rules", "label", "placeholder", "disabled"])
354
354
  ]),
355
355
  c("section", ft, [
356
- c("p", pt, M(o(a)("hr.role.form.restaurant")), 1),
356
+ c("p", pt, O(o(a)("hr.role.form.restaurant")), 1),
357
357
  le.value ? (h(), S("div", vt, [
358
358
  _(F)
359
- ])) : (h(), E(C, {
359
+ ])) : (h(), M(C, {
360
360
  key: 1,
361
361
  modelValue: s.value.restaurantIds,
362
362
  "onUpdate:modelValue": t[2] || (t[2] = (f) => s.value.restaurantIds = f),
@@ -366,13 +366,13 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
366
366
  c("div", ht, [
367
367
  _(k, {
368
368
  "model-value": Z.value,
369
- indeterminate: je.value,
369
+ indeterminate: Ee.value,
370
370
  label: o(a)("hr.role.form.all"),
371
371
  value: "1",
372
372
  disabled: g.value,
373
- "onUpdate:modelValue": Ee
373
+ "onUpdate:modelValue": Me
374
374
  }, null, 8, ["model-value", "indeterminate", "label", "disabled"]),
375
- (h(!0), S(z, null, ee(P.value, (f) => (h(), E(k, {
375
+ (h(!0), S(z, null, ee(P.value, (f) => (h(), M(k, {
376
376
  key: f._id,
377
377
  modelValue: s.value.restaurantIds,
378
378
  "onUpdate:modelValue": t[1] || (t[1] = (r) => s.value.restaurantIds = r),
@@ -387,8 +387,8 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
387
387
  ]),
388
388
  c("section", bt, [
389
389
  c("div", _t, [
390
- c("p", gt, M(o(a)("hr.role.form.permissions")), 1),
391
- c("p", yt, M(o(a)("hr.role.form.permissionsSubtitle")), 1)
390
+ c("p", gt, O(o(a)("hr.role.form.permissions")), 1),
391
+ c("p", yt, O(o(a)("hr.role.form.permissionsSubtitle")), 1)
392
392
  ]),
393
393
  c("div", xt, [
394
394
  (h(!0), S(z, null, ee(De.value, (f) => (h(), S("div", {
@@ -397,10 +397,10 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
397
397
  _(Ge, {
398
398
  layout: "leading",
399
399
  "initially-collapsed": "",
400
- subtitle: Me(f.options)
400
+ subtitle: Oe(f.options)
401
401
  }, {
402
402
  title: V(() => [
403
- c("p", Rt, M(f.title), 1)
403
+ c("p", Rt, O(f.title), 1)
404
404
  ]),
405
405
  default: V(() => [
406
406
  c("div", It, [
@@ -409,7 +409,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
409
409
  label: o(a)("hr.role.form.all"),
410
410
  value: "1",
411
411
  disabled: g.value,
412
- "onUpdate:modelValue": (r) => Oe(f.options)
412
+ "onUpdate:modelValue": (r) => je(f.options)
413
413
  }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"]),
414
414
  t[6] || (t[6] = c("div", { class: "h-px w-full bg-fm-color-neutral-gray-200" }, null, -1)),
415
415
  (h(!0), S(z, null, ee(f.options, (r) => (h(), S("div", {
@@ -426,7 +426,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
426
426
  }, null, 8, ["modelValue", "label", "value", "disabled"]),
427
427
  r.value.startsWith("report:") ? (h(), S(z, { key: 0 }, [
428
428
  s.value.permissions.includes(r.value) ? (h(), S(z, { key: 0 }, [
429
- x.value ? (h(), E(O, {
429
+ x.value ? (h(), M(j, {
430
430
  key: 0,
431
431
  "model-value": Q.value === r.value,
432
432
  header: r.label,
@@ -461,7 +461,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
461
461
  }, null, 8, ["builders", "form-value-for", "has-changes", "disable", "onUpdateForm", "onApply"])
462
462
  ]),
463
463
  _: 2
464
- }, 1032, ["model-value", "header", "onUpdate:modelValue"])) : (h(), E(Ae, {
464
+ }, 1032, ["model-value", "header", "onUpdate:modelValue"])) : (h(), M(Ae, {
465
465
  key: 1,
466
466
  disabled: g.value,
467
467
  "z-index": 100,
@@ -496,7 +496,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
496
496
  ]),
497
497
  _: 2
498
498
  }, 1032, ["disabled", "exclude-el-from-click-outside", "onPopoverChanged"]))
499
- ], 64)) : (h(), E(p, {
499
+ ], 64)) : (h(), M(p, {
500
500
  key: 1,
501
501
  name: "settings",
502
502
  size: "sm",
@@ -505,8 +505,8 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
505
505
  ], 64)) : te("", !0)
506
506
  ]),
507
507
  r.value === "order:discount" && s.value.permissions.includes(r.value) ? (h(), S("div", Vt, [
508
- c("div", Ct, M(o(a)("hr.role.form.maxDiscountPercentage")), 1),
509
- _(j, {
508
+ c("div", Ct, O(o(a)("hr.role.form.maxDiscountPercentage")), 1),
509
+ _(E, {
510
510
  modelValue: s.value.maxDiscountPercentage,
511
511
  "onUpdate:modelValue": t[4] || (t[4] = (i) => s.value.maxDiscountPercentage = i),
512
512
  rules: [
@@ -1,71 +1,80 @@
1
- import { defineComponent as Z, computed as y, ref as S, onMounted as ee, resolveComponent as C, createElementBlock as $, openBlock as _, Fragment as A, createBlock as x, createElementVNode as r, createVNode as m, unref as a, withCtx as R, h as u, renderList as oe, toDisplayString as p, createTextVNode as T, resolveDynamicComponent as M, withModifiers as se, nextTick as z } from "vue";
2
- import { e as d } from "./index-DPiNc7mn.js";
3
- import { useI18n as te } from "@feedmepos/mf-common";
4
- import { useDialog as ne, useSnackbar as re, useBreakpoints as ae, components as K, FmButtonColorThemeVariant as le } from "@feedmepos/ui-library";
5
- import { _ as ie } from "./app-C37qvNnc.js";
6
- import { _ as D } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
7
- import { _ as ce } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
8
- import { f as b, r as me, h as ue } from "./rule-EYBPBkv_.js";
9
- import { u as de } from "./restaurant-BgvuJL8G.js";
10
- import { u as pe } from "./role-D8G5QOG1.js";
11
- import { u as fe } from "./useReportPermissions-C8z7EA7v.js";
12
- import { _ as _e } from "./RoleForm.vue_vue_type_script_setup_true_lang-o4mXv2hT.js";
13
- const he = {
1
+ import { computed as g, defineComponent as se, ref as U, onMounted as te, resolveComponent as x, createElementBlock as $, openBlock as h, Fragment as A, createBlock as R, createElementVNode as r, createVNode as m, unref as a, withCtx as b, h as u, renderList as ne, toDisplayString as p, createTextVNode as T, resolveDynamicComponent as z, withModifiers as re, nextTick as K } from "vue";
2
+ import { e as d } from "./iteration-Tyg43nH0.js";
3
+ import { useI18n as ae } from "@feedmepos/mf-common";
4
+ import { useDialog as le, useSnackbar as ie, useBreakpoints as ce, components as D, FmButtonColorThemeVariant as me } from "@feedmepos/ui-library";
5
+ import { _ as ue } from "./app-B9qAxMj1.js";
6
+ import { _ as W } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
7
+ import { _ as de } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
8
+ import { f as w, r as pe, h as fe } from "./rule-EiO87cJJ.js";
9
+ import { u as j } from "./restaurant-CDJ3VjdH.js";
10
+ import { u as _e } from "./role-BDRWt87n.js";
11
+ import { u as he } from "./useReportPermissions-2dfIX21b.js";
12
+ import { _ as ve } from "./RoleForm.vue_vue_type_script_setup_true_lang-D8V8KWiL.js";
13
+ function ge() {
14
+ const B = j();
15
+ return g(() => {
16
+ const s = {};
17
+ return B.restaurants.value.forEach((f) => {
18
+ s[f._id] = f;
19
+ }), s;
20
+ });
21
+ }
22
+ const ye = {
14
23
  class: "space-y-8"
15
- }, ve = {
24
+ }, Ce = {
16
25
  class: "flex justify-end xs:px-16"
17
- }, ge = {
26
+ }, xe = {
18
27
  class: "flex flex-col h-full overflow-auto"
19
- }, ye = {
28
+ }, Re = {
20
29
  class: "pb-64 sm:hidden md:hidden lg:hidden"
21
- }, Ce = {
30
+ }, be = {
22
31
  class: "space-y-4"
23
- }, xe = {
32
+ }, we = {
24
33
  class: "fm-typo-en-body-lg-600"
25
- }, Re = {
34
+ }, Fe = {
26
35
  class: "text-fm-color-typo-secondary"
27
- }, be = {
36
+ }, Ee = {
28
37
  class: "line-clamp-2"
29
- }, we = {
30
- class: "font-bold"
31
- }, Fe = {
32
- class: "flex items-start gap-4"
33
38
  }, Le = {
34
- class: "line-clamp-2"
35
- }, Ee = {
36
39
  class: "font-bold"
37
40
  }, ke = {
38
41
  class: "flex items-start gap-4"
42
+ }, Se = {
43
+ class: "line-clamp-2"
39
44
  }, Ue = {
45
+ class: "font-bold"
46
+ }, Te = {
47
+ class: "flex items-start gap-4"
48
+ }, Be = {
40
49
  class: "line-clamp-2"
41
- }, Se = {
50
+ }, Me = {
42
51
  class: "font-bold"
43
- }, We = /* @__PURE__ */ Z({
52
+ }, Ge = /* @__PURE__ */ se({
44
53
  __name: "RoleList",
45
- setup(Te, {
46
- expose: W
54
+ setup(B, {
55
+ expose: M
47
56
  }) {
48
57
  const {
49
58
  t: s
50
- } = te(), {
51
- allReportPermissions: w
52
- } = fe(), B = de(), j = y(() => B.restaurants.value), I = y(() => j.value.map((e) => e._id));
59
+ } = ae(), {
60
+ allReportPermissions: f
61
+ } = he(), G = j(), q = g(() => G.restaurants.value), I = g(() => q.value.map((e) => e._id));
53
62
  function F(e, o) {
54
- const n = o === d.F_RULE_SUBJECT.enum.report ? w.value : void 0, t = b(e, o, n);
55
- return ["-", "All"].includes(t) ? () => null : () => u(K.FmTooltip, {
63
+ const n = o === d.F_RULE_SUBJECT.enum.report ? f.value : void 0, t = w(e, o, n);
64
+ return ["-", "All"].includes(t) ? () => null : () => u(D.FmTooltip, {
56
65
  "z-index": "999",
57
66
  placement: "top",
58
67
  class: "ml-2"
59
68
  }, {
60
- content: () => u("div", [s("hr.role.tooltip.labels.permission"), ...e.filter((i) => i.subject === o).map((i) => u("div", ["- ", me(i).label]))]),
61
- default: () => u(K.FmIcon, {
69
+ content: () => u("div", [s("hr.role.tooltip.labels.permission"), ...e.filter((i) => i.subject === o).map((i) => u("div", ["- ", pe(i).label]))]),
70
+ default: () => u(D.FmIcon, {
62
71
  name: "info",
63
- color: le.NeutralGray400
72
+ color: me.NeutralGray400
64
73
  })
65
74
  });
66
75
  }
67
76
  function J(e, o) {
68
- const n = o === d.F_RULE_SUBJECT.enum.report ? w.value : void 0, t = b(e, o, n);
77
+ const n = o === d.F_RULE_SUBJECT.enum.report ? f.value : void 0, t = w(e, o, n);
69
78
  return () => t === "All" ? t : u("div", {
70
79
  class: "flex items-center"
71
80
  }, [t, F(e, o)()]);
@@ -73,15 +82,15 @@ const he = {
73
82
  function N(e) {
74
83
  return [{
75
84
  label: s("hr.role.form.update"),
76
- onClick: () => L(e)
85
+ onClick: () => E(e)
77
86
  }, {
78
87
  label: s("hr.role.remove.title"),
79
- onClick: () => Q(e),
88
+ onClick: () => Z(e),
80
89
  itemClass: "text-fm-color-typo-error",
81
- disabled: ue(e.permissions)
90
+ disabled: fe(e.permissions)
82
91
  }];
83
92
  }
84
- const G = ({
93
+ const H = ({
85
94
  role: e,
86
95
  className: o = ""
87
96
  }) => m("div", {
@@ -89,9 +98,9 @@ const he = {
89
98
  onClick: (n) => {
90
99
  n.stopPropagation();
91
100
  }
92
- }, [m(D, {
101
+ }, [m(W, {
93
102
  items: N(e)
94
- }, null)]), q = [{
103
+ }, null)]), O = [{
95
104
  accessorKey: "name",
96
105
  header: () => s("hr.role.columns.name"),
97
106
  enableSorting: !1
@@ -121,21 +130,21 @@ const he = {
121
130
  cellClass: "pl-16",
122
131
  headerContentClass: "-mx-16"
123
132
  },
124
- cell: (e) => G({
133
+ cell: (e) => H({
125
134
  role: e.row.original,
126
135
  className: "flex w-full items-center justify-end"
127
136
  })
128
- }], L = async (e) => {
137
+ }], E = async (e) => {
129
138
  var o;
130
- g.value = e._id, await z(), (o = U.value) == null || o.trigger();
131
- }, f = pe(), H = y(() => {
132
- const e = f.roles.value || [];
139
+ C.value = e._id, await K(), (o = S.value) == null || o.trigger();
140
+ }, _ = _e(), Q = ge(), X = g(() => {
141
+ const e = _.roles.value || [];
133
142
  return (I.value.length === 0 ? e : e.filter((n) => n.restaurants.some((t) => I.value.includes(t.id)))).map((n) => {
134
143
  const t = n.restaurants.map((i) => {
135
- const c = B.restaurantsById.value.get(i.id);
144
+ const c = Q.value[i.id];
136
145
  return {
137
146
  ...i,
138
- // Prefer live data from restaurantStore so names populate reactively
147
+ // Prefer live data from restaurantMap so names populate reactively
139
148
  // even when restaurants loaded after roles.
140
149
  name: (c == null ? void 0 : c.profile.name) || i.name,
141
150
  code: c == null ? void 0 : c.profile.code
@@ -146,24 +155,24 @@ const he = {
146
155
  restaurants: t
147
156
  };
148
157
  });
149
- }), v = y(() => {
158
+ }), y = g(() => {
150
159
  var o;
151
- return (o = H.value) == null ? void 0 : o.filter((n) => {
152
- const t = k.value.toLowerCase(), i = n.name.toLowerCase().includes(t), l = (n.restaurants || []).some((h) => {
160
+ return (o = X.value) == null ? void 0 : o.filter((n) => {
161
+ const t = k.value.toLowerCase(), i = n.name.toLowerCase().includes(t), l = (n.restaurants || []).some((v) => {
153
162
  var V;
154
- return h.name.toLowerCase().includes(t) || ((V = h.code) == null ? void 0 : V.toLowerCase().includes(t));
163
+ return v.name.toLowerCase().includes(t) || ((V = v.code) == null ? void 0 : V.toLowerCase().includes(t));
155
164
  });
156
165
  return i || l;
157
166
  });
158
- }), P = ne(), E = re(), {
159
- breakpoints: O
160
- } = ae(), Q = (e) => {
167
+ }), P = le(), L = ie(), {
168
+ breakpoints: Y
169
+ } = ce(), Z = (e) => {
161
170
  P.open({
162
171
  title: s("hr.role.remove.title"),
163
172
  message: s("hr.role.remove.message", {
164
173
  name: e.name
165
174
  }),
166
- minWidth: O.value.lg ? 588 : 0,
175
+ minWidth: Y.value.lg ? 588 : 0,
167
176
  primaryActions: {
168
177
  text: s("common.remove"),
169
178
  close: !1,
@@ -174,81 +183,81 @@ const he = {
174
183
  close: !0
175
184
  }
176
185
  }).onPrimary(async () => {
177
- await f.deleteRole(e).then(() => E.open({
186
+ await _.deleteRole(e).then(() => L.open({
178
187
  message: s("hr.role.remove.successMessage", {
179
188
  name: e.name
180
189
  }),
181
190
  type: "success"
182
- })).catch((o) => E.open({
191
+ })).catch((o) => L.open({
183
192
  message: o,
184
193
  type: "error"
185
194
  })), P.close();
186
195
  });
187
- }, k = S(""), U = S(), g = S(void 0);
188
- async function X() {
196
+ }, k = U(""), S = U(), C = U(void 0);
197
+ async function ee() {
189
198
  var e;
190
- g.value = void 0, await z(), (e = U.value) == null || e.trigger();
199
+ C.value = void 0, await K(), (e = S.value) == null || e.trigger();
191
200
  }
192
- async function Y() {
193
- if (f.roles.value.length === 0)
201
+ async function oe() {
202
+ if (_.roles.value.length === 0)
194
203
  try {
195
- await f.readRoles();
204
+ await _.readRoles();
196
205
  } catch (e) {
197
- console.error("Failed to load roles:", e), E.open({
206
+ console.error("Failed to load roles:", e), L.open({
198
207
  message: e instanceof Error ? e.message : String(e),
199
208
  type: "error"
200
209
  });
201
210
  }
202
211
  }
203
- return ee(() => {
204
- Y();
205
- }), W({
206
- create: X
212
+ return te(() => {
213
+ oe();
214
+ }), M({
215
+ create: ee
207
216
  }), (e, o) => {
208
- const n = C("FmSearch"), t = C("FmTable"), i = C("FmListItem"), c = C("FmList");
209
- return _(), $(A, null, [(_(), x(_e, {
210
- id: g.value,
211
- key: g.value,
217
+ const n = x("FmSearch"), t = x("FmTable"), i = x("FmListItem"), c = x("FmList");
218
+ return h(), $(A, null, [(h(), R(ve, {
219
+ id: C.value,
220
+ key: C.value,
212
221
  ref_key: "roleFormRef",
213
- ref: U
214
- }, null, 8, ["id"])), r("div", he, [r("div", ve, [m(n, {
222
+ ref: S
223
+ }, null, 8, ["id"])), r("div", ye, [r("div", Ce, [m(n, {
215
224
  modelValue: k.value,
216
225
  "onUpdate:modelValue": o[0] || (o[0] = (l) => k.value = l),
217
226
  class: "w-[320px] xs:w-full",
218
227
  autofocus: "",
219
228
  placeholder: a(s)("hr.role.search.placeholder") + " / " + a(s)("hr.restaurant.search.placeholder")
220
- }, null, 8, ["modelValue", "placeholder"])]), m(ie, null, {
221
- default: R(() => [r("div", ge, [m(ce, {
222
- "is-loading": a(f).isLoading.value,
223
- "is-empty": v.value.length === 0,
229
+ }, null, 8, ["modelValue", "placeholder"])]), m(ue, null, {
230
+ default: b(() => [r("div", xe, [m(de, {
231
+ "is-loading": a(_).isLoading.value,
232
+ "is-empty": y.value.length === 0,
224
233
  "collapse-at": "xs",
225
234
  title: a(s)("hr.role.noData.title"),
226
235
  subtitle: a(s)("hr.role.noData.subtitle")
227
236
  }, {
228
- default: R(() => [m(t, {
237
+ default: b(() => [m(t, {
229
238
  class: "xs:hidden",
230
- "column-defs": q,
231
- "row-data": v.value,
232
- "page-size": v.value.length,
233
- loading: a(f).isLoading.value,
239
+ "column-defs": O,
240
+ "row-data": y.value,
241
+ "page-size": y.value.length,
242
+ loading: a(_).isLoading.value,
234
243
  "pin-header-row": "",
235
244
  "hide-footer": "",
236
245
  "shrink-at": !1,
237
- onRowClick: o[1] || (o[1] = (l) => L(l.original))
246
+ onRowClick: o[1] || (o[1] = (l) => E(l.original))
238
247
  }, null, 8, ["row-data", "page-size", "loading"])]),
239
248
  _: 1
240
- }, 8, ["is-loading", "is-empty", "title", "subtitle"]), r("div", ye, [m(c, {
249
+ }, 8, ["is-loading", "is-empty", "title", "subtitle"]), r("div", Re, [m(c, {
241
250
  separator: ""
242
251
  }, {
243
- default: R(() => [(_(!0), $(A, null, oe(v.value, (l) => (_(), x(i, {
252
+ default: b(() => [(h(!0), $(A, null, ne(y.value, (l) => (h(), R(i, {
244
253
  key: l._id,
245
254
  class: "py-12 px-16 items-center justify-between",
246
- onClick: (h) => L(l)
255
+ onClick: (v) => E(l)
247
256
  }, {
248
- default: R(() => [r("div", Ce, [r("p", xe, p(l.name), 1), r("div", Re, [r("p", be, [r("span", we, p(a(s)("hr.role.labels.restaurant")) + ":", 1), T(" " + p(l.restaurants.map((h) => h.name).join(", ")), 1)]), r("p", Fe, [r("span", Le, [r("span", Ee, p(a(s)("hr.role.labels.operation")) + ":", 1), T(" " + p(a(b)(l.permissions, a(d.F_RULE_SUBJECT).enum.order)), 1)]), (_(), x(M(F(l.permissions, a(d.F_RULE_SUBJECT).enum.order))))]), r("p", ke, [r("span", Ue, [r("span", Se, p(a(s)("hr.role.labels.report")) + ":", 1), T(" " + p(a(b)(l.permissions, a(d.F_RULE_SUBJECT).enum.report, a(w))), 1)]), (_(), x(M(F(l.permissions, a(d.F_RULE_SUBJECT).enum.report))))])])]), r("div", {
249
- onClick: o[2] || (o[2] = se(() => {
257
+ default: b(() => [r("div", be, [r("p", we, p(l.name), 1), r("div", Fe, [r("p", Ee, [r("span", Le, p(a(s)("hr.role.labels.restaurant")) + ":", 1), T(" " + p(l.restaurants.map((v) => v.name).join(", ")), 1)]), r("p", ke, [r("span", Se, [r("span", Ue, p(a(s)("hr.role.labels.operation")) + ":", 1), T(" " + p(a(w)(l.permissions, a(d.F_RULE_SUBJECT).enum.order)), 1)]), (h(), R(z(F(l.permissions, a(d.F_RULE_SUBJECT).enum.order))))]), r("p", Te, [r("span", Be, [r("span", Me, p(a(s)("hr.role.labels.report")) + ":", 1), T(" " + p(a(w)(l.permissions, a(d.F_RULE_SUBJECT).enum.report, a(f))), 1)]), (h(), R(z(F(l.permissions, a(d.F_RULE_SUBJECT).enum.report))))])])]), r("div", {
258
+ onClick: o[2] || (o[2] = re(() => {
250
259
  }, ["stop"]))
251
- }, [m(D, {
260
+ }, [m(W, {
252
261
  items: N(l)
253
262
  }, null, 8, ["items"])])]),
254
263
  _: 2
@@ -261,5 +270,5 @@ const he = {
261
270
  }
262
271
  });
263
272
  export {
264
- We as default
273
+ Ge as default
265
274
  };
@@ -1,6 +1,6 @@
1
1
  import { ref as k, watch as he, computed as z, reactive as Pe, nextTick as we, defineComponent as Ne, createBlock as ne, openBlock as b, withCtx as T, createElementVNode as i, createVNode as H, toDisplayString as v, unref as o, createElementBlock as E, withDirectives as fe, withKeys as Ce, vModelText as ye, normalizeClass as ge, createTextVNode as V, createCommentVNode as Z, Fragment as Ie, renderList as Se } from "vue";
2
2
  import { useI18n as ie } from "@feedmepos/mf-common";
3
- import { az as oe, p as D, aD as ke, aE as se, aF as pe, y as Ee, aG as $e, K as te, e as _, ay as xe, av as W } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-D5jOHLA1.js";
3
+ import { az as oe, p as D, aD as ke, aE as se, aF as pe, y as Ee, aG as $e, K as te, e as _, ay as xe, av as W } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-CP-kToVO.js";
4
4
  function be() {
5
5
  return oe.map((e) => ({ id: e.id, name: e.name }));
6
6
  }
@@ -2,8 +2,8 @@ import { ref as b, reactive as Y, computed as L, defineComponent as N, createBlo
2
2
  import { useRouter as K } from "vue-router";
3
3
  import { useSnackbar as j } from "@feedmepos/ui-library";
4
4
  import { useCoreStore as F, useI18n as E } from "@feedmepos/mf-common";
5
- import { R as G } from "./app-C37qvNnc.js";
6
- import { b as g, o as A, g as V, V as J, a1 as z, p as U, ay as Q, av as C, aA as X, aB as Z, ai as ee, ax as se } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-D5jOHLA1.js";
5
+ import { R as G } from "./app-B9qAxMj1.js";
6
+ import { b as g, o as A, g as V, V as J, a1 as z, p as U, ay as Q, av as C, aA as X, aB as Z, ai as ee, ax as se } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-CP-kToVO.js";
7
7
  const te = [
8
8
  { key: "payrates", labelKey: "scheduling.general.payRates" },
9
9
  { key: "overtime", labelKey: "scheduling.general.overtime" },
@@ -1,10 +1,10 @@
1
1
  import { onMounted as Re, onBeforeUnmount as $e, ref as S, reactive as T, shallowRef as Ae, watch as Be, computed as Y, defineComponent as xe, createElementBlock as M, openBlock as C, renderSlot as Xe, useAttrs as pa, nextTick as ke, normalizeClass as he, createElementVNode as x, createBlock as ha, mergeProps as va, toDisplayString as z, Teleport as ga, createCommentVNode as G, withDirectives as Da, unref as Ee, vModelText as wa, Fragment as be, renderList as Ha, createTextVNode as Aa, withModifiers as Ea, normalizeStyle as ba } from "vue";
2
2
  import { useRoute as Pa, useRouter as Sa } from "vue-router";
3
3
  import { useCoreStore as Je, useI18n as ka } from "@feedmepos/mf-common";
4
- import { u as Ca } from "./restaurant-BgvuJL8G.js";
5
- import { g, b as p } from "./app-C37qvNnc.js";
6
- import { E as Ce, u as Ze } from "./employee-Bn6HTMxg.js";
7
- import { t as Fe, c as Ma } from "./rule-EYBPBkv_.js";
4
+ import { u as Ca } from "./restaurant-CDJ3VjdH.js";
5
+ import { g, b as p } from "./app-B9qAxMj1.js";
6
+ import { E as Ce, u as Ze } from "./employee-BD3NXG8h.js";
7
+ import { t as Fe, c as Ma } from "./rule-EiO87cJJ.js";
8
8
  function io(e) {
9
9
  let a = null;
10
10
  function t() {