@feedmepos/mf-hrm-portal 2.3.2-dev.2 → 2.3.2-dev.20

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 (82) hide show
  1. package/dist/{ApprovalCodeList-sHnINTik.js → ApprovalCodeList-eCTF8Rwt.js} +7 -7
  2. package/dist/AuditLogList-YzR5ysmN.js +2021 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BbsPesWY.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang--660w-zJ.js} +2 -2
  4. package/dist/{EmployeeList-D4oy5hXz.js → EmployeeList-C2ctTGCo.js} +8 -8
  5. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-Cl053Tg1.js → FormSection.vue_vue_type_script_setup_true_lang-DWvJM14K.js} +1 -1
  6. package/dist/{GrantUserList-LWpqhl-5.js → GrantUserList-BoN1MUkB.js} +8 -8
  7. package/dist/{Main-PBJjfzBg.js → Main-BLmTdeYO.js} +5 -5
  8. package/dist/{Main-BWKb-QIE.js → Main-CIldvI5X.js} +2274 -2280
  9. package/dist/{Main-CVGiOYpC.js → Main-Di-083Pw.js} +29 -29
  10. package/dist/MyPosProfile-CctvT3RF.js +360 -0
  11. package/dist/{PermissionSetList-D2qZVlF4.js → PermissionSetList-BzvVAzwG.js} +126 -126
  12. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-JgrJvMly.js +4212 -0
  13. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DRGTxOMW.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-BdjAh48A.js} +414 -448
  14. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-DFDTw0lj.js → RoleForm.vue_vue_type_script_setup_true_lang-WCNUeA3G.js} +74 -74
  15. package/dist/{RoleList-DG0crFzW.js → RoleList-wPupuMBG.js} +7 -7
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Cs0rhCa3.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DcBIt4DL.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-C4J6jYtG.js → ScheduleGeneralPage-NCKqPyt5.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-3UqO6uPu.js → ScheduleModal.vue_vue_type_script_setup_true_lang-CG5Xxj3Q.js} +4 -4
  19. package/dist/{SchedulePage-ICzggri0.js → SchedulePage-BZ5bKLly.js} +197 -209
  20. package/dist/{SchedulePositionPage-BshUCd_C.js → SchedulePositionPage-CwHd3rf2.js} +3 -3
  21. package/dist/{SelectFilter-D9T0nFvG.js → SelectFilter-DLZNvKwI.js} +2 -3
  22. package/dist/TeamMemberList-D8uWsS0J.js +2082 -0
  23. package/dist/TimesheetList-K6doo0BX.js +408 -0
  24. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BLqgALLe.js → TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-DFoIix3D.js} +7 -7
  25. package/dist/{app-n6d4AmtP.js → app-BGzac7xv.js} +5618 -4632
  26. package/dist/app.js +1 -1
  27. package/dist/{approval-code-1j1OoXt1.js → approval-code-BBNbWSqR.js} +4 -4
  28. package/dist/{dayjs.min-DdNivv4b.js → dayjs.min-ey-9Jb-9.js} +20 -20
  29. package/dist/employee-D_COMGXq.js +237 -0
  30. package/dist/{grant-user-BmTyexk3.js → grant-user-CTTTpewT.js} +2 -2
  31. package/dist/{iteration-y_jodvfN.js → index-CTqdA7gA.js} +573 -558
  32. package/dist/{lodash-B2eWEGH4.js → lodash-DNSDZgnL.js} +1 -1
  33. package/dist/member-grant-5DnD17dB.js +54 -0
  34. package/dist/restaurant-qoOY3iMJ.js +49 -0
  35. package/dist/role-BEbd5Qsi.js +91 -0
  36. package/dist/rule-BLG5i_xT.js +845 -0
  37. package/dist/src/api/audit-log/index.d.ts +2 -0
  38. package/dist/src/api/my-pos-profile/index.d.ts +1 -3
  39. package/dist/src/composables/useTenant.d.ts +11 -0
  40. package/dist/src/helpers/employee-merge.d.ts +33 -0
  41. package/dist/src/helpers/iteration.d.ts +9 -2
  42. package/dist/src/helpers/permission-set.d.ts +1 -102
  43. package/dist/src/helpers/restaurant-lookup.d.ts +19 -0
  44. package/dist/src/helpers/role-merge.d.ts +11 -0
  45. package/dist/src/helpers/rule.d.ts +2 -2
  46. package/dist/src/router/courtGuard.d.ts +4 -0
  47. package/dist/src/stores/approval-code.d.ts +1 -1
  48. package/dist/src/stores/employee.d.ts +2 -2
  49. package/dist/src/stores/grant-user.d.ts +1 -1
  50. package/dist/src/stores/permission-assignment.d.ts +2 -2
  51. package/dist/src/stores/permission-set.d.ts +2 -2
  52. package/dist/src/stores/restaurant.d.ts +2 -2
  53. package/dist/src/stores/role.d.ts +2 -2
  54. package/dist/src/stores/team.d.ts +2 -2
  55. package/dist/src/stores/timesheet.d.ts +2 -2
  56. package/dist/src/types/my-pos-profile.d.ts +2 -3
  57. package/dist/src/views/audit-log/constants.d.ts +1 -1
  58. package/dist/src/views/audit-log/locales/index.d.ts +56 -0
  59. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
  60. package/dist/src/views/hr/locales/index.d.ts +4 -4
  61. package/dist/src/views/hr/timesheet/timesheet-view.d.ts +29 -0
  62. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
  63. package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -4
  64. package/dist/style.css +1 -1
  65. package/dist/tsconfig.app.tsbuildinfo +1 -1
  66. package/dist/{useAppStore-BPARQyvJ.js → useAppStore-BwUs5XGY.js} +1 -1
  67. package/dist/{useLoading-iPESFb6R.js → useLoading-DmAqc_Gx.js} +1 -1
  68. package/dist/useMessage-_ywT_N9X.js +17 -0
  69. package/dist/useReportPermissions-PEzIBX1U.js +80 -0
  70. package/dist/useSsoProviders-CwLbvOdH.js +41 -0
  71. package/package.json +5 -5
  72. package/dist/AuditLogList-C9C2emU9.js +0 -1950
  73. package/dist/MyPosProfile-BQCBFMFw.js +0 -301
  74. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ZSREAS1r.js +0 -4243
  75. package/dist/TeamMemberList-C970Iqlj.js +0 -2086
  76. package/dist/TimesheetList-nxhr0EWj.js +0 -402
  77. package/dist/employee-BlfleiCU.js +0 -210
  78. package/dist/member-grant-CzZUdO_s.js +0 -55
  79. package/dist/restaurant-Dl6yx37M.js +0 -51
  80. package/dist/role-DfZi7Ssk.js +0 -93
  81. package/dist/rule-ChmhcGgA.js +0 -788
  82. package/dist/useReportPermissions-By-BoJZb.js +0 -82
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { H as e, F as o, I as p } from "./app-n6d4AmtP.js";
1
+ import { K as e, J as o, L as p } from "./app-BGzac7xv.js";
2
2
  export {
3
3
  e as FmApp,
4
4
  o as i18nMessages,
@@ -1,6 +1,6 @@
1
- import { defineStore as C } from "pinia";
1
+ import { defineStore as A } from "pinia";
2
2
  import { ref as l } from "vue";
3
- import { g as p, b as s } from "./app-n6d4AmtP.js";
3
+ import { g as p, b as s } from "./app-BGzac7xv.js";
4
4
  const n = {
5
5
  async getApprovalCodes() {
6
6
  return p(await s("approval-codes").get(""));
@@ -15,7 +15,7 @@ const n = {
15
15
  })
16
16
  );
17
17
  }
