@feedmepos/mf-hrm-portal 2.0.6-dev → 2.0.6-dev.1

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 (50) hide show
  1. package/dist/{AuditLogList-BxigxQv3.js → AuditLogList-C23_MiyK.js} +31 -30
  2. package/dist/{EmployeeList-DyvqwZtw.js → EmployeeList-vXPEVqoh.js} +164 -169
  3. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js +71 -0
  4. package/dist/HorizontalSplitter-o860F4xM.js +12 -0
  5. package/dist/Main-CQWe1-SW.js +599 -0
  6. package/dist/{Main-B8tSMq-U.js → Main-DC9H9bAs.js} +11 -10
  7. package/dist/{Main-CtH5MCty.js → Main-k56Iy_zg.js} +8 -7
  8. package/dist/PermissionSetList-B8tJCNpR.js +338 -0
  9. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BPJpVG8_.js +3356 -0
  10. package/dist/{RoleList-jykDD_zm.js → RoleList-C5WA3Kxu.js} +26 -24
  11. package/dist/TeamMemberList-Ic-iWBHd.js +989 -0
  12. package/dist/{TimesheetList-Bk1XF9xy.js → TimesheetList-DlGpcOUp.js} +11 -10
  13. package/dist/{app-BPlaahxK.js → app-D0xH_99A.js} +1310 -937
  14. package/dist/app.js +2 -2
  15. package/dist/{dayjs.min-LweNOSZ_.js → dayjs.min-C1rTVn8X.js} +1 -1
  16. package/dist/{employee-DPfiL6rd.js → employee-BK4sYiRy.js} +21 -20
  17. package/dist/index-C2ubYSVV.js +968 -0
  18. package/dist/{index-BAhsHYNv.js → index-DSAB4vz3.js} +1 -1
  19. package/dist/{index-CBxn7cxI.js → iteration-BSGKcAZm.js} +3416 -4256
  20. package/dist/{lodash-D1uG3PY3.js → lodash-CeTePH4O.js} +1 -1
  21. package/dist/src/api/grant-user/index.d.ts +8 -0
  22. package/dist/src/api/index.d.ts +3 -1
  23. package/dist/src/api/permission-assignment/index.d.ts +3 -0
  24. package/dist/src/api/report-query/index.d.ts +1 -0
  25. package/dist/src/composables/useCustomReportPermissions.d.ts +7 -0
  26. package/dist/src/helpers/permission-set.d.ts +32 -1
  27. package/dist/src/helpers/permission-set.test.d.ts +1 -0
  28. package/dist/src/helpers/rule.d.ts +4 -1
  29. package/dist/src/router/shared.d.ts +2 -1
  30. package/dist/src/stores/grant-user.d.ts +86 -0
  31. package/dist/src/types/grant-user.d.ts +27 -0
  32. package/dist/src/types/report-query.d.ts +1 -0
  33. package/dist/src/views/grant/GrantUserList.vue.d.ts +17 -0
  34. package/dist/src/views/grant/Main.vue.d.ts +2 -0
  35. package/dist/src/views/grant/components/GrantUserForm.vue.d.ts +17 -0
  36. package/dist/src/views/grant/locales/index.d.ts +232 -0
  37. package/dist/src/views/team/components/BasePermission.vue.d.ts +17 -0
  38. package/dist/{team-B1osnB4U.js → team-B25hRkju.js} +1 -1
  39. package/dist/{timesheet-rte2utJf.js → timesheet-C8oy-bxz.js} +10 -9
  40. package/dist/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/{useAppStore-CqrjwnF_.js → useAppStore-WGnUS7Wm.js} +1 -1
  42. package/dist/{useLoading-B5IjfVEP.js → useLoading-BCi2g_rf.js} +1 -1
  43. package/dist/useReportPermissions--LOfl1e-.js +60 -0
  44. package/dist/useRestaurantMap-e9fQJiLC.js +39 -0
  45. package/package.json +2 -2
  46. package/dist/PermissionSetList-DCONmOgn.js +0 -323
  47. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-07Dsea27.js +0 -3092
  48. package/dist/TeamMemberList-DMrPgF1l.js +0 -973
  49. package/dist/useReportPermissions-C4Q29AQJ.js +0 -65
  50. package/dist/useRestaurantMap-D5BNPLKh.js +0 -107
@@ -1,14 +1,16 @@
1
1
  import { defineComponent as he, ref as T, computed as _, onMounted as _e, watch as ue, resolveComponent as y, createBlock as k, openBlock as v, unref as t, withCtx as b, createElementVNode as h, createVNode as p, createCommentVNode as me, createElementBlock as P, Fragment as W, renderList as ae, toDisplayString as M, h as V, createTextVNode as de, resolveDynamicComponent as ce, withModifiers as we, nextTick as pe } from "vue";
