@feedmepos/mf-hrm-portal 2.2.2-dev → 2.2.2-dev.3

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 (32) hide show
  1. package/dist/{ApprovalCodeList-B9O8QzzI.js → ApprovalCodeList-BjRRA_sc.js} +2 -2
  2. package/dist/{AuditLogList-CtFEXKWZ.js → AuditLogList-B8kE39lt.js} +3 -3
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C9MYbxum.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Ba8w1BwT.js} +2 -2
  4. package/dist/{EmployeeList-BFxMwFJq.js → EmployeeList-7e069yPp.js} +66 -65
  5. package/dist/{GrantUserList-CZtmMRoS.js → GrantUserList-CTYamty5.js} +3 -3
  6. package/dist/{Main-on0TXkQt.js → Main-B-3s0bf_.js} +5 -5
  7. package/dist/{Main-DD6IthCS.js → Main-DcPLufZ5.js} +2 -2
  8. package/dist/{Main-B622Z4q4.js → Main-DfeNUiyv.js} +9 -9
  9. package/dist/{PermissionSetList-FCX3TBoi.js → PermissionSetList-CNujxzHF.js} +77 -76
  10. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Cl_YNh0k.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Cq9xp1TW.js} +585 -580
  11. package/dist/RoleList-YaY7Np_9.js +739 -0
  12. package/dist/{TeamMemberList-BAU7Y3jh.js → TeamMemberList-B-I3KjnH.js} +305 -305
  13. package/dist/{TimesheetList-DtFBWhma.js → TimesheetList-BTsvEiD6.js} +5 -5
  14. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Tatn3jUv.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CJYgeUxK.js} +2 -2
  15. package/dist/{app-Bbf6hEPt.js → app-C3u5orep.js} +16 -12
  16. package/dist/app.js +1 -1
  17. package/dist/{dayjs.min-BAnGg8q2.js → dayjs.min-B-sLuqme.js} +1 -1
  18. package/dist/{employee-DVSD3L51.js → employee-DaduVi88.js} +3 -3
  19. package/dist/{iteration-BTZViJtd.js → iteration-Cii8ZeX3.js} +1 -1
  20. package/dist/{lodash-Cgdk4_YL.js → lodash-BifZ3B1q.js} +1 -1
  21. package/dist/{role-CXVpO6fB.js → role-tzqciGzt.js} +1 -1
  22. package/dist/{rule-TR3MVo-b.js → rule-GhzA0R9H.js} +287 -260
  23. package/dist/src/api/user/index.d.ts +2 -2
  24. package/dist/src/composables/useReportPermissions.d.ts +1 -0
  25. package/dist/src/helpers/rule.d.ts +2 -0
  26. package/dist/src/types/role.d.ts +1 -0
  27. package/dist/src/views/hr/locales/index.d.ts +12 -8
  28. package/dist/tsconfig.app.tsbuildinfo +1 -1
  29. package/dist/useReportPermissions-BRLy3D7v.js +82 -0
  30. package/package.json +2 -2
  31. package/dist/RoleList-p_9KHzqF.js +0 -725
  32. package/dist/useReportPermissions-BpAFyO17.js +0 -71
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as re, ref as K, computed as g, resolveComponent as b, createBlock as O, openBlock as _, withCtx as $, createElementVNode as s, createElementBlock as S, createCommentVNode as Y, toDisplayString as C, unref as a, Fragment as H, renderList as te, createVNode as c, renderSlot as xe, isRef as ue, withModifiers as de, createTextVNode as be, normalizeClass as ke, h as x } from "vue";
2
- import { d as Ve } from "./dayjs.min-BAnGg8q2.js";
2
+ import { d as Ve } from "./dayjs.min-B-sLuqme.js";
3
3
  import { useI18n as ne } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as ie, components as z, useDialog as we, useBreakpoints as Fe, FmButtonVariant as se } from "@feedmepos/ui-library";
5
5
  import { S as q } from "./SelectFilter-ATOm0hdn.js";
6
- import { _ as $e } from "./app-Bbf6hEPt.js";
6
+ import { _ as $e } from "./app-C3u5orep.js";
7
7
  import { _ as pe, u as Se, H as Ae } from "./FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js";
