@feedmepos/mf-hrm-portal 2.3.3 → 2.4.0

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 (46) hide show
  1. package/dist/{ApprovalCodeList-BvS5dgU3.js → ApprovalCodeList-D62tXKEd.js} +7 -7
  2. package/dist/{AuditLogList-CpX_suVp.js → AuditLogList-DQOdhFJm.js} +825 -835
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BT4DaSaO.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDT1AfXa.js} +2 -2
  4. package/dist/{EmployeeList-CVsnidNV.js → EmployeeList-Bd211chl.js} +8 -8
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-h8toO2k-.js → FormItem.vue_vue_type_script_setup_true_lang-CUBQnkkY.js} +1 -1
  6. package/dist/{GrantUserList-Dyh5kllB.js → GrantUserList-DaUUILOT.js} +8 -8
  7. package/dist/{Main-aoY6s0QA.js → Main-B95BdgQd.js} +5 -5
  8. package/dist/{Main-CRU4YEdj.js → Main-CvGjvEQL.js} +28 -28
  9. package/dist/{Main-OmCnufx6.js → Main-Dh3E2cEf.js} +11 -11
  10. package/dist/{PermissionSetList-B7B3vnRf.js → PermissionSetList-BIzlo_EV.js} +90 -90
  11. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BYYiW77c.js +4181 -0
  12. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-EwU7gHP7.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CSYNrTGr.js} +1 -1
  13. package/dist/{RoleList-B7jLSn2l.js → RoleList-QJV3cGvV.js} +33 -33
  14. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BG5gE0iX.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DsKfRa5Z.js} +1 -1
  15. package/dist/{ScheduleGeneralPage-DK2hKCWE.js → ScheduleGeneralPage-D6NPsdrU.js} +2 -2
  16. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-mMjDR4Nz.js → ScheduleModal.vue_vue_type_script_setup_true_lang-kYGNELLb.js} +3 -3
  17. package/dist/{SchedulePage-Dn4joe9m.js → SchedulePage-CO_ZP2QD.js} +13 -13
  18. package/dist/{SchedulePositionPage-D7u4QBug.js → SchedulePositionPage-DFjWfRwI.js} +3 -3
  19. package/dist/{SelectFilter-BbTj7kMh.js → SelectFilter-B94Z_Fat.js} +1 -1
  20. package/dist/TeamMemberList-BbGMw0jg.js +1150 -0
  21. package/dist/{TimesheetList-B6TIgZba.js → TimesheetList-DiTCj2H7.js} +8 -8
  22. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CF1cWXsG.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-B97k3KNz.js} +3 -3
  23. package/dist/{app-Cfzysb_Z.js → app-BRlNuQIz.js} +2465 -2387
  24. package/dist/app.js +1 -1
  25. package/dist/{approval-code-CWq2ce3u.js → approval-code-D6eLRwC7.js} +1 -1
  26. package/dist/{dayjs.min-NoTESZyy.js → dayjs.min-BaLuYA95.js} +1 -1
  27. package/dist/{employee-BzUt7_wz.js → employee-DF_QGtpu.js} +4 -4
  28. package/dist/{grant-user-q_mkj3Vh.js → grant-user-CdkuTYlZ.js} +1 -1
  29. package/dist/{iteration-DmbHO_Rl.js → iteration-t4kb_i13.js} +1 -1
  30. package/dist/{lodash-DqvpfdBt.js → lodash-Dv0NUeUP.js} +1 -1
  31. package/dist/{restaurant-DJBQY9N5.js → restaurant-D2q9eNtu.js} +578 -581
  32. package/dist/{role-Crd3XL59.js → role-y253W1Ep.js} +19 -20
  33. package/dist/{rule-B1ck-XG6.js → rule-DaFOMP6z.js} +150 -153
  34. package/dist/src/composables/useTenant.d.ts +11 -0
  35. package/dist/src/router/courtGuard.d.ts +4 -0
  36. package/dist/src/stores/team.d.ts +1 -1
  37. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +1 -1
  38. package/dist/style.css +1 -1
  39. package/dist/tsconfig.app.tsbuildinfo +1 -1
  40. package/dist/{useAppStore-TRX-PQD4.js → useAppStore-CIPpnfP7.js} +1 -1
  41. package/dist/{useLoading-W3YSF8OB.js → useLoading-BRCeBVXP.js} +1 -1
  42. package/dist/useReportPermissions-Bveud3kc.js +80 -0
  43. package/package.json +3 -3
  44. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BVOwDcXo.js +0 -4167
  45. package/dist/TeamMemberList-C0nZBhqp.js +0 -1154
  46. package/dist/useReportPermissions-DmMlLiQP.js +0 -82
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as M, ref as S, onMounted as ae, nextTick as le, onUnmounted as ue, resolveComponent as F, createElementBlock as p, openBlock as s, Fragment as C, createElementVNode as U, renderSlot as _, createCommentVNode as w, toDisplayString as J, createVNode as E, normalizeStyle as re, watch as X, defineAsyncComponent as se, computed as z, renderList as T, createBlock as h, withCtx as H, unref as x, resolveDynamicComponent as ie, normalizeClass as de } from "vue";
2
2
  import { useI18n as q, useCoreStore as me } from "@feedmepos/mf-common";
