@feedmepos/mf-hrm-portal 1.1.3-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-zU7fmC4c.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-jbZqer7A.js → RoleList-CsctaXlu.js} +53 -57
  4. package/dist/TeamMemberList-DtXoUa5K.js +1508 -0
  5. package/dist/{TimesheetList-hgT9DrHd.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-7Am6_Zd3.js → lodash-B5BTJU4_.js} +343 -326
  30. package/dist/{Main-DGymQNz9.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-DKhEeLe7.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-DNQh1rE9.js +0 -316
  54. package/dist/Main-BqhrqOzx.js +0 -85
  55. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BvjXcknf.js +0 -3050
  56. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
  57. package/dist/RolePermissionList-Dd8ks5i7.js +0 -285
  58. package/dist/TeamMemberList-uamoOFIV.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-CcbYGJ22.js +0 -2598
  63. package/dist/dayjs.min-CgN1oBQf.js +0 -282
  64. package/dist/employee-khk560IC.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-D5sdamN5.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-CFyc6tnm.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-DOSLuH24.js +0 -180
  76. package/dist/useLoading-BA-GSZ3R.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
@@ -0,0 +1,449 @@
1
+ import { q as se, m as ne, b as O, g as Y, u as ae, p as oe, s as Q } from "./rule-CM7JgjNr.js";
2
+ import { storeToRefs as ie, defineStore as ue } from "pinia";
3
+ import { ref as R } from "vue";
4
+ import { useCoreStore as ce } from "@feedmepos/mf-common";
5
+ import { t as le } from "./index-8ift6lz3.js";
6
+ var K = { exports: {} };
7
+ (function(u, v) {
8
+ (function(I, T) {
9
+ u.exports = T();
10
+ })(ne, function() {
11
+ var I = 1e3, T = 6e4, _ = 36e5, x = "millisecond", b = "second", D = "minute", M = "hour", E = "day", w = "week", p = "month", U = "quarter", i = "year", c = "date", $ = "Invalid Date", X = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ee = /\[([^\]]+)]|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, te = { 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(n) {
12
+ var r = ["th", "st", "nd", "rd"], e = n % 100;
13
+ return "[" + n + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
14
+ } }, V = function(n, r, e) {
15
+ var s = String(n);
16
+ return !s || s.length >= r ? n : "" + Array(r + 1 - s.length).join(e) + n;
17
+ }, re = { s: V, z: function(n) {
18
+ var r = -n.utcOffset(), e = Math.abs(r), s = Math.floor(e / 60), t = e % 60;
19
+ return (r <= 0 ? "+" : "-") + V(s, 2, "0") + ":" + V(t, 2, "0");
20
+ }, m: function n(r, e) {
21
+ if (r.date() < e.date()) return -n(e, r);
22
+ var s = 12 * (e.year() - r.year()) + (e.month() - r.month()), t = r.clone().add(s, p), a = e - t < 0, o = r.clone().add(s + (a ? -1 : 1), p);
23
+ return +(-(s + (e - t) / (a ? t - o : o - t)) || 0);
24
+ }, a: function(n) {
25
+ return n < 0 ? Math.ceil(n) || 0 : Math.floor(n);
26
+ }, p: function(n) {
27
+ return { M: p, y: i, w, d: E, D: c, h: M, m: D, s: b, ms: x, Q: U }[n] || String(n || "").toLowerCase().replace(/s$/, "");
28
+ }, u: function(n) {
29
+ return n === void 0;
30
+ } }, N = "en", A = {};
31
+ A[N] = te;
32
+ var B = "$isDayjsObject", q = function(n) {
33
+ return n instanceof Z || !(!n || !n[B]);
34
+ }, J = function n(r, e, s) {
35
+ var t;
36
+ if (!r) return N;
37
+ if (typeof r == "string") {
38
+ var a = r.toLowerCase();
39
+ A[a] && (t = a), e && (A[a] = e, t = a);
40
+ var o = r.split("-");
41
+ if (!t && o.length > 1) return n(o[0]);
42
+ } else {
43
+ var f = r.name;
44
+ A[f] = r, t = f;
45
+ }
46
+ return !s && t && (N = t), t || !s && N;
47
+ }, m = function(n, r) {
48
+ if (q(n)) return n.clone();
49
+ var e = typeof r == "object" ? r : {};
50
+ return e.date = n, e.args = arguments, new Z(e);
51
+ }, l = re;
52
+ l.l = J, l.i = q, l.w = function(n, r) {
53
+ return m(n, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
54
+ };
55
+ var Z = function() {
56
+ function n(e) {
57
+ this.$L = J(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[B] = !0;
58
+ }
59
+ var r = n.prototype;
60
+ return r.parse = function(e) {
61
+ this.$d = function(s) {
62
+ var t = s.date, a = s.utc;
63
+ if (t === null) return /* @__PURE__ */ new Date(NaN);
64
+ if (l.u(t)) return /* @__PURE__ */ new Date();
65
+ if (t instanceof Date) return new Date(t);
66
+ if (typeof t == "string" && !/Z$/i.test(t)) {
67
+ var o = t.match(X);
68
+ if (o) {
69
+ var f = o[2] - 1 || 0, d = (o[7] || "0").substring(0, 3);
70
+ return a ? new Date(Date.UTC(o[1], f, o[3] || 1, o[4] || 0, o[5] || 0, o[6] || 0, d)) : new Date(o[1], f, o[3] || 1, o[4] || 0, o[5] || 0, o[6] || 0, d);
71
+ }
72
+ }
73
+ return new Date(t);
74
+ }(e), this.init();
75
+ }, r.init = function() {
76
+ var e = this.$d;
77
+ this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
78
+ }, r.$utils = function() {
79
+ return l;
80
+ }, r.isValid = function() {
81
+ return this.$d.toString() !== $;
82
+ }, r.isSame = function(e, s) {
83
+ var t = m(e);
84
+ return this.startOf(s) <= t && t <= this.endOf(s);
85
+ }, r.isAfter = function(e, s) {
86
+ return m(e) < this.startOf(s);
87
+ }, r.isBefore = function(e, s) {
88
+ return this.endOf(s) < m(e);
89
+ }, r.$g = function(e, s, t) {
90
+ return l.u(e) ? this[s] : this.set(t, e);
91
+ }, r.unix = function() {
92
+ return Math.floor(this.valueOf() / 1e3);
93
+ }, r.valueOf = function() {
94
+ return this.$d.getTime();
95
+ }, r.startOf = function(e, s) {
96
+ var t = this, a = !!l.u(s) || s, o = l.p(e), f = function(j, g) {
97
+ var H = l.w(t.$u ? Date.UTC(t.$y, g, j) : new Date(t.$y, g, j), t);
98
+ return a ? H : H.endOf(E);
99
+ }, d = function(j, g) {
100
+ return l.w(t.toDate()[j].apply(t.toDate("s"), (a ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(g)), t);
101
+ }, h = this.$W, y = this.$M, S = this.$D, W = "set" + (this.$u ? "UTC" : "");
102
+ switch (o) {
103
+ case i:
104
+ return a ? f(1, 0) : f(31, 11);
105
+ case p:
106
+ return a ? f(1, y) : f(0, y + 1);
107
+ case w:
108
+ var L = this.$locale().weekStart || 0, F = (h < L ? h + 7 : h) - L;
109
+ return f(a ? S - F : S + (6 - F), y);
110
+ case E:
111
+ case c:
112
+ return d(W + "Hours", 0);
113
+ case M:
114
+ return d(W + "Minutes", 1);
115
+ case D:
116
+ return d(W + "Seconds", 2);
117
+ case b:
118
+ return d(W + "Milliseconds", 3);
119
+ default:
120
+ return this.clone();
121
+ }
122
+ }, r.endOf = function(e) {
123
+ return this.startOf(e, !1);
124
+ }, r.$set = function(e, s) {
125
+ var t, a = l.p(e), o = "set" + (this.$u ? "UTC" : ""), f = (t = {}, t[E] = o + "Date", t[c] = o + "Date", t[p] = o + "Month", t[i] = o + "FullYear", t[M] = o + "Hours", t[D] = o + "Minutes", t[b] = o + "Seconds", t[x] = o + "Milliseconds", t)[a], d = a === E ? this.$D + (s - this.$W) : s;
126
+ if (a === p || a === i) {
127
+ var h = this.clone().set(c, 1);
128
+ h.$d[f](d), h.init(), this.$d = h.set(c, Math.min(this.$D, h.daysInMonth())).$d;
129
+ } else f && this.$d[f](d);
130
+ return this.init(), this;
131
+ }, r.set = function(e, s) {
132
+ return this.clone().$set(e, s);
133
+ }, r.get = function(e) {
134
+ return this[l.p(e)]();
135
+ }, r.add = function(e, s) {
136
+ var t, a = this;
137
+ e = Number(e);
138
+ var o = l.p(s), f = function(y) {
139
+ var S = m(a);
140
+ return l.w(S.date(S.date() + Math.round(y * e)), a);
141
+ };
142
+ if (o === p) return this.set(p, this.$M + e);
143
+ if (o === i) return this.set(i, this.$y + e);
144
+ if (o === E) return f(1);
145
+ if (o === w) return f(7);
146
+ var d = (t = {}, t[D] = T, t[M] = _, t[b] = I, t)[o] || 1, h = this.$d.getTime() + e * d;
147
+ return l.w(h, this);
148
+ }, r.subtract = function(e, s) {
149
+ return this.add(-1 * e, s);
150
+ }, r.format = function(e) {
151
+ var s = this, t = this.$locale();
152
+ if (!this.isValid()) return t.invalidDate || $;
153
+ var a = e || "YYYY-MM-DDTHH:mm:ssZ", o = l.z(this), f = this.$H, d = this.$m, h = this.$M, y = t.weekdays, S = t.months, W = t.meridiem, L = function(g, H, P, z) {
154
+ return g && (g[H] || g(s, a)) || P[H].slice(0, z);
155
+ }, F = function(g) {
156
+ return l.s(f % 12 || 12, g, "0");
157
+ }, j = W || function(g, H, P) {
158
+ var z = g < 12 ? "AM" : "PM";
159
+ return P ? z.toLowerCase() : z;
160
+ };
161
+ return a.replace(ee, function(g, H) {
162
+ return H || function(P) {
163
+ switch (P) {
164
+ case "YY":
165
+ return String(s.$y).slice(-2);
166
+ case "YYYY":
167
+ return l.s(s.$y, 4, "0");
168
+ case "M":
169
+ return h + 1;
170
+ case "MM":
171
+ return l.s(h + 1, 2, "0");
172
+ case "MMM":
173
+ return L(t.monthsShort, h, S, 3);
174
+ case "MMMM":
175
+ return L(S, h);
176
+ case "D":
177
+ return s.$D;
178
+ case "DD":
179
+ return l.s(s.$D, 2, "0");
180
+ case "d":
181
+ return String(s.$W);
182
+ case "dd":
183
+ return L(t.weekdaysMin, s.$W, y, 2);
184
+ case "ddd":
185
+ return L(t.weekdaysShort, s.$W, y, 3);
186
+ case "dddd":
187
+ return y[s.$W];
188
+ case "H":
189
+ return String(f);
190
+ case "HH":
191
+ return l.s(f, 2, "0");
192
+ case "h":
193
+ return F(1);
194
+ case "hh":
195
+ return F(2);
196
+ case "a":
197
+ return j(f, d, !0);
198
+ case "A":
199
+ return j(f, d, !1);
200
+ case "m":
201
+ return String(d);
202
+ case "mm":
203
+ return l.s(d, 2, "0");
204
+ case "s":
205
+ return String(s.$s);
206
+ case "ss":
207
+ return l.s(s.$s, 2, "0");
208
+ case "SSS":
209
+ return l.s(s.$ms, 3, "0");
210
+ case "Z":
211
+ return o;
212
+ }
213
+ return null;
214
+ }(g) || o.replace(":", "");
215
+ });
216
+ }, r.utcOffset = function() {
217
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
218
+ }, r.diff = function(e, s, t) {
219
+ var a, o = this, f = l.p(s), d = m(e), h = (d.utcOffset() - this.utcOffset()) * T, y = this - d, S = function() {
220
+ return l.m(o, d);
221
+ };
222
+ switch (f) {
223
+ case i:
224
+ a = S() / 12;
225
+ break;
226
+ case p:
227
+ a = S();
228
+ break;
229
+ case U:
230
+ a = S() / 3;
231
+ break;
232
+ case w:
233
+ a = (y - h) / 6048e5;
234
+ break;
235
+ case E:
236
+ a = (y - h) / 864e5;
237
+ break;
238
+ case M:
239
+ a = y / _;
240
+ break;
241
+ case D:
242
+ a = y / T;
243
+ break;
244
+ case b:
245
+ a = y / I;
246
+ break;
247
+ default:
248
+ a = y;
249
+ }
250
+ return t ? a : l.a(a);
251
+ }, r.daysInMonth = function() {
252
+ return this.endOf(p).$D;
253
+ }, r.$locale = function() {
254
+ return A[this.$L];
255
+ }, r.locale = function(e, s) {
256
+ if (!e) return this.$L;
257
+ var t = this.clone(), a = J(e, s, !0);
258
+ return a && (t.$L = a), t;
259
+ }, r.clone = function() {
260
+ return l.w(this.$d, this);
261
+ }, r.toDate = function() {
262
+ return new Date(this.valueOf());
263
+ }, r.toJSON = function() {
264
+ return this.isValid() ? this.toISOString() : null;
265
+ }, r.toISOString = function() {
266
+ return this.$d.toISOString();
267
+ }, r.toString = function() {
268
+ return this.$d.toUTCString();
269
+ }, n;
270
+ }(), G = Z.prototype;
271
+ return m.prototype = G, [["$ms", x], ["$s", b], ["$m", D], ["$H", M], ["$W", E], ["$M", p], ["$y", i], ["$D", c]].forEach(function(n) {
272
+ G[n[1]] = function(r) {
273
+ return this.$g(r, n[0], n[1]);
274
+ };
275
+ }), m.extend = function(n, r) {
276
+ return n.$i || (n(r, Z, m), n.$i = !0), m;
277
+ }, m.locale = J, m.isDayjs = q, m.unix = function(n) {
278
+ return m(1e3 * n);
279
+ }, m.en = A[N], m.Ls = A, m.p = {}, m;
280
+ });
281
+ })(K);
282
+ var fe = K.exports;
283
+ const de = /* @__PURE__ */ se(fe), k = {
284
+ async readEmployees() {
285
+ return Y(await O().get("/pos-users"));
286
+ },
287
+ async createEmployee(u) {
288
+ return Y(await O().post("/pos-users", u));
289
+ },
290
+ async createMasterEmployee(u) {
291
+ return Y(await O().post("/pos-users/master-user", u));
292
+ },
293
+ async migrateToMasterEmployee(u, v) {
294
+ return Y(await O().put(`/pos-users/migrate/${u}`, v));
295
+ },
296
+ async updateEmployee(u, v) {
297
+ return Y(await O().put(`/pos-users/${u}`, v));
298
+ },
299
+ async updateMasterEmployee(u, v) {
300
+ return Y(await O().put(`/pos-users/master-user/${u}`, v));
301
+ },
302
+ async deleteEmployee(u) {
303
+ return Y(
304
+ await O().put(`/pos-users/${u._id}`, {
305
+ user: u,
306
+ roles: []
307
+ })
308
+ );
309
+ },
310
+ async deleteMasterEmployee(u) {
311
+ return Y(
312
+ await O().put(`/pos-users/master-user/${u._id}`, {
313
+ user: u,
314
+ roles: []
315
+ })
316
+ );
317
+ },
318
+ async generateEmployeePasscode() {
319
+ return `${Y(await O().get("/pos-users/generate-passcode"))}`;
320
+ },
321
+ async syncUsersMeta() {
322
+ await O().post("/pos-users/create-users-meta");
323
+ }
324
+ };
325
+ async function C(u) {
326
+ const v = ae().roles.value, { restaurants: I } = ce(), T = u.reduce((_, x) => {
327
+ var U;
328
+ const { _id: b, restaurantId: D } = x, M = _.findIndex((i) => i._id === b), E = ((U = I.value.find((i) => i._id === D)) == null ? void 0 : U.profile.name) || "", w = v.find((i) => i._id === x.role), p = {
329
+ restaurantId: D,
330
+ restaurantName: E,
331
+ roleId: (w == null ? void 0 : w._id) || "",
332
+ roleName: (w == null ? void 0 : w.name) || ""
333
+ };
334
+ return M < 0 ? _.push({
335
+ ...x,
336
+ since: de(oe(b)).format("DD/MM/YYYY"),
337
+ restaurants: [p]
338
+ }) : _[M].restaurants.some((i) => i.restaurantId === D) || (_[M].restaurants = Q([..._[M].restaurants, p], {
339
+ selector: "restaurantName"
340
+ })), _;
341
+ }, []);
342
+ return Q(T, { selector: "name" });
343
+ }
344
+ const me = ue("employee", () => {
345
+ const u = R([]), v = R(!1), I = R([]);
346
+ async function T() {
347
+ try {
348
+ v.value = !0;
349
+ const i = await k.readEmployees();
350
+ u.value = await C(i);
351
+ } catch (i) {
352
+ console.log("Error reading employees:", i);
353
+ } finally {
354
+ v.value = !1;
355
+ }
356
+ }
357
+ async function _(i) {
358
+ try {
359
+ const c = await k.createEmployee(i);
360
+ u.value = await C(c);
361
+ } catch (c) {
362
+ console.log("Error creating employee:", c);
363
+ }
364
+ }
365
+ async function x(i, c) {
366
+ try {
367
+ const $ = await k.updateEmployee(i, c);
368
+ u.value = await C($);
369
+ } catch ($) {
370
+ console.log("Error updating employee:", $);
371
+ }
372
+ }
373
+ async function b(i) {
374
+ try {
375
+ const c = await k.deleteEmployee(i);
376
+ u.value = await C(c);
377
+ } catch (c) {
378
+ console.log("Error deleting employee:", c);
379
+ }
380
+ }
381
+ async function D(i) {
382
+ try {
383
+ const c = await k.deleteMasterEmployee(i);
384
+ u.value = await C(c);
385
+ } catch (c) {
386
+ console.log("Error deleting master employee:", c);
387
+ }
388
+ }
389
+ async function M(i) {
390
+ try {
391
+ const c = await k.createMasterEmployee(i);
392
+ u.value = await C(c);
393
+ } catch (c) {
394
+ console.log("Error creating master employee:", c);
395
+ }
396
+ }
397
+ async function E(i, c) {
398
+ try {
399
+ const $ = await k.updateMasterEmployee(i, c);
400
+ u.value = await C($);
401
+ } catch ($) {
402
+ console.log("Error updating master employee:", $);
403
+ }
404
+ }
405
+ async function w(i, c) {
406
+ try {
407
+ const $ = await k.migrateToMasterEmployee(i, c);
408
+ u.value = await C($);
409
+ } catch ($) {
410
+ console.log("Error migrating to master employee:", $);
411
+ }
412
+ }
413
+ async function p() {
414
+ try {
415
+ I.value = await le.readTeamMemberPosUserIds();
416
+ } catch (i) {
417
+ console.log("Error reading team member pos user ids:", i);
418
+ }
419
+ }
420
+ async function U() {
421
+ await k.syncUsersMeta();
422
+ }
423
+ return {
424
+ employees: u,
425
+ restrictEmployeeIds: I,
426
+ isLoading: v,
427
+ readEmployees: T,
428
+ createEmployee: _,
429
+ updateEmployee: x,
430
+ deleteEmployee: b,
431
+ createMasterEmployee: M,
432
+ updateMasterEmployee: E,
433
+ deleteMasterEmployee: D,
434
+ migrateToMasterUser: w,
435
+ readTeamMemberPosUserIds: p,
436
+ syncUsersMeta: U
437
+ };
438
+ }), Me = () => {
439
+ const u = me();
440
+ return {
441
+ ...u,
442
+ ...ie(u)
443
+ };
444
+ };
445
+ export {
446
+ de as D,
447
+ k as E,
448
+ Me as u
449
+ };