8
8
  import { _ as Pe } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
9
9
  import { u as ve } from "./useLoading-CXzTpIVv.js";
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as Mt, ref as S, computed as A, onMounted as ko, onBeforeUnmount as Io, watch as ue, resolveComponent as U, createElementBlock as p, openBlock as v, createBlock as Se, createCommentVNode as j, createElementVNode as a, Fragment as q, renderList as ae, withCtx as B, createVNode as m, toDisplayString as l, unref as u, nextTick as Ao, onUnmounted as Fo, createTextVNode as Te, normalizeClass as Mo } from "vue";
2
- import { d as D } from "./dayjs.min-BAnGg8q2.js";
2
+ import { d as D } from "./dayjs.min-B-sLuqme.js";
3
3
  import { useI18n as Ot, useCoreStore as Oo } from "@feedmepos/mf-common";
4
- import { G as xt, _ as Do } from "./app-Bbf6hEPt.js";
4
+ import { G as xt, _ as Do } from "./app-C3u5orep.js";
5
5
  import { components as ie } from "@feedmepos/ui-library";
6
6
  import { g as Qe, b as Ze } from "./restaurant-BTpBmfBV.js";
7
7
  import { S as Pe, _ as jo } from "./SelectFilter-ATOm0hdn.js";
8
8
  import { _ as Co } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
9
9
  import { _ as To } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
10
- import { t as Po, p as Lt } from "./rule-TR3MVo-b.js";
10
+ import { t as Po, p as Lt } from "./rule-GhzA0R9H.js";
11
11
  import { defineStore as Vo } from "pinia";
12
12
  import { u as Eo } from "./useDebounce-B8ZPVS5C.js";
