@feedmepos/mf-hrm-portal 2.0.0 → 2.0.1-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 (23) hide show
  1. package/dist/{AuditLogList-Cm3ueTso.js → AuditLogList-DZENrFVl.js} +4 -4
  2. package/dist/{EmployeeList-vMcIqBU_.js → EmployeeList-DJ-Lx4RI.js} +102 -102
  3. package/dist/{Main-CeGYov-a.js → Main-BiTy1HOn.js} +8 -8
  4. package/dist/{Main-gHCENd4i.js → Main-Dp5EpNkO.js} +5 -5
  5. package/dist/{PermissionSetList-Dw69OYF4.js → PermissionSetList-_pXwG00F.js} +3 -3
  6. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-bvPOPUhu.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DrU4O0ww.js} +419 -419
  7. package/dist/{RoleList-D1CrixYc.js → RoleList-Ky-QqbsY.js} +51 -51
  8. package/dist/{TeamMemberList-M0Q8CP4h.js → TeamMemberList-DRrHuY31.js} +102 -102
  9. package/dist/{TimesheetList-BmOfy0pc.js → TimesheetList-BHHH42rb.js} +6 -6
  10. package/dist/{app-RUdgf-7_.js → app-BA8Bg7Fs.js} +4 -4
  11. package/dist/app.js +1 -1
  12. package/dist/{dayjs.min-D9w2-Exz.js → dayjs.min-CEZE1nhx.js} +1 -1
  13. package/dist/{employee-B3jBmvNJ.js → employee-pAypR6MP.js} +3 -3
  14. package/dist/{index-BMVQbdBd.js → index-C-bqkIkl.js} +1 -1
  15. package/dist/{index-BS6B6k7h.js → index-bp5uff_3.js} +198 -198
  16. package/dist/{lodash-CglPbFKR.js → lodash-D4y44Bjw.js} +1 -1
  17. package/dist/{team-afjBSzOz.js → team-DcE1JQXZ.js} +1 -1
  18. package/dist/{timesheet-fOBJOS1i.js → timesheet-DLosZfP0.js} +2 -2
  19. package/dist/tsconfig.app.tsbuildinfo +1 -1
  20. package/dist/{useAppStore-D-SLROq6.js → useAppStore-BMisdZ57.js} +1 -1
  21. package/dist/{useLoading-CLQGJW7G.js → useLoading-JdhZp_cM.js} +1 -1
  22. package/dist/{useReportPermissions-Cx4ghxj6.js → useReportPermissions-OjM-nHtC.js} +2 -2
  23. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as se, ref as _, computed as k, watch as R, resolveComponent as D, createElementBlock as m, openBlock as r, Fragment as A, createVNode as d, unref as s, withCtx as F, createElementVNode as e, createBlock as $, createCommentVNode as g, toDisplayString as a, renderList as ie, createTextVNode as Y } from "vue";
2
- import { d as ne } from "./dayjs.min-D9w2-Exz.js";
2
+ import { d as ne } from "./dayjs.min-CEZE1nhx.js";
3
3
  import { useI18n as de, useCoreStore as ce } from "@feedmepos/mf-common";
4
- import { _ as re, G as ue } from "./app-RUdgf-7_.js";
4
+ import { _ as re, G as ue } from "./app-BA8Bg7Fs.js";
5
5
  import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
6
  import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
7
  import { components as G } from "@feedmepos/ui-library";
8
- import { g as pe, b as _e, p as J } from "./index-BS6B6k7h.js";
9
- import { u as ve } from "./team-afjBSzOz.js";
8
+ import { g as pe, b as _e, p as J } from "./index-bp5uff_3.js";
9
+ import { u as ve } from "./team-DcE1JQXZ.js";
10
10
  import { S as U } from "./SelectFilter-NbXrJ4iH.js";
