@feedmepos/mf-hrm-portal 2.3.0-dev.13 → 2.3.0-dev.14

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 (40) hide show
  1. package/dist/{ApprovalCodeList-D3egZFML.js → ApprovalCodeList-C9dauQ81.js} +4 -4
  2. package/dist/{AuditLogList-BzbaEsSj.js → AuditLogList-zW_N_ECT.js} +17 -18
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Do52KbKm.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DJuO1qPX.js} +2 -2
  4. package/dist/{EmployeeList-BiM8dRwZ.js → EmployeeList-8jkHTd7q.js} +255 -267
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js → FormItem.vue_vue_type_script_setup_true_lang-CJc_g0tW.js} +6 -6
  6. package/dist/{GrantUserList-Dj2ms20E.js → GrantUserList-Dj55GA7O.js} +5 -5
  7. package/dist/{Main-C2z7Jf9A.js → Main-0TfvGJ4N.js} +5 -5
  8. package/dist/{Main-DmpwTPaI.js → Main-BQNkTyET.js} +9 -9
  9. package/dist/{Main-DklZWoKj.js → Main-CuUG6svQ.js} +2 -2
  10. package/dist/{PermissionSetList-C-qgCcRO.js → PermissionSetList-BsLi-TOK.js} +5 -5
  11. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ggZB5zWW.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C2l8nWx2.js} +1014 -1014
  12. package/dist/{RoleList-ohfin77B.js → RoleList-DLDcyVWT.js} +7 -7
  13. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-diuWysro.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CUXUPfRc.js} +190 -181
  14. package/dist/{ScheduleGeneralPage-aCljFf21.js → ScheduleGeneralPage-BhYI6O9g.js} +132 -133
  15. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-x_-BYkcc.js → ScheduleModal.vue_vue_type_script_setup_true_lang-BLBLBtNG.js} +669 -646
  16. package/dist/{SchedulePage-DdMHF6kX.js → SchedulePage-DPU4taJt.js} +7407 -7359
  17. package/dist/{SchedulePositionPage-CID91orD.js → SchedulePositionPage-Byt6nmUj.js} +82 -84
  18. package/dist/{SelectFilter-CG13h83-.js → SelectFilter-1fh00OZW.js} +1 -1
  19. package/dist/{TeamMemberList-DJIKL4dE.js → TeamMemberList-CyUX8Afk.js} +35 -36
  20. package/dist/{TimesheetList-BPXWPNfT.js → TimesheetList-Q4FeNgOT.js} +52 -53
  21. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DVcV0knM.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-C3iU4Zmc.js} +2 -2
  22. package/dist/{app-Bz8568j8.js → app-TuHQoM7K.js} +676 -666
  23. package/dist/app.js +1 -1
  24. package/dist/{dayjs.min-DhSRKSu4.js → dayjs.min-DXnA8GYn.js} +1 -1
  25. package/dist/{employee-BM44u8b-.js → employee-Ctnil3cD.js} +3 -3
  26. package/dist/{iteration-BHDxs89d.js → iteration-BxOzv27y.js} +1 -1
  27. package/dist/{lodash-DgSYLwYD.js → lodash-CKT_RxJs.js} +1 -1
  28. package/dist/object-Dwyg2LgX.js +16 -0
  29. package/dist/{role-BMJ7LEHN.js → role-CNEJPyaD.js} +1 -1
  30. package/dist/{rule-CCo7_ckA.js → rule-FbuHv6Gh.js} +2 -2
  31. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +2 -1
  32. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +3 -1
  33. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +2 -0
  34. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +3 -1
  35. package/dist/src/views/scheduling/data.d.ts +17 -0
  36. package/dist/style.css +1 -1
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/{useReportPermissions-C_Cd__n1.js → useReportPermissions-lemBrd1S.js} +3 -3
  39. package/package.json +1 -1
  40. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
@@ -1,16 +1,16 @@
1
1
  import { computed as y, defineComponent as Pe, ref as V, watch as le, onMounted as Me, resolveComponent as F, createBlock as M, openBlock as v, unref as o, withCtx as g, createElementVNode as u, createVNode as c, createElementBlock as R, Fragment as P, createCommentVNode as _e, renderList as ne, normalizeClass as Ue, toDisplayString as $, h as A, createTextVNode as ge, resolveDynamicComponent as Ee, withModifiers as Ze, nextTick as De } from "vue";
2
- import { e as D } from "./iteration-BHDxs89d.js";
2
+ import { e as D } from "./iteration-BxOzv27y.js";
3
3
  import { useI18n as Te } from "@feedmepos/mf-common";
4
4
  import { useBreakpoints as Be, useSnackbar as je, components as ye, useDialog as es, FmButtonColorThemeVariant as ss } from "@feedmepos/ui-library";
5
- import { D as ts, k as as, A as ls, S as os, _ as rs } from "./app-Bz8568j8.js";
5
+ import { D as ts, k as as, A as ls, S as os, _ as rs } from "./app-TuHQoM7K.js";
6
6
  import { _ as $e } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