13
13
  const xe = [
@@ -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 { O as j, f as ce, U as L } from "./app-Bbf6hEPt.js";
4
- import { l as fe } from "./lodash-Cgdk4_YL.js";
3
+ import { O as j, f as ce, U as L } from "./app-C3u5orep.js";
4
+ import { l as fe } from "./lodash-BifZ3B1q.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"
@@ -2,18 +2,18 @@ import { toRaw as je, defineComponent as Ae, ref as v, computed as x, watch as a
2
2
  import { useI18n as De, useCoreStore as We } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as Ne, components as ze, useDialog as Qe, useBreakpoints as Ye } from "@feedmepos/ui-library";
4
4
  import { S as fe, _ as Ze } from "./SelectFilter-ATOm0hdn.js";
5
- import { _ as Xe, a as ea } from "./app-Bbf6hEPt.js";
5
+ import { _ as Xe, a as ea } from "./app-C3u5orep.js";
6
6
  import { _ as Re, u as aa, H as la } from "./FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js";
7
7
  import { u as ta, _ as sa } from "./useDiscardConfirm-DPhEV6v0.js";
8
8
  import { _ as oa } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
9
9
  import { _ as Ue } from "./Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js";
10
10
  import { u as ra } from "./useDebounce-B8ZPVS5C.js";
11
- import { u as Ke, E as na } from "./employee-DVSD3L51.js";
11
+ import { u as Ke, E as na } from "./employee-DaduVi88.js";
12
12
  import { u as Oe } from "./restaurant-BTpBmfBV.js";
13
- import { l as ia } from "./lodash-Cgdk4_YL.js";
13
+ import { l as ia } from "./lodash-BifZ3B1q.js";
14
14
  import { _ as $e } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
15
15
  import { u as Be } from "./useLoading-CXzTpIVv.js";
16
- import { u as Ee } from "./role-CXVpO6fB.js";
16
+ import { u as Ee } from "./role-tzqciGzt.js";
17
17
  /* empty css */
18
18
  function Me(z) {
19
19
  return JSON.parse(JSON.stringify(z));
@@ -37,7 +37,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
37
37
  },
38
38
  emits: ["submitted"],
39
39
  setup(z, { expose: ve, emit: u }) {
40
- const E = Ee(), p = Oe(), R = Ke(), ye = Ne(), P = Be(ye), ge = u, { t: c } = De(), U = v(!1), A = v(!0);
40
+ const E = Ee(), p = Oe(), U = Ke(), ye = Ne(), P = Be(ye), ge = u, { t: c } = De(), C = v(!1), A = v(!0);
41
41
  function K() {
42
42
  return {
43
43
  restaurantId: "",
@@ -59,7 +59,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
59
59
  };
60
60
  }
61
61
  const te = (o) => {
62
- t.value = he(o), I.value = Le(t.value), se.value = o == null ? void 0 : o._id, F.value = [], t.value.passcode && (F.value = t.value.passcode.split(""), T.value = !0), A.value = !o, U.value = !0;
62
+ t.value = he(o), I.value = Le(t.value), se.value = o == null ? void 0 : o._id, V.value = [], t.value.passcode && (V.value = t.value.passcode.split(""), T.value = !0), A.value = !o, C.value = !0;
63
63
  };
64
64
  function k() {
65
65
  return {
@@ -73,7 +73,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
73
73
  const J = x(() => A.value ? c("hr.employee.form.add") : c("hr.employee.form.update")), W = x(() => A.value ? c("common.create") : c("common.update")), I = v(k()), t = v(k()), se = v(void 0), O = x(
74
74
  () => t.value.restaurants.map((o) => o.restaurantId).filter(Boolean)
75
75
  );
76
- function C(o) {
76
+ function S(o) {
77
77
  var l;
78
78
  return o ? !((l = p.restaurants.value.find((n) => n._id === o)) != null && l.managable) : !1;
79
79
  }
@@ -92,8 +92,8 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
92
92
  })) : [];
93
93
  }
94
94
  function _e(o, l) {
95
- var b, S, G;
96
- const n = ((b = t.value.restaurants[o]) == null ? void 0 : b.roleId) ?? "", h = re(l, n), _ = ((S = h.find((V) => V.value === n && !V.disabled)) == null ? void 0 : S.value) ?? ((G = h.find((V) => !V.disabled)) == null ? void 0 : G.value) ?? "";
95
+ var b, R, G;
96
+ const n = ((b = t.value.restaurants[o]) == null ? void 0 : b.roleId) ?? "", h = re(l, n), _ = ((R = h.find((F) => F.value === n && !F.disabled)) == null ? void 0 : R.value) ?? ((G = h.find((F) => !F.disabled)) == null ? void 0 : G.value) ?? "";
97
97
  t.value.restaurants[o] = {
98
98
  restaurantId: l,
99
99
  roleId: _
@@ -111,7 +111,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
111
111
  function Q(o) {
112
112
  var n;
113
113
  const l = ((n = t.value.restaurants[o]) == null ? void 0 : n.restaurantId) ?? "";
114
- if (!C(l)) {
114
+ if (!S(l)) {
115
115
  if (t.value.restaurants.length === 1) {
116
116
  t.value.restaurants = [K()];
117
117
  return;
@@ -128,16 +128,16 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
128
128
  (n) => n.restaurantId && n.roleId
129
129
  );
130
130
  return o && l;
131
- }), F = v([]), T = v(!1);
131
+ }), V = v([]), T = v(!1);
132
132
  function Y() {
133
- T.value && (T.value = !1, F.value = []);
133
+ T.value && (T.value = !1, V.value = []);
134
134
  }
135
135
  const $ = v(!1), j = v(!1);
136
136
  async function ie() {
137
137
  j.value = !0;
138
138
  try {
139
139
  const o = await na.generateEmployeePasscode();
140
- T.value = !1, F.value = o.split("");
140
+ T.value = !1, V.value = o.split("");
141
141
  } finally {
142
142
  j.value = !1;
143
143
  }
@@ -145,7 +145,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
145
145
  const D = ta(
146
146
  () => !ia.isEqual(t.value, I.value),
147
147
  () => {
148
- U.value = !1;
148
+ C.value = !1;
149
149
  }
150
150
  );
151
151
  async function Z() {
@@ -157,7 +157,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
157
157
  },
158
158
  roles: t.value.restaurants
159
159
  };
160
- t.value.isMasterUser ? await R.createMasterEmployee(o) : (delete o.user.code, await R.createEmployee(o));
160
+ t.value.isMasterUser ? await U.createMasterEmployee(o) : (delete o.user.code, await U.createEmployee(o));
161
161
  }
162
162
  async function ue() {
163
163
  var h, _;
@@ -173,7 +173,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
173
173
  }))
