@feedmepos/mf-hrm-portal 1.1.2-dev → 1.1.6-dev

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 (89) hide show
  1. package/dist/{EmployeeList-CKHgrdAO.js → EmployeeList-CP42mLpi.js} +16 -18
  2. package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js → PageLayout.vue_vue_type_script_setup_true_lang-DuwNwJDM.js} +2 -2
  3. package/dist/{RoleList-Bef-7IhW.js → RoleList-CsctaXlu.js} +53 -57
  4. package/dist/TeamMemberList-DtXoUa5K.js +1508 -0
  5. package/dist/{TimesheetList-DVIk0Tis.js → TimesheetList-qaolOL4w.js} +41 -42
  6. package/dist/api/team/index.d.ts +1 -5
  7. package/dist/app-G_Dbs0OJ.js +1202 -0
  8. package/dist/app.js +4 -4
  9. package/dist/components/AppForm.vue.d.ts +2 -3
  10. package/dist/components/CheckboxInput.vue.d.ts +4 -10
  11. package/dist/components/CollapsibleWrapper.vue.d.ts +2 -3
  12. package/dist/components/form/SelectFilter.vue.d.ts +2 -3
  13. package/dist/components/layout/FormColumn.vue.d.ts +3 -6
  14. package/dist/components/layout/FormItem.vue.d.ts +1 -2
  15. package/dist/components/layout/FormSection.vue.d.ts +1 -2
  16. package/dist/components/layout/FullWrapper.vue.d.ts +3 -6
  17. package/dist/components/layout/PageLayout.vue.d.ts +1 -2
  18. package/dist/components/menu/BottomSheetMenu.vue.d.ts +1 -2
  19. package/dist/components/menu/BottomSheetMenuItem.vue.d.ts +3 -6
  20. package/dist/components/table/EmptyDataTemplate/index.vue.d.ts +3 -6
  21. package/dist/composables/useAppStore.d.ts +6 -6
  22. package/dist/composables/useDateRange.d.ts +1 -1
  23. package/dist/composables/useRestaurantMap.d.ts +8 -4
  24. package/dist/composables/useSheet.d.ts +1 -1
  25. package/dist/employee-BTWpYxn5.js +449 -0
  26. package/dist/{index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js → empty-placeholder-ey8LJtN1.js} +2 -43
  27. package/dist/helpers/rule.d.ts +3 -4
  28. package/dist/index-8ift6lz3.js +57 -0
  29. package/dist/{lodash-DpoPPi_j.js → lodash-B5BTJU4_.js} +343 -326
  30. package/dist/{Main-YQ5f-v03.js → main-C370wsCl.js} +1531 -1501
  31. package/dist/router/shared.d.ts +1 -4
  32. package/dist/rule-CM7JgjNr.js +142112 -0
  33. package/dist/stores/employee.d.ts +4 -4
  34. package/dist/stores/role.d.ts +4 -4
  35. package/dist/stores/timesheet.d.ts +19 -19
  36. package/dist/{timesheet-BRQvljNj.js → timesheet-Cy-jSzje.js} +14 -14
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/types/permission.d.ts +4 -1
  39. package/dist/types/team.d.ts +3 -13
  40. package/dist/useAppStore-zINIo0LR.js +93 -0
  41. package/dist/useLoading-CWBRIBiy.js +141 -0
  42. package/dist/{useRestaurantMap-D5BNPLKh.js → useRestaurantMap-CpS9-OSq.js} +7 -7
  43. package/dist/{SelectFilter-NbXrJ4iH.js → useSearch-C25VELOk.js} +101 -90
  44. package/dist/views/hr/employee/{EmployeeForm.vue.d.ts → components/EmployeeForm.vue.d.ts} +7 -10
  45. package/dist/views/team/{member → components}/AddMemberForm.vue.d.ts +0 -1
  46. package/dist/views/team/components/PortalPermissionEditor.vue.d.ts +28 -68
  47. package/dist/views/team/components/TeamMemberBasePermission.vue.d.ts +36 -0
  48. package/dist/views/team/components/{ConditionPermission.vue.d.ts → TeamMemberConditionPermission.vue.d.ts} +1 -14
  49. package/dist/views/team/components/TeamMemberMasterUser.vue.d.ts +718 -0
  50. package/dist/views/team/components/{PosRolePermission.vue.d.ts → TeamMemberRolePermission.vue.d.ts} +1 -14
  51. package/dist/views/team/locales/index.d.ts +4 -176
  52. package/package.json +8 -13
  53. package/dist/AuditLogList-CjrocQS2.js +0 -316
  54. package/dist/Main-HzplGv-e.js +0 -85
  55. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-xQ4fjIxa.js +0 -3050
  56. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
  57. package/dist/RolePermissionList-BzwpQFeO.js +0 -285
  58. package/dist/TeamMemberList-D2Xey_w9.js +0 -949
  59. package/dist/api/audit-log/index.d.ts +0 -10
  60. package/dist/api/permission-assignment/index.d.ts +0 -10
  61. package/dist/api/permission-set/index.d.ts +0 -8
  62. package/dist/app-DUs516v0.js +0 -2592
  63. package/dist/dayjs.min-DVb8OkTL.js +0 -282
  64. package/dist/employee-jH7EJnhi.js +0 -172
  65. package/dist/helpers/permission-set.d.ts +0 -32
  66. package/dist/helpers/portal-user.d.ts +0 -8
  67. package/dist/index-CicR1-Jp.js +0 -8411
  68. package/dist/stores/permission-assignment.d.ts +0 -277
  69. package/dist/stores/permission-set.d.ts +0 -250
  70. package/dist/stores/team.d.ts +0 -288
  71. package/dist/team-CiZSNUQW.js +0 -26
  72. package/dist/types/audit-log.d.ts +0 -19
  73. package/dist/types/permission-assignment.d.ts +0 -20
  74. package/dist/types/permission-set.d.ts +0 -20
  75. package/dist/useAppStore-RzLLN5d9.js +0 -180
  76. package/dist/useLoading-1OqFn86y.js +0 -99
  77. package/dist/useSearch-B6WK1LBB.js +0 -15
  78. package/dist/views/audit-log/locales/index.d.ts +0 -211
  79. package/dist/views/team/Main.vue.d.ts +0 -2
  80. package/dist/views/team/components/BasePermission.vue.d.ts +0 -64
  81. package/dist/views/team/components/InheritPermissionTooltip.vue.d.ts +0 -14
  82. package/dist/views/team/components/PermissionWithTooltip.vue.d.ts +0 -14
  83. package/dist/views/team/member/TeamMemberList.vue.d.ts +0 -4
  84. package/dist/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -55
  85. package/dist/views/team/role/RolePermissionForm.vue.d.ts +0 -19
  86. package/dist/views/team/role/RolePermissionList.vue.d.ts +0 -5
  87. /package/dist/views/{audit-log/AuditLogList.vue.d.ts → hr/main.vue.d.ts} +0 -0
  88. /package/dist/views/{hr/Main.vue.d.ts → team/TeamMemberList.vue.d.ts} +0 -0
  89. /package/dist/views/team/{member → components}/MemberInfo.vue.d.ts +0 -0
