@feedmepos/mf-hrm-portal 2.2.5-dev.7 → 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 (94) hide show
  1. package/dist/{ApprovalCodeList-dn-WwNAd.js → ApprovalCodeList-D5l9vIsE.js} +2 -2
  2. package/dist/{AuditLogList-BqVp9fxD.js → AuditLogList-ByTa5UJY.js} +3 -3
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DnAet2oc.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-mNdn1TYV.js} +2 -2
  4. package/dist/{EmployeeList-BwTJre5k.js → EmployeeList-Bv6ANk-P.js} +8 -9
  5. package/dist/{GrantUserList-CZek1r4F.js → GrantUserList-Bt8w3p4j.js} +3 -3
  6. package/dist/{Main-MjSYZdOq.js → Main-DHJcgePj.js} +5 -5
  7. package/dist/{Main-CbmA-SYo.js → Main-DkP8dWgn.js} +9 -9
  8. package/dist/{Main-DVA51sj2.js → Main-DqiGpT4v.js} +2 -2
  9. package/dist/{PermissionSetList-lkHmXhNm.js → PermissionSetList-BIGv1u67.js} +10 -11
  10. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-cFQDQCal.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-niywl_DX.js} +687 -688
  11. package/dist/{RoleList-BSs0SmFo.js → RoleList-CH6NDKPU.js} +7 -7
  12. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-T1ACkX_6.js +426 -0
  13. package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-BzQuLLf5.js +690 -0
  14. package/dist/ScheduleGeneralPage-DJPENJZ2.js +320 -0
  15. package/dist/SchedulePage-C1egcbIC.js +14421 -0
  16. package/dist/SchedulePositionPage-OhL_hsqG.js +293 -0
  17. package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-B8W4sTsA.js +242 -0
  18. package/dist/{TeamMemberList-Dit_nV6d.js → TeamMemberList-BwfG3go2.js} +8 -9
  19. package/dist/{TimesheetList-B-FlRO7E.js → TimesheetList-DcoqzbLO.js} +5 -5
  20. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DZUJR8K_.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RyhiKTSd.js} +2 -2
  21. package/dist/{app-BpnOPodL.js → app-BcZ6C8M8.js} +8 -8
  22. package/dist/app.js +1 -1
  23. package/dist/{dayjs.min-4GLfSOGZ.js → dayjs.min-Ch0iysTG.js} +1 -1
  24. package/dist/employee-DwYHFacQ.js +204 -0
  25. package/dist/{index-DYoVJQTd.js → iteration-D1uWLp0V.js} +726 -698
  26. package/dist/{lodash-CcFIMCiJ.js → lodash-DErxm7xf.js} +1 -1
  27. package/dist/{role-OXCiWTVq.js → role-B9VanAny.js} +3 -4
  28. package/dist/{rule-8iyCO_LZ.js → rule-C4f_Ilzr.js} +36 -37
  29. package/dist/src/api/schedule/index.d.ts +0 -3
  30. package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +1 -2
  31. package/dist/src/views/scheduling/SchedulePage.vue.d.ts +1 -2
  32. package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +1 -2
  33. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +5 -1
  34. package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +5 -1
  35. package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
  36. package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +5 -1
  37. package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
  38. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +1 -1
  39. package/dist/src/views/scheduling/components/ScheduleEmployeeMenu.vue.d.ts +6 -0
  40. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
  41. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +4 -2
  42. package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +3 -0
  43. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +32 -2
  44. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +4 -0
  45. package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +5 -1
  46. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +2 -0
  47. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +4 -2
  48. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +8 -2
  49. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +4 -6
  50. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +5 -0
  51. package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
  52. package/dist/src/views/scheduling/composables/scheduleAutoSolver.d.ts +21 -0
  53. package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
  54. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +12 -0
  55. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +14 -7
  56. package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +11 -2
  57. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +18 -11
  58. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +11 -0
  59. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +5 -3
  60. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +0 -5
  61. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +12 -4
  62. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +7 -1
  63. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +11 -2
  64. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +35 -0
  65. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +2 -0
  66. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +53 -3
  67. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1192 -55
  68. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +1 -0
  69. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +50 -0
  70. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +2 -0
  71. package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +10 -1
  72. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +6 -0
  73. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +5 -5
  74. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +6 -0
  75. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +7 -0
  76. package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +4 -1
  77. package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +6 -1
  78. package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
  79. package/dist/src/views/scheduling/data.d.ts +6 -1
  80. package/dist/src/views/scheduling/schedule-store.d.ts +36 -1
  81. package/dist/src/views/scheduling/types.d.ts +14 -1
  82. package/dist/style.css +1 -1
  83. package/dist/tsconfig.app.tsbuildinfo +1 -1
  84. package/dist/{useReportPermissions-C3fuFTUC.js → useReportPermissions-CTr56kBo.js} +3 -3
  85. package/package.json +1 -1
  86. package/dist/ScheduleGeneralPage-DD9n2TUe.js +0 -242
  87. package/dist/SchedulePage-B0X97zVC.js +0 -10761
  88. package/dist/SchedulePositionPage-BXz1USn3.js +0 -220
  89. package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-DAHke2rH.js +0 -201
  90. package/dist/employee-ChdVnSmd.js +0 -139
  91. package/dist/index-CilJxsY7.js +0 -70
  92. package/dist/iteration-CcXrOMQe.js +0 -30
  93. package/dist/useScheduleOutlet-TPZJHgSY.js +0 -546
  94. package/dist/useSchedulePositions-DCkaKHQm.js +0 -103
