@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
@@ -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-BgvuJL8G.js";
8
- import { u as H } from "./role-D8G5QOG1.js";
9
- import { u as J } from "./grant-user-CostZ0Md.js";
10
- import { u as K } from "./approval-code-B7rpc4Oe.js";
11
- import { R as n } from "./app-C37qvNnc.js";
7
+ import { u as j } from "./restaurant-CDJ3VjdH.js";
8
+ import { u as H } from "./role-BDRWt87n.js";
9
+ import { u as J } from "./grant-user-jeTFzGU1.js";
10
+ import { u as K } from "./approval-code-CTgj9q6m.js";
11
+ import { R as n } from "./app-B9qAxMj1.js";
12
12
  const Q = { class: "space-y-24" }, ue = /* @__PURE__ */ D({
13
13
  __name: "Main",
14
14
  setup(W) {
@@ -2,7 +2,7 @@ import { defineComponent as G, ref as i, computed as y, resolveComponent as x, c
2
2
  import { useI18n as K, useCoreStore as re, FeedMeAuth as ce } from "@feedmepos/mf-common";
3
3
  import { useBreakpoints as W, useSnackbar as ie, useDialog as de, components as me, SnackbarPosition as pe } from "@feedmepos/ui-library";
4
4
  import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
5
- import { t as fe, f as ye, c as _e, r as ve, i as H, d as ge, p as xe, o as he } from "./app-C37qvNnc.js";
5
+ import { t as fe, f as ye, c as _e, r as ve, i as H, d as ge, p as xe, o as he } from "./app-B9qAxMj1.js";
6
6
  import { _ as Pe } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
7
7
  const be = { class: "flex w-full flex-col items-center gap-8 pt-[4px]" }, ke = { class: "fm-typo-en-title-sm-600 text-center" }, we = { class: "py-[4px]" }, Fe = {
8
8
  class: "flex items-center justify-center gap-4 rounded-[12px] bg-fm-color-neutral-gray-100 px-16 py-[20px]",
@@ -1,17 +1,16 @@
1
- import { defineComponent as Z, ref as v, computed as h, watch as ue, resolveComponent as b, createBlock as de, openBlock as ee, unref as r, withCtx as C, createVNode as m, createElementVNode as P, toDisplayString as J, nextTick as pe, onMounted as fe, createElementBlock as ve, Fragment as Se, h as S } from "vue";
2
- import { useI18n as se, useCoreStore as he } from "@feedmepos/mf-common";
1
+ import { defineComponent as Z, ref as v, computed as h, watch as ue, resolveComponent as b, createBlock as de, openBlock as ee, unref as l, withCtx as k, createVNode as m, createElementVNode as P, toDisplayString as J, 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 Q } from "@feedmepos/ui-library";
4
- import { v as X, _ as be, n as _e } from "./app-C37qvNnc.js";
4
+ import { h as X, u as he, _ as be, q as _e } from "./app-B9qAxMj1.js";
5
5
  import { _ as ge } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
6
6
  import { _ as ye } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
7
- import { u as ie, P as M, a as ae, p as Y, $ as Pe, H as we, R as A, B as xe, x as Fe, T as ke, E as Ce, m as Ie } from "./rule-EYBPBkv_.js";
8
- import { l as $ } from "./lodash-C8MGI_QW.js";
9
- import "./index-DPiNc7mn.js";
10
- import { u as Ve } from "./useDiscardConfirm-CzZSPyvh.js";
11
- import { u as Re } from "./useLoading-BtyGXkm_.js";
12
- import { c as je } from "./iteration-CcXrOMQe.js";
13
- import { _ as Ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-e2vu_Mcn.js";
14
- const $e = { class: "flex w-full items-center justify-between" }, Be = { class: "fm-typo-en-title-md-600" }, Le = { class: "fm-typo-en-title-sm-600 mt-24" }, Te = { class: "flex items-center justify-start gap-8" }, Ae = /* @__PURE__ */ Z({
7
+ import { u as ie, P as W, a as ae, p as Y, $ as Pe, H as we, R as B, B as xe, x as Fe, T as ke, E as Ce, m as Ie } from "./rule-EiO87cJJ.js";
8
+ import { l as $ } from "./lodash-CZsDR_DU.js";
9
+ import { c as Ve } from "./iteration-Tyg43nH0.js";
10
+ import { u as Re } from "./useDiscardConfirm-CzZSPyvh.js";
11
+ import { u as je } from "./useLoading-DJHJM5E0.js";
12
+ import { _ as Ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BM9Von-l.js";
13
+ const $e = { class: "flex w-full items-center justify-between" }, Le = { class: "fm-typo-en-title-md-600" }, Te = { class: "fm-typo-en-title-sm-600 mt-24" }, Be = { class: "flex items-center justify-start gap-8" }, Ae = /* @__PURE__ */ Z({
15
14
  __name: "PermissionSetForm",
16
15
  props: {
17
16
  modelValue: {
@@ -19,20 +18,20 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
19
18
  default: () => ({})
20
19
  }
21
20
  },
22
- setup(K, { expose: D }) {
23
- const o = K, { t: i } = se(), f = v(!1), B = h(() => {
21
+ setup(M, { expose: A }) {
22
+ const o = M, { t: i } = se(), f = v(!1), L = h(() => {
24
23
  var e;
25
24
  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([]), L = [(e) => !!e || i("permissionSet.form.nameRequired")], q = h(() => {
25
+ }), C = v(), D = oe(), w = te(), { breakpoints: I } = ne(), V = je(D), r = ie(), d = v({ ...o.modelValue }), a = v([]), p = v([]), T = [(e) => !!e || i("permissionSet.form.nameRequired")], q = h(() => {
27
26
  var e;
28
27
  return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
29
- }), z = h(
30
- () => l.permissionSets.value.filter((e) => {
28
+ }), N = h(
29
+ () => r.permissionSets.value.filter((e) => {
31
30
  var s;
32
31
  return e.id !== ((s = o.modelValue) == null ? void 0 : s.id);
33
32
  }).map((e) => ({ label: e.name, value: e.id }))
34
- ), j = h(
35
- () => M(a.value, l.permissionSets.value)
33
+ ), R = h(
34
+ () => W(a.value, r.permissionSets.value)
36
35
  ), {
37
36
  fetchCustomReportPermissions: n,
38
37
  customReportPermissions: t,
@@ -43,7 +42,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
43
42
  const e = new Set(_);
44
43
  for (const s of t.value) e.add(s.subject);
45
44
  return e;
46
- }), O = h(() => {
45
+ }), z = h(() => {
47
46
  const e = /* @__PURE__ */ new Set();
48
47
  for (const s of Y)
49
48
  s.category === X.reports && e.add(s.subject);
@@ -51,55 +50,55 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
51
50
  s.category === X.reports && e.add(s.subject);
52
51
  return e;
53
52
  }), y = v({ name: "", permissionSetIds: [], userPermissions: [] });
54
- async function U() {
53
+ async function O() {
55
54
  var s, u;
56
55
  await pe(), f.value = !f.value, d.value = { ...o.modelValue }, a.value = ((s = o.modelValue) == null ? void 0 : s.permissionSetIds) ?? [];
57
56
  const e = ((u = o.modelValue) == null ? void 0 : u.permissions) ?? [];
58
57
  p.value = we(
59
- A(j.value),
58
+ B(R.value),
60
59
  e
61
60
  ), y.value = {
62
61
  name: d.value.name ?? "",
63
62
  permissionSetIds: [...a.value],
64
- userPermissions: je(p.value)
63
+ userPermissions: Ve(p.value)
65
64
  };
66
65
  }
67
66
  ue(f, async (e) => {
68
67
  e && await n();
69
68
  });
70
- const W = Ve(
69
+ const U = Re(
71
70
  () => !$.isEqual(d.value.name ?? "", y.value.name) || !$.isEqual(a.value, y.value.permissionSetIds) || !$.isEqual(p.value, y.value.userPermissions),
72
71
  () => {
73
72
  f.value = !1;
74
73
  }
75
74
  );
76
- function re() {
77
- const e = A(j.value), s = c.value ? g.value : _, u = xe(p.value, s), x = Fe(u, O.value), F = ke(x);
75
+ function le() {
76
+ const e = B(R.value), s = c.value ? g.value : _, u = xe(p.value, s), x = Fe(u, z.value), F = ke(x);
78
77
  return Ce(e, F);
79
78
  }
80
- function H(e) {
81
- return A(
82
- M(e, l.permissionSets.value)
79
+ function K(e) {
80
+ return B(
81
+ W(e, r.permissionSets.value)
83
82
  );
84
83
  }
85
- function G(e) {
86
- p.value = H(e);
84
+ function H(e) {
85
+ p.value = K(e);
87
86
  }
88
- function le(e) {
87
+ function re(e) {
89
88
  const s = [...e ?? []];
90
89
  if ($.isEqual(s, a.value)) return;
91
90
  const u = !$.isEqual(
92
91
  p.value,
93
- H(a.value)
92
+ K(a.value)
94
93
  );
95
94
  if (a.value = s, !u) {
96
- G(s);
95
+ H(s);
97
96
  return;
98
97
  }
99
98
  w.open({
100
99
  title: i("permissionSet.form.overrideInherited.title"),
101
100
  message: i("permissionSet.form.overrideInherited.message"),
102
- minWidth: V.value.lg ? 588 : 0,
101
+ minWidth: I.value.lg ? 588 : 0,
103
102
  primaryActions: {
104
103
  text: i("permissionSet.form.overrideInherited.override"),
105
104
  close: !1
@@ -109,103 +108,103 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
109
108
  close: !0
110
109
  }
111
110
  }).onPrimary(() => {
112
- G(s), w.close();
111
+ H(s), w.close();
113
112
  });
114
113
  }
115
114
  async function me() {
116
- var u, x;
117
- const e = await ((u = I.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s = (x = he().currentBusiness.value) == null ? void 0 : x.id;
118
- !(e != null && e.length) && s && R.minor(async () => {
119
- var T;
120
- const F = re();
121
- if ((T = o.modelValue) != null && T.id) {
122
- const k = {
115
+ var u;
116
+ const e = await ((u = C.value) == null ? void 0 : u.validateInputsWithoutSubmit()), s = he().id.value;
117
+ !(e != null && e.length) && s && V.minor(async () => {
118
+ var F;
119
+ const x = le();
120
+ if ((F = o.modelValue) != null && F.id) {
121
+ const j = {
123
122
  name: d.value.name,
124
- permissions: F,
123
+ permissions: x,
125
124
  permissionSetIds: a.value,
126
125
  businessId: d.value.businessId
127
126
  };
128
- await l.updatePermissionSet(o.modelValue.id, k);
127
+ await r.updatePermissionSet(o.modelValue.id, j);
129
128
  } else {
130
- const k = {
129
+ const j = {
131
130
  name: d.value.name,
132
131
  businessId: s,
133
- permissions: F,
132
+ permissions: x,
134
133
  permissionSetIds: a.value
135
134
  };
136
- await l.createPermissionSet(k);
135
+ await r.createPermissionSet(j);
137
136
  }
138
137
  f.value = !1;
139
138
  });
140
139
  }
141
- return D({
142
- trigger: U
140
+ return A({
141
+ trigger: O
143
142
  }), (e, s) => {
144
- const u = b("FmIcon"), x = b("FmTextField"), F = b("FmSelect"), T = b("FmForm"), k = b("FmButton"), ce = b("FmSideSheet");
143
+ const u = b("FmIcon"), x = b("FmTextField"), F = b("FmSelect"), j = b("FmForm"), G = b("FmButton"), ce = b("FmSideSheet");
145
144
  return ee(), de(ce, {
146
145
  modelValue: f.value,
147
146
  "onUpdate:modelValue": s[2] || (s[2] = (E) => f.value = E),
148
147
  "max-width": 960,
149
148
  "close-button": !1,
150
- "onOn:clickedAway": r(W)
149
+ "onOn:clickedAway": l(U)
151
150
  }, {
152
- "side-sheet-header": C(() => [
151
+ "side-sheet-header": k(() => [
153
152
  P("div", $e, [
154
- P("p", Be, J(B.value), 1),
153
+ P("p", Le, J(L.value), 1),
155
154
  m(u, {
156
155
  name: "close",
157
156
  size: "md",
158
157
  class: "cursor-pointer",
159
- onClick: r(W)
158
+ onClick: l(U)
160
159
  }, null, 8, ["onClick"])
161
160
  ])
162
161
  ]),
163
- "side-sheet-footer": C(() => [
164
- P("div", Te, [
165
- m(k, {
162
+ "side-sheet-footer": k(() => [
163
+ P("div", Be, [
164
+ m(G, {
166
165
  label: q.value,
167
166
  size: "md",
168
167
  variant: "primary",
169
168
  type: "submit",
170
169
  onClick: me
171
170
  }, null, 8, ["label"]),
172
- m(k, {
173
- label: r(i)("common.cancel"),
171
+ m(G, {
172
+ label: l(i)("common.cancel"),
174
173
  size: "md",
175
174
  variant: "secondary",
176
- onClick: r(W)
175
+ onClick: l(U)
177
176
  }, null, 8, ["label", "onClick"])
178
177
  ])
179
178
  ]),
180
- default: C(() => [
181
- m(T, {
179
+ default: k(() => [
180
+ m(j, {
182
181
  ref_key: "formRef",
183
- ref: I
182
+ ref: C
184
183
  }, {
185
- default: C(() => [
184
+ default: k(() => [
186
185
  m(x, {
187
186
  modelValue: d.value.name,
188
187
  "onUpdate:modelValue": s[0] || (s[0] = (E) => d.value.name = E),
189
- label: r(i)("permissionSet.form.name"),
190
- placeholder: r(i)("permissionSet.form.namePlaceholder"),
191
- rules: L
188
+ label: l(i)("permissionSet.form.name"),
189
+ placeholder: l(i)("permissionSet.form.namePlaceholder"),
190
+ rules: T
192
191
  }, null, 8, ["modelValue", "label", "placeholder"]),
193
192
  m(F, {
194
193
  "model-value": a.value,
195
194
  multiselect: "",
196
195
  searchable: "",
197
196
  "search-debounce": 300,
198
- items: z.value,
199
- label: r(i)("permissionSet.form.includedSets"),
200
- placeholder: r(i)("permissionSet.form.includedSetsPlaceholder"),
197
+ items: N.value,
198
+ label: l(i)("permissionSet.form.includedSets"),
199
+ placeholder: l(i)("permissionSet.form.includedSetsPlaceholder"),
201
200
  class: "mt-16",
202
- "onUpdate:modelValue": le
201
+ "onUpdate:modelValue": re
203
202
  }, null, 8, ["model-value", "items", "label", "placeholder"]),
204
- P("div", Le, J(r(i)("team.memberForm.permissions.title")), 1),
203
+ P("div", Te, J(l(i)("team.memberForm.permissions.title")), 1),
205
204
  m(Ee, {
206
205
  modelValue: p.value,
207
206
  "onUpdate:modelValue": s[1] || (s[1] = (E) => p.value = E),
208
- "inherit-permissions": j.value,
207
+ "inherit-permissions": R.value,
209
208
  class: "mt-16"
210
209
  }, null, 8, ["modelValue", "inherit-permissions"])
211
210
  ]),
@@ -216,24 +215,24 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
216
215
  }, 8, ["modelValue", "onOn:clickedAway"]);
217
216
  };
218
217
  }
219
- }), De = { class: "space-y-8" }, Ne = { class: "flex justify-end xs:px-16" }, qe = { class: "flex flex-col h-full overflow-auto" }, es = /* @__PURE__ */ Z({
218
+ }), De = { class: "space-y-8" }, qe = { class: "flex justify-end xs:px-16" }, Ne = { class: "flex flex-col h-full overflow-auto" }, Ze = /* @__PURE__ */ Z({
220
219
  __name: "PermissionSetList",
221
- setup(K, { expose: D }) {
222
- const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(), B = oe(), I = te(), { breakpoints: N } = ne(), w = v(""), V = h(() => {
220
+ setup(M, { expose: A }) {
221
+ const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(), L = oe(), C = te(), { breakpoints: D } = ne(), w = v(""), I = h(() => {
223
222
  var n;
224
223
  return (n = d.value) == null ? void 0 : n.filter((t) => {
225
224
  const c = w.value.toLowerCase();
226
225
  return t.name.toLowerCase().includes(c);
227
226
  });
228
- }), R = v(), l = ie(), d = h(
229
- () => l.permissionSets.value
227
+ }), V = v(), r = ie(), d = h(
228
+ () => r.permissionSets.value
230
229
  ), a = v();
231
230
  async function p() {
232
- await l.readPermissionSets();
231
+ await r.readPermissionSets();
233
232
  }
234
- function L(n) {
233
+ function T(n) {
235
234
  var t;
236
- a.value = n, (t = R.value) == null || t.trigger();
235
+ a.value = n, (t = V.value) == null || t.trigger();
237
236
  }
238
237
  const q = [
239
238
  {
@@ -245,10 +244,10 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
245
244
  header: () => o("permissionSet.table.columns.permissions"),
246
245
  enableSorting: !1,
247
246
  cell(n) {
248
- const t = n.row.original, c = M(
247
+ const t = n.row.original, c = W(
249
248
  [t.id],
250
- l.permissionSets.value
251
- ), _ = A(c), g = _.length, O = Ie(
249
+ r.permissionSets.value
250
+ ), _ = B(c), g = _.length, z = Ie(
252
251
  _,
253
252
  i.value
254
253
  );
@@ -264,8 +263,8 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
264
263
  }),
265
264
  content: () => S("div", [
266
265
  o("team.labels.permission"),
267
- ...O.map(
268
- (y, U) => S("div", { key: `${y}-${U}` }, `- ${y}`)
266
+ ...z.map(
267
+ (y, O) => S("div", { key: `${y}-${O}` }, `- ${y}`)
269
268
  )
270
269
  ])
271
270
  }
@@ -291,10 +290,10 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
291
290
  [
292
291
  S(ye, {
293
292
  items: [
294
- { label: o("common.update"), onClick: () => L(t) },
293
+ { label: o("common.update"), onClick: () => T(t) },
295
294
  {
296
295
  label: o("common.remove"),
297
- onClick: () => j(t),
296
+ onClick: () => R(t),
298
297
  itemClass: "text-fm-color-typo-error"
299
298
  }
300
299
  ]
@@ -305,15 +304,15 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
305
304
  enableSorting: !1
306
305
  }
307
306
  ];
308
- function z() {
307
+ function N() {
309
308
  var n;
310
- a.value = void 0, (n = R.value) == null || n.trigger();
309
+ a.value = void 0, (n = V.value) == null || n.trigger();
311
310
  }
312
- async function j(n) {
313
- I.open({
311
+ async function R(n) {
312
+ C.open({
314
313
  title: o("permissionSet.form.delete.title"),
315
314
  message: o("permissionSet.form.delete.confirmationMessage", { permissionSetName: n.name }),
316
- minWidth: N.value.lg ? 588 : 0,
315
+ minWidth: D.value.lg ? 588 : 0,
317
316
  primaryActions: {
318
317
  text: o("common.remove"),
319
318
  close: !1,
@@ -322,7 +321,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
322
321
  secondaryActions: { text: o("common.cancel"), close: !0 }
323
322
  }).onPrimary(async () => {
324
323
  try {
325
- await l.deletePermissionSet(n.id), B.open({
324
+ await r.deletePermissionSet(n.id), L.open({
326
325
  message: o("permissionSet.form.delete.successMessage", { permissionSetName: n.name }),
327
326
  type: "success"
328
327
  });
@@ -330,53 +329,53 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
330
329
  const c = t instanceof _e && t.status === 409 ? t.message.includes("referenced by") ? o("permissionSet.form.delete.setReferencedConflictError", {
331
330
  permissionSetName: n.name
332
331
  }) : o("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : t instanceof Error ? t.message : `${t}`;
333
- B.open({ message: c, type: "error" });
332
+ L.open({ message: c, type: "error" });
334
333
  }
335
- I.close();
334
+ C.close();
336
335
  });
337
336
  }
338
337
  return fe(() => {
339
338
  p(), f();
340
- }), D({
341
- create: z
339
+ }), A({
340
+ create: N
342
341
  }), (n, t) => {
343
342
  const c = b("FmSearch"), _ = b("FmTable");
344
343
  return ee(), ve(Se, null, [
345
344
  m(Ae, {
346
345
  ref_key: "permissionSetFormRef",
347
- ref: R,
346
+ ref: V,
348
347
  "model-value": a.value
349
348
  }, null, 8, ["model-value"]),
350
349
  P("div", De, [
351
- P("div", Ne, [
350
+ P("div", qe, [
352
351
  m(c, {
353
352
  modelValue: w.value,
354
353
  "onUpdate:modelValue": t[0] || (t[0] = (g) => w.value = g),
355
354
  class: "w-[320px] xs:w-full",
356
355
  autofocus: "",
357
- placeholder: r(o)("permissionSet.search.placeholder")
356
+ placeholder: l(o)("permissionSet.search.placeholder")
358
357
  }, null, 8, ["modelValue", "placeholder"])
359
358
  ]),
360
359
  m(be, null, {
361
- default: C(() => [
362
- P("div", qe, [
360
+ default: k(() => [
361
+ P("div", Ne, [
363
362
  m(ge, {
364
- "is-loading": r(l).isLoading.value,
365
- "is-empty": V.value.length === 0,
363
+ "is-loading": l(r).isLoading.value,
364
+ "is-empty": I.value.length === 0,
366
365
  "collapse-at": !1,
367
- title: r(o)("permissionSet.noData.title"),
368
- subtitle: r(o)("permissionSet.noData.subtitle")
366
+ title: l(o)("permissionSet.noData.title"),
367
+ subtitle: l(o)("permissionSet.noData.subtitle")
369
368
  }, {
370
- default: C(() => [
369
+ default: k(() => [
371
370
  m(_, {
372
371
  "column-defs": q,
373
- "row-data": V.value,
374
- "page-size": V.value.length,
375
- loading: r(l).isLoading.value,
372
+ "row-data": I.value,
373
+ "page-size": I.value.length,
374
+ loading: l(r).isLoading.value,
376
375
  "pin-header-row": "",
377
376
  "hide-footer": "",
378
377
  "shrink-at": !1,
379
- onRowClick: t[1] || (t[1] = (g) => L(g.original))
378
+ onRowClick: t[1] || (t[1] = (g) => T(g.original))
380
379
  }, null, 8, ["row-data", "page-size", "loading"])
381
380
  ]),
382
381
  _: 1
@@ -391,5 +390,5 @@ const $e = { class: "flex w-full items-center justify-between" }, Be = { class:
391
390
  }
392
391
  });
393
392
  export {
394
- es as default
393
+ Ze as default
395
394
  };