18
- }, A = C("approvalCode", () => {
18
+ }, C = A("hrm-approval-code", () => {
19
19
  const r = l([]), a = l(!1);
20
20
  async function d() {
21
21
  a.value = !0;
@@ -52,7 +52,7 @@ const n = {
52
52
  createApprovalCodes: v,
53
53
  revokeApprovalCode: i
54
54
  };
55
- }), g = A;
55
+ }), g = C;
56
56
  export {
57
57
  g as u
58
58
  };
@@ -1,10 +1,10 @@
1
- import { y as Q, x as K } from "./app-n6d4AmtP.js";
1
+ import { z as Q, y as K } from "./app-BGzac7xv.js";
2
2
  var E = { exports: {} };
3
3
  (function(V, X) {
4
- (function(W, x) {
5
- V.exports = x();
4
+ (function(W, k) {
5
+ V.exports = k();
6
6
  })(K, function() {
7
- var W = 1e3, x = 6e4, N = 36e5, A = "millisecond", S = "second", w = "minute", O = "hour", M = "day", T = "week", m = "month", U = "quarter", y = "year", _ = "date", J = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, B = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, G = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
7
+ var W = 1e3, k = 6e4, N = 36e5, A = "millisecond", S = "second", w = "minute", O = "hour", M = "day", T = "week", m = "month", U = "quarter", y = "year", _ = "date", z = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, B = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, G = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
8
8
  var n = ["th", "st", "nd", "rd"], t = s % 100;
9
9
  return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
10
10
  } }, I = function(s, n, t) {
@@ -23,13 +23,13 @@ var E = { exports: {} };
23
23
  return { M: m, y, w: T, d: M, D: _, h: O, m: w, s: S, ms: A, Q: U }[s] || String(s || "").toLowerCase().replace(/s$/, "");
24
24
  }, u: function(s) {
25
25
  return s === void 0;
26
- } }, k = "en", D = {};
27
- D[k] = G;
28
- var Z = "$isDayjsObject", F = function(s) {
29
- return s instanceof C || !(!s || !s[Z]);
26
+ } }, x = "en", D = {};
27
+ D[x] = G;
28
+ var J = "$isDayjsObject", F = function(s) {
29
+ return s instanceof C || !(!s || !s[J]);
30
30
  }, j = function s(n, t, r) {
31
31
  var e;
32
- if (!n) return k;
32
+ if (!n) return x;
33
33
  if (typeof n == "string") {
34
34
  var i = n.toLowerCase();
35
35
  D[i] && (e = i), t && (D[i] = t, e = i);
@@ -39,7 +39,7 @@ var E = { exports: {} };
39
39
  var o = n.name;
40
40
  D[o] = n, e = o;
41
41
  }
42
- return !r && e && (k = e), e || !r && k;
42
+ return !r && e && (x = e), e || !r && x;
43
43
  }, f = function(s, n) {
44
44
  if (F(s)) return s.clone();
45
45
  var t = typeof n == "object" ? n : {};
@@ -50,7 +50,7 @@ var E = { exports: {} };
50
50
  };
51
51
  var C = function() {
52
52
  function s(t) {
53
- this.$L = j(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[Z] = !0;
53
+ this.$L = j(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[J] = !0;
54
54
  }
55
55
  var n = s.prototype;
56
56
  return n.parse = function(t) {
@@ -74,7 +74,7 @@ var E = { exports: {} };
74
74
  }, n.$utils = function() {
75
75
  return a;
76
76
  }, n.isValid = function() {
77
- return this.$d.toString() !== J;
77
+ return this.$d.toString() !== z;
78
78
  }, n.isSame = function(t, r) {
79
79
  var e = f(t);
80
80
  return this.startOf(r) <= e && e <= this.endOf(r);
@@ -139,13 +139,13 @@ var E = { exports: {} };
139
139
  if (u === y) return this.set(y, this.$y + t);
140
140
  if (u === M) return o(1);
141
141
  if (u === T) return o(7);
142
- var c = (e = {}, e[w] = x, e[O] = N, e[S] = W, e)[u] || 1, h = this.$d.getTime() + t * c;
142
+ var c = (e = {}, e[w] = k, e[O] = N, e[S] = W, e)[u] || 1, h = this.$d.getTime() + t * c;
143
143
  return a.w(h, this);
144
144
  }, n.subtract = function(t, r) {
145
145
  return this.add(-1 * t, r);
146
146
  }, n.format = function(t) {
147
147
  var r = this, e = this.$locale();
148
- if (!this.isValid()) return e.invalidDate || J;
148
+ if (!this.isValid()) return e.invalidDate || z;
149
149
  var i = t || "YYYY-MM-DDTHH:mm:ssZ", u = a.z(this), o = this.$H, c = this.$m, h = this.$M, d = e.weekdays, l = e.months, b = e.meridiem, g = function($, v, H, L) {
150
150
  return $ && ($[v] || $(r, i)) || H[v].slice(0, L);
151
151
  }, Y = function($) {
@@ -212,7 +212,7 @@ var E = { exports: {} };
212
212
  }, n.utcOffset = function() {
213
213
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
214
214
  }, n.diff = function(t, r, e) {
215
- var i, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * x, d = this - c, l = function() {
215
+ var i, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * k, d = this - c, l = function() {
216
216
  return a.m(u, c);
217
217
  };
218
218
  switch (o) {
@@ -235,7 +235,7 @@ var E = { exports: {} };
235
235
  i = d / N;
236
236
  break;
237
237
  case w:
238
- i = d / x;
238
+ i = d / k;
239
239
  break;
240
240
  case S:
241
241
  i = d / W;
@@ -263,16 +263,16 @@ var E = { exports: {} };
263
263
  }, n.toString = function() {
264
264
  return this.$d.toUTCString();
265
265
  }, s;
266
- }(), z = C.prototype;
267
- return f.prototype = z, [["$ms", A], ["$s", S], ["$m", w], ["$H", O], ["$W", M], ["$M", m], ["$y", y], ["$D", _]].forEach(function(s) {
268
- z[s[1]] = function(n) {
266
+ }(), Z = C.prototype;
267
+ return f.prototype = Z, [["$ms", A], ["$s", S], ["$m", w], ["$H", O], ["$W", M], ["$M", m], ["$y", y], ["$D", _]].forEach(function(s) {
268
+ Z[s[1]] = function(n) {
269
269
  return this.$g(n, s[0], s[1]);
270
270
  };
271
271
  }), f.extend = function(s, n) {
272
272
  return s.$i || (s(n, C, f), s.$i = !0), f;
273
273
  }, f.locale = j, f.isDayjs = F, f.unix = function(s) {
274
274
  return f(1e3 * s);
275
- }, f.en = D[k], f.Ls = D, f.p = {}, f;
275
+ }, f.en = D[x], f.Ls = D, f.p = {}, f;
276
276
  });
277
277
  })(E);
278
278
  var R = E.exports;
@@ -0,0 +1,237 @@
1
+ import { defineStore as U, storeToRefs as $ } from "pinia";
2
+ import { toRaw as y, ref as I } from "vue";
3
+ import { a as T, s as E } from "./index-CTqdA7gA.js";
4
+ import { b as p, g as m } from "./app-BGzac7xv.js";
5
+ import { d as D } from "./dayjs.min-ey-9Jb-9.js";
6
+ import { i as Y } from "./utils-BZkjJbju.js";
7
+ import { u as M } from "./role-BEbd5Qsi.js";
8
+ import { u as b } from "./restaurant-qoOY3iMJ.js";
9
+ function g(e) {
10
+ return D(Y(e)).format("DD/MM/YYYY");
11
+ }
12
+ function j(e, s, l) {
13
+ const c = new Map(y(s).map((t) => [t._id, t.profile.name])), a = new Map(y(l).map((t) => [t._id, t.name])), r = /* @__PURE__ */ new Map();
14
+ for (const t of e) {
15
+ const f = {
16
+ restaurantId: t.restaurantId,
17
+ restaurantName: c.get(t.restaurantId) || "",
18
+ roleId: t.role,
19
+ roleName: a.get(t.role) || ""
20
+ }, i = r.get(t._id);
21
+ i ? i.outletIds.has(t.restaurantId) || (i.outletIds.add(t.restaurantId), i.employee.restaurants.push(f)) : r.set(t._id, {
22
+ employee: {
23
+ ...t,
24
+ isRestricted: !1,
25
+ since: g(t._id),
26
+ restaurants: [f]
27
+ },
28
+ outletIds: /* @__PURE__ */ new Set([t.restaurantId])
29
+ });
30
+ }
31
+ const n = [];
32
+ for (const { employee: t } of r.values())
33
+ t.restaurants = E(t.restaurants, { selector: "restaurantName" }), n.push(t);
34
+ return E(n, { selector: "name" });
35
+ }
36
+ function A(e, s) {
37
+ const l = new Map(y(e).map((a) => [a._id, a])), c = new Map(y(s).map((a) => [a._id, a.name]));
38
+ return (a) => {
39
+ const r = a.restaurantRole[0];
40
+ return {
41
+ _id: a._id,
42
+ name: a.name,
43
+ code: a.code,
44
+ passcode: a.passcode,
45
+ isMasterUser: a.isMasterUser,
46
+ isRestricted: a.isRestricted,
47
+ restaurantId: (r == null ? void 0 : r.restaurantId) || "",
48
+ role: (r == null ? void 0 : r.roleId) || "",
49
+ since: g(a._id),
50
+ restaurants: E(
51
+ a.restaurantRole.map((n) => {
52
+ const t = l.get(n.restaurantId);
53
+ return {
54
+ restaurantId: n.restaurantId,
55
+ restaurantName: (t == null ? void 0 : t.profile.name) || "",
56
+ restaurantCode: (t == null ? void 0 : t.profile.code) ?? void 0,
57
+ roleId: n.roleId,
58
+ roleName: c.get(n.roleId) || ""
59
+ };
60
+ }),
61
+ { selector: "restaurantName" }
62
+ )
63
+ };
64
+ };
65
+ }
66
+ function J(e, s, l) {
67
+ const { nameById: c } = T(s), a = /* @__PURE__ */ new Map();
68
+ for (const r of y(l))
69
+ a.has(r._id) || a.set(r._id, r.name);
70
+ return e.flatMap(
71
+ (r) => r.restaurants.map((n, t) => ({
72
+ code: t === 0 ? Reflect.get(r, "code") : "",
73
+ name: t === 0 ? r.name : "",
74
+ passcode: t === 0 ? r.passcode : "",
75
+ since: t === 0 ? r.since : "",
76
+ restaurant: c.get(n.restaurantId) || "",
77
+ role: a.get(n.roleId) || ""
78
+ }))
79
+ );
80
+ }
81
+ const u = {
82
+ async readEmployees() {
83
+ return m(await p().get("/pos-users"));
84
+ },
85
+ async readEmployeesPage(e) {
86
+ var s, l;
87
+ return m(
88
+ await p().get("/pos-users/paged", {
89
+ params: {
90
+ limit: e.limit,
91
+ offset: e.offset,
92
+ search: e.search,
93
+ restaurantIds: (s = e.restaurantIds) != null && s.length ? e.restaurantIds : void 0,
94
+ roleIds: (l = e.roleIds) != null && l.length ? e.roleIds : void 0,
95
+ includeEmptyPasscode: e.includeEmptyPasscode || void 0
96
+ }
97
+ })
98
+ );
99
+ },
100
+ async createEmployee(e) {
101
+ return m(
102
+ await p().post("/pos-users", e)
103
+ ).employeeId;
104
+ },
105
+ async createMasterEmployee(e) {
106
+ return m(
107
+ await p().post("/pos-users/master-user", e)
108
+ ).employeeId;
109
+ },
110
+ async migrateToMasterEmployee(e, s) {
111
+ await p().put(`/pos-users/migrate/${e}`, s);
112
+ },
113
+ async updateEmployee(e, s) {
114
+ await p().put(`/pos-users/${e}`, s);
115
+ },
116
+ async updateMasterEmployee(e, s) {
117
+ await p().put(`/pos-users/master-user/${e}`, s);
118
+ },
119
+ async deleteEmployee(e) {
120
+ await p().put(`/pos-users/${e._id}`, {
121
+ user: e,
122
+ roles: [],
123
+ previousRoles: e.restaurants.map((s) => ({
124
+ restaurantId: s.restaurantId,
125
+ roleId: s.roleId
126
+ }))
127
+ });
128
+ },
129
+ async deleteMasterEmployee(e) {
130
+ await p().put(`/pos-users/master-user/${e._id}`, {
131
+ user: e,
132
+ roles: [],
133
+ previousRoles: e.restaurants.map((s) => ({
134
+ restaurantId: s.restaurantId,
135
+ roleId: s.roleId
136
+ }))
137
+ });
138
+ },
139
+ async generateEmployeePasscode(e) {
140
+ return `${m(
141
+ await p().post("/pos-users/generate-passcode", {
142
+ restaurantIds: e.restaurantIds,
143
+ excludePosUserId: e.excludePosUserId
144
+ })
145
+ )}`;
146
+ },
147
+ async syncUsersMeta() {
148
+ await p().post("/pos-users/create-users-meta");
149
+ }
150
+ }, x = U("hrm-employee", () => {
151
+ const e = b(), s = I([]), l = I([]), c = I(0), a = I(!1);
152
+ function r() {
153
+ return A(
154
+ e.restaurants.value,
155
+ M().roles.value
156
+ );
157
+ }
158
+ async function n() {
159
+ try {
160
+ a.value = !0, await e.readRestaurants();
161
+ const o = await u.readEmployees();
162
+ s.value = j(
163
+ o,
164
+ e.restaurants.value,
165
+ M().roles.value
166
+ );
167
+ } finally {
168
+ a.value = !1;
169
+ }
170
+ }
171
+ async function t(o) {
172
+ try {
173
+ a.value = !0, await e.readRestaurants();
174
+ const d = await u.readEmployeesPage(o);
175
+ l.value = d.items.map(r()), c.value = d.total;
176
+ } finally {
177
+ a.value = !1;
178
+ }
179
+ }
180
+ async function f(o, d) {
181
+ await e.readRestaurants();
182
+ const w = d ?? (await u.readEmployeesPage({ ...o, limit: 1, offset: 0 })).total;
183
+ return w === 0 ? [] : (await u.readEmployeesPage({ ...o, limit: w, offset: 0 })).items.map(r());
184
+ }
185
+ async function i(o) {
186
+ return u.createEmployee(o);
187
+ }
188
+ async function v(o, d) {
189
+ await u.updateEmployee(o, d);
190
+ }
191
+ async function _(o) {
192
+ await u.deleteEmployee(o);
193
+ }
194
+ async function P(o) {
195
+ await u.deleteMasterEmployee(o);
196
+ }
197
+ async function h(o) {
198
+ return u.createMasterEmployee(o);
199
+ }
200
+ async function S(o, d) {
201
+ await u.updateMasterEmployee(o, d);
202
+ }
203
+ async function N(o, d) {
204
+ await u.migrateToMasterEmployee(o, d);
205
+ }
206
+ async function R() {
207
+ await u.syncUsersMeta();
208
+ }
209
+ return {
210
+ employees: s,
211
+ listEmployees: l,
212
+ totalEmployees: c,
213
+ isLoading: a,
214
+ readEmployees: n,
215
+ readEmployeesPage: t,
216
+ readAllEmployeesPage: f,
217
+ createEmployee: i,
218
+ updateEmployee: v,
219
+ deleteEmployee: _,
220
+ createMasterEmployee: h,
221
+ updateMasterEmployee: S,
222
+ deleteMasterEmployee: P,
223
+ migrateToMasterUser: N,
224
+ syncUsersMeta: R
225
+ };
226
+ }), K = () => {
227
+ const e = x();
228
+ return {
229
+ ...e,
230
+ ...$(e)
231
+ };
232
+ };
233
+ export {
234
+ u as E,
235
+ J as t,
236
+ K as u
237
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineStore as f } from "pinia";
2
2
  import { ref as u } from "vue";
3
- import { g as s, h as v, b as o } from "./app-n6d4AmtP.js";
3
+ import { g as s, e as v, b as o } from "./app-BGzac7xv.js";
4
4
  const c = {
5
5
  async getGrantUsers() {
6
6
  return s(await o("grant").get(""));
@@ -24,7 +24,7 @@ const c = {
24
24
  })
25
25
  );
26
26
  }
27
- }, w = f("grantUser", () => {
27
+ }, w = f("hrm-grant-user", () => {
28
28
  const r = u([]), a = u(!1);
29
29
  async function l() {
30
30
  a.value = !0;