@@ -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 "./index-DYoVJQTd.js";
2
+ import { e as D } from "./iteration-D1uWLp0V.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-BpnOPodL.js";
5
+ import { D as ts, k as as, A as ls, S as os, _ as rs } from "./app-BcZ6C8M8.js";
6
6
  import { u as ns, _ as $e } from "./useDiscardConfirm-DPhEV6v0.js";
7
7
  import { _ as is } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
8
- import { r as ie, h as Ae, f as us, s as cs, g as Ie, e as ms, a as oe } from "./rule-8iyCO_LZ.js";
8
+ import { r as ie, h as Ae, f as us, s as cs, g as Ie, e as ms, a as oe } from "./rule-C4f_Ilzr.js";
9
9
  import { u as xe } from "./restaurant-BTpBmfBV.js";
10
- import { u as Oe } from "./role-OXCiWTVq.js";
11
- import { u as Ne } from "./useReportPermissions-C3fuFTUC.js";
12
- import { l as re } from "./lodash-CcFIMCiJ.js";
13
- import { u as ds, _ as ps, a as Le } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DnAet2oc.js";
10
+ import { u as Oe } from "./role-B9VanAny.js";
11
+ import { u as Ne } from "./useReportPermissions-CTr56kBo.js";
12
+ import { l as re } from "./lodash-DErxm7xf.js";
13
+ import { u as ds, _ as ps, a as Le } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-mNdn1TYV.js";
14
14
  import { _ as be } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
15
15
  import { u as fs } from "./useLoading-CXzTpIVv.js";