174
174
  };
175
175
  if (!t.value.isMasterUser)
176
- await R.updateEmployee(l, n);
176
+ await U.updateEmployee(l, n);
177
177
  else {
178
178
  const b = {
179
179
  user: {
@@ -182,12 +182,12 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
182
182
  code: t.value.code
183
183
  },
184
184
  roles: t.value.restaurants,
185
- previousRoles: (_ = o.restaurants) == null ? void 0 : _.map((S) => ({
186
- restaurantId: S.restaurantId,
187
- roleId: S.roleId
185
+ previousRoles: (_ = o.restaurants) == null ? void 0 : _.map((R) => ({
186
+ restaurantId: R.restaurantId,
187
+ roleId: R.roleId
188
188
  }))
189
189
  };
190
- I.value.isMasterUser ? await R.updateMasterEmployee(l, b) : await R.migrateToMasterUser(l, b);
190
+ I.value.isMasterUser ? await U.updateMasterEmployee(l, b) : await U.migrateToMasterUser(l, b);
191
191
  }
192
192
  }
193
193
  async function ce() {
@@ -207,22 +207,23 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
207
207
  successMessage: c("hr.employee.update.successMessage"),
208
208
  isLoading: $
209
209
  }
210
- ), ge("submitted"), U.value = !1;
210
+ ), ge("submitted"), C.value = !1;
211
211
  }