2
- import { e as ke, a as w, r as K, h as re, f as Ue, c as ve, d as Z } from "./index-CBxn7cxI.js";
2
+ import { e as w } from "./iteration-BSGKcAZm.js";
3
3
  import { useI18n as ge, useCoreStore as be } from "@feedmepos/mf-common";
4
- import { useSnackbar as ye, components as se, useDialog as Le, useBreakpoints as Ie, FmButtonColorThemeVariant as fe, FmButtonVariant as Ee } from "@feedmepos/ui-library";
5
- import { _ as Se } from "./app-BPlaahxK.js";
6
- import { _ as Pe } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
- import { u as Fe } from "./useAppStore-CqrjwnF_.js";
8
- import { u as xe } from "./useReportPermissions-C4Q29AQJ.js";
9
- import { u as $e, _ as oe, a as Te, b as Be } from "./useRestaurantMap-D5BNPLKh.js";
10
- import { l as ee } from "./lodash-D1uG3PY3.js";
11
- import { u as De } from "./useLoading-B5IjfVEP.js";
4
+ import { useSnackbar as ye, components as se, useDialog as ke, useBreakpoints as Ue, FmButtonColorThemeVariant as ve, FmButtonVariant as Le } from "@feedmepos/ui-library";
5
+ import { _ as Ie } from "./app-D0xH_99A.js";
6
+ import { _ as Ee } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
+ import { e as Se, r as K, h as re, f as Pe, g as fe, a as Z } from "./index-C2ubYSVV.js";
8
+ import { u as Fe } from "./useAppStore-WGnUS7Wm.js";
9
+ import { u as xe } from "./useReportPermissions--LOfl1e-.js";
10
+ import { u as $e, a as Te } from "./useRestaurantMap-e9fQJiLC.js";
11
+ import { l as ee } from "./lodash-CeTePH4O.js";
12
+ import { _ as oe, a as Be } from "./FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js";
13
+ import { u as De } from "./useLoading-BCi2g_rf.js";
12
14
  const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, Ne = { class: "space-y-8" }, Oe = { class: "space-y-8" }, Je = {
13
15
  key: 0,
14
16
  class: "w-50 ml-5 flex flex-row items-start"
@@ -27,7 +29,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
27
29
  })), O = Fe(), J = ye(), G = De(J), { fetchReportPermissions: te, allReportPermissions: j, availableReportKeys: F } = xe(), q = ne, g = T(!1), z = () => {
28
30
  g.value = !g.value, g.value && Y();
29
31
  }, H = _(() => q.id ? l("hr.role.form.update") : l("hr.role.form.add")), Q = _(() => q.id ? l("common.update") : l("common.add")), X = _(() => {
30
- const e = ke.filter(
32
+ const e = Se.filter(
31
33
  (u) => u.subject !== w.F_RULE_SUBJECT.enum.report
32
34
  ).map((u) => K(u)), a = j.value.map((u) => K(u));
33
35
  return [...e, ...a];
@@ -61,7 +63,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
61
63
  });
62
64
  function Y() {
63
65
  var e;
64
- s.value = C(), s.value.name = ((e = d.value) == null ? void 0 : e.name) ?? "", x.value ? (s.value.restaurantIds = U.value.map((a) => a._id), s.value.permissions = X.value.map((a) => a.value)) : d.value && (s.value.restaurantIds = d.value.restaurants.map((a) => a.id), s.value.permissions = d.value.permissions.map((a) => K(a).value).filter((a) => a.startsWith("report:") ? F.value.has(a.split(":")[1]) : !0), s.value.maxDiscountPercentage = ve(
66
+ s.value = C(), s.value.name = ((e = d.value) == null ? void 0 : e.name) ?? "", x.value ? (s.value.restaurantIds = U.value.map((a) => a._id), s.value.permissions = X.value.map((a) => a.value)) : d.value && (s.value.restaurantIds = d.value.restaurants.map((a) => a.id), s.value.permissions = d.value.permissions.map((a) => K(a).value).filter((a) => a.startsWith("report:") ? F.value.has(a.split(":")[1]) : !0), s.value.maxDiscountPercentage = fe(
65
67
  d.value.permissions
66
68
  ));
67
69
  }
@@ -74,7 +76,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
74
76
  restaurantIds: s.value.restaurantIds,
75
77
  role: {
76
78
  name: s.value.name,
77
- permissions: Ue(s.value.permissions, s.value.maxDiscountPercentage)
79
+ permissions: Pe(s.value.permissions, s.value.maxDiscountPercentage)
78
80
  }
79
81
  })), c = async () => {
80
82
  const e = r.value;
@@ -114,7 +116,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
114
116
  ((u = d.value) == null ? void 0 : u.permissions.map((E) => K(E).value)) || C().permissions
115
117
  ) || !ee.isEqual(
116
118
  s.value.maxDiscountPercentage,
117
- d.value ? ve((A = d.value) == null ? void 0 : A.permissions) : C().maxDiscountPercentage
119
+ d.value ? fe((A = d.value) == null ? void 0 : A.permissions) : C().maxDiscountPercentage
118
120
  );