3
- import { f as j, G as ce, U as L } from "./app-Cfzysb_Z.js";
4
- import { l as fe } from "./lodash-DqvpfdBt.js";
3
+ import { O as j, G as ce, U as L } from "./app-BRlNuQIz.js";
4
+ import { l as fe } from "./lodash-Dv0NUeUP.js";
5
5
  const ye = { class: "flex items-center" }, be = {
6
6
  key: 0,
7
7
  class: "ml-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
@@ -1,22 +1,22 @@
1
1
  import { defineComponent as Ce, ref as v, computed as h, watch as Z, resolveComponent as E, createElementBlock as X, openBlock as g, Fragment as Ue, renderSlot as Ke, createVNode as i, unref as l, withCtx as y, createElementVNode as f, createBlock as I, createCommentVNode as B, toDisplayString as j, onUnmounted as Oe, isRef as be, normalizeClass as ke, createTextVNode as ye, withModifiers as Ge, resolveDynamicComponent as Be, h as ne } from "vue";
2
2
  import { useI18n as Fe, useCoreStore as je } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as Ie, components as Me, useDialog as qe, useBreakpoints as He } from "@feedmepos/ui-library";
4
- import { S as ie } from "./SelectFilter-BbTj7kMh.js";
5
- import { _ as We, b as Je, a as Qe } from "./app-Cfzysb_Z.js";
6
- import { _ as we, u as Ye, H as Ze } from "./FormItem.vue_vue_type_script_setup_true_lang-h8toO2k-.js";
4
+ import { S as ie } from "./SelectFilter-B94Z_Fat.js";
5
+ import { _ as We, b as Je, a as Qe } from "./app-BRlNuQIz.js";
6
+ import { _ as we, u as Ye, H as Ze } from "./FormItem.vue_vue_type_script_setup_true_lang-CUBQnkkY.js";
7
7
  import { _ as Xe } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
8
8
  import { _ as ea } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
9
9
  import { s as aa, _ as la, a as sa, b as ta, c as xe } from "./PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js";
10
10
  import { u as oa } from "./useDebounce-B8ZPVS5C.js";
11
11
  import { n as ra } from "./string-VNuQNweN.js";
12
- import { u as Re, E as na } from "./employee-BzUt7_wz.js";
13
- import { u as $e } from "./restaurant-DJBQY9N5.js";
14
- import { l as ia } from "./lodash-DqvpfdBt.js";
12
+ import { u as Re, E as na } from "./employee-DF_QGtpu.js";
13
+ import { u as $e } from "./restaurant-D2q9eNtu.js";
14
+ import { l as ia } from "./lodash-Dv0NUeUP.js";
15
15
  import { _ as Ee } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
16
16
  import { u as ua } from "./useDiscardConfirm-CzZSPyvh.js";
17
- import { u as Le } from "./useLoading-W3YSF8OB.js";
17
+ import { u as Le } from "./useLoading-BRCeBVXP.js";
18
18
  import { c as Ve } from "./object-Dwyg2LgX.js";
19
- import { u as ge } from "./role-Crd3XL59.js";
19
+ import { u as ge } from "./role-y253W1Ep.js";
20
20
  /* empty css */