16
16
  function vs() {
@@ -0,0 +1,426 @@
1
+ import { ref as d, watch as ee, computed as C, reactive as ae, nextTick as le, defineComponent as te, createElementBlock as f, createCommentVNode as U, openBlock as y, withModifiers as ne, createElementVNode as t, createVNode as N, withCtx as $, withDirectives as H, withKeys as se, vModelText as X, normalizeClass as Y, toDisplayString as m, createTextVNode as x, Fragment as Z, renderList as oe } from "vue";
2
+ import { X as R, a as ie, Y as de, Z as ue, $ as _, e as J, a0 as re, j as me, p as Q, _ as S } from "./ScheduleButton.vue_vue_type_script_setup_true_lang-BzQuLLf5.js";
3
+ function W() {
4
+ return R.map((a) => ({ id: a.id, name: a.name }));
5
+ }
6
+ function je() {
7
+ const a = d(W());
8
+ ee(
9
+ () => R.map((s) => `${s.id}:${s.name}`).join(" "),
10
+ () => {
11
+ a.value = W();
12
+ }
13
+ );
14
+ const h = C(() => ie()), e = d(!1), l = d(""), i = d(null), g = d(""), c = d(null), v = d(!1), u = d(null);
15
+ function M(s) {
16
+ return h.value.filter((o) => o.role === s).length;
17
+ }
18
+ function E(s, o) {
19
+ return a.value.some(
20
+ (k) => k.id !== o && k.name.toLowerCase() === s.toLowerCase()
21
+ );
22
+ }
23
+ function V() {
24
+ e.value = !0, l.value = "", i.value = null, c.value = null, u.value = null;
25
+ }
26
+ function D() {
27
+ e.value = !1, l.value = "";
28
+ }
29
+ async function I() {
30
+ const s = l.value.trim().slice(0, 40);
31
+ if (!(!s || E(s))) {
32
+ v.value = !0, u.value = null;
33
+ try {
34
+ await _({ name: s }), e.value = !1, l.value = "";
35
+ } catch (o) {
36
+ u.value = o instanceof Error ? o.message : "Could not add this position";
37
+ } finally {
38
+ v.value = !1;
39
+ }
40
+ }
41
+ }
42
+ function L(s) {
43
+ const o = a.value.find((k) => k.id === s);
44
+ o && (i.value = s, g.value = o.name, e.value = !1, c.value = null, u.value = null);
45
+ }
46
+ function O() {
47
+ i.value = null, g.value = "";
48
+ }
49
+ async function z(s) {
50
+ const o = g.value.trim().slice(0, 40);
51
+ if (!(!o || E(o, s))) {
52
+ v.value = !0, u.value = null;
53
+ try {
54
+ await ue(s, { name: o }), i.value = null, g.value = "";
55
+ } catch (k) {
56
+ u.value = k instanceof Error ? k.message : "Could not rename this position";
57
+ } finally {
58
+ v.value = !1;
59
+ }
60
+ }
61
+ }
62
+ function j(s) {
63
+ c.value = s;
64
+ }
65
+ function B() {
66
+ c.value = null;
67
+ }
68
+ async function F(s) {
69
+ v.value = !0, u.value = null;
70
+ try {
71
+ await de(s), c.value = null;
72
+ } catch (o) {
73
+ u.value = o instanceof Error ? o.message : "Could not delete this position";
74
+ } finally {
75
+ v.value = !1;
76
+ }
77
+ }
78
+ const K = C(() => a.value.length);
79
+ return {
80
+ positions: a,
81
+ count: K,
82
+ isAdding: e,
83
+ newName: l,
84
+ editingId: i,
85
+ editingName: g,
86
+ pendingDeleteId: c,
87
+ saving: v,
88
+ error: u,
89
+ usageCountFor: M,
90
+ startAdd: V,
91
+ cancelAdd: D,
92
+ confirmAdd: I,
93
+ startEdit: L,
94
+ cancelEdit: O,
95
+ saveEdit: z,
96
+ askDelete: j,
97
+ cancelDelete: B,
98
+ confirmDelete: F
99
+ };
100
+ }
101
+ function ce(a) {
102
+ var e;
103
+ const h = a.trim().split(/\s+/).filter(Boolean);
104
+ return h.length ? (h[0][0] + (((e = h[1]) == null ? void 0 : e[0]) ?? "")).toUpperCase() : "??";
105
+ }
106
+ function Be(a) {
107
+ const h = d(!1), e = d(""), l = d(""), i = ae({}), g = d(!1), c = d(null), v = d(null), u = d(!1), M = C(() => {
108
+ var r;
109
+ const n = new Map((((r = J.value) == null ? void 0 : r.employees) ?? []).map((P) => [P.employeeId, P]));
110
+ return re.value.map((P) => {
111
+ var w;
112
+ const b = n.get(P._id), p = [
113
+ (w = b == null ? void 0 : b.primaryPosition) == null ? void 0 : w.positionName,
114
+ ...((b == null ? void 0 : b.secondaryPositions) ?? []).map((T) => T.positionName)
115
+ ].filter((T) => !!T);
116
+ return { employeeId: P._id, name: P.name, initials: ce(P.name), held: p };
117
+ });
118
+ }), E = C(() => {
119
+ const n = l.value.trim().toLowerCase();
120
+ return M.value.filter((r) => !n || r.name.toLowerCase().includes(n));
121
+ }), V = C(
122
+ () => M.value.filter((n) => i[n.employeeId]).map((n) => n.employeeId)
123
+ ), D = C(
124
+ () => E.value.length > 0 && E.value.every((n) => i[n.employeeId])
125
+ ), I = C(() => e.value.trim().slice(0, 40)), L = C(
126
+ () => !!I.value && R.some((n) => n.name.toLowerCase() === I.value.toLowerCase())
127
+ ), O = C(() => !!I.value && !L.value && !g.value);
128
+ function z() {
129
+ e.value = "", l.value = "", Object.keys(i).forEach((n) => delete i[n]), c.value = null, u.value = !1, v.value = null;
130
+ }
131
+ function j() {
132
+ z(), h.value = !0;
133
+ }
134
+ function B() {
135
+ h.value = !1, z();
136
+ }
137
+ function F(n) {
138
+ i[n] = !i[n];
139
+ }
140
+ function K() {
141
+ const n = !D.value;
142
+ E.value.forEach((r) => i[r.employeeId] = n);
143
+ }
144
+ async function s() {
145
+ if (!I.value)
146
+ return u.value = !0, !1;
147
+ if (!O.value) return !1;
148
+ g.value = !0, c.value = null;
149
+ const n = I.value;
150
+ try {
151
+ await _({ name: n }), await le(), a == null || a(n);
152
+ const r = M.value.filter((p) => i[p.employeeId]), b = (await Promise.allSettled(
153
+ r.map((p) => {
154
+ var G;
155
+ const w = (G = J.value) == null ? void 0 : G.employees.find((A) => A.employeeId === p.employeeId), T = !!(w != null && w.primaryPosition), q = ((w == null ? void 0 : w.secondaryPositions) ?? []).map((A) => A.positionName);
156
+ return me(p.employeeId, {
157
+ employeeName: p.name,
158
+ ...T ? {} : { primaryPosition: Q(n) },
159
+ secondaryPositions: (T ? [...q, n] : q).map((A) => Q(A)).filter((A) => !!A)
160
+ });
161
+ })
162
+ )).filter((p) => p.status === "rejected").length;
163
+ return v.value = { name: n, assigned: r.length - b, failed: b }, !0;
164
+ } catch (r) {
165
+ return c.value = r instanceof Error ? r.message : "Could not add this position", !1;
166
+ } finally {
167
+ g.value = !1;
168
+ }
169
+ }
170
+ function o() {
171
+ z();
172
+ }
173
+ async function k() {
174
+ await s() && o();
175
+ }
176
+ return {
177
+ open: h,
178
+ name: e,
179
+ search: l,
180
+ picks: i,
181
+ saving: g,
182
+ error: c,
183
+ done: v,
184
+ nameError: u,
185
+ people: M,
186
+ visible: E,
187
+ pickedIds: V,
188
+ allPicked: D,
189
+ nameTaken: L,
190
+ canSave: O,
191
+ openNew: j,
192
+ close: B,
193
+ toggle: F,
194
+ toggleAll: K,
195
+ save: s,
196
+ saveAndAnother: k,
197
+ another: o
198
+ };
199
+ }
200
+ const ve = {
201
+ class: "ce-modal",
202
+ style: { width: "min(480px, 95vw)" }
203
+ }, fe = { class: "am-head" }, ye = { class: "ce-body" }, he = { key: 0 }, ge = { class: "ce-field" }, ke = {
204
+ class: "ce-field asg-field",
205
+ style: { "margin-bottom": "0" }
206
+ }, be = { class: "asg-head" }, pe = { class: "asg-count" }, we = { class: "asg-list" }, Ce = ["checked", "onChange"], Pe = { class: "asg-av" }, Ee = { class: "asg-id" }, Ie = { class: "asg-nm" }, Ae = { class: "asg-sub" }, Ne = { key: 1 }, $e = {
207
+ key: 0,
208
+ class: "asg-sub",
209
+ style: { padding: "10px" }
210
+ }, xe = { key: 1 }, Se = { class: "cg-done" }, Me = { class: "cg-st-main" }, Te = {
211
+ key: 0,
212
+ class: "cg-done-also"
213
+ }, ze = { class: "am-foot" }, De = {
214
+ key: 0,
215
+ class: "am-foot-btns"
216
+ }, Le = {
217
+ key: 1,
218
+ class: "am-foot-btns"
219
+ }, Fe = /* @__PURE__ */ te({
220
+ __name: "ScheduleAddPositionModal",
221
+ props: {
222
+ modal: {}
223
+ },
224
+ setup(a) {
225
+ return (h, e) => a.modal.open.value ? (y(), f("div", {
226
+ key: 0,
227
+ class: "modal-overlay open",
228
+ onClick: e[11] || (e[11] = ne((l) => a.modal.close(), ["self"]))
229
+ }, [
230
+ t("div", ve, [
231
+ t("div", fe, [
232
+ e[13] || (e[13] = t("div", { class: "am-title" }, "Add Position", -1)),
233
+ N(S, {
234
+ hierarchy: "ghost",
235
+ size: "xs",
236
+ "icon-only": "",
237
+ class: "ce-close-x",
238
+ type: "button",
239
+ "aria-label": "Close",
240
+ onClick: e[0] || (e[0] = (l) => a.modal.close())
241
+ }, {
242
+ default: $(() => [...e[12] || (e[12] = [
243
+ t("svg", {
244
+ width: "20",
245
+ height: "20",
246
+ viewBox: "0 0 20 20",
247
+ fill: "none",
248
+ stroke: "currentColor",
249
+ "stroke-width": "1.8",
250
+ "stroke-linecap": "round",
251
+ "aria-hidden": "true"
252
+ }, [
253
+ t("path", { d: "M5.5 5.5l9 9M14.5 5.5l-9 9" })
254
+ ], -1)
255
+ ])]),
256
+ _: 1
257
+ })
258
+ ]),
259
+ t("div", ye, [
260
+ a.modal.done.value ? (y(), f("div", xe, [
261
+ t("div", Se, [
262
+ e[17] || (e[17] = t("span", {
263
+ class: "cg-done-tick",
264
+ "aria-hidden": "true"
265
+ }, "✓", -1)),
266
+ t("div", Me, [
267
+ t("b", null, m(a.modal.done.value.name), 1),
268
+ t("small", null, m(a.modal.done.value.assigned ? `Added to ${a.modal.done.value.assigned} ${a.modal.done.value.assigned === 1 ? "employee" : "employees"}` : "Position added"), 1)
269
+ ])
270
+ ]),
271
+ a.modal.done.value.failed ? (y(), f("div", Te, m(a.modal.done.value.failed) + " " + m(a.modal.done.value.failed === 1 ? "employee" : "employees") + " could not be updated. Add the position to them from their profile. ", 1)) : U("", !0)
272
+ ])) : (y(), f("div", he, [
273
+ t("div", ge, [
274
+ e[14] || (e[14] = t("label", {
275
+ class: "ce-label",
276
+ for: "skName"
277
+ }, "Position name", -1)),
278
+ H(t("input", {
279
+ id: "skName",
280
+ "onUpdate:modelValue": e[1] || (e[1] = (l) => a.modal.name.value = l),
281
+ class: "sch-input ce-input",
282
+ maxlength: "40",
283
+ placeholder: "e.g. FOH, Kitchen, Manager, Cashier…",
284
+ autocomplete: "off",
285
+ onInput: e[2] || (e[2] = (l) => a.modal.nameError.value = !1),
286
+ onKeyup: e[3] || (e[3] = se((l) => a.modal.save(), ["enter"]))
287
+ }, null, 544), [
288
+ [X, a.modal.name.value]
289
+ ]),
290
+ t("div", {
291
+ class: Y(["ce-err", { show: a.modal.nameError.value || a.modal.nameTaken.value }])
292
+ }, m(a.modal.nameTaken.value ? "A position with this name already exists" : "Give the position a name"), 3)
293
+ ]),
294
+ t("div", ke, [
295
+ t("div", be, [
296
+ e[15] || (e[15] = t("span", { class: "asg-lbl" }, "Employees with this position", -1)),
297
+ N(S, {
298
+ hierarchy: "ghost",
299
+ size: "sm",
300
+ class: "ce-add-link asg-all",
301
+ type: "button",
302
+ onClick: e[4] || (e[4] = (l) => a.modal.toggleAll())
303
+ }, {
304
+ default: $(() => [
305
+ x(m(a.modal.allPicked.value ? "Clear" : "Select all"), 1)
306
+ ]),
307
+ _: 1
308
+ }),
309
+ t("span", pe, m(a.modal.pickedIds.value.length) + " selected", 1)
310
+ ]),
311
+ H(t("input", {
312
+ "onUpdate:modelValue": e[5] || (e[5] = (l) => a.modal.search.value = l),
313
+ class: "sch-input ce-input asg-search",
314
+ placeholder: "Search team…",
315
+ autocomplete: "off"
316
+ }, null, 512), [
317
+ [X, a.modal.search.value]
318
+ ]),
319
+ t("div", we, [
320
+ (y(!0), f(Z, null, oe(a.modal.visible.value, (l) => (y(), f("label", {
321
+ key: l.employeeId,
322
+ class: "asg-row"
323
+ }, [
324
+ t("input", {
325
+ type: "checkbox",
326
+ class: "sch-checkbox asg-check",
327
+ checked: !!a.modal.picks[l.employeeId],
328
+ onChange: (i) => a.modal.toggle(l.employeeId),
329
+ "data-platform": "desktop"
330
+ }, null, 40, Ce),
331
+ t("span", Pe, m(l.initials), 1),
332
+ t("span", Ee, [
333
+ t("span", Ie, m(l.name), 1),
334
+ t("span", Ae, [
335
+ l.held.length ? (y(), f(Z, { key: 0 }, [
336
+ x(m(l.held.join(", ")), 1)
337
+ ], 64)) : (y(), f("i", Ne, "No positions added"))
338
+ ])
339
+ ])
340
+ ]))), 128)),
341
+ a.modal.visible.value.length ? U("", !0) : (y(), f("div", $e, " No one matches. "))
342
+ ]),
343
+ e[16] || (e[16] = t("div", { class: "ce-hint" }, "Ticked people can work this position.", -1))
344
+ ]),
345
+ t("div", {
346
+ class: Y(["ce-err", { show: !!a.modal.error.value }])
347
+ }, m(a.modal.error.value), 3)
348
+ ]))
349
+ ]),
350
+ t("div", ze, [
351
+ e[22] || (e[22] = t("div", { class: "am-cost-preview" }, null, -1)),
352
+ a.modal.done.value ? (y(), f("div", Le, [
353
+ N(S, {
354
+ hierarchy: "secondary",
355
+ size: "sm",
356
+ class: "am-btn am-btn-sec",
357
+ type: "button",
358
+ onClick: e[9] || (e[9] = (l) => a.modal.another())
359
+ }, {
360
+ default: $(() => [...e[20] || (e[20] = [
361
+ x("Add another", -1)
362
+ ])]),
363
+ _: 1
364
+ }),
365
+ N(S, {
366
+ hierarchy: "primary",
367
+ size: "sm",
368
+ class: "am-btn am-btn-primary",
369
+ type: "button",
370
+ onClick: e[10] || (e[10] = (l) => a.modal.close())
371
+ }, {
372
+ default: $(() => [...e[21] || (e[21] = [
373
+ x("Done", -1)
374
+ ])]),
375
+ _: 1
376
+ })
377
+ ])) : (y(), f("div", De, [
378
+ N(S, {
379
+ hierarchy: "secondary",
380
+ size: "sm",
381
+ class: "am-btn am-btn-sec",
382
+ type: "button",
383
+ onClick: e[6] || (e[6] = (l) => a.modal.close())
384
+ }, {
385
+ default: $(() => [...e[18] || (e[18] = [
386
+ x("Cancel", -1)
387
+ ])]),
388
+ _: 1
389
+ }),
390
+ N(S, {
391
+ hierarchy: "secondary",
392
+ size: "sm",
393
+ class: "am-btn am-btn-sec",
394
+ type: "button",
395
+ disabled: !a.modal.canSave.value,
396
+ onClick: e[7] || (e[7] = (l) => a.modal.saveAndAnother())
397
+ }, {
398
+ default: $(() => [...e[19] || (e[19] = [
399
+ x(" Save & add another ", -1)
400
+ ])]),
401
+ _: 1
402
+ }, 8, ["disabled"]),
403
+ N(S, {
404
+ hierarchy: "primary",
405
+ size: "sm",
406
+ class: "am-btn am-btn-primary",
407
+ type: "button",
408
+ disabled: !a.modal.canSave.value,
409
+ onClick: e[8] || (e[8] = (l) => a.modal.save())
410
+ }, {
411
+ default: $(() => [
412
+ x(m(a.modal.saving.value ? "Adding…" : "Add position"), 1)
413
+ ]),
414
+ _: 1
415
+ }, 8, ["disabled"])
416
+ ]))
417
+ ])
418
+ ])
419
+ ])) : U("", !0);
420
+ }
421
+ });
422
+ export {
423
+ Fe as _,
424
+ Be as a,
425
+ je as u
426
+ };