@feedmepos/mf-hrm-portal 2.3.2-dev.3 → 2.3.2-dev.4

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 (99) hide show
  1. package/dist/{ApprovalCodeList-D3U4nvlF.js → ApprovalCodeList-BPTnWcra.js} +14 -15
  2. package/dist/{AuditLogList-qGCW7tf0.js → AuditLogList-CvEF4bit.js} +12 -12
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CPX0sv64.js +459 -0
  4. package/dist/EmployeeList-CANPsrQY.js +896 -0
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-mdfK9rtZ.js +90 -0
  6. package/dist/{GrantUserList-C71pal0N.js → GrantUserList-DPj_6Wsg.js} +15 -16
  7. package/dist/{Main-CCdTWngg.js → Main-BWRMirTY.js} +11 -11
  8. package/dist/{Main-BWJPyEU1.js → Main-Cob4hcf-.js} +5 -5
  9. package/dist/Main-DXcSgkhR.js +101 -0
  10. package/dist/MyPosProfile-Bp7-pATz.js +301 -0
  11. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
  12. package/dist/{PermissionSetList-BS-oBunI.js → PermissionSetList-DvAW1q0c.js} +45 -46
  13. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DmbI5vgH.js +4243 -0
  14. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-C8hcooKP.js +1831 -0
  15. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-Bq8-aBSv.js +547 -0
  16. package/dist/RoleList-DsrHgU4s.js +274 -0
  17. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BXihM4sl.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CRR18xmB.js} +1 -1
  18. package/dist/{ScheduleGeneralPage-DpNvWNGs.js → ScheduleGeneralPage-C_Kj9wmp.js} +2 -2
  19. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DIYLOF9N.js → ScheduleModal.vue_vue_type_script_setup_true_lang-3oQ6lE86.js} +187 -186
  20. package/dist/{SchedulePage-QW-cYvu2.js → SchedulePage-9dFXxWwZ.js} +13 -13
  21. package/dist/{SchedulePositionPage-BtFfVo2N.js → SchedulePositionPage-Dea5X8Sa.js} +3 -3
  22. package/dist/{SelectFilter-BXeVKgHN.js → SelectFilter-Dr9lB6Ta.js} +1 -1
  23. package/dist/TeamMemberList-Bu9QNP9W.js +2086 -0
  24. package/dist/{TimesheetList-D-bESKe5.js → TimesheetList-B98l028z.js} +9 -9
  25. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D0zAVqCa.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIQ7kjG8.js} +3 -3
  26. package/dist/{app-D-MUq9Ab.js → app-BHQJX4L4.js} +6398 -3459
  27. package/dist/app.js +3 -3
  28. package/dist/{approval-code-BXUiojPH.js → approval-code-w0rZJeYU.js} +1 -1
  29. package/dist/{dayjs.min-BZ1pM-6M.js → dayjs.min-C4H4diN8.js} +34 -34
  30. package/dist/{employee-HQEU8fjb.js → employee-BEwUmdt6.js} +48 -47
  31. package/dist/{grant-user-CBJ3gEgW.js → grant-user-DdxPMH5_.js} +1 -1
  32. package/dist/{iteration-ogxW2-Tv.js → iteration-DBHifssn.js} +1 -1
  33. package/dist/{lodash-Def4gaas.js → lodash-DqZsWm-0.js} +1 -1
  34. package/dist/member-grant-DOigVnBR.js +55 -0
  35. package/dist/restaurant-2xCb2x26.js +51 -0
  36. package/dist/{role-JDoDFVd9.js → role-C8STcmLJ.js} +5 -4
  37. package/dist/{rule-DPtqlnz-.js → rule-BkL34-Ma.js} +105 -100
  38. package/dist/src/api/my-pos-profile/index.d.ts +5 -0
  39. package/dist/src/api/sso-provider/index.d.ts +5 -0
  40. package/dist/src/api/staff-invite/index.d.ts +16 -0
  41. package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
  42. package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
  43. package/dist/src/composables/useMenuAccess.d.ts +56 -0
  44. package/dist/src/composables/useSsoProviders.d.ts +19 -0
  45. package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
  46. package/dist/src/helpers/member-grant.d.ts +36 -0
  47. package/dist/src/helpers/my-pos-profile.d.ts +37 -0
  48. package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
  49. package/dist/src/helpers/staff-invite.d.ts +54 -0
  50. package/dist/src/helpers/string.d.ts +10 -1
  51. package/dist/src/router/menu-access-guard.d.ts +17 -0
  52. package/dist/src/router/shared.d.ts +3 -1
  53. package/dist/src/stores/restaurant.d.ts +7 -7
  54. package/dist/src/stores/team.d.ts +30 -0
  55. package/dist/src/types/my-pos-profile.d.ts +25 -0
  56. package/dist/src/types/sso-provider.d.ts +10 -0
  57. package/dist/src/types/staff-invite.d.ts +100 -0
  58. package/dist/src/types/team.d.ts +17 -1
  59. package/dist/src/views/hr/locales/index.d.ts +20 -0
  60. package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
  61. package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
  62. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
  63. package/dist/src/views/my-pos-profile/locales/index.d.ts +200 -0
  64. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
  65. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
  66. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
  67. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
  68. package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
  69. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
  70. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
  71. package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
  72. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
  73. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
  74. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
  75. package/dist/src/views/team/locales/index.d.ts +716 -0
  76. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
  77. package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
  78. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
  79. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
  80. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
  81. package/dist/string-DZQ1uNjn.js +22 -0
  82. package/dist/style.css +1 -1
  83. package/dist/tsconfig.app.tsbuildinfo +1 -1
  84. package/dist/{useAppStore-DZCdxlCd.js → useAppStore-BUmFt2dT.js} +1 -1
  85. package/dist/{useLoading-Nygx2zn8.js → useLoading-oHRj4RgU.js} +1 -1
  86. package/dist/{useReportPermissions-CxV7Dz1B.js → useReportPermissions-CpcyfEuV.js} +5 -5
  87. package/package.json +1 -1
  88. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-B0VcRYUg.js +0 -438
  89. package/dist/EmployeeList-Bd73xDCX.js +0 -776
  90. package/dist/FormItem.vue_vue_type_script_setup_true_lang-cLEnrtC6.js +0 -45
  91. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  92. package/dist/Main-DGf0bQvy.js +0 -96
  93. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
  94. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CkOAT-oX.js +0 -4167
  95. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js +0 -35
  96. package/dist/RoleList-B_7UnVNb.js +0 -740
  97. package/dist/TeamMemberList-DoisBYnk.js +0 -1154
  98. package/dist/restaurant-D2mfKHaH.js +0 -1880
  99. package/dist/string-VNuQNweN.js +0 -15