21
21
  const ma = { class: "flex w-full items-center justify-between" }, ca = { class: "fm-typo-en-title-md-600" }, da = { class: "space-y-40" }, pa = { class: "flex flex-row gap-16" }, fa = { class: "space-y-16" }, va = { class: "flex gap-8 items-center justify-start" }, Se = 4, ya = /* @__PURE__ */ Ce({
22
22
  __name: "EmployeeForm",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as r, openBlock as c, createElementVNode as o, ref as m, computed as f, defineComponent as p, renderSlot as l, createCommentVNode as _, toDisplayString as i } from "vue";
2
- import { a as y } from "./app-Cfzysb_Z.js";
2
+ import { a as y } from "./app-BRlNuQIz.js";
3
3
  const h = {};
4
4
  function v(t, e) {
5
5
  return c(), r("div", null, [...e[0] || (e[0] = [
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as X, ref as S, computed as f, watch as ue, resolveComponent as v, createElementBlock as D, openBlock as w, Fragment as E, renderSlot as de, createVNode as l, unref as s, withCtx as g, createElementVNode as o, toDisplayString as _, isRef as H, renderList as me, createBlock as pe, createCommentVNode as fe, withModifiers as W, createTextVNode as J, normalizeClass as ve, h as p } from "vue";
2
- import { d as ge } from "./dayjs.min-NoTESZyy.js";
2
+ import { d as ge } from "./dayjs.min-BaLuYA95.js";
3
3
  import { useI18n as Z } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as ee, components as K, useDialog as _e, useBreakpoints as ye, FmButtonVariant as O } from "@feedmepos/ui-library";
5
- import { S as A } from "./SelectFilter-BbTj7kMh.js";
6
- import { _ as he } from "./app-Cfzysb_Z.js";
7
- import { _ as Q, u as Ue, H as xe } from "./FormItem.vue_vue_type_script_setup_true_lang-h8toO2k-.js";
5
+ import { S as A } from "./SelectFilter-B94Z_Fat.js";
6
+ import { _ as he } from "./app-BRlNuQIz.js";
7
+ import { _ as Q, u as Ue, H as xe } from "./FormItem.vue_vue_type_script_setup_true_lang-CUBQnkkY.js";
8
8
  import { _ as be } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
9
- import { u as te } from "./useLoading-W3YSF8OB.js";
10
- import { u as ae } from "./grant-user-q_mkj3Vh.js";
11
- import { u as se } from "./restaurant-DJBQY9N5.js";
12
- import { u as re } from "./role-Crd3XL59.js";
9
+ import { u as te } from "./useLoading-BRCeBVXP.js";
10
+ import { u as ae } from "./grant-user-CdkuTYlZ.js";
11
+ import { u as se } from "./restaurant-D2q9eNtu.js";
12
+ import { u as re } from "./role-y253W1Ep.js";
13
13
  import { _ as Ve } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
14
14
  const ke = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, we = { class: "flex gap-8 items-center justify-start" }, Se = /* @__PURE__ */ X({
15
15
  __name: "GrantUserForm",
@@ -4,11 +4,11 @@ import { useI18n as E, useCoreStore as $ } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as I } from "@feedmepos/ui-library";
5
5
  import { _ as z } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
6
6
  import { _ as M } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
7
- import { u as j } from "./restaurant-DJBQY9N5.js";
8
- import { u as H } from "./role-Crd3XL59.js";
9
- import { u as J } from "./grant-user-q_mkj3Vh.js";
10
- import { u as K } from "./approval-code-CWq2ce3u.js";
11
- import { R as n } from "./app-Cfzysb_Z.js";
7
+ import { u as j } from "./restaurant-D2q9eNtu.js";
8
+ import { u as H } from "./role-y253W1Ep.js";
9
+ import { u as J } from "./grant-user-CdkuTYlZ.js";
10
+ import { u as K } from "./approval-code-D6eLRwC7.js";
11
+ import { R as n } from "./app-BRlNuQIz.js";
12
12
  const Q = { class: "space-y-24" }, ue = /* @__PURE__ */ D({
13
13
  __name: "Main",
14
14
  setup(W) {
@@ -1,22 +1,22 @@
1
- import { defineComponent as M, ref as R, computed as s, resolveComponent as i, createBlock as c, openBlock as p, withCtx as l, createElementVNode as S, createVNode as d, resolveDynamicComponent as g, createCommentVNode as y, createTextVNode as A, toDisplayString as C } from "vue";
1
+ import { defineComponent as C, ref as R, computed as s, resolveComponent as i, createBlock as c, openBlock as p, withCtx as u, createElementVNode as S, createVNode as d, resolveDynamicComponent as g, createCommentVNode as y, createTextVNode as A, toDisplayString as F } from "vue";
2
2
  import { useRouter as N, useRoute as h } from "vue-router";
3
3
  import { useI18n as k } from "@feedmepos/mf-common";
4
4
  import { _ as x } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
5
- import { _ as F } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
- import { u as w } from "./restaurant-DJBQY9N5.js";
5
+ import { _ as w } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
+ import { u as $ } from "./restaurant-D2q9eNtu.js";
7
7
  import "@feedmepos/ui-library";
8
- import "./rule-B1ck-XG6.js";
9
- import "./lodash-DqvpfdBt.js";
10
- import "./iteration-DmbHO_Rl.js";
11
- import "./useAppStore-TRX-PQD4.js";
12
- import { R as v } from "./app-Cfzysb_Z.js";
13
- import "./role-Crd3XL59.js";
8
+ import "./rule-DaFOMP6z.js";
9
+ import "./lodash-Dv0NUeUP.js";
10
+ import "./iteration-t4kb_i13.js";
11
+ import { u as q, R as v } from "./app-BRlNuQIz.js";
12
+ import "./useAppStore-CIPpnfP7.js";
13
+ import "./role-y253W1Ep.js";
14
14
  /* empty css */
15
- import "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-EwU7gHP7.js";
16
- const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
15
+ import "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CSYNrTGr.js";
16
+ const D = { class: "space-y-24" }, te = /* @__PURE__ */ C({
17
17
  __name: "Main",
18
- setup(q) {
19
- const { t: o } = k(), b = N(), B = h(), { readRestaurants: T } = w(), _ = R(), f = R(), a = s({
18
+ setup(I) {
19
+ const { t: o } = k(), b = N(), B = h(), { readRestaurants: T } = $(), { isFoodCourt: L } = q(), _ = R(), f = R(), a = s({
20
20
  get: () => B.name === v.TEAM_ROLE ? "role" : "member",
21
21
  set: (e) => {
22
22
  b.push({
@@ -25,8 +25,8 @@ const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
25
25
  });
26
26
  }
27
27
  });
28
- T();
29
- const r = s(() => u.value.find((e) => e.value === a.value) || u.value[0]), u = s(() => [
28
+ L.value || T();
29
+ const r = s(() => l.value.find((e) => e.value === a.value) || l.value[0]), l = s(() => [
30
30
  {
31
31
  label: o("team.title"),
32
32
  subTitle: o("team.subtitle"),
@@ -48,17 +48,17 @@ const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
48
48
  }
49
49
  ]);
50
50
  return (e, n) => {
51
- const L = i("FmSpacer"), V = i("FmTabs"), E = i("RouterView");
52
- return p(), c(F, {
51
+ const V = i("FmSpacer"), E = i("FmTabs"), M = i("RouterView");
52
+ return p(), c(w, {
53
53
  heading: r.value.label
54
54
  }, {
55
- "sub-heading": l(() => [
56
- A(C(r.value.subTitle), 1)
55
+ "sub-heading": u(() => [
56
+ A(F(r.value.subTitle), 1)
57
57
  ]),
58
- "append-heading": l(() => {
58
+ "append-heading": u(() => {
59
59
  var t;
60
60
  return [
61
- d(L),
61
+ d(V),
62
62
  (t = r.value) != null && t.createButtonLabel ? (p(), c(x, {
63
63
  key: 0,
64
64
  icon: "add",
@@ -67,15 +67,15 @@ const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
67
67
  }, null, 8, ["label"])) : y("", !0)
68
68
  ];
69
69
  }),
70
- default: l(() => [
71
- S("div", $, [
72
- d(V, {
70
+ default: u(() => [
71
+ S("div", D, [
72
+ d(E, {
73
73
  modelValue: a.value,
74
74
  "onUpdate:modelValue": n[1] || (n[1] = (t) => a.value = t),
75
- items: u.value
75
+ items: l.value
76
76
  }, null, 8, ["modelValue", "items"]),
77
- d(E, null, {
78
- default: l(({ Component: t }) => [
77
+ d(M, null, {
78
+ default: u(({ Component: t }) => [
79
79
  (p(), c(g(t), {
80
80
  ref: (m) => {
81
81
  a.value === "member" && (_.value = m), a.value === "role" && (f.value = m);
@@ -92,5 +92,5 @@ const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
92
92
  }
93
93
  });
94
94
  export {
95
- Z as default
95
+ te as default
96
96
  };
@@ -4,19 +4,19 @@ import { useCoreStore as uf, useI18n as vf } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as pf } from "@feedmepos/ui-library";
5
5
  import { _ as df } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
6
6
  import { _ as mf } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
7
- import { u as gf } from "./restaurant-DJBQY9N5.js";
8
- import { u as _f } from "./role-Crd3XL59.js";
7
+ import { u as gf } from "./restaurant-D2q9eNtu.js";
8
+ import { u as _f } from "./role-y253W1Ep.js";
9
9
  /* empty css */
10
- import "./employee-BzUt7_wz.js";
11
- import "./lodash-DqvpfdBt.js";
12
- import "./useAppStore-TRX-PQD4.js";
13
- import "./iteration-DmbHO_Rl.js";
10
+ import "./employee-DF_QGtpu.js";
11
+ import "./lodash-Dv0NUeUP.js";
12
+ import "./useAppStore-CIPpnfP7.js";
13
+ import "./iteration-t4kb_i13.js";
14
+ import { R as pt } from "./app-BRlNuQIz.js";
14
15
  /* empty css */
15
- import { R as pt } from "./app-Cfzysb_Z.js";
16
- import "./rule-B1ck-XG6.js";
17
- import "./useReportPermissions-DmMlLiQP.js";
18
- import "./dayjs.min-NoTESZyy.js";
19
- import "./TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CF1cWXsG.js";
16
+ import "./rule-DaFOMP6z.js";
17
+ import "./useReportPermissions-Bveud3kc.js";
18
+ import "./dayjs.min-BaLuYA95.js";
19
+ import "./TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-B97k3KNz.js";
20
20
  var Nn = {};
21
21
  /*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
22
22
  var qt = {};
@@ -1,17 +1,17 @@
1
- import { defineComponent as Z, ref as v, computed as b, watch as ue, resolveComponent as h, createBlock as de, openBlock as ee, unref as r, withCtx as C, createVNode as m, createElementVNode as y, toDisplayString as G, nextTick as pe, onMounted as fe, createElementBlock as ve, Fragment as Se, h as S } from "vue";
2
- import { useI18n as se, useCoreStore as be } from "@feedmepos/mf-common";
1
+ import { defineComponent as Z, ref as v, computed as b, watch as ue, resolveComponent as h, createBlock as de, openBlock as ee, unref as r, withCtx as k, createVNode as m, createElementVNode as y, toDisplayString as G, nextTick as pe, onMounted as fe, createElementBlock as ve, Fragment as Se, h as S } from "vue";
2
+ import { useI18n as se } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as oe, useDialog as te, useBreakpoints as ne, components as H } from "@feedmepos/ui-library";
4
- import { c as Q, _ as he } from "./app-Cfzysb_Z.js";
4
+ import { d as Q, u as be, _ as he } from "./app-BRlNuQIz.js";
5
5
  import { _ as _e } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
6
6
  import { _ as ge } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
7
- import { u as ie, c as M, d as ae, p as Y, i as Pe, b as ye, m as A, n as we, o as xe, k as Fe, l as ke, v as Ce } from "./rule-B1ck-XG6.js";
8
- import { l as T } from "./lodash-DqvpfdBt.js";
9
- import { c as Ie } from "./iteration-DmbHO_Rl.js";
7
+ import { u as ie, c as W, d as ae, p as Y, i as Pe, b as ye, m as A, n as we, o as xe, k as Fe, l as ke, v as Ce } from "./rule-DaFOMP6z.js";
8
+ import { l as T } from "./lodash-Dv0NUeUP.js";
9
+ import { c as Ie } from "./iteration-t4kb_i13.js";
10
10
  import { u as Ve } from "./useDiscardConfirm-CzZSPyvh.js";
11
- import { u as Re } from "./useLoading-W3YSF8OB.js";
12
- import { _ as Ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BVOwDcXo.js";
13
- import { A as je } from "./restaurant-DJBQY9N5.js";
14
- const Te = { class: "flex w-full items-center justify-between" }, $e = { class: "fm-typo-en-title-md-600" }, Be = { class: "fm-typo-en-title-sm-600 mt-24" }, Le = { class: "flex items-center justify-start gap-8" }, Ae = /* @__PURE__ */ Z({
11
+ import { u as Re } from "./useLoading-BRCeBVXP.js";
12
+ import { _ as Ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BYYiW77c.js";
13
+ import { A as je } from "./restaurant-D2q9eNtu.js";
14
+ const Te = { class: "flex w-full items-center justify-between" }, $e = { class: "fm-typo-en-title-md-600" }, Le = { class: "fm-typo-en-title-sm-600 mt-24" }, Ae = { class: "flex items-center justify-start gap-8" }, Be = /* @__PURE__ */ Z({
15
15
  __name: "PermissionSetForm",
16
16
  props: {
17
17
  modelValue: {
@@ -19,20 +19,20 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
19
19
  default: () => ({})
20
20
  }
21
21
  },
22
- setup(K, { expose: D }) {
23
- const o = K, { t: i } = se(), f = v(!1), $ = b(() => {
22
+ setup(M, { expose: B }) {
23
+ const o = M, { t: i } = se(), f = v(!1), $ = b(() => {
24
24
  var e;
25
25
  return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
26
- }), I = v(), N = oe(), w = te(), { breakpoints: V } = ne(), R = Re(N), l = ie(), d = v({ ...o.modelValue }), a = v([]), p = v([]), B = [(e) => !!e || i("permissionSet.form.nameRequired")], O = b(() => {
26
+ }), C = v(), D = oe(), w = te(), { breakpoints: I } = ne(), V = Re(D), l = ie(), d = v({ ...o.modelValue }), a = v([]), p = v([]), L = [(e) => !!e || i("permissionSet.form.nameRequired")], N = b(() => {
27
27
  var e;
28
28
  return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
29
- }), q = b(
29
+ }), O = b(
30
30
  () => l.permissionSets.value.filter((e) => {
31
31
  var s;
32
32
  return e.id !== ((s = o.modelValue) == null ? void 0 : s.id);
33
33
  }).map((e) => ({ label: e.name, value: e.id }))
34
- ), E = b(
35
- () => M(a.value, l.permissionSets.value)
34
+ ), R = b(
35
+ () => W(a.value, l.permissionSets.value)
36
36
  ), {
37
37
  fetchCustomReportPermissions: n,
38
38
  customReportPermissions: t,
@@ -43,7 +43,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
43
43
  const e = new Set(_);
44
44
  for (const s of t.value) e.add(s.subject);
45
45
  return e;
46
- }), z = b(() => {
46
+ }), q = b(() => {
47
47
  const e = /* @__PURE__ */ new Set();
48
48
  for (const s of Y)
49
49
  s.category === Q.reports && e.add(s.subject);
@@ -51,12 +51,12 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
51
51
  s.category === Q.reports && e.add(s.subject);
52
52
  return e;
53
53
  }), P = v({ name: "", permissionSetIds: [], userPermissions: [] });
54
- async function U() {
54
+ async function z() {
55
55
  var s, u;
56
56
  await pe(), f.value = !f.value, d.value = { ...o.modelValue }, a.value = ((s = o.modelValue) == null ? void 0 : s.permissionSetIds) ?? [];
57
57
  const e = ((u = o.modelValue) == null ? void 0 : u.permissions) ?? [];
58
58
  p.value = ye(
59
- A(E.value),
59
+ A(R.value),
60
60
  e
61
61
  ), P.value = {
62
62
  name: d.value.name ?? "",
@@ -67,39 +67,39 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
67
67
  ue(f, async (e) => {
68
68
  e && await n();
69
69
  });
70
- const W = Ve(
70
+ const U = Ve(
71
71
  () => !T.isEqual(d.value.name ?? "", P.value.name) || !T.isEqual(a.value, P.value.permissionSetIds) || !T.isEqual(p.value, P.value.userPermissions),
72
72
  () => {
73
73
  f.value = !1;
74
74
  }
75
75
  );
76
76
  function re() {
77
- const e = A(E.value), s = c.value ? g.value : _, u = we(p.value, s), x = xe(u, z.value), F = Fe(x);
77
+ const e = A(R.value), s = c.value ? g.value : _, u = we(p.value, s), x = xe(u, q.value), F = Fe(x);
78
78
  return ke(e, F);
79
79
  }
80
- function J(e) {
80
+ function K(e) {
81
81
  return A(
82
- M(e, l.permissionSets.value)
82
+ W(e, l.permissionSets.value)
83
83
  );
84
84
  }
85
- function X(e) {
86
- p.value = J(e);
85
+ function J(e) {
86
+ p.value = K(e);
87
87
  }
88
88
  function le(e) {
89
89
  const s = [...e ?? []];
90
90
  if (T.isEqual(s, a.value)) return;
91
91
  const u = !T.isEqual(
92
92
  p.value,
93
- J(a.value)
93
+ K(a.value)
94
94
  );
95
95
  if (a.value = s, !u) {
96
- X(s);
96
+ J(s);
97
97
  return;
98
98
  }
99
99
  w.open({
100
100
  title: i("permissionSet.form.overrideInherited.title"),
101
101
  message: i("permissionSet.form.overrideInherited.message"),
102
- minWidth: V.value.lg ? 588 : 0,
102
+ minWidth: I.value.lg ? 588 : 0,
103
103
  primaryActions: {
104
104
  text: i("permissionSet.form.overrideInherited.override"),
105
105
  close: !1
@@ -109,103 +109,103 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
109
109
  close: !0
110
110
  }
111
111
  }).onPrimary(() => {
112
- X(s), w.close();
112
+ J(s), w.close();
113
113
  });
114
114
  }
115
115
  async function me() {
116
- var u, x;
117
- const e = await ((u = I.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s = (x = be().currentBusiness.value) == null ? void 0 : x.id;
118
- !(e != null && e.length) && s && R.minor(async () => {
119
- var L;
120
- const F = re();
121
- if ((L = o.modelValue) != null && L.id) {
122
- const k = {
116
+ var u;
117
+ const e = await ((u = C.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s = be().id.value;
118
+ !(e != null && e.length) && s && V.minor(async () => {
119
+ var F;
120
+ const x = re();
121
+ if ((F = o.modelValue) != null && F.id) {
122
+ const E = {
123
123
  name: d.value.name,
124
- permissions: F,
124
+ permissions: x,
125
125
  permissionSetIds: a.value,
126
126
  businessId: d.value.businessId
127
127
  };
128
- await l.updatePermissionSet(o.modelValue.id, k);
128
+ await l.updatePermissionSet(o.modelValue.id, E);
129
129
  } else {
130
- const k = {
130
+ const E = {
131
131
  name: d.value.name,
132
132
  businessId: s,
133
- permissions: F,
133
+ permissions: x,
134
134
  permissionSetIds: a.value
135
135
  };
136
- await l.createPermissionSet(k);
136
+ await l.createPermissionSet(E);
137
137
  }
138
138
  f.value = !1;
139
139
  });
140
140
  }
141
- return D({
142
- trigger: U
141
+ return B({
142
+ trigger: z
143
143
  }), (e, s) => {
144
- const u = h("FmIcon"), x = h("FmTextField"), F = h("FmSelect"), L = h("FmForm"), k = h("FmButton"), ce = h("FmSideSheet");
144
+ const u = h("FmIcon"), x = h("FmTextField"), F = h("FmSelect"), E = h("FmForm"), X = h("FmButton"), ce = h("FmSideSheet");
145
145
  return ee(), de(ce, {
146
146
  modelValue: f.value,
147
147
  "onUpdate:modelValue": s[2] || (s[2] = (j) => f.value = j),
148
148
  "max-width": 960,
149
149
  "close-button": !1,
150
- "onOn:clickedAway": r(W)
150
+ "onOn:clickedAway": r(U)
151
151
  }, {
152
- "side-sheet-header": C(() => [
152
+ "side-sheet-header": k(() => [
153
153
  y("div", Te, [
154
154
  y("p", $e, G($.value), 1),
155
155
  m(u, {
156
156
  name: "close",
157
157
  size: "md",
158
158
  class: "cursor-pointer",
159
- onClick: r(W)
159
+ onClick: r(U)
160
160
  }, null, 8, ["onClick"])
161
161
  ])
162
162
  ]),
163
- "side-sheet-footer": C(() => [
164
- y("div", Le, [
165
- m(k, {
166
- label: O.value,
163
+ "side-sheet-footer": k(() => [
164
+ y("div", Ae, [
165
+ m(X, {
166
+ label: N.value,
167
167
  size: "md",
168
168
  variant: "primary",
169
169
  type: "submit",
170
170
  onClick: me
171
171
  }, null, 8, ["label"]),
172
- m(k, {
172
+ m(X, {
173
173
  label: r(i)("common.cancel"),
174
174
  size: "md",
175
175
  variant: "secondary",
176
- onClick: r(W)
176
+ onClick: r(U)
177
177
  }, null, 8, ["label", "onClick"])
178
178
  ])
179
179
  ]),
180
- default: C(() => [
181
- m(L, {
180
+ default: k(() => [
181
+ m(E, {
182
182
  ref_key: "formRef",
183
- ref: I
183
+ ref: C
184
184
  }, {
185
- default: C(() => [
185
+ default: k(() => [
186
186
  m(x, {
187
187
  modelValue: d.value.name,
188
188
  "onUpdate:modelValue": s[0] || (s[0] = (j) => d.value.name = j),
189
189
  label: r(i)("permissionSet.form.name"),
190
190
  placeholder: r(i)("permissionSet.form.namePlaceholder"),
191
- rules: B
191
+ rules: L
192
192
  }, null, 8, ["modelValue", "label", "placeholder"]),
193
193
  m(F, {
194
194
  "model-value": a.value,
195
195
  multiselect: "",
196
196
  searchable: "",
197
197
  "search-debounce": 300,
198
- items: q.value,
198
+ items: O.value,
199
199
  label: r(i)("permissionSet.form.includedSets"),
200
200
  placeholder: r(i)("permissionSet.form.includedSetsPlaceholder"),
201
201
  class: "mt-16",
202
202
  "onUpdate:modelValue": le
203
203
  }, null, 8, ["model-value", "items", "label", "placeholder"]),
204
- y("div", Be, G(r(i)("team.memberForm.permissions.title")), 1),
204
+ y("div", Le, G(r(i)("team.memberForm.permissions.title")), 1),
205
205
  m(Ee, {
206
206
  modelValue: p.value,
207
207
  "onUpdate:modelValue": s[1] || (s[1] = (j) => p.value = j),
208
- "inherit-permissions": E.value,
208
+ "inherit-permissions": R.value,
209
209
  class: "mt-16"
210
210
  }, null, 8, ["modelValue", "inherit-permissions"])
211
211
  ]),
@@ -218,24 +218,24 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
218
218
  }
219
219
  }), De = { class: "space-y-8" }, Ne = { class: "flex justify-end xs:px-16" }, Oe = { class: "flex flex-col h-full overflow-auto" }, es = /* @__PURE__ */ Z({
220
220
  __name: "PermissionSetList",
221
- setup(K, { expose: D }) {
222
- const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(), $ = oe(), I = te(), { breakpoints: N } = ne(), w = v(""), V = b(() => {
221
+ setup(M, { expose: B }) {
222
+ const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(), $ = oe(), C = te(), { breakpoints: D } = ne(), w = v(""), I = b(() => {
223
223
  var n;
224
224
  return (n = d.value) == null ? void 0 : n.filter((t) => {
225
225
  const c = w.value.toLowerCase();
226
226
  return t.name.toLowerCase().includes(c);
227
227
  });
228
- }), R = v(), l = ie(), d = b(
228
+ }), V = v(), l = ie(), d = b(
229
229
  () => l.permissionSets.value
230
230
  ), a = v();
231
231
  async function p() {
232
232
  await l.readPermissionSets();
233
233
  }
234
- function B(n) {
234
+ function L(n) {
235
235
  var t;
236
- a.value = n, (t = R.value) == null || t.trigger();
236
+ a.value = n, (t = V.value) == null || t.trigger();
237
237
  }
238
- const O = [
238
+ const N = [
239
239
  {
240
240
  accessorKey: "name",
241
241
  header: () => o("permissionSet.table.columns.name")
@@ -245,10 +245,10 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
245
245
  header: () => o("permissionSet.table.columns.permissions"),
246
246
  enableSorting: !1,
247
247
  cell(n) {
248
- const t = n.row.original, c = M(
248
+ const t = n.row.original, c = W(
249
249
  [t.id],
250
250
  l.permissionSets.value
251
- ), _ = A(c), g = _.length, z = Ce(
251
+ ), _ = A(c), g = _.length, q = Ce(
252
252
  _,
253
253
  i.value
254
254
  );
@@ -264,8 +264,8 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
264
264
  }),
265
265
  content: () => S("div", [
266
266
  o("team.labels.permission"),
267
- ...z.map(
268
- (P, U) => S("div", { key: `${P}-${U}` }, `- ${P}`)
267
+ ...q.map(
268
+ (P, z) => S("div", { key: `${P}-${z}` }, `- ${P}`)
269
269
  )
270
270
  ])
271
271
  }
@@ -291,10 +291,10 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
291
291
  [
292
292
  S(ge, {
293
293
  items: [
294
- { label: o("common.update"), onClick: () => B(t) },
294
+ { label: o("common.update"), onClick: () => L(t) },
295
295
  {
296
296
  label: o("common.remove"),
297
- onClick: () => E(t),
297
+ onClick: () => R(t),
298
298
  itemClass: "text-fm-color-typo-error"
299
299
  }
300
300
  ]
@@ -305,15 +305,15 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
305
305
  enableSorting: !1
306
306
  }
307
307
  ];
308
- function q() {
308
+ function O() {
309
309
  var n;
310
- a.value = void 0, (n = R.value) == null || n.trigger();
310
+ a.value = void 0, (n = V.value) == null || n.trigger();
311
311
  }
312
- async function E(n) {
313
- I.open({
312
+ async function R(n) {
313
+ C.open({
314
314
  title: o("permissionSet.form.delete.title"),
315
315
  message: o("permissionSet.form.delete.confirmationMessage", { permissionSetName: n.name }),
316
- minWidth: N.value.lg ? 588 : 0,
316
+ minWidth: D.value.lg ? 588 : 0,
317
317
  primaryActions: {
318
318
  text: o("common.remove"),
319
319
  close: !1,
@@ -332,19 +332,19 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
332
332
  }) : o("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : t instanceof Error ? t.message : `${t}`;
333
333
  $.open({ message: c, type: "error" });
334
334
  }
335
- I.close();
335
+ C.close();
336
336
  });
337
337
  }
338
338
  return fe(() => {
339
339
  p(), f();
340
- }), D({
341
- create: q
340
+ }), B({
341
+ create: O
342
342
  }), (n, t) => {
343
343
  const c = h("FmSearch"), _ = h("FmTable");
344
344
  return ee(), ve(Se, null, [
345
- m(Ae, {
345
+ m(Be, {
346
346
  ref_key: "permissionSetFormRef",
347
- ref: R,
347
+ ref: V,
348
348
  "model-value": a.value
349
349
  }, null, 8, ["model-value"]),
350
350
  y("div", De, [
@@ -358,25 +358,25 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
358
358
  }, null, 8, ["modelValue", "placeholder"])
359
359
  ]),
360
360
  m(he, null, {
361
- default: C(() => [
361
+ default: k(() => [
362
362
  y("div", Oe, [
363
363
  m(_e, {
364
364
  "is-loading": r(l).isLoading.value,
365
- "is-empty": V.value.length === 0,
365
+ "is-empty": I.value.length === 0,
366
366
  "collapse-at": !1,
367
367
  title: r(o)("permissionSet.noData.title"),
368
368
  subtitle: r(o)("permissionSet.noData.subtitle")
369
369
  }, {
370
- default: C(() => [
370
+ default: k(() => [
371
371
  m(_, {
372
- "column-defs": O,
373
- "row-data": V.value,
374
- "page-size": V.value.length,
372
+ "column-defs": N,
373
+ "row-data": I.value,
374
+ "page-size": I.value.length,
375
375
  loading: r(l).isLoading.value,
376
376
  "pin-header-row": "",
377
377
  "hide-footer": "",
378
378
  "shrink-at": !1,
379
- onRowClick: t[1] || (t[1] = (g) => B(g.original))
379
+ onRowClick: t[1] || (t[1] = (g) => L(g.original))
380
380
  }, null, 8, ["row-data", "page-size", "loading"])
381
381
  ]),
382
382
  _: 1