@feedmepos/mf-hrm-portal 2.2.5-dev.8 → 2.2.5-dev.9

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 (57) hide show
  1. package/dist/{ApprovalCodeList-BzL73nqc.js → ApprovalCodeList-D5l9vIsE.js} +2 -2
  2. package/dist/{AuditLogList-BEZoHLsX.js → AuditLogList-ByTa5UJY.js} +3 -3
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DDrP7ywR.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-mNdn1TYV.js} +2 -2
  4. package/dist/{EmployeeList-s4FYw1ZF.js → EmployeeList-Bv6ANk-P.js} +8 -9
  5. package/dist/{GrantUserList-Ci_ElhHZ.js → GrantUserList-Bt8w3p4j.js} +3 -3
  6. package/dist/{Main-BojQuzZI.js → Main-DHJcgePj.js} +5 -5
  7. package/dist/{Main-N1CNGDAy.js → Main-DkP8dWgn.js} +9 -9
  8. package/dist/{Main-CKr3RGvf.js → Main-DqiGpT4v.js} +2 -2
  9. package/dist/{PermissionSetList-DLknSOzA.js → PermissionSetList-BIGv1u67.js} +10 -11
  10. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DK2Bx8Aw.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-niywl_DX.js} +892 -893
  11. package/dist/{RoleList-Cm7_q5l9.js → RoleList-CH6NDKPU.js} +7 -7
  12. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DrJ1vA88.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-T1ACkX_6.js} +39 -39
  13. package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-BzQuLLf5.js +690 -0
  14. package/dist/{ScheduleGeneralPage-CmR4BZAp.js → ScheduleGeneralPage-DJPENJZ2.js} +96 -99
  15. package/dist/SchedulePage-C1egcbIC.js +14421 -0
  16. package/dist/{SchedulePositionPage-Bv3zraaF.js → SchedulePositionPage-OhL_hsqG.js} +10 -10
  17. package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-B8W4sTsA.js +242 -0
  18. package/dist/{TeamMemberList-D2OfkfJP.js → TeamMemberList-BwfG3go2.js} +8 -9
  19. package/dist/{TimesheetList-DEdLpYuM.js → TimesheetList-DcoqzbLO.js} +5 -5
  20. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BfMkNvCz.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RyhiKTSd.js} +2 -2
  21. package/dist/{app-Dmmpy4k-.js → app-BcZ6C8M8.js} +8 -8
  22. package/dist/app.js +1 -1
  23. package/dist/{dayjs.min-DcfKURXN.js → dayjs.min-Ch0iysTG.js} +1 -1
  24. package/dist/employee-DwYHFacQ.js +204 -0
  25. package/dist/{index-BxkisKEs.js → iteration-D1uWLp0V.js} +726 -698
  26. package/dist/{lodash-p40sRkqQ.js → lodash-DErxm7xf.js} +1 -1
  27. package/dist/{role-CM1urkJZ.js → role-B9VanAny.js} +3 -4
  28. package/dist/{rule-BPApyMJY.js → rule-C4f_Ilzr.js} +36 -37
  29. package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +5 -1
  30. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
  31. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +18 -2
  32. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +4 -0
  33. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +4 -0
  34. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +2 -2
  35. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +4 -0
  36. package/dist/src/views/scheduling/composables/scheduleAutoSolver.d.ts +21 -0
  37. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +11 -0
  38. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +10 -11
  39. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +5 -3
  40. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +7 -1
  41. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +11 -2
  42. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +2 -0
  43. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +11 -0
  44. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +1 -0
  45. package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +4 -1
  46. package/dist/src/views/scheduling/schedule-store.d.ts +25 -0
  47. package/dist/src/views/scheduling/types.d.ts +5 -0
  48. package/dist/style.css +1 -1
  49. package/dist/tsconfig.app.tsbuildinfo +1 -1
  50. package/dist/{useReportPermissions-5EhPvVT9.js → useReportPermissions-CTr56kBo.js} +3 -3
  51. package/package.json +1 -1
  52. package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-DX5JR7bi.js +0 -600
  53. package/dist/SchedulePage-CN3ZsQ9E.js +0 -13905
  54. package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-Buu8NEQf.js +0 -221
  55. package/dist/employee-D3ZpYH4j.js +0 -139
  56. package/dist/index-D-VlxJu9.js +0 -70
  57. package/dist/iteration-CcXrOMQe.js +0 -30
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as $, ref as D, onMounted as N, createElementBlock as l, openBlock as d, createElementVNode as i, createVNode as o, withCtx as r, toDisplayString as v, unref as e, createTextVNode as u, normalizeClass as g, createCommentVNode as E, withDirectives as b, withKeys as m, vModelText as h, Fragment as p, renderList as z, withModifiers as f } from "vue";
2
2
  import { useRouter as M } from "vue-router";
