@feedmepos/mf-hrm-portal 2.3.0 → 2.3.1-dev.1

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 (72) hide show
  1. package/dist/{ApprovalCodeList-DwubNElp.js → ApprovalCodeList-CDU3yUHy.js} +7 -7
  2. package/dist/AuditLogList-BU11Q5sF.js +1950 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CmLLNcB4.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BjHwyaXu.js} +2 -2
  4. package/dist/{EmployeeList-DEAJPx9F.js → EmployeeList-BqzXg3uA.js} +8 -8
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-OAvd6eHM.js → FormItem.vue_vue_type_script_setup_true_lang-Clh43Y-8.js} +1 -1
  6. package/dist/{GrantUserList-Dx4jF2qJ.js → GrantUserList-Cw8RkFqf.js} +8 -8
  7. package/dist/{Main-BirWXk7o.js → Main-BxcRbcce.js} +5 -5
  8. package/dist/{Main-CL5JYCPg.js → Main-CL-ysWRu.js} +8 -8
  9. package/dist/{Main-C2PBSCte.js → Main-Dlar77Zq.js} +11 -11
  10. package/dist/{PermissionSetList-BtYcqPiO.js → PermissionSetList-_8aBzGy7.js} +7 -7
  11. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BXw4aX39.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CNgtAtYH.js} +1292 -1292
  12. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DaAx79pC.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js} +1 -1
  13. package/dist/{RoleList-YS_LBfoJ.js → RoleList-C3n_zOB3.js} +9 -9
  14. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CnrbCggg.js +544 -0
  15. package/dist/ScheduleGeneralPage-DGHKW_ww.js +811 -0
  16. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-CnKzVz3I.js → ScheduleModal.vue_vue_type_script_setup_true_lang-AfTAGsh1.js} +933 -834
  17. package/dist/SchedulePage-UzDPRldO.js +19458 -0
  18. package/dist/SchedulePositionPage-RHETW36P.js +282 -0
  19. package/dist/{SelectFilter-Dh3eY1hV.js → SelectFilter-CeBV_Kug.js} +1 -1
  20. package/dist/{TeamMemberList-Bv6_2bzs.js → TeamMemberList-B-qR7VS3.js} +11 -11
  21. package/dist/{TimesheetList-B3BmpH0I.js → TimesheetList-BqRIZBt1.js} +8 -8
  22. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-C4rbnZh1.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-oIBUAjtv.js} +3 -3
  23. package/dist/{app-CyS8c8dx.js → app-DFL6Nv_p.js} +10360 -3848
  24. package/dist/app.js +1 -1
  25. package/dist/{approval-code-BIpLingm.js → approval-code-BXUiojPH.js} +1 -1
  26. package/dist/{dayjs.min-BRlEc3-d.js → dayjs.min-CH-gVmsz.js} +1 -1
  27. package/dist/{employee-CcdjLOLQ.js → employee-3xpIjR6i.js} +4 -4
  28. package/dist/{grant-user-uZmvD_bw.js → grant-user-CBJ3gEgW.js} +1 -1
  29. package/dist/{iteration-CL1RDmws.js → iteration-D6wutq5U.js} +1 -1
  30. package/dist/{lodash-C00ieagp.js → lodash-D5kU1nPN.js} +1 -1
  31. package/dist/{restaurant-CHpkjUPy.js → restaurant-D2mfKHaH.js} +2 -2
  32. package/dist/{role-DtatkKp9.js → role-B7nu6hH1.js} +2 -2
  33. package/dist/{rule-DJJMpkoG.js → rule-CMd6SL3n.js} +3 -3
  34. package/dist/src/api/audit-log/index.d.ts +4 -0
  35. package/dist/src/views/audit-log/constants.d.ts +9 -30
  36. package/dist/src/views/audit-log/locales/index.d.ts +236 -0
  37. package/dist/src/views/audit-log/pos-row.d.ts +27 -0
  38. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +0 -2
  39. package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +5 -3
  40. package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +2 -0
  41. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +1 -1
  42. package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +10 -0
  43. package/dist/src/views/scheduling/composables/schedule-cost.d.ts +5 -0
  44. package/dist/src/views/scheduling/composables/schedule-currency.d.ts +22 -0
  45. package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +1 -1
  46. package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +4 -0
  47. package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +2 -1
  48. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +5 -5
  49. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +2 -0
  50. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +5 -5
  51. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +1 -1
  52. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +2 -2
  53. package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +1 -1
  54. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +9 -12
  55. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +7 -6
  56. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +12 -0
  57. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +1 -1
  58. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
  59. package/dist/src/views/scheduling/country-rules/index.d.ts +5 -1
  60. package/dist/src/views/scheduling/locales/index.d.ts +6272 -0
  61. package/dist/src/views/scheduling/schedule-store.d.ts +3 -0
  62. package/dist/style.css +1 -1
  63. package/dist/tsconfig.app.tsbuildinfo +1 -1
  64. package/dist/{useAppStore-Bp0PwbAN.js → useAppStore-DZCdxlCd.js} +1 -1
  65. package/dist/{useLoading-sgL8DRUz.js → useLoading-Nygx2zn8.js} +1 -1
  66. package/dist/{useReportPermissions-DI-xg3OX.js → useReportPermissions-BcxIKxlF.js} +3 -3
  67. package/package.json +1 -1
  68. package/dist/AuditLogList-CTeMbyHL.js +0 -1778
  69. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BorKuXxL.js +0 -530
  70. package/dist/ScheduleGeneralPage-C1p2mivt.js +0 -780
  71. package/dist/SchedulePage-BP7x7JAl.js +0 -19485
  72. package/dist/SchedulePositionPage-BogOQZVW.js +0 -262