package/dist/app.js CHANGED
@@ -1,6 +1,6 @@
1
- import { j as e, i as r, r as o } from "./app-D-MUq9Ab.js";
1
+ import { H as e, F as o, I as p } from "./app-BHQJX4L4.js";
2
2
  export {
3
3
  e as FmApp,
4
- r as i18nMessages,
5
- o as routes
4
+ o as i18nMessages,
5
+ p as routes
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import { defineStore as C } from "pinia";
2
2
  import { ref as l } from "vue";
3
- import { g as p, b as s } from "./restaurant-D2mfKHaH.js";
3
+ import { g as p, b as s } from "./app-BHQJX4L4.js";
4
4
  const n = {
5
5
  async getApprovalCodes() {
6
6
  return p(await s("approval-codes").get(""));
@@ -1,10 +1,10 @@
1
- import { g as Q, f as K } from "./app-D-MUq9Ab.js";
1
+ import { y as Q, x as K } from "./app-BHQJX4L4.js";
2
2
  var E = { exports: {} };
3
3
  (function(V, X) {
4
- (function(W, k) {
5
- V.exports = k();
4
+ (function(W, x) {
5
+ V.exports = x();
6
6
  })(K, function() {
7
- var W = 1e3, k = 6e4, N = 36e5, A = "millisecond", S = "second", w = "minute", O = "hour", M = "day", T = "week", m = "month", U = "quarter", v = "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, 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) {
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) {
@@ -20,26 +20,26 @@ var E = { exports: {} };
20
20
  }, a: function(s) {
21
21
  return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
22
22
  }, p: function(s) {
23
- return { M: m, y: v, w: T, d: M, D: _, h: O, m: w, s: S, ms: A, Q: U }[s] || String(s || "").toLowerCase().replace(/s$/, "");
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
- } }, x = "en", g = {};
27
- g[x] = G;
26
+ } }, k = "en", D = {};
27
+ D[k] = G;
28
28
  var Z = "$isDayjsObject", F = function(s) {
29
29
  return s instanceof C || !(!s || !s[Z]);
30
30
  }, j = function s(n, t, r) {
31
31
  var e;
32
- if (!n) return x;
32
+ if (!n) return k;
33
33
  if (typeof n == "string") {
34
34
  var i = n.toLowerCase();
35
- g[i] && (e = i), t && (g[i] = t, e = i);
35
+ D[i] && (e = i), t && (D[i] = t, e = i);
36
36
  var u = n.split("-");
37
37
  if (!e && u.length > 1) return s(u[0]);
38
38
  } else {
39
39
  var o = n.name;
40
- g[o] = n, e = o;
40
+ D[o] = n, e = o;
41
41
  }
42
- return !r && e && (x = e), e || !r && x;
42
+ return !r && e && (k = e), e || !r && k;
43
43
  }, f = function(s, n) {
44
44
  if (F(s)) return s.clone();
45
45
  var t = typeof n == "object" ? n : {};
@@ -90,18 +90,18 @@ var E = { exports: {} };
90
90
  return this.$d.getTime();
91
91
  }, n.startOf = function(t, r) {
92
92
  var e = this, i = !!a.u(r) || r, u = a.p(t), o = function(p, $) {
93
- var y = a.w(e.$u ? Date.UTC(e.$y, $, p) : new Date(e.$y, $, p), e);
94
- return i ? y : y.endOf(M);
93
+ var v = a.w(e.$u ? Date.UTC(e.$y, $, p) : new Date(e.$y, $, p), e);
94
+ return i ? v : v.endOf(M);
95
95
  }, c = function(p, $) {
96
96
  return a.w(e.toDate()[p].apply(e.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), e);
97
97
  }, h = this.$W, d = this.$M, l = this.$D, b = "set" + (this.$u ? "UTC" : "");
98
98
  switch (u) {
99
- case v:
99
+ case y:
100
100
  return i ? o(1, 0) : o(31, 11);
101
101
  case m:
102
102
  return i ? o(1, d) : o(0, d + 1);
103
103
  case T:
104
- var D = this.$locale().weekStart || 0, Y = (h < D ? h + 7 : h) - D;
104
+ var g = this.$locale().weekStart || 0, Y = (h < g ? h + 7 : h) - g;
105
105
  return o(i ? l - Y : l + (6 - Y), d);
106
106
  case M:
107
107
  case _:
@@ -118,8 +118,8 @@ var E = { exports: {} };
118
118
  }, n.endOf = function(t) {
119
119
  return this.startOf(t, !1);
120
120
  }, n.$set = function(t, r) {
121
- var e, i = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = u + "Date", e[_] = u + "Date", e[m] = u + "Month", e[v] = u + "FullYear", e[O] = u + "Hours", e[w] = u + "Minutes", e[S] = u + "Seconds", e[A] = u + "Milliseconds", e)[i], c = i === M ? this.$D + (r - this.$W) : r;
122
- if (i === m || i === v) {
121
+ var e, i = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = u + "Date", e[_] = u + "Date", e[m] = u + "Month", e[y] = u + "FullYear", e[O] = u + "Hours", e[w] = u + "Minutes", e[S] = u + "Seconds", e[A] = u + "Milliseconds", e)[i], c = i === M ? this.$D + (r - this.$W) : r;
122
+ if (i === m || i === y) {
123
123
  var h = this.clone().set(_, 1);
124
124
  h.$d[o](c), h.init(), this.$d = h.set(_, Math.min(this.$D, h.daysInMonth())).$d;
125
125
  } else o && this.$d[o](c);
@@ -136,26 +136,26 @@ var E = { exports: {} };
136
136
  return a.w(l.date(l.date() + Math.round(d * t)), i);
137
137
  };
138
138
  if (u === m) return this.set(m, this.$M + t);
139
- if (u === v) return this.set(v, this.$y + t);
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] = k, e[O] = N, e[S] = W, e)[u] || 1, h = this.$d.getTime() + t * c;
142
+ var c = (e = {}, e[w] = x, 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
148
  if (!this.isValid()) return e.invalidDate || J;
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, D = function($, y, H, L) {
150
- return $ && ($[y] || $(r, i)) || H[y].slice(0, L);
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
+ return $ && ($[v] || $(r, i)) || H[v].slice(0, L);
151
151
  }, Y = function($) {
152
152
  return a.s(o % 12 || 12, $, "0");
153
- }, p = b || function($, y, H) {
153
+ }, p = b || function($, v, H) {
154
154
  var L = $ < 12 ? "AM" : "PM";
155
155
  return H ? L.toLowerCase() : L;
156
156
  };
157
- return i.replace(B, function($, y) {
158
- return y || function(H) {
157
+ return i.replace(B, function($, v) {
158
+ return v || function(H) {
159
159
  switch (H) {
160
160
  case "YY":
161
161
  return String(r.$y).slice(-2);
@@ -166,9 +166,9 @@ var E = { exports: {} };
166
166
  case "MM":
167
167
  return a.s(h + 1, 2, "0");
168
168
  case "MMM":
169
- return D(e.monthsShort, h, l, 3);
169
+ return g(e.monthsShort, h, l, 3);
170
170
  case "MMMM":
171
- return D(l, h);
171
+ return g(l, h);
172
172
  case "D":
173
173
  return r.$D;
174
174
  case "DD":
@@ -176,9 +176,9 @@ var E = { exports: {} };
176
176
  case "d":
177
177
  return String(r.$W);
178
178
  case "dd":
179
- return D(e.weekdaysMin, r.$W, d, 2);
179
+ return g(e.weekdaysMin, r.$W, d, 2);
180
180
  case "ddd":
181
- return D(e.weekdaysShort, r.$W, d, 3);
181
+ return g(e.weekdaysShort, r.$W, d, 3);
182
182
  case "dddd":
183
183
  return d[r.$W];
184
184
  case "H":
@@ -212,11 +212,11 @@ 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()) * k, d = this - c, l = function() {
215
+ var i, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * x, d = this - c, l = function() {
216
216
  return a.m(u, c);
217
217
  };
218
218
  switch (o) {
219
- case v:
219
+ case y:
220
220
  i = l() / 12;
221
221
  break;
222
222
  case m:
@@ -235,7 +235,7 @@ var E = { exports: {} };
235
235
  i = d / N;
236
236
  break;
237
237
  case w:
238
- i = d / k;
238
+ i = d / x;
239
239
  break;
240
240
  case S:
241
241
  i = d / W;
@@ -247,7 +247,7 @@ var E = { exports: {} };
247
247
  }, n.daysInMonth = function() {
248
248
  return this.endOf(m).$D;
249
249
  }, n.$locale = function() {
250
- return g[this.$L];
250
+ return D[this.$L];
251
251
  }, n.locale = function(t, r) {
252
252
  if (!t) return this.$L;
253
253
  var e = this.clone(), i = j(t, r, !0);
@@ -264,7 +264,7 @@ var E = { exports: {} };
264
264
  return this.$d.toUTCString();
265
265
  }, s;
266
266
  }(), z = C.prototype;
267
- return f.prototype = z, [["$ms", A], ["$s", S], ["$m", w], ["$H", O], ["$W", M], ["$M", m], ["$y", v], ["$D", _]].forEach(function(s) {
267
+ return f.prototype = z, [["$ms", A], ["$s", S], ["$m", w], ["$H", O], ["$W", M], ["$M", m], ["$y", y], ["$D", _]].forEach(function(s) {
268
268
  z[s[1]] = function(n) {
269
269
  return this.$g(n, s[0], s[1]);
270
270
  };
@@ -272,7 +272,7 @@ var E = { exports: {} };
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 = g[x], f.Ls = g, f.p = {}, f;
275
+ }, f.en = D[k], f.Ls = D, f.p = {}, f;
276
276
  });
277
277
  })(E);
278
278
  var R = E.exports;
@@ -1,23 +1,24 @@
1
- import { d as g } from "./dayjs.min-BZ1pM-6M.js";
1
+ import { d as g } from "./dayjs.min-C4H4diN8.js";
2
2
  import { defineStore as $, storeToRefs as x } from "pinia";
3
3
  import { ref as y } from "vue";
4
- import { s as E } from "./iteration-ogxW2-Tv.js";
5
- import { b as l, g as m, u as I } from "./restaurant-D2mfKHaH.js";
4
+ import { s as E } from "./iteration-DBHifssn.js";
5
+ import { b as l, g as m } from "./app-BHQJX4L4.js";
6
6
  import { i as v } from "./utils-BZkjJbju.js";
7
- import { u as P } from "./role-JDoDFVd9.js";
7
+ import { u as P } from "./role-C8STcmLJ.js";
8
+ import { u as I } from "./restaurant-2xCb2x26.js";
8
9
  const o = {
9
10
  async readEmployees() {
10
11
  return m(await l().get("/pos-users"));
11
12
  },
12
13
  async readEmployeesPage(e) {
13
- var s, i;
14
+ var t, i;
14
15
  return m(
15
16
  await l().get("/pos-users/paged", {
16
17
  params: {
17
18
  limit: e.limit,
18
19
  offset: e.offset,
19
20
  search: e.search,
20
- restaurantIds: (s = e.restaurantIds) != null && s.length ? e.restaurantIds : void 0,
21
+ restaurantIds: (t = e.restaurantIds) != null && t.length ? e.restaurantIds : void 0,
21
22
  roleIds: (i = e.roleIds) != null && i.length ? e.roleIds : void 0,
22
23
  includeEmptyPasscode: e.includeEmptyPasscode || void 0
23
24
  }
@@ -34,22 +35,22 @@ const o = {
34
35
  await l().post("/pos-users/master-user", e)
35
36
  ).employeeId;
36
37
  },
37
- async migrateToMasterEmployee(e, s) {
38
- await l().put(`/pos-users/migrate/${e}`, s);
38
+ async migrateToMasterEmployee(e, t) {
39
+ await l().put(`/pos-users/migrate/${e}`, t);
39
40
  },
40
- async updateEmployee(e, s) {
41
- await l().put(`/pos-users/${e}`, s);
41
+ async updateEmployee(e, t) {
42
+ await l().put(`/pos-users/${e}`, t);
42
43
  },
43
- async updateMasterEmployee(e, s) {
44
- await l().put(`/pos-users/master-user/${e}`, s);
44
+ async updateMasterEmployee(e, t) {
45
+ await l().put(`/pos-users/master-user/${e}`, t);
45
46
  },
46
47
  async deleteEmployee(e) {
47
48
  await l().put(`/pos-users/${e._id}`, {
48
49
  user: e,
49
50
  roles: [],
50
- previousRoles: e.restaurants.map((s) => ({
51
- restaurantId: s.restaurantId,
52
- roleId: s.roleId
51
+ previousRoles: e.restaurants.map((t) => ({
52
+ restaurantId: t.restaurantId,
53
+ roleId: t.roleId
53
54
  }))
54
55
  });
55
56
  },
@@ -57,9 +58,9 @@ const o = {
57
58
  await l().put(`/pos-users/master-user/${e._id}`, {
58
59
  user: e,
59
60
  roles: [],
60
- previousRoles: e.restaurants.map((s) => ({
61
- restaurantId: s.restaurantId,
62
- roleId: s.roleId
61
+ previousRoles: e.restaurants.map((t) => ({
62
+ restaurantId: t.restaurantId,
63
+ roleId: t.roleId
63
64
  }))
64
65
  });
65
66
  },
@@ -76,9 +77,9 @@ const o = {
76
77
  }
77
78
  };
78
79
  async function T(e) {
79
- const s = P().roles.value, { restaurants: i } = I(), c = new Map(
80
+ const t = P().roles.value, { restaurants: i } = I(), c = new Map(
80
81
  i.value.map((a) => [a._id, a.profile.name])
81
- ), u = new Map(s.map((a) => [a._id, a.name])), r = /* @__PURE__ */ new Map();
82
+ ), u = new Map(t.map((a) => [a._id, a.name])), r = /* @__PURE__ */ new Map();
82
83
  for (const a of e) {
83
84
  const n = {
84
85
  restaurantId: a.restaurantId,
@@ -102,8 +103,8 @@ async function T(e) {
102
103
  return E([...r.values()], { selector: "name" });
103
104
  }
104
105
  function M(e) {
105
- const { restaurants: s } = I(), i = P().roles.value, c = new Map(
106
- s.value.map((a) => [a._id, a])
106
+ const { restaurants: t } = I(), i = P().roles.value, c = new Map(
107
+ t.value.map((a) => [a._id, a])
107
108
  ), u = new Map(i.map((a) => [a._id, a.name])), r = e.restaurantRole[0];
108
109
  return {
109
110
  _id: e._id,
@@ -131,56 +132,56 @@ function M(e) {
131
132
  };
132
133
  }
133
134
  const h = $("employee", () => {
134
- const e = I(), s = y([]), i = y([]), c = y(0), u = y(!1);
135
+ const e = I(), t = y([]), i = y([]), c = y(0), u = y(!1);
135
136
  async function r() {
136
137
  try {
137
138
  u.value = !0, await e.readRestaurants();
138
- const t = await o.readEmployees();
139
- s.value = await T(t);
139
+ const s = await o.readEmployees();
140
+ t.value = await T(s);
140
141
  } finally {
141
142
  u.value = !1;
142
143
  }
143
144
  }
144
- async function a(t) {
145
+ async function a(s) {
145
146
  try {
146
147
  u.value = !0, await e.readRestaurants();
147
- const p = await o.readEmployeesPage(t);
148
+ const p = await o.readEmployeesPage(s);
148
149
  i.value = p.items.map(M), c.value = p.total;
149
150
  } finally {
150
151
  u.value = !1;
151
152
  }
152
153
  }
153
- async function n(t, p) {
154
+ async function n(s, p) {
154
155
  await e.readRestaurants();
155
- const w = p ?? (await o.readEmployeesPage({ ...t, limit: 1, offset: 0 })).total;
156
- return w === 0 ? [] : (await o.readEmployeesPage({ ...t, limit: w, offset: 0 })).items.map(M);
156
+ const w = p ?? (await o.readEmployeesPage({ ...s, limit: 1, offset: 0 })).total;
157
+ return w === 0 ? [] : (await o.readEmployeesPage({ ...s, limit: w, offset: 0 })).items.map(M);
157
158
  }
158
- async function d(t) {
159
- return o.createEmployee(t);
159
+ async function d(s) {
160
+ return o.createEmployee(s);
160
161
  }
161
- async function f(t, p) {
162
- await o.updateEmployee(t, p);
162
+ async function f(s, p) {
163
+ await o.updateEmployee(s, p);
163
164
  }
164
- async function _(t) {
165
- await o.deleteEmployee(t);
165
+ async function _(s) {
166
+ await o.deleteEmployee(s);
166
167
  }
167
- async function U(t) {
168
- await o.deleteMasterEmployee(t);
168
+ async function U(s) {
169
+ await o.deleteMasterEmployee(s);
169
170
  }
170
- async function Y(t) {
171
- return o.createMasterEmployee(t);
171
+ async function Y(s) {
172
+ return o.createMasterEmployee(s);
172
173
  }
173
- async function N(t, p) {
174
- await o.updateMasterEmployee(t, p);
174
+ async function N(s, p) {
175
+ await o.updateMasterEmployee(s, p);
175
176
  }
176
- async function S(t, p) {
177
- await o.migrateToMasterEmployee(t, p);
177
+ async function S(s, p) {
178
+ await o.migrateToMasterEmployee(s, p);
178
179
  }
179
180
  async function D() {
180
181
  await o.syncUsersMeta();
181
182
  }
182
183
  return {
183
- employees: s,
184
+ employees: t,
184
185
  listEmployees: i,
185
186
  totalEmployees: c,
186
187
  isLoading: u,
@@ -196,7 +197,7 @@ const h = $("employee", () => {
196
197
  migrateToMasterUser: S,
197
198
  syncUsersMeta: D
198
199
  };
199
- }), z = () => {
200
+ }), B = () => {
200
201
  const e = h();
201
202
  return {
202
203
  ...e,
@@ -205,5 +206,5 @@ const h = $("employee", () => {
205
206
  };
206
207
  export {
207
208
  o as E,
208
- z as u
209
+ B as u
209
210
  };
@@ -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, a as v, b as o } from "./restaurant-D2mfKHaH.js";
3
+ import { g as s, h as v, b as o } from "./app-BHQJX4L4.js";
4
4
  const c = {
5
5
  async getGrantUsers() {
6
6
  return s(await o("grant").get(""));
@@ -1,4 +1,4 @@
1
- import { f as B } from "./app-D-MUq9Ab.js";
1
+ import { x as B } from "./app-BHQJX4L4.js";
2
2
  var ma = {}, Zt = {}, l = {}, ji = {}, Ei = {}, Ii = {}, Dn = {};
3
3
  (function(e) {
4
4
  Object.defineProperty(e, "__esModule", { value: !0 }), e.getParsedType = e.ZodParsedType = e.util = void 0;
@@ -1,4 +1,4 @@
1
- import { f as jt } from "./app-D-MUq9Ab.js";
1
+ import { x as jt } from "./app-BHQJX4L4.js";
2
2
  var Jr = { exports: {} };
3
3
  /**
4
4
  * @license
@@ -0,0 +1,55 @@
1
+ import { m as i, s as u } from "./app-BHQJX4L4.js";
2
+ import { n as a, l as m, q as l, o as d, m as p } from "./rule-BkL34-Ma.js";
3
+ const f = [
4
+ i.Subject.Business.restaurant,
5
+ i.Subject.Business.role,
6
+ i.Subject.Restaurant.restaurant,
7
+ i.Subject.Business.inventory_stock
8
+ ], n = (s) => f.includes(s.subject);
9
+ function P(s, r) {
10
+ return r.length > 0 || s.some((e) => !e.inverted && !n(e));
11
+ }
12
+ function j(s) {
13
+ return s.filter(n);
14
+ }
15
+ const R = {
16
+ customPermissions: [],
17
+ permissions: [],
18
+ permissionSetIds: [],
19
+ posUser: void 0
20
+ };
21
+ function E(s) {
22
+ const r = a(
23
+ m(s.userPermissions, s.reportSubjects),
24
+ s.defaultReportSubjects
25
+ ), { posUser: e, savedPosUser: o } = s;
26
+ return {
27
+ customPermissions: l(
28
+ p(s.inheritedPermissions),
29
+ d(r)
30
+ ),
31
+ permissions: r.filter((t) => !t.inverted).map((t) => ({ ...t, subject: u(t.subject) })),
32
+ permissionSetIds: s.permissionSetIds,
33
+ posUser: e ? {
34
+ ...e,
35
+ name: e.name || (o == null ? void 0 : o.name) || s.fallbackName,
36
+ code: e.code || (o == null ? void 0 : o.code) || "",
37
+ passcode: e.passcode,
38
+ roles: e.roles.filter((t) => !!t.roleId)
39
+ } : e === null ? null : void 0
40
+ };
41
+ }
42
+ function h(s, r) {
43
+ const { posUser: e, ...o } = s;
44
+ if (!e || !r || e.passcode !== r.passcode) return { ...o, posUser: e };
45
+ const { passcode: t, ...c } = e;
46
+ return { ...o, posUser: c };
47
+ }
48
+ export {
49
+ R as E,
50
+ f as W,
51
+ E as b,
52
+ P as h,
53
+ h as t,
54
+ j as w
55
+ };
@@ -0,0 +1,51 @@
1
+ import { defineStore as p, storeToRefs as m } from "pinia";
2
+ import { ref as o } from "vue";
3
+ import { useCoreStore as R } from "@feedmepos/mf-common";
4
+ import { b as d, g } from "./app-BHQJX4L4.js";
5
+ const y = {
6
+ async readRestaurants() {
7
+ return g(await d().get("/hr-restaurants"));
8
+ },
9
+ async saveOperationalHours(e, n) {
10
+ await d(`restaurants/${e}/schedules`).patch(
11
+ "operational-hours",
12
+ { operatingHours: n }
13
+ );
14
+ }
15
+ }, w = p("restaurant", () => {
16
+ const { currentBusiness: e } = R(), n = o([]), l = o(!1), u = o(null);
17
+ let a = null, t = null;
18
+ async function v(i = !1) {
19
+ var c, f;
20
+ const s = ((c = e.value) == null ? void 0 : c._id) ?? ((f = e.value) == null ? void 0 : f.id) ?? null;
21
+ if (!s) {
22
+ n.value = [], u.value = null, a = null, t = null;
23
+ return;
24
+ }
25
+ if (u.value && u.value !== s && (n.value = [], u.value = null), t && t !== s && (a = null, t = null), !i && u.value === s) return;
26
+ if (!i && a && t === s)
27
+ return await a;
28
+ let r = null;
29
+ try {
30
+ l.value = !0, r = (async () => {
31
+ n.value = await y.readRestaurants(), u.value = s;
32
+ })(), a = r, t = s, await r;
33
+ } finally {
34
+ a === r && (a = null, t = null), l.value = !1;
35
+ }
36
+ }
37
+ return {
38
+ restaurants: n,
39
+ isLoading: l,
40
+ readRestaurants: v
41
+ };
42
+ }), B = () => {
43
+ const e = w();
44
+ return {
45
+ ...e,
46
+ ...m(e)
47
+ };
48
+ };
49
+ export {
50
+ B as u
51
+ };
@@ -1,8 +1,9 @@
1
1
  import { defineStore as x, storeToRefs as b } from "pinia";
2
2
  import { ref as w } from "vue";
3
3
  import { useCoreStore as B } from "@feedmepos/mf-common";
4
- import { s as v } from "./iteration-ogxW2-Tv.js";
5
- import { g as f, b as p, u as I } from "./restaurant-D2mfKHaH.js";
4
+ import { s as v } from "./iteration-DBHifssn.js";
5
+ import { g as f, b as p } from "./app-BHQJX4L4.js";
6
+ import { u as I } from "./restaurant-2xCb2x26.js";
6
7
  const R = {
7
8
  async readRoles() {
8
9
  return f(await p().get("/pos-roles"));
@@ -80,7 +81,7 @@ const A = x("role", () => {
80
81
  updateRole: g,
81
82
  deleteRole: S
82
83
  };
83
- }), L = () => {
84
+ }), P = () => {
84
85
  const e = A();
85
86
  return {
86
87
  ...e,
@@ -88,5 +89,5 @@ const A = x("role", () => {
88
89
  };
89
90
  };
90
91
  export {
91
- L as u
92
+ P as u
92
93
  };