@@ -1,15 +1,13 @@
1
- import { createElementBlock as $, openBlock as h, createElementVNode as c, toRaw as Ce, defineComponent as he, ref as g, computed as F, watch as _e, resolveComponent as v, Fragment as G, renderSlot as Me, createVNode as n, unref as o, withCtx as y, createBlock as B, createCommentVNode as Q, isRef as re, renderList as ge, toDisplayString as K, onMounted as Ie, h as se, createTextVNode as $e, withModifiers as Oe } from "vue";
1
+ import { openBlock as h, createElementBlock as $, createElementVNode as c, toRaw as Ce, defineComponent as he, ref as g, computed as F, watch as _e, resolveComponent as v, Fragment as G, renderSlot as Me, createVNode as n, unref as o, withCtx as y, createBlock as B, createCommentVNode as Q, isRef as re, renderList as ge, toDisplayString as K, onMounted as Ie, createTextVNode as $e, withModifiers as Oe, h as se } from "vue";
2
2
  import { useCoreStore as be, useI18n as Ve, RestaurantSelector as me } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as Fe, components as xe, useDialog as Le, useBreakpoints as Be, FmButtonVariant as De } from "@feedmepos/ui-library";
4
- import { _ as Ne, S as ce } from "./SelectFilter-NbXrJ4iH.js";
5
- import { _ as Pe } from "./app-DUs516v0.js";
6
- import { _ as Te } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
- import { u as we } from "./useSearch-B6WK1LBB.js";
8
- import { u as ke, E as ze } from "./employee-jH7EJnhi.js";
9
- import { l as Ae } from "./lodash-DpoPPi_j.js";
10
- import { u as je, _ as de, a as pe, b as Ke } from "./useRestaurantMap-D5BNPLKh.js";
11
- import { u as Ge } from "./useLoading-1OqFn86y.js";
12
- import { u as ne } from "./useAppStore-RzLLN5d9.js";
4
+ import { _ as Ne, u as we, S as ce } from "./useSearch-C25VELOk.js";
5
+ import { _ as Pe } from "./app-G_Dbs0OJ.js";
6
+ import { u as Te, _ as ze } from "./useLoading-CWBRIBiy.js";
7
+ import { u as ke, E as Ae } from "./employee-BTWpYxn5.js";
8
+ import { l as je } from "./lodash-B5BTJU4_.js";
9
+ import { u as Ke, _ as de, a as pe, b as Ge } from "./useRestaurantMap-CpS9-OSq.js";
10
+ import { u as ne } from "./rule-CM7JgjNr.js";
13
11
  const qe = {};