11
11
  const ge = "/audit-logs", he = {
12
12
  async read(n) {
@@ -1,19 +1,19 @@
1
- import { createElementBlock as $, openBlock as _, createElementVNode as d, toRaw as Me, defineComponent as ge, ref as g, computed as x, watch as be, resolveComponent as p, Fragment as G, renderSlot as Ie, createVNode as u, unref as o, withCtx as h, createBlock as D, createCommentVNode as Q, isRef as ne, renderList as Ve, toDisplayString as K, onMounted as $e, h as re, createTextVNode as Oe, withModifiers as Le } from "vue";
2
- import { useCoreStore as Fe, useI18n as xe, RestaurantSelector as ce } from "@feedmepos/mf-common";
3
- import { useSnackbar as we, components as ke, useDialog as Ne, useBreakpoints as Be, FmButtonVariant as De } from "@feedmepos/ui-library";
1
+ import { createElementBlock as $, openBlock as g, createElementVNode as m, toRaw as Me, defineComponent as _e, ref as _, computed as w, watch as be, resolveComponent as p, Fragment as G, renderSlot as Ie, createVNode as u, unref as o, withCtx as h, createBlock as D, createCommentVNode as Q, isRef as ne, renderList as Ve, toDisplayString as K, onMounted as $e, h as re, createTextVNode as Oe, withModifiers as Le } from "vue";
2
+ import { useCoreStore as Fe, useI18n as we, RestaurantSelector as ce } from "@feedmepos/mf-common";
3
+ import { useSnackbar as xe, components as Ue, useDialog as Ne, useBreakpoints as Be, FmButtonVariant as De } from "@feedmepos/ui-library";
4
4
  import { _ as Pe, S as pe } from "./SelectFilter-NbXrJ4iH.js";
5
- import { _ as Te } from "./app-RUdgf-7_.js";
5
+ import { _ as Te } from "./app-BA8Bg7Fs.js";
6
6
  import { _ as ze } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
- import { u as Ue } from "./useSearch-B6WK1LBB.js";
8
- import { u as Se, E as Ae } from "./employee-B3jBmvNJ.js";
9
- import { l as je } from "./lodash-CglPbFKR.js";
7
+ import { u as ke } from "./useSearch-B6WK1LBB.js";
8
+ import { u as Se, E as Ae } from "./employee-pAypR6MP.js";
9
+ import { l as je } from "./lodash-D4y44Bjw.js";
10
10
  import { u as Ke, _ as ve, a as fe, b as Ge } from "./useRestaurantMap-D5BNPLKh.js";
11
- import { u as qe } from "./useLoading-CLQGJW7G.js";
12
- import { u as ue } from "./useAppStore-D-SLROq6.js";
11
+ import { u as qe } from "./useLoading-JdhZp_cM.js";
12
+ import { u as ue } from "./useAppStore-BMisdZ57.js";
13
13
  const He = {};
14
14
  function Je(S, O) {
15
- return _(), $("div", null, [...O[0] || (O[0] = [
16
- d("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
15
+ return g(), $("div", null, [...O[0] || (O[0] = [
16
+ m("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
17
17
  ])]);
18
18
  }
19
19
  const We = /* @__PURE__ */ Pe(He, [["render", Je]]);
@@ -29,7 +29,7 @@ function he(S) {
29
29
  return ye(S);
30
30
  }
31
31
  }
32
- const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Ye = { class: "flex flex-row gap-16" }, Ze = { class: "space-y-16" }, el = { class: "flex gap-8 items-center justify-start" }, _e = 4, ll = /* @__PURE__ */ ge({
32
+ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Ye = { class: "flex flex-row gap-16" }, Ze = { class: "space-y-16" }, el = { class: "flex gap-8 items-center justify-start" }, ge = 4, ll = /* @__PURE__ */ _e({
33
33
  __name: "EmployeeForm",
34
34
  props: {
35
35
  roleErrorMessage: {
@@ -38,8 +38,8 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
38
38
  }
39
39
  },
40
40
  setup(S, { expose: O }) {
41
- const i = ue(), E = Fe(), c = Se(), q = we(), H = qe(q), { t: m } = xe(), v = g(!1), L = g(!0), R = (l) => {
42
- s.value = l ? he(l) : P(), w.value = he(s.value), a.value = [], b.value = s.value.restaurants.map((e) => e.restaurantId), s.value.passcode && (a.value = s.value.passcode.split(""), t.value = !0), L.value = !l, v.value = !0;
41
+ const i = ue(), E = Fe(), c = Se(), q = xe(), H = qe(q), { t: d } = we(), v = _(!1), L = _(!0), R = (l) => {
42
+ s.value = l ? he(l) : P(), x.value = he(s.value), a.value = [], b.value = s.value.restaurants.map((e) => e.restaurantId), s.value.passcode && (a.value = s.value.passcode.split(""), t.value = !0), L.value = !l, v.value = !0;
43
43
  };
44
44
  function P() {
45
45
  return {
@@ -50,7 +50,7 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
50
50
  restaurants: []
51
51
  };
52
52
  }
53
- const T = x(() => L.value ? m("hr.employee.form.add") : m("hr.employee.form.update")), X = x(() => L.value ? m("common.create") : m("common.update")), w = g(P()), s = g(P()), { searchKey: C, filter: z } = Ue(), Y = x(() => {
53
+ const T = w(() => L.value ? d("hr.employee.form.add") : d("hr.employee.form.update")), X = w(() => L.value ? d("common.create") : d("common.update")), x = _(P()), s = _(P()), { searchKey: C, filter: z } = ke(), Y = w(() => {
54
54
  const l = {};
55
55
  return i.roles.value.forEach((e) => {
56
56
  l[e._id] = e.name;
@@ -60,7 +60,7 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
60
60
  const e = A(l) ?? "";
61
61
  return Y.value[e] || "";
62
62
  }
63
- const M = x(() => E.restaurants.value.filter(({ _id: e, profile: n, managable: I }) => I ? z([n.code, n.name, J(e)]) : b.value.includes(e)).map(({ _id: e, profile: n, managable: I }) => {
63
+ const M = w(() => E.restaurants.value.filter(({ _id: e, profile: n, managable: I }) => I ? z([n.code, n.name, J(e)]) : b.value.includes(e)).map(({ _id: e, profile: n, managable: I }) => {
64
64
  const B = i.roles.value.filter((V) => V.restaurants.some((F) => F.id == e)).map((V) => ({
65
65
  label: V.name,
66
66
  value: V._id,
@@ -72,7 +72,7 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
72
72
  roleOptions: B,
73
73
  disabled: !I
74
74
  };
75
- })), Z = x(() => {
75
+ })), Z = w(() => {
76
76
  const l = {};
77
77
  return s.value.restaurants.forEach((e) => {
78
78
  l[e.restaurantId] = e.roleId;
@@ -85,16 +85,16 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
85
85
  roleId: e
86
86
  }
87
87
  ];
88
- }, b = g(s.value.restaurants.map((l) => l.restaurantId)), N = x(
88
+ }, b = _(s.value.restaurants.map((l) => l.restaurantId)), N = w(
89
89
  () => b.value.filter(
90
90
  (l) => M.value.some((e) => e.value === l && !e.disabled)
91
91
  )
92
- ), U = x(() => {
92
+ ), k = w(() => {
93
93
  const l = M.value.filter((e) => !e.disabled).length;
94
94
  return l > 0 && l === N.value.length;
95
95
  }), ee = () => {
96
96
  const l = b.value.filter((e) => !N.value.includes(e));
97
- if (U.value === !0)
97
+ if (k.value === !0)
98
98
  j(l);
99
99
  else {
100
100
  const e = M.value.filter((n) => !n.disabled).map((n) => n.value);
@@ -115,16 +115,16 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
115
115
  roleId: ((V = s.value.restaurants.find((F) => F.restaurantId === e)) == null ? void 0 : V.roleId) || I
116
116
  };
117
117
  });
118
- }, a = g([]), t = g(!1);
118
+ }, a = _([]), t = _(!1);
119
119
  function f() {
120
120
  t.value && (t.value = !1, a.value = []);
121
121
  }
122
- async function k() {
122
+ async function U() {
123
123
  const l = await Ae.generateEmployeePasscode();
124
124
  t.value = !1, a.value = l.split("");
125
125
  }
126
126
  const y = Ke(
127
- () => !je.isEqual(s.value, w.value),
127
+ () => !je.isEqual(s.value, x.value),
128
128
  () => {
129
129
  v.value = !1;
130
130
  }
@@ -141,7 +141,7 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
141
141
  s.value.isMasterUser ? await c.createMasterEmployee(l) : (delete l.user.code, await c.createEmployee(l));
142
142
  }
143
143
  async function ae() {
144
- const l = w.value, e = {
144
+ const l = x.value, e = {
145
145
  user: {
146
146
  name: s.value.name,
147
147
  passcode: s.value.passcode
@@ -159,7 +159,7 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
159
159
  },
160
160
  roles: s.value.restaurants
161
161
  };
162
- w.value.isMasterUser ? await c.updateMasterEmployee(l._id, n) : await c.migrateToMasterUser(l._id, n);
162
+ x.value.isMasterUser ? await c.updateMasterEmployee(l._id, n) : await c.migrateToMasterUser(l._id, n);
163
163
  }
164
164
  }
165
165
  async function te() {
@@ -168,14 +168,14 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
168
168
  await le();
169
169
  },
170
170
  {
171
- successMessage: m("hr.employee.create.successMessage")
171
+ successMessage: d("hr.employee.create.successMessage")
172
172
  }
173
173
  ) : await H.minor(
174
174
  async () => {
175
175
  await ae();
176
176
  },
177
177
  {
178
- successMessage: m("hr.employee.update.successMessage")
178
+ successMessage: d("hr.employee.update.successMessage")
179
179
  }
180
180
  ), v.value = !1;
181
181
  }
@@ -187,14 +187,14 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
187
187
  show: v,
188
188
  trigger: R
189
189
  }), (l, e) => {
190
- const n = p("FmSwitch"), I = p("FmTextField"), B = p("FmPinField"), V = p("FmFormGroup"), F = p("FmButton"), Ee = p("FmSearch"), ie = p("FmCheckbox"), Re = p("FmSelect"), me = p("fm-button"), Ce = p("fm-side-sheet");
191
- return _(), $(G, null, [
190
+ const n = p("FmSwitch"), I = p("FmTextField"), B = p("FmPinField"), V = p("FmFormGroup"), F = p("FmButton"), Ee = p("FmSearch"), ie = p("FmCheckbox"), Re = p("FmSelect"), de = p("fm-button"), Ce = p("fm-side-sheet");
191
+ return g(), $(G, null, [
192
192
  Ie(l.$slots, "default", { trigger: R }),
193
193
  u(Ce, {
194
194
  id: "unit-form",
195
195
  modelValue: v.value,
196
196
  "onUpdate:modelValue": e[9] || (e[9] = (r) => v.value = r),
197
- "is-container": o(ke).FmForm,
197
+ "is-container": o(Ue).FmForm,
198
198
  "is-container-props": {
199
199
  onValidationSuccess: te,
200
200
  blameFormChildOnValidationFailed: !0
@@ -203,18 +203,18 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
203
203
  "onOn:clickedAway": o(y)
204
204
  }, {
205
205
  "side-sheet-header": h(() => [
206
- d("p", Qe, K(T.value), 1)
206
+ m("p", Qe, K(T.value), 1)
207
207
  ]),
208
208
  "side-sheet-footer": h(() => [
209
- d("div", el, [
210
- u(me, {
209
+ m("div", el, [
210
+ u(de, {
211
211
  label: X.value,
212
212
  size: "lg",
213
213
  type: "submit",
214
214
  variant: "primary"
215
215
  }, null, 8, ["label"]),
216
- u(me, {
217
- label: o(m)("common.cancel"),
216
+ u(de, {
217
+ label: o(d)("common.cancel"),
218
218
  size: "lg",
219
219
  variant: "tertiary",
220
220
  onClick: e[8] || (e[8] = () => v.value = !1)
@@ -222,58 +222,58 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
222
222
  ])
223
223
  ]),
224
224
  default: h(() => [
225
- d("div", Xe, [
225
+ m("div", Xe, [
226
226
  u(ve, {
227
- title: o(m)("hr.employee.form.employeeSetting")
227
+ title: o(d)("hr.employee.form.employeeSetting")
228
228
  }, {
229
229
  default: h(() => [
230
230
  u(fe, {
231
- label: o(m)("hr.employee.form.masterUserConfig")
231
+ label: o(d)("hr.employee.form.masterUserConfig")
232
232
  }, {
233
233
  default: h(() => [
234
234
  u(n, {
235
235
  modelValue: s.value.isMasterUser,
236
236
  "onUpdate:modelValue": e[0] || (e[0] = (r) => s.value.isMasterUser = r),
237
237
  value: "masterUser",
238
- label: o(m)("hr.employee.form.masterUser"),
239
- sublabel: o(m)("hr.employee.form.masterUserSublabel"),
238
+ label: o(d)("hr.employee.form.masterUser"),
239
+ sublabel: o(d)("hr.employee.form.masterUserSublabel"),
240
240
  "label-placement": "right"
241
241
  }, null, 8, ["modelValue", "label", "sublabel"])
242
242
  ]),
243
243
  _: 1
244
244
  }, 8, ["label"]),
245
- d("div", Ye, [
246
- s.value.isMasterUser ? (_(), D(I, {
245
+ m("div", Ye, [
246
+ s.value.isMasterUser ? (g(), D(I, {
247
247
  key: 0,
248
248
  modelValue: s.value.code,
249
249
  "onUpdate:modelValue": e[1] || (e[1] = (r) => s.value.code = r),
250
- label: o(m)("hr.employee.form.code")
250
+ label: o(d)("hr.employee.form.code")
251
251
  }, null, 8, ["modelValue", "label"])) : Q("", !0),
252
252
  u(I, {
253
253
  modelValue: s.value.name,
254
254
  "onUpdate:modelValue": e[2] || (e[2] = (r) => s.value.name = r),
255
255
  class: "w-full",
256
- label: o(m)("hr.employee.form.name"),
257
- rules: [(r) => !!r || o(m)("hr.employee.form.required")]
256
+ label: o(d)("hr.employee.form.name"),
257
+ rules: [(r) => !!r || o(d)("hr.employee.form.required")]
258
258
  }, null, 8, ["modelValue", "label", "rules"])
259
259
  ]),
260
260
  u(fe, {
261
- label: o(m)("hr.employee.form.passcode")
261
+ label: o(d)("hr.employee.form.passcode")
262
262
  }, {
263
263
  default: h(() => [
264
- d("div", Ze, [
264
+ m("div", Ze, [
265
265
  u(V, {
266
266
  modelValue: a.value,
267
267
  "onUpdate:modelValue": e[5] || (e[5] = (r) => a.value = r),
268
268
  rules: [
269
- (r) => (r == null ? void 0 : r.filter((oe) => !!oe).length) !== _e ? o(m)("hr.employee.form.passcodeRequired") : !0
269
+ (r) => (r == null ? void 0 : r.filter((oe) => !!oe).length) !== ge ? o(d)("hr.employee.form.passcodeRequired") : !0
270
270
  ]
271
271
  }, {
272
272
  default: h(() => [
273
273
  u(B, {
274
274
  modelValue: a.value,
275
275
  "onUpdate:modelValue": e[3] || (e[3] = (r) => a.value = r),
276
- length: _e,
276
+ length: ge,
277
277
  masked: t.value,
278
278
  onComplete: e[4] || (e[4] = (r) => s.value.passcode = r),
279
279
  onFocus: f
@@ -285,9 +285,9 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
285
285
  variant: "secondary",
286
286
  "text-color": "primary",
287
287
  "border-color": "primary",
288
- label: o(m)("hr.employee.form.passcodeGenerate"),
288
+ label: o(d)("hr.employee.form.passcodeGenerate"),
289
289
  size: "md",
290
- onClick: k
290
+ onClick: U
291
291
  }, null, 8, ["label"])
292
292
  ])
293
293
  ]),
@@ -297,30 +297,30 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
297
297
  _: 1
298
298
  }, 8, ["title"]),
299
299
  u(ve, {
300
- title: o(m)("hr.employee.form.role")
300
+ title: o(d)("hr.employee.form.role")
301
301
  }, {
302
302
  default: h(() => [
303
303
  u(Ee, {
304
304
  modelValue: o(C),
305
305
  "onUpdate:modelValue": e[6] || (e[6] = (r) => ne(C) ? C.value = r : null),
306
- placeholder: o(m)("hr.restaurant.search.placeholder")
306
+ placeholder: o(d)("hr.restaurant.search.placeholder")
307
307
  }, null, 8, ["modelValue", "placeholder"]),
308
308
  u(V, {
309
309
  modelValue: b.value,
310
310
  "onUpdate:modelValue": e[7] || (e[7] = (r) => b.value = r),
311
- rules: [(r) => r.length > 0 || o(m)("hr.employee.form.atLeastOneRestaurant")]
311
+ rules: [(r) => r.length > 0 || o(d)("hr.employee.form.atLeastOneRestaurant")]
312
312
  }, {
313
313
  default: h(() => [
314
314
  u(ie, {
315
- "model-value": U.value,
316
- label: o(m)("hr.employee.form.all"),
315
+ "model-value": k.value,
316
+ label: o(d)("hr.employee.form.all"),
317
317
  value: "1",
318
318
  indeterminate: N.value.length > 0,
319
319
  "onUpdate:modelValue": ee
320
320
  }, null, 8, ["model-value", "label", "indeterminate"]),
321
- (_(!0), $(G, null, Ve(M.value, (r, oe) => {
322
- var de;
323
- return _(), $(G, { key: oe }, [
321
+ (g(!0), $(G, null, Ve(M.value, (r, oe) => {
322
+ var me;
323
+ return g(), $(G, { key: oe }, [
324
324
  u(ie, {
325
325
  "model-value": b.value,
326
326
  label: r.label,
@@ -328,13 +328,13 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
328
328
  disabled: r.disabled,
329
329
  "onUpdate:modelValue": j
330
330
  }, null, 8, ["model-value", "label", "value", "disabled"]),
331
- b.value.includes(r.value) ? (_(), D(Re, {
331
+ b.value.includes(r.value) ? (g(), D(Re, {
332
332
  key: 0,
333
333
  class: "ml-32 mr-8",
334
334
  items: r.roleOptions,
335
335
  "model-value": A(r.value),
336
336
  multiselect: !1,
337
- placeholder: ((de = r.roleOptions.find((se) => !se.disabled) ?? r.roleOptions[0]) == null ? void 0 : de.label) ?? "",
337
+ placeholder: ((me = r.roleOptions.find((se) => !se.disabled) ?? r.roleOptions[0]) == null ? void 0 : me.label) ?? "",
338
338
  disabled: r.disabled,
339
339
  "onUpdate:modelValue": (se) => W(r.value, se)
340
340
  }, null, 8, ["items", "model-value", "placeholder", "disabled", "onUpdate:modelValue"])) : Q("", !0)
@@ -362,39 +362,39 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
362
362
  }, sl = {
363
363
  class: "flex"
364
364
  }, rl = {
365
- class: "space-y-4 hidden xs:block"
365
+ class: "space-y-4 sm:hidden md:hidden lg:hidden"
366
366
  }, nl = {
367
367
  class: "px-16"
368
368
  }, ul = {
369
369
  class: "px-16 flex items-start gap-8"
370
370
  }, il = {
371
- class: "pb-64 hidden xs:block"
372
- }, ml = {
373
- class: "space-y-4"
371
+ class: "pb-64 sm:hidden md:hidden lg:hidden"
374
372
  }, dl = {
373
+ class: "space-y-4"
374
+ }, ml = {
375
375
  class: "fm-typo-en-body-lg-600"
376
376
  }, cl = {
377
377
  key: 0,
378
378
  class: "mr-4"
379
379
  }, pl = {
380
380
  class: "text-fm-color-typo-secondary"
381
- }, Ul = /* @__PURE__ */ ge({
381
+ }, kl = /* @__PURE__ */ _e({
382
382
  __name: "EmployeeList",
383
383
  setup(S, {
384
384
  expose: O
385
385
  }) {
386
386
  const {
387
387
  t: i
388
- } = xe(), E = g(), c = Se(), q = ue(), {
388
+ } = we(), E = _(), c = Se(), q = ue(), {
389
389
  sessionUser: H
390
- } = Fe(), m = x(() => c.employees.value), {
390
+ } = Fe(), d = w(() => c.employees.value), {
391
391
  searchKey: v,
392
392
  filter: L
393
- } = Ue(""), R = x(() => {
393
+ } = ke(""), R = w(() => {
394
394
  var a;
395
- return (a = m.value) == null ? void 0 : a.filter((t) => {
396
- const f = !E.value || t.restaurants.some((y) => E.value.includes(y.restaurantId)), k = !U.value || t.restaurants.some((y) => y.roleId && U.value.includes(y.roleId));
397
- return f && k && L([t.code, t.name, `${t.restaurants.map((y) => T(y)).join(" ")}`]);
395
+ return (a = d.value) == null ? void 0 : a.filter((t) => {
396
+ const f = !E.value || t.restaurants.some((y) => E.value.includes(y.restaurantId)), U = !k.value || t.restaurants.some((y) => y.roleId && k.value.includes(y.roleId));
397
+ return f && U && L([t.code, t.name, `${t.restaurants.map((y) => T(y)).join(" ")}`]);
398
398
  });
399
399
  }), P = Ge(), T = (a) => {
400
400
  const t = P.value[a.restaurantId], f = t == null ? void 0 : t.profile.code;
@@ -415,9 +415,9 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
415
415
  enableSorting: !1,
416
416
  cell(a) {
417
417
  return a.row.original.restaurants.map((t, f) => {
418
- const k = T(t);
418
+ const U = T(t);
419
419
  return re("div", (f ? `
420
- ` : "") + k);
420
+ ` : "") + U);
421
421
  });
422
422
  }
423
423
  }, {
@@ -433,7 +433,7 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
433
433
  },
434
434
  cell: (a) => re("div", {
435
435
  class: "w-full flex justify-end items-center"
436
- }, [re(ke.FmButton, {
436
+ }, [re(Ue.FmButton, {
437
437
  prependIcon: "delete",
438
438
  variant: De.Tertiary,
439
439
  textColor: "neutral-gray-400",
@@ -441,10 +441,10 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
441
441
  t.stopPropagation(), A(a.row.original);
442
442
  }
443
443
  })])
444
- }], w = we(), s = Ne(), C = g(), z = g(), Y = x(() => c.restrictEmployeeIds.value);
444
+ }], x = xe(), s = Ne(), C = _(), z = _(), Y = w(() => c.restrictEmployeeIds.value);
445
445
  function J(a) {
446
446
  const t = Y.value.includes(a._id);
447
- return t && w.open({
447
+ return t && x.open({
448
448
  message: i("hr.employee.cannotUpdateMasterUser", {
449
449
  name: a.name
450
450
  }),
@@ -473,17 +473,17 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
473
473
  close: !0
474
474
  }
475
475
  }).onPrimary(async () => {
476
- await (a.isMasterUser ? c.deleteMasterEmployee : c.deleteEmployee)(a).then(() => w.open({
476
+ await (a.isMasterUser ? c.deleteMasterEmployee : c.deleteEmployee)(a).then(() => x.open({
477
477
  message: i("hr.employee.remove.successMessage", {
478
478
  name: a.name
479
479
  }),
480
480
  type: "success"
481
- })).catch((k) => w.open({
482
- message: k,
481
+ })).catch((U) => x.open({
482
+ message: U,
483
483
  type: "error"
484
484
  })), s.close();
485
485
  });
486
- }, W = g("");
486
+ }, W = _("");
487
487
  be(() => C.value && C.value.restaurants, (a) => {
488
488
  a && a.length > 0 && (W.value = "");
489
489
  });
@@ -491,18 +491,18 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
491
491
  var a;
492
492
  (a = z.value) == null || a.trigger();
493
493
  }
494
- const N = x(() => ue().roles.value.map((a) => ({
494
+ const N = w(() => ue().roles.value.map((a) => ({
495
495
  label: a.name,
496
496
  value: a._id
497
- }))), U = g();
497
+ }))), k = _();
498
498
  async function ee() {
499
499
  try {
500
- await c.syncUsersMeta(), await c.readEmployees(), w.open({
500
+ await c.syncUsersMeta(), await c.readEmployees(), x.open({
501
501
  message: i("hr.employee.sync.successMessage"),
502
502
  type: "success"
503
503
  });
504
504
  } catch (a) {
505
- console.error("Error syncing users:", a), w.open({
505
+ console.error("Error syncing users:", a), x.open({
506
506
  message: i("hr.employee.sync.errorMessage"),
507
507
  type: "error"
508
508
  });
@@ -518,15 +518,15 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
518
518
  filteredEmployees: R
519
519
  }), (a, t) => {
520
520
  var l;
521
- const f = p("FmButton"), k = p("FmTooltip"), y = p("FmSearch"), le = p("FmTable"), ae = p("FmListItem"), te = p("FmList");
522
- return _(), $(G, null, [u(ll, {
521
+ const f = p("FmButton"), U = p("FmTooltip"), y = p("FmSearch"), le = p("FmTable"), ae = p("FmListItem"), te = p("FmList");
522
+ return g(), $(G, null, [u(ll, {
523
523
  ref_key: "employeeFormRef",
524
524
  ref: z,
525
525
  modelValue: C.value,
526
526
  "onUpdate:modelValue": t[0] || (t[0] = (e) => C.value = e),
527
527
  "role-error-message": W.value,
528
528
  class: "gap-8"
529
- }, null, 8, ["modelValue", "role-error-message"]), d("div", al, [d("div", tl, [d("div", ol, [u(o(ce), {
529
+ }, null, 8, ["modelValue", "role-error-message"]), m("div", al, [m("div", tl, [m("div", ol, [u(o(ce), {
530
530
  modelValue: E.value,
531
531
  "onUpdate:modelValue": t[1] || (t[1] = (e) => E.value = e),
532
532
  "managable-only": !1,
@@ -534,14 +534,14 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
534
534
  variant: "dark",
535
535
  class: "!w-auto"
536
536
  }, null, 8, ["modelValue"]), u(pe, {
537
- modelValue: U.value,
538
- "onUpdate:modelValue": t[2] || (t[2] = (e) => U.value = e),
537
+ modelValue: k.value,
538
+ "onUpdate:modelValue": t[2] || (t[2] = (e) => k.value = e),
539
539
  multiple: "",
540
540
  variant: "dark",
541
541
  items: N.value,
542
542
  "selected-prefix": o(i)("hr.employee.filter.selected_role_prefix"),
543
543
  placeholder: o(i)("hr.employee.filter.role_placeholder")
544
- }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), d("div", sl, [(l = o(H)) != null && l.role.isAdmin ? (_(), D(k, {
544
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), m("div", sl, [(l = o(H)) != null && l.role.isAdmin ? (g(), D(U, {
545
545
  key: 0,
546
546
  content: o(i)("hr.employee.sync.tooltip")
547
547
  }, {
@@ -558,12 +558,12 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
558
558
  autofocus: "",
559
559
  class: "pl-4 w-[320px]",
560
560
  placeholder: o(i)("hr.employee.search.placeholder")
561
- }, null, 8, ["modelValue", "placeholder"])])]), d("div", rl, [d("div", nl, [u(y, {
561
+ }, null, 8, ["modelValue", "placeholder"])])]), m("div", rl, [m("div", nl, [u(y, {
562
562
  modelValue: o(v),
563
563
  "onUpdate:modelValue": t[4] || (t[4] = (e) => ne(v) ? v.value = e : null),
564
564
  autofocus: "",
565
565
  placeholder: o(i)("hr.employee.search.placeholder")
566
- }, null, 8, ["modelValue", "placeholder"])]), u(We), d("div", ul, [u(o(ce), {
566
+ }, null, 8, ["modelValue", "placeholder"])]), u(We), m("div", ul, [u(o(ce), {
567
567
  modelValue: E.value,
568
568
  "onUpdate:modelValue": t[5] || (t[5] = (e) => E.value = e),
569
569
  "managable-only": !1,
@@ -571,14 +571,14 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
571
571
  variant: "dark",
572
572
  class: "!w-auto"
573
573
  }, null, 8, ["modelValue"]), u(pe, {
574
- modelValue: U.value,
575
- "onUpdate:modelValue": t[6] || (t[6] = (e) => U.value = e),
574
+ modelValue: k.value,
575
+ "onUpdate:modelValue": t[6] || (t[6] = (e) => k.value = e),
576
576
  multiple: "",
577
577
  items: N.value,
578
578
  variant: "dark",
579
579
  "selected-prefix": o(i)("hr.employee.filter.selected_role_prefix"),
580
580
  placeholder: o(i)("hr.employee.filter.role_placeholder")
581
- }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), o(c).employees.value.length > 0 || o(c).isLoading.value ? (_(), D(Te, {
581
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), o(c).employees.value.length > 0 || o(c).isLoading.value ? (g(), D(Te, {
582
582
  key: 0,
583
583
  class: "overflow-auto"
584
584
  }, {
@@ -592,17 +592,17 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
592
592
  "pin-header-row": "",
593
593
  "hide-footer": "",
594
594
  onRowClick: t[7] || (t[7] = (e) => M(e.original))
595
- }, null, 8, ["row-data", "page-size", "loading", "virtual"]), d("div", il, [u(te, {
595
+ }, null, 8, ["row-data", "page-size", "loading", "virtual"]), m("div", il, [u(te, {
596
596
  separator: ""
597
597
  }, {
598
- default: h(() => [(_(!0), $(G, null, Ve(R.value, (e) => (_(), D(ae, {
598
+ default: h(() => [(g(!0), $(G, null, Ve(R.value, (e) => (g(), D(ae, {
599
599
  key: e._id,
600
600
  class: "py-12 px-16 items-center justify-between",
601
601
  onClick: (n) => M(e)
602
602
  }, {
603
- default: h(() => [d("div", ml, [d("p", dl, [e.code ? (_(), $("span", cl, K(e.code) + ".", 1)) : Q("", !0), Oe(K(e.name), 1)]), d("div", pl, [d("p", null, K(o(i)("hr.employee.restaurants", {
603
+ default: h(() => [m("div", dl, [m("p", ml, [e.code ? (g(), $("span", cl, K(e.code) + ".", 1)) : Q("", !0), Oe(K(e.name), 1)]), m("div", pl, [m("p", null, K(o(i)("hr.employee.restaurants", {
604
604
  restaurants: e.restaurants.map((n) => T(n)).join(", ")
605
- })), 1), d("p", null, " Since: " + K(e.since), 1)])]), u(f, {
605
+ })), 1), m("p", null, " Since: " + K(e.since), 1)])]), u(f, {
606
606
  icon: "delete",
607
607
  variant: "tertiary",
608
608
  "text-color": "neutral-gray-400",
@@ -613,7 +613,7 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
613
613
  _: 1
614
614
  })])]),
615
615
  _: 1
616
- })) : (_(), D(o(ze), {
616
+ })) : (g(), D(o(ze), {
617
617
  key: 1,
618
618
  title: o(i)("hr.employee.noData.title"),
619
619
  subtitle: o(i)("hr.employee.noData.subtitle")
@@ -622,5 +622,5 @@ const Qe = { class: "fm-typo-en-title-md-600" }, Xe = { class: "space-y-40" }, Y
622
622
  }
623
623
  });
624
624
  export {
625
- Ul as default
625
+ kl as default
626
626
  };
@@ -3,16 +3,16 @@ import { useRouter as of, useRoute as cf } from "vue-router";
3
3
  import { useCoreStore as hf, useI18n as uf } from "@feedmepos/mf-common";
4
4
  import { _ as vf } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
5
  import { _ as pf } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
- import { u as df } from "./useAppStore-D-SLROq6.js";
6
+ import { u as df } from "./useAppStore-BMisdZ57.js";
7
7
  import "@feedmepos/ui-library";
8
8
  /* empty css */
9
- import { u as mf } from "./employee-B3jBmvNJ.js";
10
- import "./lodash-CglPbFKR.js";
11
- import "./index-BS6B6k7h.js";
12
- import { R as vt } from "./app-RUdgf-7_.js";
13
- import "./useReportPermissions-Cx4ghxj6.js";
14
- import "./dayjs.min-D9w2-Exz.js";
15
- import "./timesheet-fOBJOS1i.js";
9
+ import { u as mf } from "./employee-pAypR6MP.js";
10
+ import "./lodash-D4y44Bjw.js";
11
+ import "./index-bp5uff_3.js";
12
+ import { R as vt } from "./app-BA8Bg7Fs.js";
13
+ import "./useReportPermissions-OjM-nHtC.js";
14
+ import "./dayjs.min-CEZE1nhx.js";
15
+ import "./timesheet-DLosZfP0.js";
16
16
  var In = {};
17
17
  /*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
18
18
  var jt = {};
@@ -4,13 +4,13 @@ import { useI18n as N } from "@feedmepos/mf-common";
4
4
  import { _ as g } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
5
  import { _ as h } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
6
  import "@feedmepos/ui-library";
7
- import "./index-BS6B6k7h.js";
8
- import { R as v } from "./app-RUdgf-7_.js";
9
- import "./useAppStore-D-SLROq6.js";
10
- import "./index-BMVQbdBd.js";
7
+ import "./index-bp5uff_3.js";
8
+ import { R as v } from "./app-BA8Bg7Fs.js";
9
+ import "./useAppStore-BMisdZ57.js";
10
+ import "./index-C-bqkIkl.js";
11
11
  /* empty css */
12
12
  /* empty css */
13
- import "./team-afjBSzOz.js";
13
+ import "./team-DcE1JQXZ.js";
14
14
  const w = { class: "space-y-24" }, P = /* @__PURE__ */ V({
15
15
  __name: "Main",
16
16
  setup(x) {
@@ -2,9 +2,9 @@ import { defineComponent as W, computed as g, resolveComponent as c, createEleme
2
2
  import { useI18n as j, useCoreStore as Y } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as q, useDialog as Z, useBreakpoints as ee, components as se, FmButtonColorThemeVariant as te, FmButtonVariant as oe } from "@feedmepos/ui-library";
4
4
  import { _ as ne } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
5
- import { z as le, u as K, m as G, n as ie, o as R, w as ae, x as re, A as me } from "./index-BS6B6k7h.js";
6
- import { u as ue } from "./useLoading-CLQGJW7G.js";
7
- import { a as ce } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-bvPOPUhu.js";
5
+ import { z as le, u as K, m as G, n as ie, o as R, w as ae, x as re, A as me } from "./index-bp5uff_3.js";
6
+ import { u as ue } from "./useLoading-JdhZp_cM.js";
7
+ import { a as ce } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DrU4O0ww.js";
8
8
  const de = { class: "flex flex-row items-center gap-8" }, pe = /* @__PURE__ */ W({
9
9
  __name: "PermissionWithTooltip",
10
10
  props: {