@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
@@ -1,530 +0,0 @@
1
- import { ref as I, watch as ce, computed as O, reactive as we, nextTick as Pe, defineComponent as pe, createBlock as te, openBlock as k, withCtx as M, createElementVNode as s, createVNode as q, toDisplayString as g, unref as X, createElementBlock as C, withDirectives as ve, withKeys as Ne, vModelText as fe, normalizeClass as ye, createTextVNode as B, createCommentVNode as Y, Fragment as he, renderList as $e } from "vue";
2
- import { av as se, p as z, ay as ge, az as ne, aA as ke, x as Se, aB as Ce, I as le, e as Z, au as xe, as as V } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-CnKzVz3I.js";
3
- import { useI18n as Ae } from "@feedmepos/mf-common";
4
- function Ie() {
5
- return se.map((e) => ({ id: e.id, name: e.name }));
6
- }
7
- function la(e = {}) {
8
- const n = I(Ie()), f = [], a = /* @__PURE__ */ new Set();
9
- let i = 0;
10
- ce(
11
- () => se.map((l) => `${l.id}:${l.name}`).join(" "),
12
- () => {
13
- n.value = Ie();
14
- }
15
- ), ce(
16
- () => {
17
- var l;
18
- return (((l = z.value) == null ? void 0 : l.positions) ?? []).map((c) => `${c.id}:${c.name}`).join(" ");
19
- },
20
- () => {
21
- var l;
22
- n.value = (((l = z.value) == null ? void 0 : l.positions) ?? []).map((c) => ({ id: c.id, name: c.name }));
23
- }
24
- );
25
- const r = I(!1), P = I(""), w = I(null), p = I(!1), b = I(null);
26
- function x(l) {
27
- var y, $;
28
- const c = new Set(ke.value.map((T) => T._id)), N = /* @__PURE__ */ new Set();
29
- for (const T of ((y = z.value) == null ? void 0 : y.employees) ?? [])
30
- c.has(T.employeeId) && ((($ = T.primaryPosition) == null ? void 0 : $.positionId) === l || T.secondaryPositions.some((ae) => ae.positionId === l)) && N.add(T.employeeId);
31
- return N.size;
32
- }
33
- function W(l) {
34
- return n.value.some((c) => c.name.toLowerCase() === l.toLowerCase());
35
- }
36
- function D() {
37
- r.value = !0, P.value = "", w.value = null, b.value = null;
38
- }
39
- function A() {
40
- r.value = !1, P.value = "";
41
- }
42
- async function F() {
43
- var c, N;
44
- const l = P.value.trim().slice(0, 40);
45
- if (!(!l || W(l))) {
46
- p.value = !0, b.value = null;
47
- try {
48
- e.deferWrites ? (f.push(l), n.value = [...n.value, { id: `onboarding-draft-${++i}`, name: l }]) : await ne({ name: l }), r.value = !1, P.value = "", (c = e.notify) == null || c.call(e, "Position added", "success");
49
- } catch (y) {
50
- b.value = y instanceof Error ? y.message : "Could not add this position", (N = e.notify) == null || N.call(e, b.value, "error");
51
- } finally {
52
- p.value = !1;
53
- }
54
- }
55
- }
56
- function _(l) {
57
- w.value = l;
58
- }
59
- function G() {
60
- w.value = null;
61
- }
62
- async function E(l) {
63
- var c, N;
64
- p.value = !0, b.value = null;
65
- try {
66
- if (e.deferWrites) {
67
- const y = n.value.find(($) => $.id === l);
68
- if (l.startsWith("onboarding-draft-")) {
69
- const $ = f.indexOf((y == null ? void 0 : y.name) ?? "");
70
- $ >= 0 && f.splice($, 1);
71
- } else
72
- a.add(l);
73
- } else
74
- await ge(l);
75
- n.value = n.value.filter((y) => y.id !== l), w.value = null, (c = e.notify) == null || c.call(e, "Position removed", "success");
76
- } catch (y) {
77
- b.value = y instanceof Error ? y.message : "Could not delete this position", (N = e.notify) == null || N.call(e, b.value, "error");
78
- } finally {
79
- p.value = !1;
80
- }
81
- }
82
- async function H() {
83
- if (e.deferWrites)
84
- for (; f.length; ) {
85
- const l = f[0];
86
- await ne({ name: l }), f.shift();
87
- }
88
- }
89
- async function J() {
90
- if (e.deferWrites)
91
- for (const l of [...a])
92
- await ge(l), a.delete(l);
93
- }
94
- function K() {
95
- var l;
96
- e.deferWrites && (f.splice(0, f.length), a.clear(), n.value = (((l = z.value) == null ? void 0 : l.positions) ?? []).map((c) => ({ id: c.id, name: c.name })));
97
- }
98
- const ee = O(() => n.value.length);
99
- return {
100
- positions: n,
101
- pendingCreates: f,
102
- pendingDeletes: a,
103
- count: ee,
104
- isAdding: r,
105
- newName: P,
106
- pendingDeleteId: w,
107
- saving: p,
108
- error: b,
109
- usageCountFor: x,
110
- startAdd: D,
111
- cancelAdd: A,
112
- confirmAdd: F,
113
- askDelete: _,
114
- cancelDelete: G,
115
- confirmDelete: E,
116
- commitCreates: H,
117
- commitDeletes: J,
118
- discardPending: K
119
- };
120
- }
121
- function Ee(e) {
122
- var f;
123
- const n = e.trim().split(/\s+/).filter(Boolean);
124
- return n.length ? (n[0][0] + (((f = n[1]) == null ? void 0 : f[0]) ?? "")).toUpperCase() : "??";
125
- }
126
- function na(e, n = {}) {
127
- const f = I(!1), a = I(""), i = I(""), r = we({}), P = I(!1), w = I(null), p = I(null), b = I(!1), x = I(null);
128
- let W = "", D = /* @__PURE__ */ new Set();
129
- const A = O(() => {
130
- var m;
131
- const t = new Map((((m = z.value) == null ? void 0 : m.employees) ?? []).map((v) => [v.employeeId, v]));
132
- return ke.value.map((v) => {
133
- var L;
134
- const d = t.get(v._id), j = [d == null ? void 0 : d.primaryPosition, ...(d == null ? void 0 : d.secondaryPositions) ?? []].map((o) => Se(o)).filter((o) => !!o), u = [
135
- (L = d == null ? void 0 : d.primaryPosition) == null ? void 0 : L.positionId,
136
- ...((d == null ? void 0 : d.secondaryPositions) ?? []).map((o) => o.positionId)
137
- ].filter((o) => !!o);
138
- return {
139
- employeeId: v._id,
140
- name: v.name,
141
- initials: Ee(v.name),
142
- held: j,
143
- heldPositionIds: u
144
- };
145
- });
146
- }), F = O(() => {
147
- const t = i.value.trim().toLowerCase();
148
- return A.value.filter((m) => !t || m.name.toLowerCase().includes(t));
149
- }), _ = O(
150
- () => A.value.filter((t) => r[t.employeeId]).map((t) => t.employeeId)
151
- ), G = O(
152
- () => F.value.length > 0 && F.value.every((t) => r[t.employeeId])
153
- ), E = O(() => a.value.trim().slice(0, 40)), H = O(
154
- () => !!E.value && se.some(
155
- (t) => t.id !== x.value && t.name.toLowerCase() === E.value.toLowerCase()
156
- )
157
- ), J = O(() => !!E.value && !H.value && !P.value);
158
- function K() {
159
- a.value = "", i.value = "", Object.keys(r).forEach((t) => delete r[t]), w.value = null, b.value = !1, p.value = null, x.value = null, W = "", D = /* @__PURE__ */ new Set();
160
- }
161
- function ee() {
162
- K(), f.value = !0;
163
- }
164
- function l(t, m) {
165
- K(), x.value = t, a.value = m, W = m, D = new Set(
166
- A.value.filter((v) => v.heldPositionIds.includes(t)).map((v) => v.employeeId)
167
- ), D.forEach((v) => r[v] = !0), f.value = !0;
168
- }
169
- function c() {
170
- f.value = !1, K();
171
- }
172
- function N(t) {
173
- r[t] = !r[t];
174
- }
175
- function y() {
176
- if (G.value) {
177
- Object.keys(r).forEach((t) => delete r[t]);
178
- return;
179
- }
180
- F.value.forEach((t) => r[t.employeeId] = !0);
181
- }
182
- function $(t, m) {
183
- const v = !!(t != null && t.primaryPosition), d = ((t == null ? void 0 : t.secondaryPositions) ?? []).map((u) => ({
184
- positionId: u.positionId,
185
- positionName: u.positionName
186
- })), j = v ? [...d, { positionName: m }] : d;
187
- return {
188
- ...v ? {} : { primaryPosition: Z(m) },
189
- secondaryPositions: j.map((u) => Z(u.positionName, u.positionId)).filter((u) => !!u)
190
- };
191
- }
192
- async function T() {
193
- var j;
194
- const t = E.value;
195
- await ne({ name: t }), await Pe(), e == null || e(t);
196
- const m = A.value.filter((u) => r[u.employeeId]), d = (await Promise.allSettled(
197
- m.map((u) => {
198
- var o;
199
- const L = (o = z.value) == null ? void 0 : o.employees.find((h) => h.employeeId === u.employeeId);
200
- return le(u.employeeId, {
201
- employeeName: u.name,
202
- ...$(L, t)
203
- });
204
- })
205
- )).filter((u) => u.status === "rejected").length;
206
- return p.value = { name: t, assigned: m.length - d, failed: d }, (j = n.notify) == null || j.call(
207
- n,
208
- d ? `Position added, but ${d} employee assignment${d === 1 ? "" : "s"} failed` : "Position added",
209
- d ? "error" : "success"
210
- ), !0;
211
- }
212
- async function ae(t) {
213
- var L;
214
- const m = E.value;
215
- await Ce(t, { name: m }), e == null || e(m);
216
- const v = A.value.filter(
217
- (o) => r[o.employeeId] && !D.has(o.employeeId)
218
- ), d = A.value.filter(
219
- (o) => !r[o.employeeId] && D.has(o.employeeId)
220
- ), u = (await Promise.allSettled([
221
- ...v.map((o) => {
222
- var U;
223
- const h = (U = z.value) == null ? void 0 : U.employees.find((Q) => Q.employeeId === o.employeeId);
224
- return le(o.employeeId, {
225
- employeeName: o.name,
226
- ...$(h, m)
227
- });
228
- }),
229
- ...d.map((o) => {
230
- var de, ue, me, re;
231
- const h = (de = z.value) == null ? void 0 : de.employees.find((S) => S.employeeId === o.employeeId), U = ((h == null ? void 0 : h.secondaryPositions) ?? []).filter(
232
- (S) => S.positionId !== t && (S.positionId || S.positionName !== W)
233
- ), Q = ((ue = h == null ? void 0 : h.primaryPosition) == null ? void 0 : ue.positionId) === t || !((me = h == null ? void 0 : h.primaryPosition) != null && me.positionId) && ((re = h == null ? void 0 : h.primaryPosition) == null ? void 0 : re.positionName) === W, R = Q ? U.shift() : void 0;
234
- return le(o.employeeId, {
235
- employeeName: o.name,
236
- ...Q ? {
237
- primaryPosition: Z(R == null ? void 0 : R.positionName, R == null ? void 0 : R.positionId) ?? null
238
- } : {},
239
- secondaryPositions: U.map((S) => Z(S.positionName, S.positionId)).filter((S) => !!S)
240
- });
241
- })
242
- ])).filter((o) => o.status === "rejected").length;
243
- return p.value = { name: m, assigned: Math.max(0, v.length - u), failed: u }, (L = n.notify) == null || L.call(
244
- n,
245
- u ? `Position updated, but ${u} employee assignment${u === 1 ? "" : "s"} failed` : "Position updated",
246
- u ? "error" : "success"
247
- ), !0;
248
- }
249
- async function ie() {
250
- var t;
251
- if (!E.value)
252
- return b.value = !0, !1;
253
- if (!J.value) return !1;
254
- P.value = !0, w.value = null;
255
- try {
256
- return await (x.value ? ae(x.value) : T());
257
- } catch (m) {
258
- return w.value = m instanceof Error ? m.message : `Could not ${x.value ? "save" : "add"} this position`, (t = n.notify) == null || t.call(n, w.value, "error"), !1;
259
- } finally {
260
- P.value = !1;
261
- }
262
- }
263
- function oe() {
264
- K();
265
- }
266
- async function be() {
267
- await ie() && oe();
268
- }
269
- return {
270
- open: f,
271
- name: a,
272
- search: i,
273
- picks: r,
274
- saving: P,
275
- error: w,
276
- done: p,
277
- nameError: b,
278
- people: A,
279
- visible: F,
280
- pickedIds: _,
281
- allPicked: G,
282
- nameTaken: H,
283
- canSave: J,
284
- editingId: x,
285
- openNew: ee,
286
- openEdit: l,
287
- close: c,
288
- toggle: N,
289
- toggleAll: y,
290
- save: ie,
291
- saveAndAnother: be,
292
- another: oe
293
- };
294
- }
295
- const Te = { class: "am-head" }, Me = {
296
- id: "schedule-position-title",
297
- class: "am-title"
298
- }, Oe = { class: "ce-body" }, ze = { key: 0 }, De = { class: "ce-field" }, je = {
299
- class: "ce-field asg-field",
300
- style: { "margin-bottom": "0" }
301
- }, Le = { class: "asg-head" }, Be = { class: "asg-count" }, Ve = { class: "asg-list position-asg-list" }, We = ["checked", "onChange"], Fe = { class: "asg-av" }, Ke = { class: "asg-id" }, Re = ["title"], Ue = { class: "asg-sub" }, qe = { key: 1 }, Ge = {
302
- key: 0,
303
- class: "asg-sub",
304
- style: { padding: "10px" }
305
- }, He = { key: 1 }, Je = { class: "cg-done" }, Qe = { class: "cg-st-main" }, Xe = {
306
- key: 0,
307
- class: "cg-done-also"
308
- }, Ye = { class: "am-foot" }, Ze = {
309
- key: 0,
310
- class: "am-foot-btns"
311
- }, _e = {
312
- key: 1,
313
- class: "am-foot-btns"
314
- }, sa = /* @__PURE__ */ pe({
315
- __name: "ScheduleAddPositionModal",
316
- props: {
317
- modal: {}
318
- },
319
- setup(e) {
320
- const { t: n } = Ae();
321
- return (f, a) => (k(), te(xe, {
322
- open: e.modal.open.value,
323
- "panel-class": "ce-modal",
324
- "panel-style": "width: min(480px, 95vw)",
325
- "labelled-by": "schedule-position-title",
326
- onClose: a[11] || (a[11] = (i) => e.modal.close())
327
- }, {
328
- default: M(() => [
329
- s("div", Te, [
330
- s("div", Me, g(e.modal.editingId.value ? X(n)("scheduling.positionModal.editTitle") : X(n)("scheduling.positionModal.addTitle")), 1),
331
- q(V, {
332
- hierarchy: "ghost",
333
- size: "xs",
334
- "icon-only": "",
335
- class: "ce-close-x",
336
- type: "button",
337
- "aria-label": "Close",
338
- onClick: a[0] || (a[0] = (i) => e.modal.close())
339
- }, {
340
- default: M(() => [...a[12] || (a[12] = [
341
- s("svg", {
342
- width: "20",
343
- height: "20",
344
- viewBox: "0 0 20 20",
345
- fill: "none",
346
- stroke: "currentColor",
347
- "stroke-width": "1.8",
348
- "stroke-linecap": "round",
349
- "aria-hidden": "true"
350
- }, [
351
- s("path", { d: "M5.5 5.5l9 9M14.5 5.5l-9 9" })
352
- ], -1)
353
- ])]),
354
- _: 1
355
- })
356
- ]),
357
- s("div", Oe, [
358
- e.modal.done.value ? (k(), C("div", He, [
359
- s("div", Je, [
360
- a[16] || (a[16] = s("span", {
361
- class: "cg-done-tick",
362
- "aria-hidden": "true"
363
- }, "✓", -1)),
364
- s("div", Qe, [
365
- s("b", null, g(e.modal.done.value.name), 1),
366
- s("small", null, g(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)
367
- ])
368
- ]),
369
- e.modal.done.value.failed ? (k(), C("div", Xe, g(e.modal.done.value.failed) + " " + g(e.modal.done.value.failed === 1 ? "employee" : "employees") + " could not be updated. Add the position to them from their profile. ", 1)) : Y("", !0)
370
- ])) : (k(), C("div", ze, [
371
- s("div", De, [
372
- a[13] || (a[13] = s("label", {
373
- class: "ce-label",
374
- for: "skName"
375
- }, "Position name", -1)),
376
- ve(s("input", {
377
- id: "skName",
378
- "onUpdate:modelValue": a[1] || (a[1] = (i) => e.modal.name.value = i),
379
- class: "sch-input ce-input",
380
- maxlength: "40",
381
- placeholder: "e.g. FOH, Kitchen, Manager, Cashier…",
382
- autocomplete: "off",
383
- onInput: a[2] || (a[2] = (i) => e.modal.nameError.value = !1),
384
- onKeyup: a[3] || (a[3] = Ne((i) => e.modal.save(), ["enter"]))
385
- }, null, 544), [
386
- [fe, e.modal.name.value]
387
- ]),
388
- s("div", {
389
- class: ye(["ce-err", { show: e.modal.nameError.value || e.modal.nameTaken.value }])
390
- }, g(e.modal.nameTaken.value ? "A position with this name already exists" : "Give the position a name"), 3)
391
- ]),
392
- s("div", je, [
393
- s("div", Le, [
394
- a[14] || (a[14] = s("span", { class: "asg-lbl" }, "Employees with this position", -1)),
395
- q(V, {
396
- hierarchy: "ghost",
397
- size: "sm",
398
- class: "ce-add-link asg-all",
399
- type: "button",
400
- onClick: a[4] || (a[4] = (i) => e.modal.toggleAll())
401
- }, {
402
- default: M(() => [
403
- B(g(e.modal.allPicked.value ? "Clear all" : "Select all"), 1)
404
- ]),
405
- _: 1
406
- }),
407
- s("span", Be, g(e.modal.pickedIds.value.length) + " selected", 1)
408
- ]),
409
- ve(s("input", {
410
- "onUpdate:modelValue": a[5] || (a[5] = (i) => e.modal.search.value = i),
411
- class: "sch-input ce-input asg-search",
412
- placeholder: "Search team…",
413
- autocomplete: "off"
414
- }, null, 512), [
415
- [fe, e.modal.search.value]
416
- ]),
417
- s("div", Ve, [
418
- (k(!0), C(he, null, $e(e.modal.visible.value, (i) => (k(), C("label", {
419
- key: i.employeeId,
420
- class: "asg-row"
421
- }, [
422
- s("input", {
423
- type: "checkbox",
424
- class: "sch-checkbox asg-check",
425
- checked: !!e.modal.picks[i.employeeId],
426
- onChange: (r) => e.modal.toggle(i.employeeId),
427
- "data-platform": "desktop"
428
- }, null, 40, We),
429
- s("span", Fe, g(i.initials), 1),
430
- s("span", Ke, [
431
- s("span", {
432
- class: "asg-nm",
433
- title: i.name
434
- }, g(i.name), 9, Re),
435
- s("span", Ue, [
436
- i.held.length ? (k(), C(he, { key: 0 }, [
437
- B(g(i.held.join(", ")), 1)
438
- ], 64)) : (k(), C("i", qe, "No positions added"))
439
- ])
440
- ])
441
- ]))), 128)),
442
- e.modal.visible.value.length ? Y("", !0) : (k(), C("div", Ge, " No one matches. "))
443
- ]),
444
- a[15] || (a[15] = s("div", { class: "ce-hint" }, "Ticked people can work this position.", -1))
445
- ]),
446
- s("div", {
447
- class: ye(["ce-err", { show: !!e.modal.error.value }])
448
- }, g(e.modal.error.value), 3)
449
- ]))
450
- ]),
451
- s("div", Ye, [
452
- a[19] || (a[19] = s("div", { class: "am-cost-preview" }, null, -1)),
453
- e.modal.done.value ? (k(), C("div", _e, [
454
- e.modal.editingId.value ? Y("", !0) : (k(), te(V, {
455
- key: 0,
456
- hierarchy: "secondary",
457
- size: "sm",
458
- class: "am-btn am-btn-sec",
459
- type: "button",
460
- onClick: a[9] || (a[9] = (i) => e.modal.another())
461
- }, {
462
- default: M(() => [...a[18] || (a[18] = [
463
- B("Add another", -1)
464
- ])]),
465
- _: 1
466
- })),
467
- q(V, {
468
- hierarchy: "primary",
469
- size: "sm",
470
- class: "am-btn am-btn-primary",
471
- type: "button",
472
- onClick: a[10] || (a[10] = (i) => e.modal.close())
473
- }, {
474
- default: M(() => [
475
- B(g(X(n)("scheduling.common.done")), 1)
476
- ]),
477
- _: 1
478
- })
479
- ])) : (k(), C("div", Ze, [
480
- q(V, {
481
- hierarchy: "secondary",
482
- size: "sm",
483
- class: "am-btn am-btn-sec",
484
- type: "button",
485
- onClick: a[6] || (a[6] = (i) => e.modal.close())
486
- }, {
487
- default: M(() => [
488
- B(g(X(n)("scheduling.common.cancel")), 1)
489
- ]),
490
- _: 1
491
- }),
492
- e.modal.editingId.value ? Y("", !0) : (k(), te(V, {
493
- key: 0,
494
- hierarchy: "secondary",
495
- size: "sm",
496
- class: "am-btn am-btn-sec",
497
- type: "button",
498
- disabled: !e.modal.canSave.value,
499
- onClick: a[7] || (a[7] = (i) => e.modal.saveAndAnother())
500
- }, {
501
- default: M(() => [...a[17] || (a[17] = [
502
- B(" Save & add another ", -1)
503
- ])]),
504
- _: 1
505
- }, 8, ["disabled"])),
506
- q(V, {
507
- hierarchy: "primary",
508
- size: "sm",
509
- class: "am-btn am-btn-primary",
510
- type: "button",
511
- disabled: !e.modal.canSave.value,
512
- onClick: a[8] || (a[8] = (i) => e.modal.save())
513
- }, {
514
- default: M(() => [
515
- B(g(e.modal.editingId.value ? e.modal.saving.value ? "Saving…" : "Save changes" : e.modal.saving.value ? "Adding…" : "Add position"), 1)
516
- ]),
517
- _: 1
518
- }, 8, ["disabled"])
519
- ]))
520
- ])
521
- ]),
522
- _: 1
523
- }, 8, ["open"]));
524
- }
525
- });
526
- export {
527
- sa as _,
528
- na as a,
529
- la as u
530
- };