14
12
  function He(S, O) {
15
13
  return h(), $("div", null, [...O[0] || (O[0] = [
@@ -38,7 +36,7 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
38
36
  }
39
37
  },
40
38
  setup(S, { expose: O }) {
41
- const u = ne(), E = be(), d = ke(), q = Fe(), H = Ge(q), { t: i } = Ve(), f = g(!1), L = g(!0), R = (a) => {
39
+ const u = ne(), E = be(), d = ke(), q = Fe(), H = Te(q), { t: i } = Ve(), f = g(!1), L = g(!0), R = (a) => {
42
40
  s.value = a ? fe(a) : D(), x.value = fe(s.value), l.value = [], b.value = s.value.restaurants.map((e) => e.restaurantId), s.value.passcode && (l.value = s.value.passcode.split(""), t.value = !0), L.value = !a, f.value = !0;
43
41
  };
44
42
  function D() {
@@ -105,11 +103,11 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
105
103
  t.value && (t.value = !1, l.value = []);
106
104
  }
107
105
  async function _() {
108
- const a = await ze.generateEmployeePasscode();
106
+ const a = await Ae.generateEmployeePasscode();
109
107
  t.value = !1, l.value = a.split("");
110
108
  }
111
- const V = je(
112
- () => !Ae.isEqual(s.value, x.value),
109
+ const V = Ke(
110
+ () => !je.isEqual(s.value, x.value),
113
111
  () => {
114
112
  f.value = !1;
115
113
  }
@@ -358,7 +356,7 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
358
356
  class: "mr-4"
359
357
  }, dl = {
360
358
  class: "text-fm-color-typo-secondary"
361
- }, kl = /* @__PURE__ */ he({
359
+ }, xl = /* @__PURE__ */ he({
362
360
  __name: "EmployeeList",
363
361
  setup(S, {
364
362
  expose: O
@@ -376,7 +374,7 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
376
374
  const p = !E.value || t.restaurants.some((V) => E.value.includes(V.restaurantId)), _ = !U.value || t.restaurants.some((V) => V.roleId && U.value.includes(V.roleId));
377
375
  return p && _ && L([t.code, t.name, `${t.restaurants.map((V) => N(V)).join(" ")}`]);
378
376
  });
379
- }), D = Ke(), N = (l) => {
377
+ }), D = Ge(), N = (l) => {
380
378
  var _;
381
379
  const t = (_ = D.value[l.restaurantId]) == null ? void 0 : _.profile.code;
382
380
  let p = l.restaurantName;
@@ -594,7 +592,7 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
594
592
  _: 1
595
593
  })])]),
596
594
  _: 1
597
- })) : (h(), B(o(Te), {
595
+ })) : (h(), B(o(ze), {
598
596
  key: 1,
599
597
  title: o(u)("hr.employee.noData.title"),
600
598
  subtitle: o(u)("hr.employee.noData.subtitle")
@@ -603,5 +601,5 @@ const We = { class: "fm-typo-en-title-md-600" }, Qe = { class: "space-y-40" }, X
603
601
  }
604
602
  });