212
212
  return ae(
213
- () => U.value,
213
+ () => C.value,
214
214
  (o) => {
215
215
  }
216
216
  ), ve({
217
- show: U,
217
+ show: C,
218
218
  trigger: te
219
219
  }), (o, l) => {
220
- const n = w("FmIcon"), h = w("FmSwitch"), _ = w("FmTextField"), b = w("FmPinField"), S = w("FmFormGroup"), G = w("FmButton"), V = w("FmSelect"), de = w("fm-button"), we = w("fm-side-sheet");
220
+ const n = w("FmIcon"), h = w("FmSwitch"), _ = w("FmTextField"), b = w("FmPinField"), R = w("FmFormGroup"), G = w("FmButton"), F = w("FmSelect"), de = w("fm-button"), we = w("fm-side-sheet");
221
221
  return y(), N(ke, null, [
222
222
  Ge(o.$slots, "default", { trigger: te }),
223
223
  i(we, {
224
224
  id: "unit-form",
225
- "model-value": U.value,
225
+ modelValue: C.value,
226
+ "onUpdate:modelValue": l[7] || (l[7] = (e) => C.value = e),
226
227
  "is-container": s(ze).FmForm,
227
228
  "is-container-props": {
228
229
  onValidationSuccess: ce,
@@ -302,17 +303,17 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
302
303
  }, {
303
304
  default: g(() => [
304
305
  d("div", pa, [
305
- i(S, {
306
- modelValue: F.value,
307
- "onUpdate:modelValue": l[5] || (l[5] = (e) => F.value = e),
306
+ i(R, {
307
+ modelValue: V.value,
308
+ "onUpdate:modelValue": l[5] || (l[5] = (e) => V.value = e),
308
309
  rules: [
309
310
  (e) => (e == null ? void 0 : e.filter((a) => !!a).length) !== Pe ? s(c)("hr.employee.form.passcodeRequired") : !0
310
311
  ]
311
312
  }, {
312
313
  default: g(() => [
313
314
  i(b, {
314
- modelValue: F.value,
315
- "onUpdate:modelValue": l[3] || (l[3] = (e) => F.value = e),
315
+ modelValue: V.value,
316
+ "onUpdate:modelValue": l[3] || (l[3] = (e) => V.value = e),
316
317
  length: Pe,
317
318
  masked: T.value,
318
319
  onComplete: l[4] || (l[4] = (e) => t.value.passcode = e),
@@ -339,7 +340,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
339
340
  }, 8, ["title"]),
340
341
  i($e, null, {
341
342
  default: g(() => [
342
- i(S, {
343
+ i(R, {
343
344
  modelValue: t.value.restaurants,
344
345
  "onUpdate:modelValue": l[6] || (l[6] = (e) => t.value.restaurants = e),
345
346
  tag: "div",
@@ -355,13 +356,13 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
355
356
  d("div", ga, [
356
357
  d("div", ha, L(s(c)("hr.employee.columns.restaurants")), 1),
357
358
  d("div", _a, L(s(c)("hr.employee.form.role")), 1),
358
- l[7] || (l[7] = d("div", null, null, -1))
359
+ l[8] || (l[8] = d("div", null, null, -1))
359
360
  ]),
360
361
  (y(!0), N(ke, null, qe(t.value.restaurants, (e, a) => (y(), N("div", {
361
362
  key: `${e.restaurantId || "new"}-${a}`,
362
363
  class: "grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto] items-center gap-16"
363
364
  }, [
364
- i(V, {
365
+ i(F, {
365
366
  class: "min-w-0",
366
367
  "model-value": e.restaurantId,
367
368
  items: oe(e.restaurantId),
@@ -369,27 +370,27 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
369
370
  searchable: "",
370
371
  "search-debounce": 300,
371
372
  placeholder: s(c)("hr.employee.columns.restaurants"),
372
- disabled: C(e.restaurantId),
373
+ disabled: S(e.restaurantId),
373
374
  "onUpdate:modelValue": (r) => _e(a, r)
374
375
  }, null, 8, ["model-value", "items", "placeholder", "disabled", "onUpdate:modelValue"]),
375
- i(V, {
376
+ i(F, {
376
377
  class: "min-w-0",
377
378
  "model-value": e.roleId,
378
379
  items: re(e.restaurantId, e.roleId),
379
380
  multiselect: !1,
380
381
  placeholder: s(c)("hr.employee.form.role"),
381
- disabled: !e.restaurantId || C(e.restaurantId),
382
+ disabled: !e.restaurantId || S(e.restaurantId),
382
383
  "onUpdate:modelValue": (r) => be(a, r)
383
384
  }, null, 8, ["model-value", "items", "placeholder", "disabled", "onUpdate:modelValue"]),
384
385
  d("div", ba, [
385
386
  t.value.restaurants.length > 1 ? (y(), N("div", {
386
387
  key: 0,
387
388
  role: "button",
388
- tabindex: C(e.restaurantId) ? -1 : 0,
389
- "aria-disabled": C(e.restaurantId),
389
+ tabindex: S(e.restaurantId) ? -1 : 0,
390
+ "aria-disabled": S(e.restaurantId),
390
391
  class: Ie(["inline-flex h-40 w-40 shrink-0 items-center justify-center rounded-lg text-fm-color-neutral-gray-400 transition-colors hover:bg-fm-color-neutral-gray-100 focus:outline-none focus:ring-2 focus:ring-fm-color-primary disabled:cursor-not-allowed disabled:text-fm-color-neutral-gray-200 disabled:hover:bg-transparent", {
391
- "cursor-pointer": !C(e.restaurantId),
392
- "pointer-events-none": C(e.restaurantId)
392
+ "cursor-pointer": !S(e.restaurantId),
393
+ "pointer-events-none": S(e.restaurantId)
393
394
  }]),
394
395
  "aria-label": s(c)("common.remove"),
395
396
  onClick: le((r) => Q(a), ["stop"]),
@@ -427,7 +428,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
427
428
  ])
428
429
  ]),
429
430
  _: 1
430
- }, 8, ["model-value", "is-container", "is-container-props", "onOn:clickedAway"])
431
+ }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"])
431
432
  ], 64);
432
433
  };
433
434
  }
@@ -436,9 +437,9 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
436
437
  }, Ea = {
437
438
  key: 0,
438
439
  class: "flex w-full items-start justify-between"
439
- }, Fa = {
440
- class: "flex items-start gap-8"
441
440
  }, Va = {
441
+ class: "flex items-start gap-8"
442
+ }, Fa = {
442
443
  class: "flex"
443
444
  }, Ca = {
444
445
  key: 1,
@@ -469,11 +470,11 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
469
470
  }) {
470
471
  const {
471
472
  t: u
472
- } = De(), E = v(), p = Ke(), R = Oe(), ye = We(), {
473
+ } = De(), E = v(), p = Ke(), U = Oe(), ye = We(), {
473
474
  currentBusiness: P,
474
475
  sessionUser: ge
475
- } = ye, c = Ee(), U = x(() => R.isLoading.value), A = v(c.roles.value.length === 0);
476
- ae(R.restaurants, (e) => {
476
+ } = ye, c = Ee(), C = x(() => U.isLoading.value), A = v(c.roles.value.length === 0);
477
+ ae(U.restaurants, (e) => {
477
478
  if (e.length > 0 && p.listEmployees.value.length > 0) {
478
479
  const a = new Map(e.map((r) => [r._id, r]));
479
480
  p.listEmployees.value = p.listEmployees.value.map((r) => ({
@@ -489,7 +490,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
489
490
  }));
490
491
  }
491
492
  });
492
- const K = x(() => R.restaurants.value.map((e) => ({
493
+ const K = x(() => U.restaurants.value.map((e) => ({
493
494
  label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
494
495
  value: e._id
495
496
  }))), he = ae(c.roles, (e) => {
@@ -508,7 +509,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
508
509
  }
509
510
  }), te = x(() => p.listEmployees.value), {
510
511
  searchKey: k
511
- } = aa(), J = v(""), W = x(() => te.value), I = x(() => p.totalEmployees.value), t = v(1), se = x(() => p.isLoading.value), O = v(!1), C = x(() => {
512
+ } = aa(), J = v(""), W = x(() => te.value), I = x(() => p.totalEmployees.value), t = v(1), se = x(() => p.isLoading.value), O = v(!1), S = x(() => {
512
513
  var e;
513
514
  return JSON.stringify({
514
515
  businessId: ((e = P.value) == null ? void 0 : e._id) ?? "",
@@ -566,7 +567,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
566
567
  header: () => u("hr.employee.columns.restaurants"),
567
568
  enableSorting: !1,
568
569
  cell(e) {
569
- return U.value || A.value ? pe(Ue) : e.row.original.restaurants.map((a, r) => {
570
+ return C.value || A.value ? pe(Ue) : e.row.original.restaurants.map((a, r) => {
570
571
  const f = oe(a);
571
572
  return pe("div", {
572
573
  key: a.restaurantId || r
@@ -580,7 +581,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
580
581
  header: () => u("hr.employee.columns.assignedRole"),
581
582
  enableSorting: !1,
582
583
  cell(e) {
583
- return U.value || A.value ? pe(Ue, {
584
+ return C.value || A.value ? pe(Ue, {
584
585
  width: "120px"
585
586
  }) : e.row.original.restaurants.map((a, r) => {
586
587
  const f = re(a);
@@ -618,7 +619,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
618
619
  row: {
619
620
  original: e
620
621
  }
621
- }) : e[a.accessorKey]]))]), B = Ne(), F = Qe(), T = Be(B), Y = v(!1), $ = v(), j = v();
622
+ }) : e[a.accessorKey]]))]), B = Ne(), V = Qe(), T = Be(B), Y = v(!1), $ = v(), j = v();
622
623
  function ie(e) {
623
624
  const a = e.isRestricted;
624
625
  return a && B.open({
@@ -634,7 +635,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
634
635
  }, {
635
636
  breakpoints: Z
636
637
  } = Ye(), ue = (e) => {
637
- ie(e) || F.open({
638
+ ie(e) || V.open({
638
639
  title: u("hr.employee.remove.title"),
639
640
  message: u("hr.employee.remove.message", {
640
641
  name: e.name
@@ -661,7 +662,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
661
662
  name: e.name
662
663
  })
663
664
  }).catch(() => {
664
- }), F.close();
665
+ }), V.close();
665
666
  });
666
667
  }, ce = v("");
667
668
  function o() {
@@ -709,7 +710,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
709
710
  const e = Math.max(1, Math.ceil(I.value / q));
710
711
  t.value > e && (t.value = e, await _(t.value));
711
712
  }
712
- async function S() {
713
+ async function R() {
713
714
  var e, a;
714
715
  return await p.readAllEmployeesPage({
715
716
  search: J.value.trim() || void 0,
@@ -721,21 +722,21 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
721
722
  J.value = k.value;
722
723
  }, 300);
723
724
  He(G);
724
- let V = !1;
725
+ let F = !1;
725
726
  async function de({
726
727
  pageIndex: e
727
728
  }) {
728
729
  var a;
729
- if ((a = P.value) != null && a._id && !V && !(e === 0 && t.value === 1 && W.value.length > 0)) {
730
- V = !0, t.value = e + 1;
730
+ if ((a = P.value) != null && a._id && !F && !(e === 0 && t.value === 1 && W.value.length > 0)) {
731
+ F = !0, t.value = e + 1;
731
732
  try {
732
733
  await _(t.value);
733
734
  } finally {
734
- V = !1;
735
+ F = !1;
735
736
  }
736
737
  }
737
738
  }
738
- ae(C, async () => {
739
+ ae(S, async () => {
739
740
  var e;
740
741
  t.value = 1, O.value = !1, (e = P.value) != null && e._id && (await _(1), O.value = !0);
741
742
  }, {
@@ -747,10 +748,10 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
747
748
  return ve({
748
749
  create: o,
749
750
  filteredEmployees: W,
750
- exportEmployees: S,
751
+ exportEmployees: R,
751
752
  getHasPaginationFooter: () => we.value
752
753
  }), (e, a) => {
753
- var Fe, Ve;
754
+ var Ve, Fe;
754
755
  const r = w("FmButton"), f = w("FmTooltip"), X = w("FmSearch"), ee = w("FmListItem"), Te = w("FmTable");
755
756
  return y(), N(ke, null, [i(ka, {
756
757
  ref_key: "employeeFormRef",
@@ -781,7 +782,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
781
782
  variant: "dark",
782
783
  "selected-prefix": s(u)("hr.employee.filter.selected_role_prefix"),
783
784
  placeholder: s(u)("hr.employee.filter.role_placeholder")
784
- }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])])) : (y(), N("div", Ea, [d("div", Fa, [i(fe, {
785
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])])) : (y(), N("div", Ea, [d("div", Va, [i(fe, {
785
786
  modelValue: E.value,
786
787
  "onUpdate:modelValue": a[1] || (a[1] = (m) => E.value = m),
787
788
  multiple: "",
@@ -798,7 +799,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
798
799
  items: l.value,
799
800
  "selected-prefix": s(u)("hr.employee.filter.selected_role_prefix"),
800
801
  placeholder: s(u)("hr.employee.filter.role_placeholder")
801
- }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), d("div", Va, [(Fe = s(ge)) != null && Fe.role.isAdmin ? (y(), M(f, {
802
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), d("div", Fa, [(Ve = s(ge)) != null && Ve.role.isAdmin ? (y(), M(f, {
802
803
  key: 0,
803
804
  content: s(u)("hr.employee.sync.tooltip")
804
805
  }, {
@@ -815,7 +816,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
815
816
  autofocus: "",
816
817
  class: "pl-4 w-[320px]",
817
818
  placeholder: s(u)("hr.employee.search.placeholder")
818
- }, null, 8, ["modelValue", "placeholder"])])])), (Ve = s(P)) != null && Ve._id ? (y(), M(Xe, {
819
+ }, null, 8, ["modelValue", "placeholder"])])])), (Fe = s(P)) != null && Fe._id ? (y(), M(Xe, {
819
820
  key: 2
820
821
  }, {
821
822
  default: g(() => [d("div", Ua, [!O.value && s(p).isLoading.value ? (y(), M(ea, {
@@ -828,7 +829,7 @@ const ua = { class: "flex w-full items-center justify-between" }, ca = { class:
828
829
  subtitle: s(u)("hr.employee.noData.subtitle")
829
830
  }, {
830
831
  default: g(() => [(y(), M(Te, {
831
- key: C.value,
832
+ key: S.value,
832
833
  class: Ie(["employee-list-table h-full", {
833
834
  "employee-list-table--pagination-loading": se.value
834
835
  }]),
@@ -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-BAnGg8q2.js";
2
+ import { d as ge } from "./dayjs.min-B-sLuqme.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
5
  import { S as A } from "./SelectFilter-ATOm0hdn.js";
6
- import { _ as he } from "./app-Bbf6hEPt.js";
6
+ import { _ as he } from "./app-C3u5orep.js";
7
7
  import { _ as Q, u as Ue, H as xe } from "./FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js";
8
8
  import { _ as be } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
9
9
  import { u as te } from "./useLoading-CXzTpIVv.js";
10
10
  import { u as ae } from "./grant-user-SNiDV22U.js";
11
11
  import { u as se } from "./restaurant-BTpBmfBV.js";
12
- import { u as re } from "./role-CXVpO6fB.js";
12
+ import { u as re } from "./role-tzqciGzt.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",
@@ -5,12 +5,12 @@ import { _ as x } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lan
5
5
  import { _ as F } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
6
  import { u as w } from "./restaurant-BTpBmfBV.js";
7
7
  import "@feedmepos/ui-library";
8
- import "./rule-TR3MVo-b.js";
9
- import "./lodash-Cgdk4_YL.js";
10
- import "./iteration-BTZViJtd.js";
8
+ import "./rule-GhzA0R9H.js";
9
+ import "./lodash-BifZ3B1q.js";
10
+ import "./iteration-Cii8ZeX3.js";
11
11
  import "./useAppStore-DCwd8GWN.js";
12
- import { R as v } from "./app-Bbf6hEPt.js";
13
- import "./role-CXVpO6fB.js";
12
+ import { R as v } from "./app-C3u5orep.js";
13
+ import "./role-tzqciGzt.js";
14
14
  /* empty css */
15
15
  import "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js";
16
16
  const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
@@ -5,10 +5,10 @@ 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
7
  import { u as j } from "./restaurant-BTpBmfBV.js";
8
- import { u as H } from "./role-CXVpO6fB.js";
8
+ import { u as H } from "./role-tzqciGzt.js";
9
9
  import { u as J } from "./grant-user-SNiDV22U.js";
10
10
  import { u as K } from "./approval-code-jIjkeVEb.js";
11
- import { R as n } from "./app-Bbf6hEPt.js";
11
+ import { R as n } from "./app-C3u5orep.js";
12
12
  const Q = { class: "space-y-24" }, ue = /* @__PURE__ */ D({
13
13
  __name: "Main",
14
14
  setup(W) {
@@ -5,18 +5,18 @@ 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
7
  import { u as gf } from "./restaurant-BTpBmfBV.js";
8
- import { u as _f } from "./role-CXVpO6fB.js";
8
+ import { u as _f } from "./role-tzqciGzt.js";
9
9
  /* empty css */
10
- import "./employee-DVSD3L51.js";
11
- import "./lodash-Cgdk4_YL.js";
10
+ import "./employee-DaduVi88.js";
11
+ import "./lodash-BifZ3B1q.js";
12
12
  import "./useAppStore-DCwd8GWN.js";
13
- import "./iteration-BTZViJtd.js";
13
+ import "./iteration-Cii8ZeX3.js";
14
14
  /* empty css */
15
- import { R as pt } from "./app-Bbf6hEPt.js";
16
- import "./rule-TR3MVo-b.js";
17
- import "./useReportPermissions-BpAFyO17.js";
18
- import "./dayjs.min-BAnGg8q2.js";
19
- import "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Tatn3jUv.js";
15
+ import { R as pt } from "./app-C3u5orep.js";
16
+ import "./rule-GhzA0R9H.js";
17
+ import "./useReportPermissions-BRLy3D7v.js";
18
+ import "./dayjs.min-B-sLuqme.js";
19
+ import "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CJYgeUxK.js";
20
20
  var Nn = {};
21
21
  /*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
22
22
  var qt = {};