119
121
  },
120
122
  () => {
@@ -225,7 +227,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
225
227
  class: "p-16"
226
228
  }, {
227
229
  default: b(() => [
228
- p(Te, {
230
+ p(Be, {
229
231
  label: n.title
230
232
  }, {
231
233
  default: b(() => [
@@ -295,7 +297,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
295
297
  class: "flex"
296
298
  }, Ze = {
297
299
  class: "flex"
298
- }, da = /* @__PURE__ */ he({
300
+ }, pa = /* @__PURE__ */ he({
299
301
  __name: "RoleList",
300
302
  setup(ne, {
301
303
  expose: le
@@ -315,7 +317,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
315
317
  content: () => V("div", [l("hr.role.tooltip.labels.permission"), ...o.filter((f) => f.subject === r).map((f) => V("div", ["- ", K(f).label]))]),
316
318
  default: () => V(se.FmIcon, {
317
319
  name: "info",
318
- color: fe.NeutralGray400
320
+ color: ve.NeutralGray400
319
321
  })
320
322
  });
321
323
  }
@@ -359,8 +361,8 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
359
361
  class: "w-full flex justify-end items-center"
360
362
  }, [V(se.FmButton, {
361
363
  prependIcon: "delete",
362
- variant: Ee.Tertiary,
363
- textColor: fe.NeutralGray400,
364
+ variant: Le.Tertiary,
365
+ textColor: ve.NeutralGray400,
364
366
  disabled: re(o.row.original.permissions),
365
367
  onClick: (r) => {
366
368
  r.stopPropagation(), d(o.row.original);
@@ -369,7 +371,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
369
371
  }], j = async (o) => {
370
372
  var r;
371
373
  B.value = o._id, await pe(), (r = s.value) == null || r.trigger();
372
- }, F = Fe(), q = Be(), g = _(() => (F.roles.value || []).filter((c) => c.restaurants.some((i) => O.value.includes(i.id))).map((c) => {
374
+ }, F = Fe(), q = Te(), g = _(() => (F.roles.value || []).filter((c) => c.restaurants.some((i) => O.value.includes(i.id))).map((c) => {
373
375
  const i = c.restaurants.map((f) => {
374
376
  const L = q.value[f.id];
375
377
  return {
@@ -390,9 +392,9 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
390
392
  });
391
393
  return f || D;
392
394
  });
393
- }), H = Le(), Q = ye(), {
395
+ }), H = ke(), Q = ye(), {
394
396
  breakpoints: X
395
- } = Ie(), d = (o) => {
397
+ } = Ue(), d = (o) => {
396
398
  H.open({
397
399
  title: l("hr.role.remove.title"),
398
400
  message: l("hr.role.remove.message", {
@@ -444,7 +446,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
444
446
  class: "w-[320px] xs:w-full",
445
447
  autofocus: "",
446
448
  placeholder: t(l)("hr.role.search.placeholder") + " / " + t(l)("hr.restaurant.search.placeholder")
447
- }, null, 8, ["modelValue", "placeholder"])]), t(F).roles.value.length > 0 || t(F).isLoading.value ? (v(), k(Se, {
449
+ }, null, 8, ["modelValue", "placeholder"])]), t(F).roles.value.length > 0 || t(F).isLoading.value ? (v(), k(Ie, {
448
450
  key: 0,
449
451
  class: "overflow-auto"
450
452
  }, {
@@ -484,7 +486,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
484
486
  _: 1
485
487
  })])]),
486
488
  _: 1
487
- })) : (v(), k(t(Pe), {
489
+ })) : (v(), k(t(Ee), {
488
490
  key: 1,
489
491
  title: t(l)("hr.role.noData.title"),
490
492
  subtitle: t(l)("hr.role.noData.subtitle")
@@ -493,5 +495,5 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
493
495
  }
494
496
  });
495
497
  export {
496
- da as default
498
+ pa as default
497
499
  };