605
603
  export {
606
- kl as default
604
+ xl as default
607
605
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as l, createElementBlock as a, openBlock as r, normalizeClass as t, createElementVNode as o, renderSlot as s, toDisplayString as d } from "vue";
1
+ import { defineComponent as l, openBlock as a, createElementBlock as r, createElementVNode as o, renderSlot as s, toDisplayString as d, normalizeClass as t } from "vue";
2
2
  const i = {
3
3
  class: /* @__PURE__ */ t([
4
4
  "flex flex-col",
@@ -19,7 +19,7 @@ const i = {
19
19
  heading: {}
20
20
  },
21
21
  setup(n) {
22
- return (e, m) => (r(), a("div", i, [
22
+ return (e, m) => (a(), r("div", i, [
23
23
  o("div", c, [
24
24
  s(e.$slots, "prepend-heading"),
25
25
  o("div", null, [
@@ -1,14 +1,12 @@
1
- import { defineComponent as ce, ref as T, computed as _, onMounted as pe, watch as xe, resolveComponent as y, createBlock as C, openBlock as p, unref as t, withCtx as b, createElementVNode as f, createVNode as c, createCommentVNode as re, createElementBlock as L, Fragment as q, renderList as G, toDisplayString as P, h as F, createTextVNode as ne, resolveDynamicComponent as ie, withModifiers as Fe, nextTick as ue } from "vue";
2
- import { e as Ce, a as E, r as K, h as le, f as Re, c as de, d as j } from "./index-CicR1-Jp.js";
3
- import { useI18n as ve, useCoreStore as fe } from "@feedmepos/mf-common";
4
- import { useSnackbar as _e, components as W, useDialog as Ve, useBreakpoints as we, FmButtonColorThemeVariant as me, FmButtonVariant as ke } from "@feedmepos/ui-library";
5
- import { _ as Ie } from "./app-DUs516v0.js";
6
- import { _ as Le } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
- import { u as he } from "./useAppStore-RzLLN5d9.js";
8
- import { u as Ue, _ as se, a as Se, b as $e } from "./useRestaurantMap-D5BNPLKh.js";
9
- import { l as z } from "./lodash-DpoPPi_j.js";
10
- import { u as Ee } from "./useLoading-1OqFn86y.js";
11
- const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, De = { class: "space-y-8" }, Pe = { class: "space-y-8" }, Me = {
1
+ import { defineComponent as ce, ref as T, computed as _, onMounted as pe, watch as xe, resolveComponent as y, openBlock as p, createBlock as C, unref as t, withCtx as b, createElementVNode as f, createVNode as c, createCommentVNode as re, createElementBlock as L, Fragment as j, renderList as G, toDisplayString as D, createTextVNode as ne, resolveDynamicComponent as ie, withModifiers as Fe, h as F, nextTick as ue } from "vue";
2
+ import { u as ve, f as Ce, e as E, r as K, h as le, j as Re, k as de, l as J } from "./rule-CM7JgjNr.js";
3
+ import { useI18n as fe, useCoreStore as _e } from "@feedmepos/mf-common";
4
+ import { useSnackbar as he, components as W, useDialog as Ve, useBreakpoints as we, FmButtonColorThemeVariant as me, FmButtonVariant as ke } from "@feedmepos/ui-library";
5
+ import { _ as Ie } from "./app-G_Dbs0OJ.js";
6
+ import { u as Le, _ as Ue } from "./useLoading-CWBRIBiy.js";
7
+ import { u as Se, _ as se, a as $e, b as Ee } from "./useRestaurantMap-CpS9-OSq.js";
8
+ import { l as z } from "./lodash-B5BTJU4_.js";
9
+ const Te = { class: "fm-typo-en-title-md-600" }, Pe = { class: "space-y-40" }, Be = { class: "space-y-8" }, De = { class: "space-y-8" }, Me = {
12
10
  key: 0,
13
11
  class: "w-50 ml-5 flex flex-row items-start"
14
12
  }, Ae = { class: "m-2" }, Ne = { class: "flex gap-8 items-center justify-start" }, Oe = /* @__PURE__ */ ce({
@@ -20,14 +18,12 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
20
18
  }
21
19
  },
22
20
  setup(te, { expose: H }) {
23
- const { t: s } = ve(), Q = fe(), U = T(""), R = _(() => Q.restaurants.value.filter(({ profile: e }) => {
21
+ const { t: s } = fe(), Q = _e(), U = T(""), R = _(() => Q.restaurants.value.filter(({ profile: e }) => {
24
22
  const a = `${e.code ? e.code + "-" : ""}${e.legalName}`;
25
23
  return !U.value || a.toLowerCase().includes(U.value.toLowerCase());
26
- })), S = he(), J = _e(), X = Ee(J), B = te, d = T(!1), Y = () => {
24
+ })), S = ve(), q = he(), X = Le(q), P = te, d = T(!1), Y = () => {
27
25
  d.value = !d.value, d.value && $();
28
- }, Z = _(() => B.id ? s("hr.role.form.update") : s("hr.role.form.add")), M = _(() => B.id ? s("common.update") : s("common.add")), A = _(() => Ce.filter(
29
- (e) => !(e.subject === E.F_RULE_SUBJECT.enum.report && !e.conditions)
30
- ).map((e) => K(e))), m = _(() => S.roles.value.find((e) => e._id == B.id)), V = () => ({
26
+ }, Z = _(() => P.id ? s("hr.role.form.update") : s("hr.role.form.add")), M = _(() => P.id ? s("common.update") : s("common.add")), A = _(() => Ce.filter((e) => !(e.subject === E.F_RULE_SUBJECT.enum.report && !e.conditions)).map((e) => K(e))), m = _(() => S.roles.value.find((e) => e._id == P.id)), V = () => ({
31
27
  name: "",
32
28
  restaurantIds: [],
33
29
  permissions: [],
@@ -89,7 +85,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
89
85
  i.value === !0 ? l.value.restaurantIds = e : l.value.restaurantIds = R.value.map((a) => a._id);
90
86
  }, g = (e) => e.map((v) => v.value).every((v) => l.value.permissions.includes(v)), w = (e) => {
91
87
  const a = l.value.permissions.filter(
92
- (v) => !e.map((D) => D.value).includes(v)
88
+ (v) => !e.map((B) => B.value).includes(v)
93
89
  );
94
90
  g(e) === !0 ? l.value.permissions = a : l.value.permissions = [...a, ...e.map((v) => v.value)];
95
91
  };
@@ -99,9 +95,9 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
99
95
  e.length > 0 && (ee.value = "");
100
96
  }
101
97
  );
102
- const O = Ue(
98
+ const O = Se(
103
99
  () => {
104
- var e, a, v, D;
100
+ var e, a, v, B;
105
101
  return !z.isEqual(l.value.name, ((e = m.value) == null ? void 0 : e.name) || V().name) || !z.isEqual(
106
102
  l.value.restaurantIds,
107
103
  ((a = m.value) == null ? void 0 : a.restaurants.map((k) => k.id)) || V().restaurantIds
@@ -110,7 +106,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
110
106
  ((v = m.value) == null ? void 0 : v.permissions.map((k) => K(k).value)) || V().permissions
111
107
  ) || !z.isEqual(
112
108
  l.value.maxDiscountPercentage,
113
- m.value ? de((D = m.value) == null ? void 0 : D.permissions) : V().maxDiscountPercentage
109
+ m.value ? de((B = m.value) == null ? void 0 : B.permissions) : V().maxDiscountPercentage
114
110
  );
115
111
  },
116
112
  () => {
@@ -121,7 +117,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
121
117
  show: d,
122
118
  trigger: Y
123
119
  }), (e, a) => {
124
- const v = y("FmTextField"), D = y("FmSearch"), k = y("FmCheckbox"), ge = y("FmFormGroup"), be = y("FmCard"), oe = y("fm-button"), ye = y("fm-side-sheet");
120
+ const v = y("FmTextField"), B = y("FmSearch"), k = y("FmCheckbox"), ge = y("FmFormGroup"), be = y("FmCard"), oe = y("fm-button"), ye = y("fm-side-sheet");
125
121
  return p(), C(ye, {
126
122
  id: "unit-form",
127
123
  modelValue: d.value,
@@ -135,7 +131,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
135
131
  "onOn:clickedAway": t(O)
136
132
  }, {
137
133
  "side-sheet-header": b(() => [
138
- f("p", Te, P(Z.value), 1)
134
+ f("p", Te, D(Z.value), 1)
139
135
  ]),
140
136
  "side-sheet-footer": b(() => [
141
137
  f("div", Ne, [
@@ -155,7 +151,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
155
151
  ])
156
152
  ]),
157
153
  default: b(() => [
158
- f("div", Be, [
154
+ f("div", Pe, [
159
155
  c(se, { title: "Role detail" }, {
160
156
  default: b(() => [
161
157
  c(v, {
@@ -173,7 +169,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
173
169
  title: t(s)("hr.role.form.restaurant")
174
170
  }, {
175
171
  default: b(() => [
176
- c(D, {
172
+ c(B, {
177
173
  modelValue: U.value,
178
174
  "onUpdate:modelValue": a[1] || (a[1] = (n) => U.value = n),
179
175
  placeholder: t(s)("hr.restaurant.search.placeholder")
@@ -184,7 +180,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
184
180
  rules: [(n) => n.length > 0 || t(s)("hr.role.form.atLeastOneRestaurant")]
185
181
  }, {
186
182
  default: b(() => [
187
- f("div", De, [
183
+ f("div", Be, [
188
184
  U.value ? re("", !0) : (p(), C(k, {
189
185
  key: 0,
190
186
  "model-value": i.value,
@@ -193,7 +189,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
193
189
  disabled: h.value,
194
190
  "onUpdate:modelValue": u
195
191
  }, null, 8, ["model-value", "disabled"])),
196
- (p(!0), L(q, null, G(R.value, (n) => (p(), L("div", {
192
+ (p(!0), L(j, null, G(R.value, (n) => (p(), L("div", {
197
193
  key: n._id
198
194
  }, [
199
195
  c(k, {
@@ -215,17 +211,17 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
215
211
  title: t(s)("hr.role.form.permissions")
216
212
  }, {
217
213
  default: b(() => [
218
- (p(!0), L(q, null, G(N.value, (n) => (p(), C(be, {
214
+ (p(!0), L(j, null, G(N.value, (n) => (p(), C(be, {
219
215
  key: n.title,
220
216
  variant: "outlined",
221
217
  class: "p-16"
222
218
  }, {
223
219
  default: b(() => [
224
- c(Se, {
220
+ c($e, {
225
221
  label: n.title
226
222
  }, {
227
223
  default: b(() => [
228
- f("div", Pe, [
224
+ f("div", De, [
229
225
  c(k, {
230
226
  "model-value": g(n.options),
231
227
  label: "All",
@@ -233,7 +229,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
233
229
  disabled: h.value,
234
230
  "onUpdate:modelValue": (I) => w(n.options)
235
231
  }, null, 8, ["model-value", "disabled", "onUpdate:modelValue"]),
236
- (p(!0), L(q, null, G(n.options, (I) => (p(), L("div", {
232
+ (p(!0), L(j, null, G(n.options, (I) => (p(), L("div", {
237
233
  key: I.value
238
234
  }, [
239
235
  c(k, {
@@ -244,7 +240,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
244
240
  disabled: h.value
245
241
  }, null, 8, ["modelValue", "label", "value", "disabled"]),
246
242
  I.value === "order:discount" && l.value.permissions.includes(I.value) ? (p(), L("div", Me, [
247
- f("div", Ae, P(t(s)("hr.role.form.maxDiscountPercentage")), 1),
243
+ f("div", Ae, D(t(s)("hr.role.form.maxDiscountPercentage")), 1),
248
244
  c(v, {
249
245
  modelValue: l.value.maxDiscountPercentage,
250
246
  "onUpdate:modelValue": a[5] || (a[5] = (x) => l.value.maxDiscountPercentage = x),
@@ -275,11 +271,11 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
275
271
  }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]);
276
272
  };
277
273
  }
278
- }), qe = {
274
+ }), je = {
279
275
  class: "space-y-8"
280
- }, Je = {
276
+ }, qe = {
281
277
  class: "flex justify-end xs:px-16"
282
- }, je = {
278
+ }, Je = {
283
279
  class: "pb-64 hidden xs:block"
284
280
  }, ze = {
285
281
  class: "space-y-4"
@@ -291,16 +287,16 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
291
287
  class: "flex"
292
288
  }, He = {
293
289
  class: "flex"
294
- }, ra = /* @__PURE__ */ ce({
290
+ }, ta = /* @__PURE__ */ ce({
295
291
  __name: "RoleList",
296
292
  setup(te, {
297
293
  expose: H
298
294
  }) {
299
295
  const {
300
296
  t: s
301
- } = ve(), Q = fe(), U = _(() => Q.restaurants.value), R = _(() => U.value.map((o) => o._id));
297
+ } = fe(), Q = _e(), U = _(() => Q.restaurants.value), R = _(() => U.value.map((o) => o._id));
302
298
  function S(o, r) {
303
- const i = j(o, r);
299
+ const i = J(o, r);
304
300
  return ["-", "All"].includes(i) ? () => null : () => F(W.FmTooltip, {
305
301
  "z-index": "999",
306
302
  placement: "top",
@@ -318,8 +314,8 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
318
314
  })
319
315
  });
320
316
  }
321
- function J(o, r) {
322
- const i = j(o, r);
317
+ function q(o, r) {
318
+ const i = J(o, r);
323
319
  return () => i === "All" ? i : F("div", {
324
320
  class: "flex items-center"
325
321
  }, [i, S(o, r)()]);
@@ -331,12 +327,12 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
331
327
  }, {
332
328
  accessorKey: "operation",
333
329
  header: () => s("hr.role.columns.operation"),
334
- cell: (o) => F(J(o.row.original.permissions, E.F_RULE_SUBJECT.enum.order)),
330
+ cell: (o) => F(q(o.row.original.permissions, E.F_RULE_SUBJECT.enum.order)),
335
331
  enableSorting: !1
336
332
  }, {
337
333
  accessorKey: "report",
338
334
  header: () => s("hr.role.columns.report"),
339
- cell: (o) => F(J(o.row.original.permissions, E.F_RULE_SUBJECT.enum.report)),
335
+ cell: (o) => F(q(o.row.original.permissions, E.F_RULE_SUBJECT.enum.report)),
340
336
  enableSorting: !1
341
337
  }, {
342
338
  accessorKey: "restaurants",
@@ -365,10 +361,10 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
365
361
  r.stopPropagation(), l(o.row.original);
366
362
  }
367
363
  })])
368
- }], B = async (o) => {
364
+ }], P = async (o) => {
369
365
  var r;
370
366
  $.value = o._id, await ue(), (r = h.value) == null || r.trigger();
371
- }, d = he(), Y = $e(), Z = _(() => (d.roles.value || []).filter((i) => i.restaurants.some((u) => R.value.includes(u.id))).map((i) => {
367
+ }, d = ve(), Y = Ee(), Z = _(() => (d.roles.value || []).filter((i) => i.restaurants.some((u) => R.value.includes(u.id))).map((i) => {
372
368
  const u = i.restaurants.map((g) => {
373
369
  const w = Y.value[g.id];
374
370
  return {
@@ -389,7 +385,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
389
385
  });
390
386
  return g || O;
391
387
  });
392
- }), A = Ve(), m = _e(), {
388
+ }), A = Ve(), m = he(), {
393
389
  breakpoints: V
394
390
  } = we(), l = (o) => {
395
391
  A.open({
@@ -432,12 +428,12 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
432
428
  create: ee
433
429
  }), (o, r) => {
434
430
  const i = y("FmSearch"), u = y("FmTable"), g = y("FmButton"), w = y("FmListItem"), O = y("FmList");
435
- return p(), L(q, null, [(p(), C(Oe, {
431
+ return p(), L(j, null, [(p(), C(Oe, {
436
432
  id: $.value,
437
433
  key: $.value,
438
434
  ref_key: "roleFormRef",
439
435
  ref: h
440
- }, null, 8, ["id"])), f("div", qe, [f("div", Je, [c(i, {
436
+ }, null, 8, ["id"])), f("div", je, [f("div", qe, [c(i, {
441
437
  modelValue: N.value,
442
438
  "onUpdate:modelValue": r[0] || (r[0] = (e) => N.value = e),
443
439
  class: "w-[320px] xs:w-full",
@@ -456,21 +452,21 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
456
452
  "pin-header-row": "",
457
453
  "hide-footer": "",
458
454
  "shrink-at": !1,
459
- onRowClick: r[1] || (r[1] = (e) => B(e.original))
460
- }, null, 8, ["row-data", "page-size", "loading"]), f("div", je, [c(O, {
455
+ onRowClick: r[1] || (r[1] = (e) => P(e.original))
456
+ }, null, 8, ["row-data", "page-size", "loading"]), f("div", Je, [c(O, {
461
457
  separator: ""
462
458
  }, {
463
- default: b(() => [(p(!0), L(q, null, G(M.value, (e) => (p(), C(w, {
459
+ default: b(() => [(p(!0), L(j, null, G(M.value, (e) => (p(), C(w, {
464
460
  key: e._id,
465
461
  class: "py-12 px-16 items-center justify-between",
466
- onClick: (a) => B(e)
462
+ onClick: (a) => P(e)
467
463
  }, {
468
- default: b(() => [f("div", ze, [f("p", Ge, P(e.name), 1), f("div", Ke, [f("p", null, P(t(s)("hr.role.labels.restaurantList", {
464
+ default: b(() => [f("div", ze, [f("p", Ge, D(e.name), 1), f("div", Ke, [f("p", null, D(t(s)("hr.role.labels.restaurantList", {
469
465
  items: e.restaurants.map((a) => a.name).join(", ")
470
- })), 1), f("p", We, [ne(P(t(s)("hr.role.labels.operationList", {
471
- items: t(j)(e.permissions, t(E.F_RULE_SUBJECT).enum.order)
472
- })) + " ", 1), (p(), C(ie(S(e.permissions, t(E.F_RULE_SUBJECT).enum.order))))]), f("p", He, [ne(P(t(s)("hr.role.labels.reportList", {
473
- items: t(j)(e.permissions, t(E.F_RULE_SUBJECT).enum.report)
466
+ })), 1), f("p", We, [ne(D(t(s)("hr.role.labels.operationList", {
467
+ items: t(J)(e.permissions, t(E.F_RULE_SUBJECT).enum.order)
468
+ })) + " ", 1), (p(), C(ie(S(e.permissions, t(E.F_RULE_SUBJECT).enum.order))))]), f("p", He, [ne(D(t(s)("hr.role.labels.reportList", {
469
+ items: t(J)(e.permissions, t(E.F_RULE_SUBJECT).enum.report)
474
470
  })) + " ", 1), (p(), C(ie(S(e.permissions, t(E.F_RULE_SUBJECT).enum.report))))])])]), c(g, {
475
471
  disabled: t(le)(e.permissions),
476
472
  icon: "delete",
@@ -483,7 +479,7 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
483
479
  _: 1
484
480
  })])]),
485
481
  _: 1
486
- })) : (p(), C(t(Le), {
482
+ })) : (p(), C(t(Ue), {
487
483
  key: 1,
488
484
  title: t(s)("hr.role.noData.title"),
489
485
  subtitle: t(s)("hr.role.noData.subtitle")
@@ -492,5 +488,5 @@ const Te = { class: "fm-typo-en-title-md-600" }, Be = { class: "space-y-40" }, D
492
488
  }
493
489
  });
494
490
  export {
495
- ra as default
491
+ ta as default
496
492
  };