7
7
  import { _ as ns } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
8
- import { r as ie, h as Ae, f as is, s as us, g as Ie, e as cs, a as oe } from "./rule-CCo7_ckA.js";
8
+ import { r as ie, h as Ae, f as is, s as us, g as Ie, e as cs, a as oe } from "./rule-FbuHv6Gh.js";
9
9
  import { u as xe } from "./restaurant-BbYRA_IT.js";
10
- import { u as Oe } from "./role-BMJ7LEHN.js";
11
- import { u as Ne } from "./useReportPermissions-C_Cd__n1.js";
12
- import { l as re } from "./lodash-DgSYLwYD.js";
13
- import { u as ms, _ as ds, a as Le } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Do52KbKm.js";
10
+ import { u as Oe } from "./role-CNEJPyaD.js";
11
+ import { u as Ne } from "./useReportPermissions-lemBrd1S.js";
12
+ import { l as re } from "./lodash-CKT_RxJs.js";
13
+ import { u as ms, _ as ds, a as Le } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DJuO1qPX.js";
14
14
  import { _ as be } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
15
15
  import { u as ps } from "./useDiscardConfirm-CzZSPyvh.js";
16
16
  import { u as fs } from "./useLoading-Ch1AUYT1.js";
@@ -1,78 +1,87 @@
1
- import { ref as h, watch as ke, computed as S, reactive as Ie, nextTick as be, defineComponent as Pe, createBlock as Q, openBlock as I, withCtx as C, createElementVNode as n, createVNode as K, toDisplayString as f, unref as q, createElementBlock as N, withDirectives as ne, withKeys as we, vModelText as se, normalizeClass as oe, createTextVNode as M, createCommentVNode as G, Fragment as ie, renderList as Ne } from "vue";
2
- import { ar as X, au as $e, av as ue, f as R, aw as pe, ax as Ce, F as W, p as H, aq as Se, ao as O } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-x_-BYkcc.js";
1
+ import { ref as h, watch as ne, computed as S, reactive as Ie, nextTick as be, defineComponent as Pe, createBlock as Q, openBlock as b, withCtx as C, createElementVNode as n, createVNode as R, toDisplayString as f, unref as q, createElementBlock as N, withDirectives as se, withKeys as we, vModelText as oe, normalizeClass as ie, createTextVNode as M, createCommentVNode as G, Fragment as de, renderList as Ne } from "vue";
2
+ import { at as X, f as z, aw as $e, ax as me, ay as pe, az as Ce, G as W, p as H, as as Se, aq as O } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-BLBLBtNG.js";
3
3
  import { useI18n as Ae } from "@feedmepos/mf-common";