@@ -0,0 +1,544 @@
1
+ import { ref as k, watch as he, computed as z, reactive as Pe, nextTick as we, defineComponent as Ne, createBlock as ne, openBlock as b, withCtx as T, createElementVNode as i, createVNode as H, toDisplayString as v, unref as o, createElementBlock as E, withDirectives as fe, withKeys as Ce, vModelText as ye, normalizeClass as ge, createTextVNode as V, createCommentVNode as Z, Fragment as Ie, renderList as Se } from "vue";
2
+ import { useI18n as ie } from "@feedmepos/mf-common";
3
+ import { az as oe, p as D, aD as ke, aE as se, aF as pe, y as Ee, aG as $e, K as te, e as _, ay as xe, av as W } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-AfTAGsh1.js";
4
+ function be() {
5
+ return oe.map((e) => ({ id: e.id, name: e.name }));
6
+ }
7
+ function ua(e = {}) {
8
+ const { t: a } = ie(), r = k(be()), l = [], s = /* @__PURE__ */ new Set();
9
+ let B = 0;
10
+ he(
11
+ () => oe.map((t) => `${t.id}:${t.name}`).join(" "),
12
+ () => {
13
+ r.value = be();
14
+ }
15
+ ), he(
16
+ () => {
17
+ var t;
18
+ return (((t = D.value) == null ? void 0 : t.positions) ?? []).map((h) => `${h.id}:${h.name}`).join(" ");
19
+ },
20
+ () => {
21
+ var t;
22
+ r.value = (((t = D.value) == null ? void 0 : t.positions) ?? []).map((h) => ({ id: h.id, name: h.name }));
23
+ }
24
+ );
25
+ const y = k(!1), P = k(""), M = k(null), w = k(!1), p = k(null);
26
+ function $(t) {
27
+ var g, C;
28
+ const h = new Set(pe.value.map((O) => O._id)), N = /* @__PURE__ */ new Set();
29
+ for (const O of ((g = D.value) == null ? void 0 : g.employees) ?? [])
30
+ h.has(O.employeeId) && (((C = O.primaryPosition) == null ? void 0 : C.positionId) === t || O.secondaryPositions.some((le) => le.positionId === t)) && N.add(O.employeeId);
31
+ return N.size;
32
+ }
33
+ function R(t) {
34
+ return r.value.some((h) => h.name.toLowerCase() === t.toLowerCase());
35
+ }
36
+ function L() {
37
+ y.value = !0, P.value = "", M.value = null, p.value = null;
38
+ }
39
+ function x() {
40
+ y.value = !1, P.value = "";
41
+ }
42
+ async function K() {
43
+ var h, N;
44
+ const t = P.value.trim().slice(0, 40);
45
+ if (!(!t || R(t))) {
46
+ w.value = !0, p.value = null;
47
+ try {
48
+ e.deferWrites ? (l.push(t), r.value = [...r.value, { id: `onboarding-draft-${++B}`, name: t }]) : await se({ name: t }), y.value = !1, P.value = "", (h = e.notify) == null || h.call(e, a("scheduling.positions.added"), "success");
49
+ } catch (g) {
50
+ p.value = g instanceof Error ? g.message : a("scheduling.positions.addFailed"), (N = e.notify) == null || N.call(e, p.value, "error");
51
+ } finally {
52
+ w.value = !1;
53
+ }
54
+ }
55
+ }
56
+ function ee(t) {
57
+ M.value = t;
58
+ }
59
+ function J() {
60
+ M.value = null;
61
+ }
62
+ async function A(t) {
63
+ var h, N;
64
+ w.value = !0, p.value = null;
65
+ try {
66
+ if (e.deferWrites) {
67
+ const g = r.value.find((C) => C.id === t);
68
+ if (t.startsWith("onboarding-draft-")) {
69
+ const C = l.indexOf((g == null ? void 0 : g.name) ?? "");
70
+ C >= 0 && l.splice(C, 1);
71
+ } else
72
+ s.add(t);
73
+ } else
74
+ await ke(t);
75
+ r.value = r.value.filter((g) => g.id !== t), M.value = null, (h = e.notify) == null || h.call(e, a("scheduling.positions.removed"), "success");
76
+ } catch (g) {
77
+ p.value = g instanceof Error ? g.message : a("scheduling.positions.deleteFailed"), (N = e.notify) == null || N.call(e, p.value, "error");
78
+ } finally {
79
+ w.value = !1;
80
+ }
81
+ }
82
+ async function Q() {
83
+ if (e.deferWrites)
84
+ for (; l.length; ) {
85
+ const t = l[0];
86
+ await se({ name: t }), l.shift();
87
+ }
88
+ }
89
+ async function X() {
90
+ if (e.deferWrites)
91
+ for (const t of [...s])
92
+ await ke(t), s.delete(t);
93
+ }
94
+ function U() {
95
+ var t;
96
+ e.deferWrites && (l.splice(0, l.length), s.clear(), r.value = (((t = D.value) == null ? void 0 : t.positions) ?? []).map((h) => ({ id: h.id, name: h.name })));
97
+ }
98
+ const ae = z(() => r.value.length);
99
+ return {
100
+ positions: r,
101
+ pendingCreates: l,
102
+ pendingDeletes: s,
103
+ count: ae,
104
+ isAdding: y,
105
+ newName: P,
106
+ pendingDeleteId: M,
107
+ saving: w,
108
+ error: p,
109
+ usageCountFor: $,
110
+ startAdd: L,
111
+ cancelAdd: x,
112
+ confirmAdd: K,
113
+ askDelete: ee,
114
+ cancelDelete: J,
115
+ confirmDelete: A,
116
+ commitCreates: Q,
117
+ commitDeletes: X,
118
+ discardPending: U
119
+ };
120
+ }
121
+ function Ae(e) {
122
+ var r;
123
+ const a = e.trim().split(/\s+/).filter(Boolean);
124
+ return a.length ? (a[0][0] + (((r = a[1]) == null ? void 0 : r[0]) ?? "")).toUpperCase() : "??";
125
+ }
126
+ function ca(e, a = {}) {
127
+ const { t: r } = ie(), l = k(!1), s = k(""), B = k(""), y = Pe({}), P = k(!1), M = k(null), w = k(null), p = k(!1), $ = k(null);
128
+ let R = "", L = /* @__PURE__ */ new Set();
129
+ const x = z(() => {
130
+ var m;
131
+ const n = new Map((((m = D.value) == null ? void 0 : m.employees) ?? []).map((f) => [f.employeeId, f]));
132
+ return pe.value.map((f) => {
133
+ var F;
134
+ const u = n.get(f._id), j = [u == null ? void 0 : u.primaryPosition, ...(u == null ? void 0 : u.secondaryPositions) ?? []].map((d) => Ee(d)).filter((d) => !!d), c = [
135
+ (F = u == null ? void 0 : u.primaryPosition) == null ? void 0 : F.positionId,
136
+ ...((u == null ? void 0 : u.secondaryPositions) ?? []).map((d) => d.positionId)
137
+ ].filter((d) => !!d);
138
+ return {
139
+ employeeId: f._id,
140
+ name: f.name,
141
+ initials: Ae(f.name),
142
+ held: j,
143
+ heldPositionIds: c
144
+ };
145
+ });
146
+ }), K = z(() => {
147
+ const n = B.value.trim().toLowerCase();
148
+ return x.value.filter((m) => !n || m.name.toLowerCase().includes(n));
149
+ }), ee = z(
150
+ () => x.value.filter((n) => y[n.employeeId]).map((n) => n.employeeId)
151
+ ), J = z(
152
+ () => K.value.length > 0 && K.value.every((n) => y[n.employeeId])
153
+ ), A = z(() => s.value.trim().slice(0, 40)), Q = z(
154
+ () => !!A.value && oe.some(
155
+ (n) => n.id !== $.value && n.name.toLowerCase() === A.value.toLowerCase()
156
+ )
157
+ ), X = z(() => !!A.value && !Q.value && !P.value);
158
+ function U() {
159
+ s.value = "", B.value = "", Object.keys(y).forEach((n) => delete y[n]), M.value = null, p.value = !1, w.value = null, $.value = null, R = "", L = /* @__PURE__ */ new Set();
160
+ }
161
+ function ae() {
162
+ U(), l.value = !0;
163
+ }
164
+ function t(n, m) {
165
+ U(), $.value = n, s.value = m, R = m, L = new Set(
166
+ x.value.filter((f) => f.heldPositionIds.includes(n)).map((f) => f.employeeId)
167
+ ), L.forEach((f) => y[f] = !0), l.value = !0;
168
+ }
169
+ function h() {
170
+ l.value = !1, U();
171
+ }
172
+ function N(n) {
173
+ y[n] = !y[n];
174
+ }
175
+ function g() {
176
+ if (J.value) {
177
+ Object.keys(y).forEach((n) => delete y[n]);
178
+ return;
179
+ }
180
+ K.value.forEach((n) => y[n.employeeId] = !0);
181
+ }
182
+ function C(n, m) {
183
+ const f = !!(n != null && n.primaryPosition), u = ((n == null ? void 0 : n.secondaryPositions) ?? []).map((c) => ({
184
+ positionId: c.positionId,
185
+ positionName: c.positionName
186
+ })), j = f ? [...u, { positionName: m }] : u;
187
+ return {
188
+ ...f ? {} : { primaryPosition: _(m) },
189
+ secondaryPositions: j.map((c) => _(c.positionName, c.positionId)).filter((c) => !!c)
190
+ };
191
+ }
192
+ async function O() {
193
+ var j;
194
+ const n = A.value;
195
+ await se({ name: n }), await we(), e == null || e(n);
196
+ const m = x.value.filter((c) => y[c.employeeId]), u = (await Promise.allSettled(
197
+ m.map((c) => {
198
+ var d;
199
+ const F = (d = D.value) == null ? void 0 : d.employees.find((I) => I.employeeId === c.employeeId);
200
+ return te(c.employeeId, {
201
+ employeeName: c.name,
202
+ ...C(F, n)
203
+ });
204
+ })
205
+ )).filter((c) => c.status === "rejected").length;
206
+ return w.value = { name: n, assigned: m.length - u, failed: u }, (j = a.notify) == null || j.call(
207
+ a,
208
+ u ? r(
209
+ u === 1 ? "scheduling.positionModal.addedPartialOne" : "scheduling.positionModal.addedPartialMany",
210
+ { count: u }
211
+ ) : r("scheduling.positions.added"),
212
+ u ? "error" : "success"
213
+ ), !0;
214
+ }
215
+ async function le(n) {
216
+ var F;
217
+ const m = A.value;
218
+ await $e(n, { name: m }), e == null || e(m);
219
+ const f = x.value.filter(
220
+ (d) => y[d.employeeId] && !L.has(d.employeeId)
221
+ ), u = x.value.filter(
222
+ (d) => !y[d.employeeId] && L.has(d.employeeId)
223
+ ), c = (await Promise.allSettled([
224
+ ...f.map((d) => {
225
+ var G;
226
+ const I = (G = D.value) == null ? void 0 : G.employees.find((Y) => Y.employeeId === d.employeeId);
227
+ return te(d.employeeId, {
228
+ employeeName: d.name,
229
+ ...C(I, m)
230
+ });
231
+ }),
232
+ ...u.map((d) => {
233
+ var ce, re, me, ve;
234
+ const I = (ce = D.value) == null ? void 0 : ce.employees.find((S) => S.employeeId === d.employeeId), G = ((I == null ? void 0 : I.secondaryPositions) ?? []).filter(
235
+ (S) => S.positionId !== n && (S.positionId || S.positionName !== R)
236
+ ), Y = ((re = I == null ? void 0 : I.primaryPosition) == null ? void 0 : re.positionId) === n || !((me = I == null ? void 0 : I.primaryPosition) != null && me.positionId) && ((ve = I == null ? void 0 : I.primaryPosition) == null ? void 0 : ve.positionName) === R, q = Y ? G.shift() : void 0;
237
+ return te(d.employeeId, {
238
+ employeeName: d.name,
239
+ ...Y ? {
240
+ primaryPosition: _(q == null ? void 0 : q.positionName, q == null ? void 0 : q.positionId) ?? null
241
+ } : {},
242
+ secondaryPositions: G.map((S) => _(S.positionName, S.positionId)).filter((S) => !!S)
243
+ });
244
+ })
245
+ ])).filter((d) => d.status === "rejected").length;
246
+ return w.value = { name: m, assigned: Math.max(0, f.length - c), failed: c }, (F = a.notify) == null || F.call(
247
+ a,
248
+ c ? r(
249
+ c === 1 ? "scheduling.positionModal.updatedPartialOne" : "scheduling.positionModal.updatedPartialMany",
250
+ { count: c }
251
+ ) : r("scheduling.positionModal.updated"),
252
+ c ? "error" : "success"
253
+ ), !0;
254
+ }
255
+ async function de() {
256
+ var n;
257
+ if (!A.value)
258
+ return p.value = !0, !1;
259
+ if (!X.value) return !1;
260
+ P.value = !0, M.value = null;
261
+ try {
262
+ return await ($.value ? le($.value) : O());
263
+ } catch (m) {
264
+ return M.value = m instanceof Error ? m.message : r(
265
+ $.value ? "scheduling.positionModal.saveFailed" : "scheduling.positions.addFailed"
266
+ ), (n = a.notify) == null || n.call(a, M.value, "error"), !1;
267
+ } finally {
268
+ P.value = !1;
269
+ }
270
+ }
271
+ function ue() {
272
+ U();
273
+ }
274
+ async function Me() {
275
+ await de() && ue();
276
+ }
277
+ return {
278
+ open: l,
279
+ name: s,
280
+ search: B,
281
+ picks: y,
282
+ saving: P,
283
+ error: M,
284
+ done: w,
285
+ nameError: p,
286
+ people: x,
287
+ visible: K,
288
+ pickedIds: ee,
289
+ allPicked: J,
290
+ nameTaken: Q,
291
+ canSave: X,
292
+ editingId: $,
293
+ openNew: ae,
294
+ openEdit: t,
295
+ close: h,
296
+ toggle: N,
297
+ toggleAll: g,
298
+ save: de,
299
+ saveAndAnother: Me,
300
+ another: ue
301
+ };
302
+ }
303
+ const Oe = { class: "am-head" }, Te = {
304
+ id: "schedule-position-title",
305
+ class: "am-title"
306
+ }, ze = { class: "ce-body" }, De = { key: 0 }, Le = { class: "ce-field" }, je = {
307
+ class: "ce-label",
308
+ for: "skName"
309
+ }, Fe = ["placeholder"], Ve = {
310
+ class: "ce-field asg-field",
311
+ style: { "margin-bottom": "0" }
312
+ }, We = { class: "asg-head" }, Be = { class: "asg-lbl" }, Re = { class: "asg-count" }, Ke = ["placeholder"], Ue = { class: "asg-list position-asg-list" }, qe = ["checked", "onChange"], Ge = { class: "asg-av" }, He = { class: "asg-id" }, Je = ["title"], Qe = { class: "asg-sub" }, Xe = { key: 1 }, Ye = {
313
+ key: 0,
314
+ class: "asg-sub",
315
+ style: { padding: "10px" }
316
+ }, Ze = { class: "ce-hint" }, _e = { key: 1 }, ea = { class: "cg-done" }, aa = { class: "cg-st-main" }, la = {
317
+ key: 0,
318
+ class: "cg-done-also"
319
+ }, na = { class: "am-foot" }, ta = {
320
+ key: 0,
321
+ class: "am-foot-btns"
322
+ }, sa = {
323
+ key: 1,
324
+ class: "am-foot-btns"
325
+ }, ra = /* @__PURE__ */ Ne({
326
+ __name: "ScheduleAddPositionModal",
327
+ props: {
328
+ modal: {}
329
+ },
330
+ setup(e) {
331
+ const { t: a } = ie();
332
+ return (r, l) => (b(), ne(xe, {
333
+ open: e.modal.open.value,
334
+ "panel-class": "ce-modal",
335
+ "panel-style": "width: min(480px, 95vw)",
336
+ "labelled-by": "schedule-position-title",
337
+ onClose: l[11] || (l[11] = (s) => e.modal.close())
338
+ }, {
339
+ default: T(() => [
340
+ i("div", Oe, [
341
+ i("div", Te, v(e.modal.editingId.value ? o(a)("scheduling.positionModal.editTitle") : o(a)("scheduling.positionModal.addTitle")), 1),
342
+ H(W, {
343
+ hierarchy: "ghost",
344
+ size: "xs",
345
+ "icon-only": "",
346
+ class: "ce-close-x",
347
+ type: "button",
348
+ "aria-label": o(a)("scheduling.positionModal.close"),
349
+ onClick: l[0] || (l[0] = (s) => e.modal.close())
350
+ }, {
351
+ default: T(() => [...l[12] || (l[12] = [
352
+ i("svg", {
353
+ width: "20",
354
+ height: "20",
355
+ viewBox: "0 0 20 20",
356
+ fill: "none",
357
+ stroke: "currentColor",
358
+ "stroke-width": "1.8",
359
+ "stroke-linecap": "round",
360
+ "aria-hidden": "true"
361
+ }, [
362
+ i("path", { d: "M5.5 5.5l9 9M14.5 5.5l-9 9" })
363
+ ], -1)
364
+ ])]),
365
+ _: 1
366
+ }, 8, ["aria-label"])
367
+ ]),
368
+ i("div", ze, [
369
+ e.modal.done.value ? (b(), E("div", _e, [
370
+ i("div", ea, [
371
+ l[13] || (l[13] = i("span", {
372
+ class: "cg-done-tick",
373
+ "aria-hidden": "true"
374
+ }, "✓", -1)),
375
+ i("div", aa, [
376
+ i("b", null, v(e.modal.done.value.name), 1),
377
+ i("small", null, v(e.modal.editingId.value ? o(a)("scheduling.positionModal.updated") : e.modal.done.value.assigned ? o(a)(
378
+ e.modal.done.value.assigned === 1 ? "scheduling.positionModal.addedToOne" : "scheduling.positionModal.addedToMany",
379
+ { count: e.modal.done.value.assigned }
380
+ ) : o(a)("scheduling.positions.added")), 1)
381
+ ])
382
+ ]),
383
+ e.modal.done.value.failed ? (b(), E("div", la, v(o(a)(
384
+ e.modal.done.value.failed === 1 ? "scheduling.positionModal.failedOne" : "scheduling.positionModal.failedMany",
385
+ { count: e.modal.done.value.failed }
386
+ )), 1)) : Z("", !0)
387
+ ])) : (b(), E("div", De, [
388
+ i("div", Le, [
389
+ i("label", je, v(o(a)("scheduling.positionModal.nameLabel")), 1),
390
+ fe(i("input", {
391
+ id: "skName",
392
+ "onUpdate:modelValue": l[1] || (l[1] = (s) => e.modal.name.value = s),
393
+ class: "sch-input ce-input",
394
+ maxlength: "40",
395
+ placeholder: o(a)("scheduling.positionModal.namePlaceholder"),
396
+ autocomplete: "off",
397
+ onInput: l[2] || (l[2] = (s) => e.modal.nameError.value = !1),
398
+ onKeyup: l[3] || (l[3] = Ce((s) => e.modal.save(), ["enter"]))
399
+ }, null, 40, Fe), [
400
+ [ye, e.modal.name.value]
401
+ ]),
402
+ i("div", {
403
+ class: ge(["ce-err", { show: e.modal.nameError.value || e.modal.nameTaken.value }])
404
+ }, v(e.modal.nameTaken.value ? o(a)("scheduling.positionModal.nameTaken") : o(a)("scheduling.positionModal.nameRequired")), 3)
405
+ ]),
406
+ i("div", Ve, [
407
+ i("div", We, [
408
+ i("span", Be, v(o(a)("scheduling.positionModal.employeesLabel")), 1),
409
+ H(W, {
410
+ hierarchy: "ghost",
411
+ size: "sm",
412
+ class: "ce-add-link asg-all",
413
+ type: "button",
414
+ onClick: l[4] || (l[4] = (s) => e.modal.toggleAll())
415
+ }, {
416
+ default: T(() => [
417
+ V(v(e.modal.allPicked.value ? o(a)("scheduling.positionModal.clearAll") : o(a)("scheduling.positionModal.selectAll")), 1)
418
+ ]),
419
+ _: 1
420
+ }),
421
+ i("span", Re, v(o(a)("scheduling.positionModal.selectedCount", { count: e.modal.pickedIds.value.length })), 1)
422
+ ]),
423
+ fe(i("input", {
424
+ "onUpdate:modelValue": l[5] || (l[5] = (s) => e.modal.search.value = s),
425
+ class: "sch-input ce-input asg-search",
426
+ placeholder: o(a)("scheduling.positionModal.searchPlaceholder"),
427
+ autocomplete: "off"
428
+ }, null, 8, Ke), [
429
+ [ye, e.modal.search.value]
430
+ ]),
431
+ i("div", Ue, [
432
+ (b(!0), E(Ie, null, Se(e.modal.visible.value, (s) => (b(), E("label", {
433
+ key: s.employeeId,
434
+ class: "asg-row"
435
+ }, [
436
+ i("input", {
437
+ type: "checkbox",
438
+ class: "sch-checkbox asg-check",
439
+ checked: !!e.modal.picks[s.employeeId],
440
+ onChange: (B) => e.modal.toggle(s.employeeId),
441
+ "data-platform": "desktop"
442
+ }, null, 40, qe),
443
+ i("span", Ge, v(s.initials), 1),
444
+ i("span", He, [
445
+ i("span", {
446
+ class: "asg-nm",
447
+ title: s.name
448
+ }, v(s.name), 9, Je),
449
+ i("span", Qe, [
450
+ s.held.length ? (b(), E(Ie, { key: 0 }, [
451
+ V(v(s.held.join(", ")), 1)
452
+ ], 64)) : (b(), E("i", Xe, v(o(a)("scheduling.positionModal.noPositions")), 1))
453
+ ])
454
+ ])
455
+ ]))), 128)),
456
+ e.modal.visible.value.length ? Z("", !0) : (b(), E("div", Ye, v(o(a)("scheduling.positionModal.noMatches")), 1))
457
+ ]),
458
+ i("div", Ze, v(o(a)("scheduling.positionModal.tickHint")), 1)
459
+ ]),
460
+ i("div", {
461
+ class: ge(["ce-err", { show: !!e.modal.error.value }])
462
+ }, v(e.modal.error.value), 3)
463
+ ]))
464
+ ]),
465
+ i("div", na, [
466
+ l[14] || (l[14] = i("div", { class: "am-cost-preview" }, null, -1)),
467
+ e.modal.done.value ? (b(), E("div", sa, [
468
+ e.modal.editingId.value ? Z("", !0) : (b(), ne(W, {
469
+ key: 0,
470
+ hierarchy: "secondary",
471
+ size: "sm",
472
+ class: "am-btn am-btn-sec",
473
+ type: "button",
474
+ onClick: l[9] || (l[9] = (s) => e.modal.another())
475
+ }, {
476
+ default: T(() => [
477
+ V(v(o(a)("scheduling.positionModal.addAnother")), 1)
478
+ ]),
479
+ _: 1
480
+ })),
481
+ H(W, {
482
+ hierarchy: "primary",
483
+ size: "sm",
484
+ class: "am-btn am-btn-primary",
485
+ type: "button",
486
+ onClick: l[10] || (l[10] = (s) => e.modal.close())
487
+ }, {
488
+ default: T(() => [
489
+ V(v(o(a)("scheduling.common.done")), 1)
490
+ ]),
491
+ _: 1
492
+ })
493
+ ])) : (b(), E("div", ta, [
494
+ H(W, {
495
+ hierarchy: "secondary",
496
+ size: "sm",
497
+ class: "am-btn am-btn-sec",
498
+ type: "button",
499
+ onClick: l[6] || (l[6] = (s) => e.modal.close())
500
+ }, {
501
+ default: T(() => [
502
+ V(v(o(a)("scheduling.common.cancel")), 1)
503
+ ]),
504
+ _: 1
505
+ }),
506
+ e.modal.editingId.value ? Z("", !0) : (b(), ne(W, {
507
+ key: 0,
508
+ hierarchy: "secondary",
509
+ size: "sm",
510
+ class: "am-btn am-btn-sec",
511
+ type: "button",
512
+ disabled: !e.modal.canSave.value,
513
+ onClick: l[7] || (l[7] = (s) => e.modal.saveAndAnother())
514
+ }, {
515
+ default: T(() => [
516
+ V(v(o(a)("scheduling.positionModal.saveAndAnother")), 1)
517
+ ]),
518
+ _: 1
519
+ }, 8, ["disabled"])),
520
+ H(W, {
521
+ hierarchy: "primary",
522
+ size: "sm",
523
+ class: "am-btn am-btn-primary",
524
+ type: "button",
525
+ disabled: !e.modal.canSave.value,
526
+ onClick: l[8] || (l[8] = (s) => e.modal.save())
527
+ }, {
528
+ default: T(() => [
529
+ V(v(e.modal.editingId.value ? e.modal.saving.value ? o(a)("scheduling.positionModal.saving") : o(a)("scheduling.settings.saveChanges") : e.modal.saving.value ? o(a)("scheduling.positions.adding") : o(a)("scheduling.positionModal.addPosition")), 1)
530
+ ]),
531
+ _: 1
532
+ }, 8, ["disabled"])
533
+ ]))
534
+ ])
535
+ ]),
536
+ _: 1
537
+ }, 8, ["open"]));
538
+ }
539
+ });
540
+ export {
541
+ ra as _,
542
+ ca as a,
543
+ ua as u
544
+ };