3
- import { R as x } from "./app-Dmmpy4k-.js";
4
- import { z as A, B as S, D as P, _ as c } from "./ScheduleButton.vue_vue_type_script_setup_true_lang-DX5JR7bi.js";
5
- import { u as V, a as B, _ as F } from "./ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DrJ1vA88.js";
3
+ import { R as x } from "./app-BcZ6C8M8.js";
4
+ import { H as A, I as S, y as P, _ as c } from "./ScheduleButton.vue_vue_type_script_setup_true_lang-BzQuLLf5.js";
5
+ import { u as V, a as F, _ as B } from "./ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-T1ACkX_6.js";
6
6
  import { _ as I } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const K = { class: "main" }, L = {
8
8
  id: "viewPositions",
9
9
  class: "view"
10
- }, R = { class: "sp-head" }, U = { class: "sp-body" }, j = { class: "sp-content" }, T = { class: "sp-panel" }, W = { class: "cfg-head" }, q = { class: "cfg-count" }, H = { id: "skList" }, O = {
10
+ }, R = { class: "sp-head" }, U = { class: "sp-body" }, j = { class: "sp-content" }, H = { class: "sp-panel" }, T = { class: "cfg-head" }, W = { class: "cfg-count" }, q = { id: "skList" }, O = {
11
11
  key: 0,
12
12
  class: "cfg-empty"
13
13
  }, G = {
@@ -27,7 +27,7 @@ const K = { class: "main" }, L = {
27
27
  setup(ae) {
28
28
  const y = D(null);
29
29
  A(y);
30
- const C = M(), s = V(), _ = S(), k = B();
30
+ const C = M(), s = V(), _ = S(), k = F();
31
31
  N(async () => {
32
32
  await _.resolve() && await P(/* @__PURE__ */ new Date());
33
33
  });
@@ -74,10 +74,10 @@ const K = { class: "main" }, L = {
74
74
  ]),
75
75
  i("div", U, [
76
76
  i("div", j, [
77
- i("div", T, [
78
- i("div", W, [
77
+ i("div", H, [
78
+ i("div", T, [
79
79
  t[14] || (t[14] = i("div", { class: "cfg-title" }, "Configured positions", -1)),
80
- i("span", q, v(e(s).count.value), 1),
80
+ i("span", W, v(e(s).count.value), 1),
81
81
  t[15] || (t[15] = i("span", { class: "cfg-spacer" }, null, -1)),
82
82
  o(c, {
83
83
  hierarchy: "primary",
@@ -95,7 +95,7 @@ const K = { class: "main" }, L = {
95
95
  i("div", {
96
96
  class: g(["ce-err", { show: e(s).error.value }])
97
97
  }, v(e(s).error.value), 3),
98
- i("div", H, [
98
+ i("div", q, [
99
99
  !e(s).positions.value.length && !e(s).isAdding.value ? (d(), l("div", O, [...t[16] || (t[16] = [
100
100
  u(" No positions yet.", -1),
101
101
  i("br", null, null, -1),
@@ -284,7 +284,7 @@ const K = { class: "main" }, L = {
284
284
  ])
285
285
  ])
286
286
  ]),
287
- o(F, { modal: e(k) }, null, 8, ["modal"])
287
+ o(B, { modal: e(k) }, null, 8, ["modal"])
288
288
  ], 512));
289
289
  }
290
290
  }), fe = /* @__PURE__ */ I(oe, [["__scopeId", "data-v-5285df68"]]);
@@ -0,0 +1,242 @@
1
+ import { defineComponent as Z, useAttrs as ee, computed as m, ref as h, watch as te, nextTick as z, onBeforeUnmount as ne, createElementBlock as a, openBlock as i, normalizeClass as D, createElementVNode as p, createBlock as oe, mergeProps as le, toDisplayString as v, Teleport as ie, createCommentVNode as g, withDirectives as ae, vModelText as se, Fragment as _, renderList as ue, createTextVNode as re } from "vue";
2
+ const ce = ["disabled", "aria-expanded"], de = { class: "sch" }, pe = ["aria-multiselectable"], fe = {
3
+ key: 0,
4
+ class: "fx-pop-head"
5
+ }, me = {
6
+ key: 1,
7
+ class: "fx-pop-search"
8
+ }, he = {
9
+ key: 2,
10
+ class: "fx-opt is-off"
11
+ }, ve = {
12
+ key: 0,
13
+ class: "fx-grp"
14
+ }, ye = ["aria-selected", "onClick"], be = {
15
+ key: 0,
16
+ class: "fx-opt-text"
17
+ }, ke = { key: 0 }, ge = /* @__PURE__ */ Z({
18
+ inheritAttrs: !1,
19
+ __name: "ScheduleSelect",
20
+ props: {
21
+ modelValue: {},
22
+ options: {},
23
+ multiple: { type: Boolean },
24
+ selected: {},
25
+ placeholder: {},
26
+ disabled: { type: Boolean },
27
+ menuTitle: {},
28
+ searchable: { type: Boolean }
29
+ },
30
+ emits: ["update:modelValue", "toggle"],
31
+ setup(d, { emit: P }) {
32
+ const o = d, E = P, U = ee(), I = m(() => U.class ?? ""), u = h(!1), $ = h(null), y = h(null), b = h(null), O = m(() => {
33
+ var e, n;
34
+ if (o.multiple) {
35
+ const t = ((e = o.selected) == null ? void 0 : e.length) ?? 0;
36
+ return t ? `${t} selected` : o.placeholder ?? "";
37
+ }
38
+ return ((n = o.options.find((t) => t.value === o.modelValue)) == null ? void 0 : n.label) ?? "";
39
+ });
40
+ function B(e) {
41
+ var n;
42
+ return o.multiple ? !!((n = o.selected) != null && n.includes(e.value)) : e.value === o.modelValue;
43
+ }
44
+ const L = m(() => !!o.menuTitle || o.options.some((e) => e.hint)), f = h(""), H = h(null), S = m(() => {
45
+ const e = f.value.trim().toLowerCase();
46
+ return !o.searchable || !e ? o.options : o.options.filter((n) => `${n.label} ${n.hint ?? ""}`.toLowerCase().includes(e));
47
+ }), T = m(() => {
48
+ const e = [];
49
+ let n;
50
+ for (const t of S.value)
51
+ t.group !== n && (n = t.group, n && e.push({ heading: n })), e.push({ option: t });
52
+ return e;
53
+ }), k = 5, r = 8;
54
+ function M() {
55
+ const e = b.value, n = y.value;
56
+ if (!e || !n) return;
57
+ const t = n.getBoundingClientRect(), l = window.innerWidth || document.documentElement.clientWidth, s = window.innerHeight || document.documentElement.clientHeight;
58
+ e.style.minWidth = `${Math.round(t.width)}px`, e.style.maxWidth = `${Math.max(180, Math.round(l - r * 2))}px`;
59
+ const x = s - t.bottom - k - r, Q = t.top - k - r;
60
+ e.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(x, Q)))}px`;
61
+ const w = e.offsetHeight, X = e.offsetWidth;
62
+ let C = t.bottom + k;
63
+ C + w > s - r && (C = t.top - k - w >= r ? t.top - k - w : Math.max(r, s - w - r));
64
+ const Y = Math.min(Math.max(r, t.left), Math.max(r, l - X - r));
65
+ e.style.top = `${Math.round(C)}px`, e.style.left = `${Math.round(Y)}px`, e.style.visibility = "visible";
66
+ }
67
+ function A(e) {
68
+ var t, l;
69
+ const n = e.target;
70
+ n && ((t = $.value) != null && t.contains(n) || (l = b.value) != null && l.contains(n)) || c();
71
+ }
72
+ function W(e) {
73
+ const n = b.value, t = e.target;
74
+ if (n && t && t !== document && n.contains(t)) return;
75
+ const l = y.value;
76
+ if (!l) return;
77
+ const s = l.getBoundingClientRect(), x = window.innerHeight || document.documentElement.clientHeight;
78
+ if (s.bottom < 0 || s.top > x) {
79
+ c();
80
+ return;
81
+ }
82
+ M();
83
+ }
84
+ function R() {
85
+ document.addEventListener("click", A), document.addEventListener("scroll", W, !0), window.addEventListener("resize", c);
86
+ }
87
+ function q() {
88
+ document.removeEventListener("click", A), document.removeEventListener("scroll", W, !0), window.removeEventListener("resize", c);
89
+ }
90
+ async function V() {
91
+ var e, n, t;
92
+ o.disabled || u.value || (f.value = "", u.value = !0, await z(), M(), (e = H.value) == null || e.focus(), (t = (n = b.value) == null ? void 0 : n.querySelector(".fx-opt.is-on")) == null || t.scrollIntoView({ block: "nearest" }), R());
93
+ }
94
+ function c() {
95
+ u.value && (u.value = !1, f.value = "", q());
96
+ }
97
+ te(f, async () => {
98
+ u.value && (await z(), M());
99
+ });
100
+ function j(e) {
101
+ var n;
102
+ if (e.key === "Escape")
103
+ e.preventDefault(), c(), (n = y.value) == null || n.focus();
104
+ else if (e.key === "Enter") {
105
+ e.preventDefault();
106
+ const t = S.value.find((l) => !l.disabled);
107
+ t && N(t);
108
+ }
109
+ }
110
+ function K() {
111
+ u.value ? c() : V();
112
+ }
113
+ function N(e) {
114
+ if (!e.disabled) {
115
+ if (o.multiple && !e.command) {
116
+ E("toggle", e.value);
117
+ return;
118
+ }
119
+ if (c(), o.multiple) {
120
+ E("update:modelValue", e.value);
121
+ return;
122
+ }
123
+ e.value !== o.modelValue && E("update:modelValue", e.value);
124
+ }
125
+ }
126
+ const F = m(() => o.options.filter((e) => !e.disabled));
127
+ function G(e) {
128
+ const n = F.value;
129
+ if (o.multiple || !n.length) {
130
+ V();
131
+ return;
132
+ }
133
+ const t = n.findIndex((x) => x.value === o.modelValue), l = e === "Home" ? 0 : e === "End" ? n.length - 1 : e === "ArrowDown" ? Math.min(n.length - 1, (t < 0 ? -1 : t) + 1) : Math.max(0, (t < 0 ? 1 : t) - 1), s = n[l];
134
+ s && s.value !== o.modelValue ? E("update:modelValue", s.value) : V();
135
+ }
136
+ function J(e) {
137
+ var n;
138
+ if (e.key === "Escape") {
139
+ if (!u.value) return;
140
+ e.preventDefault(), c(), (n = y.value) == null || n.focus();
141
+ return;
142
+ }
143
+ if (e.key === "Enter" || e.key === " ") {
144
+ e.preventDefault(), K();
145
+ return;
146
+ }
147
+ e.key !== "ArrowDown" && e.key !== "ArrowUp" && e.key !== "Home" && e.key !== "End" || (e.preventDefault(), G(e.key));
148
+ }
149
+ return ne(q), (e, n) => (i(), a("div", {
150
+ ref_key: "rootEl",
151
+ ref: $,
152
+ class: D(["fx-sel", I.value])
153
+ }, [
154
+ p("button", le({
155
+ ref_key: "btnEl",
156
+ ref: y
157
+ }, e.$attrs, {
158
+ type: "button",
159
+ class: ["sch-input fx-btn", { "is-open": u.value }],
160
+ disabled: d.disabled,
161
+ "aria-haspopup": "listbox",
162
+ "aria-expanded": u.value,
163
+ onClick: n[0] || (n[0] = (t) => K()),
164
+ onKeydown: J
165
+ }), v(O.value), 17, ce),
166
+ (i(), oe(ie, { to: "body" }, [
167
+ p("div", de, [
168
+ u.value ? (i(), a("div", {
169
+ key: 0,
170
+ ref_key: "popEl",
171
+ ref: b,
172
+ class: D(["fx-pop", { "fx-pop-rich": L.value }]),
173
+ role: "listbox",
174
+ "aria-multiselectable": d.multiple || void 0,
175
+ style: { visibility: "hidden" }
176
+ }, [
177
+ d.menuTitle ? (i(), a("div", fe, v(d.menuTitle), 1)) : g("", !0),
178
+ d.searchable ? (i(), a("div", me, [
179
+ ae(p("input", {
180
+ ref_key: "searchEl",
181
+ ref: H,
182
+ "onUpdate:modelValue": n[1] || (n[1] = (t) => f.value = t),
183
+ class: "sch-input fx-pop-q",
184
+ type: "search",
185
+ placeholder: "Search",
186
+ autocomplete: "off",
187
+ spellcheck: "false",
188
+ "aria-label": "Search",
189
+ onKeydown: j
190
+ }, null, 544), [
191
+ [se, f.value]
192
+ ])
193
+ ])) : g("", !0),
194
+ d.searchable && !T.value.length ? (i(), a("div", he, "No matches")) : g("", !0),
195
+ (i(!0), a(_, null, ue(T.value, (t, l) => (i(), a(_, { key: l }, [
196
+ "heading" in t ? (i(), a("div", ve, v(t.heading), 1)) : (i(), a("div", {
197
+ key: 1,
198
+ class: D(["fx-opt", {
199
+ "is-on": B(t.option),
200
+ "is-off": t.option.disabled,
201
+ "is-new": t.option.command
202
+ }]),
203
+ role: "option",
204
+ "aria-selected": B(t.option),
205
+ onClick: (s) => N(t.option)
206
+ }, [
207
+ n[2] || (n[2] = p("span", {
208
+ class: "fx-tick",
209
+ "aria-hidden": "true"
210
+ }, [
211
+ p("svg", {
212
+ width: "11",
213
+ height: "11",
214
+ viewBox: "0 0 16 16",
215
+ fill: "none"
216
+ }, [
217
+ p("path", {
218
+ d: "m3.5 8.4 3 3 6-7",
219
+ stroke: "currentColor",
220
+ "stroke-width": "2.2",
221
+ "stroke-linecap": "round",
222
+ "stroke-linejoin": "round"
223
+ })
224
+ ])
225
+ ], -1)),
226
+ L.value ? (i(), a("span", be, [
227
+ p("b", null, v(t.option.label), 1),
228
+ t.option.hint ? (i(), a("small", ke, v(t.option.hint), 1)) : g("", !0)
229
+ ])) : (i(), a(_, { key: 1 }, [
230
+ re(v(t.option.label), 1)
231
+ ], 64))
232
+ ], 10, ye))
233
+ ], 64))), 128))
234
+ ], 10, pe)) : g("", !0)
235
+ ])
236
+ ]))
237
+ ], 2));
238
+ }
239
+ });
240
+ export {
241
+ ge as _
242
+ };
@@ -3,22 +3,21 @@ import { useI18n as Ve, useCoreStore as Ze } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as Le, useDialog as Qe, useBreakpoints as Ye, components as Oe } from "@feedmepos/ui-library";
4
4
  import { u as ps } from "./useDebounce-B8ZPVS5C.js";
5
5
  import { S as ye } from "./SelectFilter-CG13h83-.js";
6
- import { v as Te, m as vs, O as fs, _ as bs, a as hs } from "./app-Dmmpy4k-.js";
6
+ import { v as Te, m as vs, O as fs, _ as bs, a as hs } from "./app-BcZ6C8M8.js";
7
7
  import { u as ys, _ as gs } from "./useDiscardConfirm-DPhEV6v0.js";
8
8
  import { _ as _s } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
9
9
  import { s as Us, _ as Ss, a as xs, b as Fs, c as Ps } from "./PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js";
10
10
  import { u as He } from "./useLoading-CXzTpIVv.js";
11
11
  import { n as es } from "./string-VNuQNweN.js";
12
- import { l as Pe } from "./lodash-p40sRkqQ.js";
13
- import "./index-BxkisKEs.js";
14
- import { t as _e, u as ss, c as Ae, b as qe, m as $e, d as ts, p as Ge, i as Is, j as Ke, k as ws, l as Vs, n as ks, o as Rs, q as Cs } from "./rule-BPApyMJY.js";
15
- import { u as as } from "./role-CM1urkJZ.js";
12
+ import { l as Pe } from "./lodash-DErxm7xf.js";
13
+ import { c as he } from "./iteration-D1uWLp0V.js";
14
+ import { t as _e, u as ss, c as Ae, b as qe, m as $e, d as ts, p as Ge, i as Is, j as Ke, k as ws, l as Vs, n as ks, o as Rs, q as Cs } from "./rule-C4f_Ilzr.js";
15
+ import { u as as } from "./role-B9VanAny.js";
16
16
  import { u as ls, i as $s } from "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js";
17
17
  import "./useAppStore-DCwd8GWN.js";
18
18
  import { g as ze, b as We, u as os } from "./restaurant-BTpBmfBV.js";
19
- import { _ as Ms } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DK2Bx8Aw.js";
19
+ import { _ as Ms } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-niywl_DX.js";
20
20
  import { _ as Ns } from "./_plugin-vue_export-helper-CHgC5LLL.js";
21
- import { c as he } from "./iteration-CcXrOMQe.js";
22
21
  var Ue = /* @__PURE__ */ ((o) => (o.Update = "Update", o.Remove = "Remove", o))(Ue || {});
23
22
  const Ie = "__unassigned__";
24
23
  function Je(o) {
@@ -685,7 +684,7 @@ const Es = { class: "w-full flex flex-col gap-16" }, Ds = { class: "flex items-c
685
684
  var ee = /* @__PURE__ */ function(o) {
686
685
  return o[o.ADD = 0] = "ADD", o[o.UPDATE = 1] = "UPDATE", o[o.CLOSED = 2] = "CLOSED", o;
687
686
  }(ee || {});
688
- const ea = /* @__PURE__ */ we({
687
+ const Ht = /* @__PURE__ */ we({
689
688
  __name: "TeamMemberList",
690
689
  setup(o, {
691
690
  expose: N
@@ -1151,5 +1150,5 @@ const ea = /* @__PURE__ */ we({
1151
1150
  }
1152
1151
  });
1153
1152
  export {
1154
- ea as default
1153
+ Ht as default
1155
1154
  };
@@ -1,17 +1,17 @@
1
1
  import { ref as d, computed as g, defineComponent as pe, onMounted as fe, watch as Z, resolveComponent as u, createElementBlock as P, openBlock as E, Fragment as ee, createVNode as l, createElementVNode as i, unref as r, withCtx as b, createCommentVNode as ve, toDisplayString as O, createTextVNode as he, isRef as ge, renderList as we, createBlock as te, nextTick as ye } from "vue";
2
- import { d as v } from "./dayjs.min-DcfKURXN.js";
2
+ import { d as v } from "./dayjs.min-Ch0iysTG.js";
3
3
  import { useI18n as _e } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as be, components as xe } from "@feedmepos/ui-library";
5
5
  import { S as De } from "./SelectFilter-CG13h83-.js";
6
- import { _ as Se } from "./app-Dmmpy4k-.js";
6
+ import { _ as Se } from "./app-BcZ6C8M8.js";
7
7
  import { _ as Ve } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
8
8
  import { u as ke } from "./useLoading-CXzTpIVv.js";
9
- import { g as Ce, s as Fe } from "./iteration-CcXrOMQe.js";
9
+ import { g as Ce, s as Fe } from "./iteration-D1uWLp0V.js";
10
10
  import { f as Ye } from "./utils-BZkjJbju.js";
11
11
  import { n as Le } from "./string-VNuQNweN.js";
12
- import { u as Me } from "./employee-D3ZpYH4j.js";
12
+ import { u as Me } from "./employee-DwYHFacQ.js";
13
13
  import { u as Te } from "./restaurant-BTpBmfBV.js";
14
- import { u as Ie } from "./TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BfMkNvCz.js";
14
+ import { u as Ie } from "./TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RyhiKTSd.js";
15
15
  import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  function $e(x, a) {
17
17
  return ["years", "months"].find((S) => {
@@ -1,8 +1,8 @@
1
- import { d as i } from "./dayjs.min-DcfKURXN.js";
1
+ import { d as i } from "./dayjs.min-Ch0iysTG.js";
2
2
  import { defineStore as p, storeToRefs as T } from "pinia";
3
3
  import { ref as l } from "vue";
4
4
  import { b as c, g as y } from "./restaurant-BTpBmfBV.js";
5
- import { s as S } from "./iteration-CcXrOMQe.js";
5
+ import { s as S } from "./iteration-D1uWLp0V.js";
6
6
  import { i as f, f as g } from "./utils-BZkjJbju.js";
7
7
  const u = {
8
8
  async readTimesheets(t, e) {
@@ -9641,16 +9641,16 @@ const _e = (e) => ({
9641
9641
  }
9642
9642
  ]
9643
9643
  }
9644
- }), jc = ot(pe(() => import("./Main-N1CNGDAy.js"))), Ec = ot(pe(() => import("./Main-BojQuzZI.js"))), Pc = ot(
9645
- pe(() => import("./AuditLogList-BEZoHLsX.js"))
9646
- ), Oc = ot(pe(() => import("./Main-CKr3RGvf.js"))), Gc = pe(() => import("./ApprovalCodeList-BzL73nqc.js")), Yc = pe(() => import("./GrantUserList-Ci_ElhHZ.js")), Vc = pe(() => import("./EmployeeList-s4FYw1ZF.js")), Fc = pe(() => import("./RoleList-Cm7_q5l9.js")), Sc = pe(() => import("./TimesheetList-DEdLpYuM.js")), Rc = pe(() => import("./TeamMemberList-D2OfkfJP.js")), Hc = pe(
9647
- () => import("./PermissionSetList-DLknSOzA.js")
9644
+ }), jc = ot(pe(() => import("./Main-DkP8dWgn.js"))), Ec = ot(pe(() => import("./Main-DHJcgePj.js"))), Pc = ot(
9645
+ pe(() => import("./AuditLogList-ByTa5UJY.js"))
9646
+ ), Oc = ot(pe(() => import("./Main-DqiGpT4v.js"))), Gc = pe(() => import("./ApprovalCodeList-D5l9vIsE.js")), Yc = pe(() => import("./GrantUserList-Bt8w3p4j.js")), Vc = pe(() => import("./EmployeeList-Bv6ANk-P.js")), Fc = pe(() => import("./RoleList-CH6NDKPU.js")), Sc = pe(() => import("./TimesheetList-DcoqzbLO.js")), Rc = pe(() => import("./TeamMemberList-BwfG3go2.js")), Hc = pe(
9647
+ () => import("./PermissionSetList-BIGv1u67.js")
9648
9648
  ), Ic = Ws(
9649
- ot(pe(() => import("./SchedulePage-CN3ZsQ9E.js")))
9649
+ ot(pe(() => import("./SchedulePage-C1egcbIC.js")))
9650
9650
  ), qc = Ws(
9651
- ot(pe(() => import("./SchedulePositionPage-Bv3zraaF.js")))
9651
+ ot(pe(() => import("./SchedulePositionPage-OhL_hsqG.js")))
9652
9652
  ), kc = Ws(
9653
- ot(pe(() => import("./ScheduleGeneralPage-CmR4BZAp.js")))
9653
+ ot(pe(() => import("./ScheduleGeneralPage-DJPENJZ2.js")))
9654
9654
  ), ou = [
9655
9655
  {
9656
9656
  path: "/",
@@ -10696,7 +10696,7 @@ const iu = /* @__PURE__ */ at({
10696
10696
  };
10697
10697
  }
10698
10698
  });
10699
- var xs = { name: "@feedmepos/mf-hrm-portal", version: "2.2.5-dev.8", mode: "fmmf" };
10699
+ var xs = { name: "@feedmepos/mf-hrm-portal", version: "2.2.5-dev.9", mode: "fmmf" };
10700
10700
  console.log(
10701
10701
  `%c${xs.name}%c v${xs.version} %c${xs.mode}`,
10702
10702
  "background:#1f1f1f;color:#fff;padding:2px 6px;border-radius:3px 0 0 3px",
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { h as e, i as r, r as o } from "./app-Dmmpy4k-.js";
1
+ import { h as e, i as r, r as o } from "./app-BcZ6C8M8.js";
2
2
  export {
3
3
  e as FmApp,
4
4
  r as i18nMessages,
@@ -1,4 +1,4 @@
1
- import { g as Q, f as K } from "./app-Dmmpy4k-.js";
1
+ import { g as Q, f as K } from "./app-BcZ6C8M8.js";
2
2
  var E = { exports: {} };
3
3
  (function(V, X) {
4
4
  (function(W, k) {
@@ -0,0 +1,204 @@
1
+ import { d as g } from "./dayjs.min-Ch0iysTG.js";
2
+ import { defineStore as $, storeToRefs as x } from "pinia";
3
+ import { ref as m } from "vue";
4
+ import { s as E } from "./iteration-D1uWLp0V.js";
5
+ import { b as l, g as f, u as I } from "./restaurant-BTpBmfBV.js";
6
+ import { i as v } from "./utils-BZkjJbju.js";
7
+ import { u as _ } from "./role-B9VanAny.js";
8
+ const o = {
9
+ async readEmployees() {
10
+ return f(await l().get("/pos-users"));
11
+ },
12
+ async readEmployeesPage(e) {
13
+ var s, p;
14
+ return f(
15
+ await l().get("/pos-users/paged", {
16
+ params: {
17
+ limit: e.limit,
18
+ offset: e.offset,
19
+ search: e.search,
20
+ restaurantIds: (s = e.restaurantIds) != null && s.length ? e.restaurantIds : void 0,
21
+ roleIds: (p = e.roleIds) != null && p.length ? e.roleIds : void 0
22
+ }
23
+ })
24
+ );
25
+ },
26
+ async createEmployee(e) {
27
+ await l().post("/pos-users", e);
28
+ },
29
+ async createMasterEmployee(e) {
30
+ await l().post("/pos-users/master-user", e);
31
+ },
32
+ async migrateToMasterEmployee(e, s) {
33
+ await l().put(`/pos-users/migrate/${e}`, s);
34
+ },
35
+ async updateEmployee(e, s) {
36
+ await l().put(`/pos-users/${e}`, s);
37
+ },
38
+ async updateMasterEmployee(e, s) {
39
+ await l().put(`/pos-users/master-user/${e}`, s);
40
+ },
41
+ async deleteEmployee(e) {
42
+ await l().put(`/pos-users/${e._id}`, {
43
+ user: e,
44
+ roles: [],
45
+ previousRoles: e.restaurants.map((s) => ({
46
+ restaurantId: s.restaurantId,
47
+ roleId: s.roleId
48
+ }))
49
+ });
50
+ },
51
+ async deleteMasterEmployee(e) {
52
+ await l().put(`/pos-users/master-user/${e._id}`, {
53
+ user: e,
54
+ roles: [],
55
+ previousRoles: e.restaurants.map((s) => ({
56
+ restaurantId: s.restaurantId,
57
+ roleId: s.roleId
58
+ }))
59
+ });
60
+ },
61
+ async generateEmployeePasscode(e) {
62
+ return `${f(
63
+ await l().post("/pos-users/generate-passcode", {
64
+ restaurantIds: e.restaurantIds,
65
+ excludePosUserId: e.excludePosUserId
66
+ })
67
+ )}`;
68
+ },
69
+ async syncUsersMeta() {
70
+ await l().post("/pos-users/create-users-meta");
71
+ }
72
+ };
73
+ async function T(e) {
74
+ const s = _().roles.value, { restaurants: p } = I(), c = new Map(
75
+ p.value.map((a) => [a._id, a.profile.name])
76
+ ), u = new Map(s.map((a) => [a._id, a.name])), r = /* @__PURE__ */ new Map();
77
+ for (const a of e) {
78
+ const n = {
79
+ restaurantId: a.restaurantId,
80
+ restaurantName: c.get(a.restaurantId) || "",
81
+ roleId: a.role,
82
+ roleName: u.get(a.role) || ""
83
+ }, d = r.get(a._id);
84
+ if (!d) {
85
+ r.set(a._id, {
86
+ ...a,
87
+ isRestricted: !1,
88
+ since: g(v(a._id)).format("DD/MM/YYYY"),
89
+ restaurants: [n]
90
+ });
91
+ continue;
92
+ }
93
+ d.restaurants.some((y) => y.restaurantId === a.restaurantId) || (d.restaurants = E([...d.restaurants, n], {
94
+ selector: "restaurantName"
95
+ }));
96
+ }
97
+ return E([...r.values()], { selector: "name" });
98
+ }
99
+ function M(e) {
100
+ const { restaurants: s } = I(), p = _().roles.value, c = new Map(
101
+ s.value.map((a) => [a._id, a])
102
+ ), u = new Map(p.map((a) => [a._id, a.name])), r = e.restaurantRole[0];
103
+ return {
104
+ _id: e._id,
105
+ name: e.name,
106
+ code: e.code,
107
+ passcode: e.passcode,
108
+ isMasterUser: e.isMasterUser,
109
+ isRestricted: e.isRestricted,
110
+ restaurantId: (r == null ? void 0 : r.restaurantId) || "",
111
+ role: (r == null ? void 0 : r.roleId) || "",
112
+ since: g(v(e._id)).format("DD/MM/YYYY"),
113
+ restaurants: E(
114
+ e.restaurantRole.map((a) => {
115
+ const n = c.get(a.restaurantId);
116
+ return {
117
+ restaurantId: a.restaurantId,
118
+ restaurantName: (n == null ? void 0 : n.profile.name) || "",
119
+ restaurantCode: (n == null ? void 0 : n.profile.code) ?? void 0,
120
+ roleId: a.roleId,
121
+ roleName: u.get(a.roleId) || ""
122
+ };
123
+ }),
124
+ { selector: "restaurantName" }
125
+ )
126
+ };
127
+ }
128
+ const h = $("employee", () => {
129
+ const e = I(), s = m([]), p = m([]), c = m(0), u = m(!1);
130
+ async function r() {
131
+ try {
132
+ u.value = !0, await e.readRestaurants();
133
+ const t = await o.readEmployees();
134
+ s.value = await T(t);
135
+ } finally {
136
+ u.value = !1;
137
+ }
138
+ }
139
+ async function a(t) {
140
+ try {
141
+ u.value = !0, await e.readRestaurants();
142
+ const i = await o.readEmployeesPage(t);
143
+ p.value = i.items.map(M), c.value = i.total;
144
+ } finally {
145
+ u.value = !1;
146
+ }
147
+ }
148
+ async function n(t, i) {
149
+ await e.readRestaurants();
150
+ const w = i ?? (await o.readEmployeesPage({ ...t, limit: 1, offset: 0 })).total;
151
+ return w === 0 ? [] : (await o.readEmployeesPage({ ...t, limit: w, offset: 0 })).items.map(M);
152
+ }
153
+ async function d(t) {
154
+ await o.createEmployee(t);
155
+ }
156
+ async function y(t, i) {
157
+ await o.updateEmployee(t, i);
158
+ }
159
+ async function P(t) {
160
+ await o.deleteEmployee(t);
161
+ }
162
+ async function U(t) {
163
+ await o.deleteMasterEmployee(t);
164
+ }
165
+ async function Y(t) {
166
+ await o.createMasterEmployee(t);
167
+ }
168
+ async function N(t, i) {
169
+ await o.updateMasterEmployee(t, i);
170
+ }
171
+ async function S(t, i) {
172
+ await o.migrateToMasterEmployee(t, i);
173
+ }
174
+ async function D() {
175
+ await o.syncUsersMeta();
176
+ }
177
+ return {
178
+ employees: s,
179
+ listEmployees: p,
180
+ totalEmployees: c,
181
+ isLoading: u,
182
+ readEmployees: r,
183
+ readEmployeesPage: a,
184
+ readAllEmployeesPage: n,
185
+ createEmployee: d,
186
+ updateEmployee: y,
187
+ deleteEmployee: P,
188
+ createMasterEmployee: Y,
189
+ updateMasterEmployee: N,
190
+ deleteMasterEmployee: U,
191
+ migrateToMasterUser: S,
192
+ syncUsersMeta: D
193
+ };
194
+ }), z = () => {
195
+ const e = h();
196
+ return {
197
+ ...e,
198
+ ...x(e)
199
+ };
200
+ };
201
+ export {
202
+ o as E,
203
+ z as u
204
+ };