4
- function de() {
4
+ function ue() {
5
5
  return X.map((e) => ({ id: e.id, name: e.name }));
6
6
  }
7
7
  function la(e = {}) {
8
- const d = h(de());
9
- ke(
10
- () => X.map((v) => `${v.id}:${v.name}`).join(" "),
8
+ const s = h(ue());
9
+ ne(
10
+ () => X.map((o) => `${o.id}:${o.name}`).join(" "),
11
11
  () => {
12
- d.value = de();
12
+ s.value = ue();
13
+ }
14
+ ), ne(
15
+ () => {
16
+ var o;
17
+ return (((o = z.value) == null ? void 0 : o.positions) ?? []).map((m) => `${m.id}:${m.name}`).join(" ");
18
+ },
19
+ () => {
20
+ var o;
21
+ s.value = (((o = z.value) == null ? void 0 : o.positions) ?? []).map((m) => ({ id: m.id, name: m.name }));
13
22
  }
14
23
  );
15
- const g = h(!1), a = h(""), t = h(null), u = h(!1), k = h(null);
16
- function A(v) {
17
- var y;
18
- return (((y = R.value) == null ? void 0 : y.employees) ?? []).filter(
19
- (b) => {
20
- var P;
21
- return ((P = b.primaryPosition) == null ? void 0 : P.positionId) === v || b.secondaryPositions.some((j) => j.positionId === v);
24
+ const g = h(!1), a = h(""), t = h(null), c = h(!1), k = h(null);
25
+ function A(o) {
26
+ var m;
27
+ return (((m = z.value) == null ? void 0 : m.employees) ?? []).filter(
28
+ (P) => {
29
+ var I;
30
+ return ((I = P.primaryPosition) == null ? void 0 : I.positionId) === o || P.secondaryPositions.some((V) => V.positionId === o);
22
31
  }
23
32
  ).length;
24
33
  }
25
- function z(v) {
26
- return d.value.some((y) => y.name.toLowerCase() === v.toLowerCase());
34
+ function j(o) {
35
+ return s.value.some((m) => m.name.toLowerCase() === o.toLowerCase());
27
36
  }
28
- function B() {
37
+ function F() {
29
38
  g.value = !0, a.value = "", t.value = null, k.value = null;
30
39
  }
31
40
  function $() {
32
41
  g.value = !1, a.value = "";
33
42
  }
34
43
  async function D() {
35
- var y, b;
36
- const v = a.value.trim().slice(0, 40);
37
- if (!(!v || z(v))) {
38
- u.value = !0, k.value = null;
44
+ var m, P;
45
+ const o = a.value.trim().slice(0, 40);
46
+ if (!(!o || j(o))) {
47
+ c.value = !0, k.value = null;
39
48
  try {
40
- await ue({ name: v }), g.value = !1, a.value = "", (y = e.notify) == null || y.call(e, "Position added", "success");
41
- } catch (P) {
42
- k.value = P instanceof Error ? P.message : "Could not add this position", (b = e.notify) == null || b.call(e, k.value, "error");
49
+ await me({ name: o }), g.value = !1, a.value = "", (m = e.notify) == null || m.call(e, "Position added", "success");
50
+ } catch (I) {
51
+ k.value = I instanceof Error ? I.message : "Could not add this position", (P = e.notify) == null || P.call(e, k.value, "error");
43
52
  } finally {
44
- u.value = !1;
53
+ c.value = !1;
45
54
  }
46
55
  }
47
56
  }
48
- function E(v) {
49
- t.value = v;
57
+ function E(o) {
58
+ t.value = o;
50
59
  }
51
60
  function p() {
52
61
  t.value = null;
53
62
  }
54
- async function L(v) {
55
- var y, b;
56
- u.value = !0, k.value = null;
63
+ async function L(o) {
64
+ var m, P;
65
+ c.value = !0, k.value = null;
57
66
  try {
58
- await $e(v), t.value = null, (y = e.notify) == null || y.call(e, "Position removed", "success");
59
- } catch (P) {
60
- k.value = P instanceof Error ? P.message : "Could not delete this position", (b = e.notify) == null || b.call(e, k.value, "error");
67
+ await $e(o), s.value = s.value.filter((I) => I.id !== o), t.value = null, (m = e.notify) == null || m.call(e, "Position removed", "success");
68
+ } catch (I) {
69
+ k.value = I instanceof Error ? I.message : "Could not delete this position", (P = e.notify) == null || P.call(e, k.value, "error");
61
70
  } finally {
62
- u.value = !1;
71
+ c.value = !1;
63
72
  }
64
73
  }
65
- const J = S(() => d.value.length);
74
+ const J = S(() => s.value.length);
66
75
  return {
67
- positions: d,
76
+ positions: s,
68
77
  count: J,
69
78
  isAdding: g,
70
79
  newName: a,
71
80
  pendingDeleteId: t,
72
- saving: u,
81
+ saving: c,
73
82
  error: k,
74
83
  usageCountFor: A,
75
- startAdd: B,
84
+ startAdd: F,
76
85
  cancelAdd: $,
77
86
  confirmAdd: D,
78
87
  askDelete: E,
@@ -82,188 +91,188 @@ function la(e = {}) {
82
91
  }
83
92
  function Ee(e) {
84
93
  var g;
85
- const d = e.trim().split(/\s+/).filter(Boolean);
86
- return d.length ? (d[0][0] + (((g = d[1]) == null ? void 0 : g[0]) ?? "")).toUpperCase() : "??";
94
+ const s = e.trim().split(/\s+/).filter(Boolean);
95
+ return s.length ? (s[0][0] + (((g = s[1]) == null ? void 0 : g[0]) ?? "")).toUpperCase() : "??";
87
96
  }
88
- function ta(e, d = {}) {
89
- const g = h(!1), a = h(""), t = h(""), u = Ie({}), k = h(!1), A = h(null), z = h(null), B = h(!1), $ = h(null);
97
+ function ta(e, s = {}) {
98
+ const g = h(!1), a = h(""), t = h(""), c = Ie({}), k = h(!1), A = h(null), j = h(null), F = h(!1), $ = h(null);
90
99
  let D = "", E = /* @__PURE__ */ new Set();
91
100
  const p = S(() => {
92
- var m;
93
- const l = new Map((((m = R.value) == null ? void 0 : m.employees) ?? []).map((r) => [r.employeeId, r]));
94
- return pe.value.map((r) => {
95
- var T, c;
96
- const s = l.get(r._id), x = [
97
- (T = s == null ? void 0 : s.primaryPosition) == null ? void 0 : T.positionName,
98
- ...((s == null ? void 0 : s.secondaryPositions) ?? []).map((i) => i.positionName)
99
- ].filter((i) => !!i), o = [
100
- (c = s == null ? void 0 : s.primaryPosition) == null ? void 0 : c.positionId,
101
- ...((s == null ? void 0 : s.secondaryPositions) ?? []).map((i) => i.positionId)
102
- ].filter((i) => !!i);
101
+ var r;
102
+ const l = new Map((((r = z.value) == null ? void 0 : r.employees) ?? []).map((y) => [y.employeeId, y]));
103
+ return pe.value.map((y) => {
104
+ var T, v;
105
+ const i = l.get(y._id), x = [
106
+ (T = i == null ? void 0 : i.primaryPosition) == null ? void 0 : T.positionName,
107
+ ...((i == null ? void 0 : i.secondaryPositions) ?? []).map((u) => u.positionName)
108
+ ].filter((u) => !!u), d = [
109
+ (v = i == null ? void 0 : i.primaryPosition) == null ? void 0 : v.positionId,
110
+ ...((i == null ? void 0 : i.secondaryPositions) ?? []).map((u) => u.positionId)
111
+ ].filter((u) => !!u);
103
112
  return {
104
- employeeId: r._id,
105
- name: r.name,
106
- initials: Ee(r.name),
113
+ employeeId: y._id,
114
+ name: y.name,
115
+ initials: Ee(y.name),
107
116
  held: x,
108
- heldPositionIds: o
117
+ heldPositionIds: d
109
118
  };
110
119
  });
111
120
  }), L = S(() => {
112
121
  const l = t.value.trim().toLowerCase();
113
- return p.value.filter((m) => !l || m.name.toLowerCase().includes(l));
122
+ return p.value.filter((r) => !l || r.name.toLowerCase().includes(l));
114
123
  }), J = S(
115
- () => p.value.filter((l) => u[l.employeeId]).map((l) => l.employeeId)
116
- ), v = S(
117
- () => L.value.length > 0 && L.value.every((l) => u[l.employeeId])
118
- ), y = S(() => a.value.trim().slice(0, 40)), b = S(
119
- () => !!y.value && X.some(
120
- (l) => l.id !== $.value && l.name.toLowerCase() === y.value.toLowerCase()
124
+ () => p.value.filter((l) => c[l.employeeId]).map((l) => l.employeeId)
125
+ ), o = S(
126
+ () => L.value.length > 0 && L.value.every((l) => c[l.employeeId])
127
+ ), m = S(() => a.value.trim().slice(0, 40)), P = S(
128
+ () => !!m.value && X.some(
129
+ (l) => l.id !== $.value && l.name.toLowerCase() === m.value.toLowerCase()
121
130
  )
122
- ), P = S(() => !!y.value && !b.value && !k.value);
123
- function j() {
124
- a.value = "", t.value = "", Object.keys(u).forEach((l) => delete u[l]), A.value = null, B.value = !1, z.value = null, $.value = null, D = "", E = /* @__PURE__ */ new Set();
131
+ ), I = S(() => !!m.value && !P.value && !k.value);
132
+ function V() {
133
+ a.value = "", t.value = "", Object.keys(c).forEach((l) => delete c[l]), A.value = null, F.value = !1, j.value = null, $.value = null, D = "", E = /* @__PURE__ */ new Set();
125
134
  }
126
- function me() {
127
- j(), g.value = !0;
135
+ function ce() {
136
+ V(), g.value = !0;
128
137
  }
129
- function ce(l, m) {
130
- j(), $.value = l, a.value = m, D = m, E = new Set(
131
- p.value.filter((r) => r.heldPositionIds.includes(l)).map((r) => r.employeeId)
132
- ), E.forEach((r) => u[r] = !0), g.value = !0;
138
+ function re(l, r) {
139
+ V(), $.value = l, a.value = r, D = r, E = new Set(
140
+ p.value.filter((y) => y.heldPositionIds.includes(l)).map((y) => y.employeeId)
141
+ ), E.forEach((y) => c[y] = !0), g.value = !0;
133
142
  }
134
- function re() {
135
- g.value = !1, j();
143
+ function ve() {
144
+ g.value = !1, V();
136
145
  }
137
- function ve(l) {
138
- u[l] = !u[l];
146
+ function ye(l) {
147
+ c[l] = !c[l];
139
148
  }
140
- function ye() {
141
- if (v.value) {
142
- Object.keys(u).forEach((l) => delete u[l]);
149
+ function fe() {
150
+ if (o.value) {
151
+ Object.keys(c).forEach((l) => delete c[l]);
143
152
  return;
144
153
  }
145
- L.value.forEach((l) => u[l.employeeId] = !0);
154
+ L.value.forEach((l) => c[l.employeeId] = !0);
146
155
  }
147
- function Y(l, m) {
148
- const r = !!(l != null && l.primaryPosition), s = ((l == null ? void 0 : l.secondaryPositions) ?? []).map((o) => ({
149
- positionId: o.positionId,
150
- positionName: o.positionName
151
- })), x = r ? [...s, { positionName: m }] : s;
156
+ function Y(l, r) {
157
+ const y = !!(l != null && l.primaryPosition), i = ((l == null ? void 0 : l.secondaryPositions) ?? []).map((d) => ({
158
+ positionId: d.positionId,
159
+ positionName: d.positionName
160
+ })), x = y ? [...i, { positionName: r }] : i;
152
161
  return {
153
- ...r ? {} : { primaryPosition: H(m) },
154
- secondaryPositions: x.map((o) => H(o.positionName, o.positionId)).filter((o) => !!o)
162
+ ...y ? {} : { primaryPosition: H(r) },
163
+ secondaryPositions: x.map((d) => H(d.positionName, d.positionId)).filter((d) => !!d)
155
164
  };
156
165
  }
157
- async function fe() {
166
+ async function he() {
158
167
  var x;
159
- const l = y.value;
160
- await ue({ name: l }), await be(), e == null || e(l);
161
- const m = p.value.filter((o) => u[o.employeeId]), s = (await Promise.allSettled(
162
- m.map((o) => {
163
- var c;
164
- const T = (c = R.value) == null ? void 0 : c.employees.find((i) => i.employeeId === o.employeeId);
165
- return W(o.employeeId, {
166
- employeeName: o.name,
168
+ const l = m.value;
169
+ await me({ name: l }), await be(), e == null || e(l);
170
+ const r = p.value.filter((d) => c[d.employeeId]), i = (await Promise.allSettled(
171
+ r.map((d) => {
172
+ var v;
173
+ const T = (v = z.value) == null ? void 0 : v.employees.find((u) => u.employeeId === d.employeeId);
174
+ return W(d.employeeId, {
175
+ employeeName: d.name,
167
176
  ...Y(T, l)
168
177
  });
169
178
  })
170
- )).filter((o) => o.status === "rejected").length;
171
- return z.value = { name: l, assigned: m.length - s, failed: s }, (x = d.notify) == null || x.call(
172
- d,
173
- s ? `Position added, but ${s} employee assignment${s === 1 ? "" : "s"} failed` : "Position added",
174
- s ? "error" : "success"
179
+ )).filter((d) => d.status === "rejected").length;
180
+ return j.value = { name: l, assigned: r.length - i, failed: i }, (x = s.notify) == null || x.call(
181
+ s,
182
+ i ? `Position added, but ${i} employee assignment${i === 1 ? "" : "s"} failed` : "Position added",
183
+ i ? "error" : "success"
175
184
  ), !0;
176
185
  }
177
- async function he(l) {
186
+ async function ge(l) {
178
187
  var T;
179
- const m = y.value;
180
- await Ce(l, { name: m }), e == null || e(m);
181
- const r = p.value.filter(
182
- (c) => u[c.employeeId] && !E.has(c.employeeId)
183
- ), s = p.value.filter(
184
- (c) => !u[c.employeeId] && E.has(c.employeeId)
185
- ), o = (await Promise.allSettled([
186
- ...r.map((c) => {
187
- var F;
188
- const i = (F = R.value) == null ? void 0 : F.employees.find((U) => U.employeeId === c.employeeId);
189
- return W(c.employeeId, {
190
- employeeName: c.name,
191
- ...Y(i, m)
188
+ const r = m.value;
189
+ await Ce(l, { name: r }), e == null || e(r);
190
+ const y = p.value.filter(
191
+ (v) => c[v.employeeId] && !E.has(v.employeeId)
192
+ ), i = p.value.filter(
193
+ (v) => !c[v.employeeId] && E.has(v.employeeId)
194
+ ), d = (await Promise.allSettled([
195
+ ...y.map((v) => {
196
+ var K;
197
+ const u = (K = z.value) == null ? void 0 : K.employees.find((U) => U.employeeId === v.employeeId);
198
+ return W(v.employeeId, {
199
+ employeeName: v.name,
200
+ ...Y(u, r)
192
201
  });
193
202
  }),
194
- ...s.map((c) => {
203
+ ...i.map((v) => {
195
204
  var ee, ae, le, te;
196
- const i = (ee = R.value) == null ? void 0 : ee.employees.find((w) => w.employeeId === c.employeeId), F = ((i == null ? void 0 : i.secondaryPositions) ?? []).filter(
205
+ const u = (ee = z.value) == null ? void 0 : ee.employees.find((w) => w.employeeId === v.employeeId), K = ((u == null ? void 0 : u.secondaryPositions) ?? []).filter(
197
206
  (w) => w.positionId !== l && (w.positionId || w.positionName !== D)
198
- ), U = ((ae = i == null ? void 0 : i.primaryPosition) == null ? void 0 : ae.positionId) === l || !((le = i == null ? void 0 : i.primaryPosition) != null && le.positionId) && ((te = i == null ? void 0 : i.primaryPosition) == null ? void 0 : te.positionName) === D, V = U ? F.shift() : void 0;
199
- return W(c.employeeId, {
200
- employeeName: c.name,
207
+ ), U = ((ae = u == null ? void 0 : u.primaryPosition) == null ? void 0 : ae.positionId) === l || !((le = u == null ? void 0 : u.primaryPosition) != null && le.positionId) && ((te = u == null ? void 0 : u.primaryPosition) == null ? void 0 : te.positionName) === D, B = U ? K.shift() : void 0;
208
+ return W(v.employeeId, {
209
+ employeeName: v.name,
201
210
  ...U ? {
202
- primaryPosition: H(V == null ? void 0 : V.positionName, V == null ? void 0 : V.positionId) ?? null
211
+ primaryPosition: H(B == null ? void 0 : B.positionName, B == null ? void 0 : B.positionId) ?? null
203
212
  } : {},
204
- secondaryPositions: F.map((w) => H(w.positionName, w.positionId)).filter((w) => !!w)
213
+ secondaryPositions: K.map((w) => H(w.positionName, w.positionId)).filter((w) => !!w)
205
214
  });
206
215
  })
207
- ])).filter((c) => c.status === "rejected").length;
208
- return z.value = { name: m, assigned: Math.max(0, r.length - o), failed: o }, (T = d.notify) == null || T.call(
209
- d,
210
- o ? `Position updated, but ${o} employee assignment${o === 1 ? "" : "s"} failed` : "Position updated",
211
- o ? "error" : "success"
216
+ ])).filter((v) => v.status === "rejected").length;
217
+ return j.value = { name: r, assigned: Math.max(0, y.length - d), failed: d }, (T = s.notify) == null || T.call(
218
+ s,
219
+ d ? `Position updated, but ${d} employee assignment${d === 1 ? "" : "s"} failed` : "Position updated",
220
+ d ? "error" : "success"
212
221
  ), !0;
213
222
  }
214
223
  async function Z() {
215
224
  var l;
216
- if (!y.value)
217
- return B.value = !0, !1;
218
- if (!P.value) return !1;
225
+ if (!m.value)
226
+ return F.value = !0, !1;
227
+ if (!I.value) return !1;
219
228
  k.value = !0, A.value = null;
220
229
  try {
221
- return await ($.value ? he($.value) : fe());
222
- } catch (m) {
223
- return A.value = m instanceof Error ? m.message : `Could not ${$.value ? "save" : "add"} this position`, (l = d.notify) == null || l.call(d, A.value, "error"), !1;
230
+ return await ($.value ? ge($.value) : he());
231
+ } catch (r) {
232
+ return A.value = r instanceof Error ? r.message : `Could not ${$.value ? "save" : "add"} this position`, (l = s.notify) == null || l.call(s, A.value, "error"), !1;
224
233
  } finally {
225
234
  k.value = !1;
226
235
  }
227
236
  }
228
237
  function _() {
229
- j();
238
+ V();
230
239
  }
231
- async function ge() {
240
+ async function ke() {
232
241
  await Z() && _();
233
242
  }
234
243
  return {
235
244
  open: g,
236
245
  name: a,
237
246
  search: t,
238
- picks: u,
247
+ picks: c,
239
248
  saving: k,
240
249
  error: A,
241
- done: z,
242
- nameError: B,
250
+ done: j,
251
+ nameError: F,
243
252
  people: p,
244
253
  visible: L,
245
254
  pickedIds: J,
246
- allPicked: v,
247
- nameTaken: b,
248
- canSave: P,
255
+ allPicked: o,
256
+ nameTaken: P,
257
+ canSave: I,
249
258
  editingId: $,
250
- openNew: me,
251
- openEdit: ce,
252
- close: re,
253
- toggle: ve,
254
- toggleAll: ye,
259
+ openNew: ce,
260
+ openEdit: re,
261
+ close: ve,
262
+ toggle: ye,
263
+ toggleAll: fe,
255
264
  save: Z,
256
- saveAndAnother: ge,
265
+ saveAndAnother: ke,
257
266
  another: _
258
267
  };
259
268
  }
260
269
  const xe = { class: "am-head" }, Te = {
261
270
  id: "schedule-position-title",
262
271
  class: "am-title"
263
- }, Me = { class: "ce-body" }, Oe = { key: 0 }, ze = { class: "ce-field" }, De = {
272
+ }, Me = { class: "ce-body" }, Oe = { key: 0 }, ze = { class: "ce-field" }, je = {
264
273
  class: "ce-field asg-field",
265
274
  style: { "margin-bottom": "0" }
266
- }, Le = { class: "asg-head" }, je = { class: "asg-count" }, Ve = { class: "asg-list" }, Be = ["checked", "onChange"], Fe = { class: "asg-av" }, Ke = { class: "asg-id" }, Re = { class: "asg-nm" }, Ue = { class: "asg-sub" }, qe = { key: 1 }, Ge = {
275
+ }, De = { class: "asg-head" }, Le = { class: "asg-count" }, Ve = { class: "asg-list" }, Be = ["checked", "onChange"], Fe = { class: "asg-av" }, Ke = { class: "asg-id" }, Re = { class: "asg-nm" }, Ue = { class: "asg-sub" }, qe = { key: 1 }, Ge = {
267
276
  key: 0,
268
277
  class: "asg-sub",
269
278
  style: { padding: "10px" }
@@ -282,8 +291,8 @@ const xe = { class: "am-head" }, Te = {
282
291
  modal: {}
283
292
  },
284
293
  setup(e) {
285
- const { t: d } = Ae();
286
- return (g, a) => (I(), Q(Se, {
294
+ const { t: s } = Ae();
295
+ return (g, a) => (b(), Q(Se, {
287
296
  open: e.modal.open.value,
288
297
  "panel-class": "ce-modal",
289
298
  "panel-style": "width: min(480px, 95vw)",
@@ -292,8 +301,8 @@ const xe = { class: "am-head" }, Te = {
292
301
  }, {
293
302
  default: C(() => [
294
303
  n("div", xe, [
295
- n("div", Te, f(e.modal.editingId.value ? q(d)("scheduling.positionModal.editTitle") : q(d)("scheduling.positionModal.addTitle")), 1),
296
- K(O, {
304
+ n("div", Te, f(e.modal.editingId.value ? q(s)("scheduling.positionModal.editTitle") : q(s)("scheduling.positionModal.addTitle")), 1),
305
+ R(O, {
297
306
  hierarchy: "ghost",
298
307
  size: "xs",
299
308
  "icon-only": "",
@@ -320,7 +329,7 @@ const xe = { class: "am-head" }, Te = {
320
329
  })
321
330
  ]),
322
331
  n("div", Me, [
323
- e.modal.done.value ? (I(), N("div", He, [
332
+ e.modal.done.value ? (b(), N("div", He, [
324
333
  n("div", Je, [
325
334
  a[16] || (a[16] = n("span", {
326
335
  class: "cg-done-tick",
@@ -331,14 +340,14 @@ const xe = { class: "am-head" }, Te = {
331
340
  n("small", null, f(e.modal.editingId.value ? "Position updated" : e.modal.done.value.assigned ? `Added to ${e.modal.done.value.assigned} ${e.modal.done.value.assigned === 1 ? "employee" : "employees"}` : "Position added"), 1)
332
341
  ])
333
342
  ]),
334
- e.modal.done.value.failed ? (I(), N("div", We, f(e.modal.done.value.failed) + " " + f(e.modal.done.value.failed === 1 ? "employee" : "employees") + " could not be updated. Add the position to them from their profile. ", 1)) : G("", !0)
335
- ])) : (I(), N("div", Oe, [
343
+ e.modal.done.value.failed ? (b(), N("div", We, f(e.modal.done.value.failed) + " " + f(e.modal.done.value.failed === 1 ? "employee" : "employees") + " could not be updated. Add the position to them from their profile. ", 1)) : G("", !0)
344
+ ])) : (b(), N("div", Oe, [
336
345
  n("div", ze, [
337
346
  a[13] || (a[13] = n("label", {
338
347
  class: "ce-label",
339
348
  for: "skName"
340
349
  }, "Position name", -1)),
341
- ne(n("input", {
350
+ se(n("input", {
342
351
  id: "skName",
343
352
  "onUpdate:modelValue": a[1] || (a[1] = (t) => e.modal.name.value = t),
344
353
  class: "sch-input ce-input",
@@ -348,16 +357,16 @@ const xe = { class: "am-head" }, Te = {
348
357
  onInput: a[2] || (a[2] = (t) => e.modal.nameError.value = !1),
349
358
  onKeyup: a[3] || (a[3] = we((t) => e.modal.save(), ["enter"]))
350
359
  }, null, 544), [
351
- [se, e.modal.name.value]
360
+ [oe, e.modal.name.value]
352
361
  ]),
353
362
  n("div", {
354
- class: oe(["ce-err", { show: e.modal.nameError.value || e.modal.nameTaken.value }])
363
+ class: ie(["ce-err", { show: e.modal.nameError.value || e.modal.nameTaken.value }])
355
364
  }, f(e.modal.nameTaken.value ? "A position with this name already exists" : "Give the position a name"), 3)
356
365
  ]),
357
- n("div", De, [
358
- n("div", Le, [
366
+ n("div", je, [
367
+ n("div", De, [
359
368
  a[14] || (a[14] = n("span", { class: "asg-lbl" }, "Employees with this position", -1)),
360
- K(O, {
369
+ R(O, {
361
370
  hierarchy: "ghost",
362
371
  size: "sm",
363
372
  class: "ce-add-link asg-all",
@@ -369,18 +378,18 @@ const xe = { class: "am-head" }, Te = {
369
378
  ]),
370
379
  _: 1
371
380
  }),
372
- n("span", je, f(e.modal.pickedIds.value.length) + " selected", 1)
381
+ n("span", Le, f(e.modal.pickedIds.value.length) + " selected", 1)
373
382
  ]),
374
- ne(n("input", {
383
+ se(n("input", {
375
384
  "onUpdate:modelValue": a[5] || (a[5] = (t) => e.modal.search.value = t),
376
385
  class: "sch-input ce-input asg-search",
377
386
  placeholder: "Search team…",
378
387
  autocomplete: "off"
379
388
  }, null, 512), [
380
- [se, e.modal.search.value]
389
+ [oe, e.modal.search.value]
381
390
  ]),
382
391
  n("div", Ve, [
383
- (I(!0), N(ie, null, Ne(e.modal.visible.value, (t) => (I(), N("label", {
392
+ (b(!0), N(de, null, Ne(e.modal.visible.value, (t) => (b(), N("label", {
384
393
  key: t.employeeId,
385
394
  class: "asg-row"
386
395
  }, [
@@ -388,32 +397,32 @@ const xe = { class: "am-head" }, Te = {
388
397
  type: "checkbox",
389
398
  class: "sch-checkbox asg-check",
390
399
  checked: !!e.modal.picks[t.employeeId],
391
- onChange: (u) => e.modal.toggle(t.employeeId),
400
+ onChange: (c) => e.modal.toggle(t.employeeId),
392
401
  "data-platform": "desktop"
393
402
  }, null, 40, Be),
394
403
  n("span", Fe, f(t.initials), 1),
395
404
  n("span", Ke, [
396
405
  n("span", Re, f(t.name), 1),
397
406
  n("span", Ue, [
398
- t.held.length ? (I(), N(ie, { key: 0 }, [
407
+ t.held.length ? (b(), N(de, { key: 0 }, [
399
408
  M(f(t.held.join(", ")), 1)
400
- ], 64)) : (I(), N("i", qe, "No positions added"))
409
+ ], 64)) : (b(), N("i", qe, "No positions added"))
401
410
  ])
402
411
  ])
403
412
  ]))), 128)),
404
- e.modal.visible.value.length ? G("", !0) : (I(), N("div", Ge, " No one matches. "))
413
+ e.modal.visible.value.length ? G("", !0) : (b(), N("div", Ge, " No one matches. "))
405
414
  ]),
406
415
  a[15] || (a[15] = n("div", { class: "ce-hint" }, "Ticked people can work this position.", -1))
407
416
  ]),
408
417
  n("div", {
409
- class: oe(["ce-err", { show: !!e.modal.error.value }])
418
+ class: ie(["ce-err", { show: !!e.modal.error.value }])
410
419
  }, f(e.modal.error.value), 3)
411
420
  ]))
412
421
  ]),
413
422
  n("div", Xe, [
414
423
  a[19] || (a[19] = n("div", { class: "am-cost-preview" }, null, -1)),
415
- e.modal.done.value ? (I(), N("div", Ze, [
416
- e.modal.editingId.value ? G("", !0) : (I(), Q(O, {
424
+ e.modal.done.value ? (b(), N("div", Ze, [
425
+ e.modal.editingId.value ? G("", !0) : (b(), Q(O, {
417
426
  key: 0,
418
427
  hierarchy: "secondary",
419
428
  size: "sm",
@@ -426,7 +435,7 @@ const xe = { class: "am-head" }, Te = {
426
435
  ])]),
427
436
  _: 1
428
437
  })),
429
- K(O, {
438
+ R(O, {
430
439
  hierarchy: "primary",
431
440
  size: "sm",
432
441
  class: "am-btn am-btn-primary",
@@ -434,12 +443,12 @@ const xe = { class: "am-head" }, Te = {
434
443
  onClick: a[10] || (a[10] = (t) => e.modal.close())
435
444
  }, {
436
445
  default: C(() => [
437
- M(f(q(d)("scheduling.common.done")), 1)
446
+ M(f(q(s)("scheduling.common.done")), 1)
438
447
  ]),
439
448
  _: 1
440
449
  })
441
- ])) : (I(), N("div", Ye, [
442
- K(O, {
450
+ ])) : (b(), N("div", Ye, [
451
+ R(O, {
443
452
  hierarchy: "secondary",
444
453
  size: "sm",
445
454
  class: "am-btn am-btn-sec",
@@ -447,11 +456,11 @@ const xe = { class: "am-head" }, Te = {
447
456
  onClick: a[6] || (a[6] = (t) => e.modal.close())
448
457
  }, {
449
458
  default: C(() => [
450
- M(f(q(d)("scheduling.common.cancel")), 1)
459
+ M(f(q(s)("scheduling.common.cancel")), 1)
451
460
  ]),
452
461
  _: 1
453
462
  }),
454
- e.modal.editingId.value ? G("", !0) : (I(), Q(O, {
463
+ e.modal.editingId.value ? G("", !0) : (b(), Q(O, {
455
464
  key: 0,
456
465
  hierarchy: "secondary",
457
466
  size: "sm",
@@ -465,7 +474,7 @@ const xe = { class: "am-head" }, Te = {
465
474
  ])]),
466
475
  _: 1
467
476
  }, 8, ["disabled"])),
468
- K(O, {
477
+ R(O, {
469
478
  hierarchy: "primary",
470
479
  size: "sm",
471
480
  class: "am-btn am-btn-primary",