@feedmepos/mf-hrm-portal 2.3.0-dev.16 → 2.3.0-dev.17

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 (56) hide show
  1. package/dist/{ApprovalCodeList-NeNAiyOr.js → ApprovalCodeList-CQp5AXmP.js} +7 -7
  2. package/dist/{AuditLogList-Pv9kFjBr.js → AuditLogList-CBOp_hDR.js} +5 -5
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DWfp8X80.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-_2_usHCJ.js} +2 -2
  4. package/dist/{EmployeeList-Bs9lymzV.js → EmployeeList-1vR0zMMp.js} +8 -8
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-Cb22fFWE.js → FormItem.vue_vue_type_script_setup_true_lang-NR_aWS7l.js} +1 -1
  6. package/dist/{GrantUserList-dTWAmoUv.js → GrantUserList-CmeAG1Gy.js} +8 -8
  7. package/dist/{Main-Cp40vaRW.js → Main-BUTiZtwj.js} +5 -5
  8. package/dist/{Main-D_iKA3Se.js → Main-DLh6VmQX.js} +8 -8
  9. package/dist/{Main-C_RrWM3c.js → Main-DTAb8QWQ.js} +11 -11
  10. package/dist/{PermissionSetList-D9uTEllI.js → PermissionSetList-BtaX2k3V.js} +7 -7
  11. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-vbO5PdcM.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B6dR75q1.js} +714 -714
  12. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-BVz6q3HE.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js} +1 -1
  13. package/dist/{RoleList-DyoCd2jX.js → RoleList-Qyyi7w2u.js} +9 -9
  14. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-EPVMITc0.js +532 -0
  15. package/dist/{ScheduleGeneralPage-DyIBUXY1.js → ScheduleGeneralPage-CjZ8OFnN.js} +2 -2
  16. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-CJMPrPHl.js → ScheduleModal.vue_vue_type_script_setup_true_lang-KOLBDv21.js} +523 -512
  17. package/dist/SchedulePage-BWpgAx3a.js +18831 -0
  18. package/dist/{SchedulePositionPage-DE5XxDl2.js → SchedulePositionPage-Cu6rRBlZ.js} +3 -3
  19. package/dist/{SelectFilter-D27X9BNI.js → SelectFilter-D58Vrs_W.js} +1 -1
  20. package/dist/{TeamMemberList-YudsADAP.js → TeamMemberList-CC_okKtX.js} +11 -11
  21. package/dist/{TimesheetList-CQXDulxg.js → TimesheetList-ULjiy1OT.js} +8 -8
  22. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CWHjolT4.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D9xXvYuA.js} +3 -3
  23. package/dist/{app-BMVAE__n.js → app-COD0IHk1.js} +8 -8
  24. package/dist/app.js +1 -1
  25. package/dist/{approval-code-DHsUgc4K.js → approval-code-BXUiojPH.js} +1 -1
  26. package/dist/{dayjs.min-6iMvK3bi.js → dayjs.min-jNfjc_8X.js} +1 -1
  27. package/dist/{employee-kAmYgyIB.js → employee-Db1gyZQZ.js} +4 -4
  28. package/dist/{grant-user-qzKHFTro.js → grant-user-CBJ3gEgW.js} +1 -1
  29. package/dist/{iteration-kNseYv0g.js → iteration-z1uPD-7T.js} +1 -1
  30. package/dist/{lodash-CoGtJ4ls.js → lodash-uwLYB3oL.js} +1 -1
  31. package/dist/{restaurant-BbYRA_IT.js → restaurant-D2mfKHaH.js} +44 -45
  32. package/dist/{role-BvQeAAsI.js → role-BhO6Cl-l.js} +2 -2
  33. package/dist/{rule-DkjcuvBR.js → rule-BZ340_dr.js} +3 -3
  34. package/dist/src/api/schedule/index.d.ts +6 -1
  35. package/dist/src/types/schedule.d.ts +1 -1
  36. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +1 -0
  37. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +2 -0
  38. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +4 -4
  39. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +1 -0
  40. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +1 -0
  41. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +4 -1
  42. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +3 -10
  43. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +1 -0
  44. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +10 -1
  45. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +1 -0
  46. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +6 -0
  47. package/dist/src/views/scheduling/schedule-state.d.ts +232 -232
  48. package/dist/src/views/scheduling/schedule-store.d.ts +4 -0
  49. package/dist/style.css +1 -1
  50. package/dist/tsconfig.app.tsbuildinfo +1 -1
  51. package/dist/{useAppStore-BoLkvkE2.js → useAppStore-DZCdxlCd.js} +1 -1
  52. package/dist/{useLoading-Ch1AUYT1.js → useLoading-Nygx2zn8.js} +1 -1
  53. package/dist/{useReportPermissions-CbnelOLy.js → useReportPermissions-BjkeMcNA.js} +3 -3
  54. package/package.json +3 -3
  55. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-D0Mg9P_m.js +0 -501
  56. package/dist/SchedulePage-BkvOpOVt.js +0 -18757
@@ -1,5 +1,5 @@
1
1
  import { defineStore as p } from "pinia";
2
- import { g as s } from "./restaurant-BbYRA_IT.js";
2
+ import { g as s } from "./restaurant-D2mfKHaH.js";
3
3
  import { baseClientInstance as d } from "@feedmepos/mf-common";
4
4
  var n = [];
5
5
  for (var r = 0; r < 256; ++r)
@@ -1,6 +1,6 @@
1
1
  import { computed as I, isRef as L, watch as M } from "vue";
2
2
  import { SnackbarPosition as y } from "@feedmepos/ui-library";
3
- import { u as w, v } from "./useAppStore-BoLkvkE2.js";
3
+ import { u as w, v } from "./useAppStore-DZCdxlCd.js";
4
4
  const E = (r) => {
5
5
  async function d(u, e) {
6
6
  var l, a;
@@ -1,8 +1,8 @@
1
1
  import { computed as r, ref as n } from "vue";
2
- import { e as d } from "./iteration-kNseYv0g.js";
2
+ import { e as d } from "./iteration-z1uPD-7T.js";
3
3
  import { useCoreStore as h } from "@feedmepos/mf-common";
4
- import { R as K } from "./rule-DkjcuvBR.js";
5
- import { D as g } from "./app-BMVAE__n.js";
4
+ import { R as K } from "./rule-BZ340_dr.js";
5
+ import { D as g } from "./app-COD0IHk1.js";
6
6
  const a = n([]), i = n(!1), l = n(!1), f = n(null), p = n(null), u = n(!1);
7
7
  function B() {
8
8
  const v = h();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-hrm-portal",
3
- "version": "2.3.0-dev.16",
3
+ "version": "2.3.0-dev.17",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -30,8 +30,8 @@
30
30
  "vue-router": "^4.3.2",
31
31
  "vue3-lottie": "^3.3.0",
32
32
  "xlsx": "^0.18.5",
33
- "@feedmepos/hrm-schedule-contract": "1.0.0",
34
- "@feedmepos/hrm-permission": "1.2.0"
33
+ "@feedmepos/hrm-permission": "1.2.0",
34
+ "@feedmepos/hrm-schedule-contract": "1.0.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@casl/ability": "^3.4.0",
@@ -1,501 +0,0 @@
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 { au as X, p as z, ax as $e, ay as me, az as pe, u as Ce, aA as Se, I as W, e as H, at as Ae, ar as O } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-CJMPrPHl.js";
3
- import { useI18n as Ee } from "@feedmepos/mf-common";
4
- function ue() {
5
- return X.map((e) => ({ id: e.id, name: e.name }));
6
- }
7
- function ta(e = {}) {
8
- const s = h(ue());
9
- ne(
10
- () => X.map((i) => `${i.id}:${i.name}`).join(" "),
11
- () => {
12
- s.value = ue();
13
- }
14
- ), ne(
15
- () => {
16
- var i;
17
- return (((i = z.value) == null ? void 0 : i.positions) ?? []).map((m) => `${m.id}:${m.name}`).join(" ");
18
- },
19
- () => {
20
- var i;
21
- s.value = (((i = z.value) == null ? void 0 : i.positions) ?? []).map((m) => ({ id: m.id, name: m.name }));
22
- }
23
- );
24
- const g = h(!1), a = h(""), t = h(null), c = h(!1), k = h(null);
25
- function A(i) {
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) === i || P.secondaryPositions.some((V) => V.positionId === i);
31
- }
32
- ).length;
33
- }
34
- function j(i) {
35
- return s.value.some((m) => m.name.toLowerCase() === i.toLowerCase());
36
- }
37
- function F() {
38
- g.value = !0, a.value = "", t.value = null, k.value = null;
39
- }
40
- function $() {
41
- g.value = !1, a.value = "";
42
- }
43
- async function D() {
44
- var m, P;
45
- const i = a.value.trim().slice(0, 40);
46
- if (!(!i || j(i))) {
47
- c.value = !0, k.value = null;
48
- try {
49
- await me({ name: i }), 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");
52
- } finally {
53
- c.value = !1;
54
- }
55
- }
56
- }
57
- function E(i) {
58
- t.value = i;
59
- }
60
- function p() {
61
- t.value = null;
62
- }
63
- async function L(i) {
64
- var m, P;
65
- c.value = !0, k.value = null;
66
- try {
67
- await $e(i), s.value = s.value.filter((I) => I.id !== i), 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");
70
- } finally {
71
- c.value = !1;
72
- }
73
- }
74
- const J = S(() => s.value.length);
75
- return {
76
- positions: s,
77
- count: J,
78
- isAdding: g,
79
- newName: a,
80
- pendingDeleteId: t,
81
- saving: c,
82
- error: k,
83
- usageCountFor: A,
84
- startAdd: F,
85
- cancelAdd: $,
86
- confirmAdd: D,
87
- askDelete: E,
88
- cancelDelete: p,
89
- confirmDelete: L
90
- };
91
- }
92
- function xe(e) {
93
- var g;
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() : "??";
96
- }
97
- function na(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);
99
- let D = "", E = /* @__PURE__ */ new Set();
100
- const p = S(() => {
101
- var r;
102
- const l = new Map((((r = z.value) == null ? void 0 : r.employees) ?? []).map((v) => [v.employeeId, v]));
103
- return pe.value.map((v) => {
104
- var T;
105
- const d = l.get(v._id), x = [d == null ? void 0 : d.primaryPosition, ...(d == null ? void 0 : d.secondaryPositions) ?? []].map((o) => Ce(o)).filter((o) => !!o), u = [
106
- (T = d == null ? void 0 : d.primaryPosition) == null ? void 0 : T.positionId,
107
- ...((d == null ? void 0 : d.secondaryPositions) ?? []).map((o) => o.positionId)
108
- ].filter((o) => !!o);
109
- return {
110
- employeeId: v._id,
111
- name: v.name,
112
- initials: xe(v.name),
113
- held: x,
114
- heldPositionIds: u
115
- };
116
- });
117
- }), L = S(() => {
118
- const l = t.value.trim().toLowerCase();
119
- return p.value.filter((r) => !l || r.name.toLowerCase().includes(l));
120
- }), J = S(
121
- () => p.value.filter((l) => c[l.employeeId]).map((l) => l.employeeId)
122
- ), i = S(
123
- () => L.value.length > 0 && L.value.every((l) => c[l.employeeId])
124
- ), m = S(() => a.value.trim().slice(0, 40)), P = S(
125
- () => !!m.value && X.some(
126
- (l) => l.id !== $.value && l.name.toLowerCase() === m.value.toLowerCase()
127
- )
128
- ), I = S(() => !!m.value && !P.value && !k.value);
129
- function V() {
130
- 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();
131
- }
132
- function ce() {
133
- V(), g.value = !0;
134
- }
135
- function re(l, r) {
136
- V(), $.value = l, a.value = r, D = r, E = new Set(
137
- p.value.filter((v) => v.heldPositionIds.includes(l)).map((v) => v.employeeId)
138
- ), E.forEach((v) => c[v] = !0), g.value = !0;
139
- }
140
- function ve() {
141
- g.value = !1, V();
142
- }
143
- function ye(l) {
144
- c[l] = !c[l];
145
- }
146
- function fe() {
147
- if (i.value) {
148
- Object.keys(c).forEach((l) => delete c[l]);
149
- return;
150
- }
151
- L.value.forEach((l) => c[l.employeeId] = !0);
152
- }
153
- function Y(l, r) {
154
- const v = !!(l != null && l.primaryPosition), d = ((l == null ? void 0 : l.secondaryPositions) ?? []).map((u) => ({
155
- positionId: u.positionId,
156
- positionName: u.positionName
157
- })), x = v ? [...d, { positionName: r }] : d;
158
- return {
159
- ...v ? {} : { primaryPosition: H(r) },
160
- secondaryPositions: x.map((u) => H(u.positionName, u.positionId)).filter((u) => !!u)
161
- };
162
- }
163
- async function he() {
164
- var x;
165
- const l = m.value;
166
- await me({ name: l }), await be(), e == null || e(l);
167
- const r = p.value.filter((u) => c[u.employeeId]), d = (await Promise.allSettled(
168
- r.map((u) => {
169
- var o;
170
- const T = (o = z.value) == null ? void 0 : o.employees.find((y) => y.employeeId === u.employeeId);
171
- return W(u.employeeId, {
172
- employeeName: u.name,
173
- ...Y(T, l)
174
- });
175
- })
176
- )).filter((u) => u.status === "rejected").length;
177
- return j.value = { name: l, assigned: r.length - d, failed: d }, (x = s.notify) == null || x.call(
178
- s,
179
- d ? `Position added, but ${d} employee assignment${d === 1 ? "" : "s"} failed` : "Position added",
180
- d ? "error" : "success"
181
- ), !0;
182
- }
183
- async function ge(l) {
184
- var T;
185
- const r = m.value;
186
- await Se(l, { name: r }), e == null || e(r);
187
- const v = p.value.filter(
188
- (o) => c[o.employeeId] && !E.has(o.employeeId)
189
- ), d = p.value.filter(
190
- (o) => !c[o.employeeId] && E.has(o.employeeId)
191
- ), u = (await Promise.allSettled([
192
- ...v.map((o) => {
193
- var K;
194
- const y = (K = z.value) == null ? void 0 : K.employees.find((U) => U.employeeId === o.employeeId);
195
- return W(o.employeeId, {
196
- employeeName: o.name,
197
- ...Y(y, r)
198
- });
199
- }),
200
- ...d.map((o) => {
201
- var ee, ae, le, te;
202
- const y = (ee = z.value) == null ? void 0 : ee.employees.find((w) => w.employeeId === o.employeeId), K = ((y == null ? void 0 : y.secondaryPositions) ?? []).filter(
203
- (w) => w.positionId !== l && (w.positionId || w.positionName !== D)
204
- ), U = ((ae = y == null ? void 0 : y.primaryPosition) == null ? void 0 : ae.positionId) === l || !((le = y == null ? void 0 : y.primaryPosition) != null && le.positionId) && ((te = y == null ? void 0 : y.primaryPosition) == null ? void 0 : te.positionName) === D, B = U ? K.shift() : void 0;
205
- return W(o.employeeId, {
206
- employeeName: o.name,
207
- ...U ? {
208
- primaryPosition: H(B == null ? void 0 : B.positionName, B == null ? void 0 : B.positionId) ?? null
209
- } : {},
210
- secondaryPositions: K.map((w) => H(w.positionName, w.positionId)).filter((w) => !!w)
211
- });
212
- })
213
- ])).filter((o) => o.status === "rejected").length;
214
- return j.value = { name: r, assigned: Math.max(0, v.length - u), failed: u }, (T = s.notify) == null || T.call(
215
- s,
216
- u ? `Position updated, but ${u} employee assignment${u === 1 ? "" : "s"} failed` : "Position updated",
217
- u ? "error" : "success"
218
- ), !0;
219
- }
220
- async function Z() {
221
- var l;
222
- if (!m.value)
223
- return F.value = !0, !1;
224
- if (!I.value) return !1;
225
- k.value = !0, A.value = null;
226
- try {
227
- return await ($.value ? ge($.value) : he());
228
- } catch (r) {
229
- 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;
230
- } finally {
231
- k.value = !1;
232
- }
233
- }
234
- function _() {
235
- V();
236
- }
237
- async function ke() {
238
- await Z() && _();
239
- }
240
- return {
241
- open: g,
242
- name: a,
243
- search: t,
244
- picks: c,
245
- saving: k,
246
- error: A,
247
- done: j,
248
- nameError: F,
249
- people: p,
250
- visible: L,
251
- pickedIds: J,
252
- allPicked: i,
253
- nameTaken: P,
254
- canSave: I,
255
- editingId: $,
256
- openNew: ce,
257
- openEdit: re,
258
- close: ve,
259
- toggle: ye,
260
- toggleAll: fe,
261
- save: Z,
262
- saveAndAnother: ke,
263
- another: _
264
- };
265
- }
266
- const Te = { class: "am-head" }, Me = {
267
- id: "schedule-position-title",
268
- class: "am-title"
269
- }, Oe = { class: "ce-body" }, ze = { key: 0 }, je = { class: "ce-field" }, De = {
270
- class: "ce-field asg-field",
271
- style: { "margin-bottom": "0" }
272
- }, Le = { class: "asg-head" }, Ve = { class: "asg-count" }, Be = { class: "asg-list position-asg-list" }, Fe = ["checked", "onChange"], Ke = { class: "asg-av" }, Re = { class: "asg-id" }, Ue = ["title"], qe = { class: "asg-sub" }, Ge = { key: 1 }, He = {
273
- key: 0,
274
- class: "asg-sub",
275
- style: { padding: "10px" }
276
- }, Je = { key: 1 }, Qe = { class: "cg-done" }, We = { class: "cg-st-main" }, Xe = {
277
- key: 0,
278
- class: "cg-done-also"
279
- }, Ye = { class: "am-foot" }, Ze = {
280
- key: 0,
281
- class: "am-foot-btns"
282
- }, _e = {
283
- key: 1,
284
- class: "am-foot-btns"
285
- }, sa = /* @__PURE__ */ Pe({
286
- __name: "ScheduleAddPositionModal",
287
- props: {
288
- modal: {}
289
- },
290
- setup(e) {
291
- const { t: s } = Ee();
292
- return (g, a) => (b(), Q(Ae, {
293
- open: e.modal.open.value,
294
- "panel-class": "ce-modal",
295
- "panel-style": "width: min(480px, 95vw)",
296
- "labelled-by": "schedule-position-title",
297
- onClose: a[11] || (a[11] = (t) => e.modal.close())
298
- }, {
299
- default: C(() => [
300
- n("div", Te, [
301
- n("div", Me, f(e.modal.editingId.value ? q(s)("scheduling.positionModal.editTitle") : q(s)("scheduling.positionModal.addTitle")), 1),
302
- R(O, {
303
- hierarchy: "ghost",
304
- size: "xs",
305
- "icon-only": "",
306
- class: "ce-close-x",
307
- type: "button",
308
- "aria-label": "Close",
309
- onClick: a[0] || (a[0] = (t) => e.modal.close())
310
- }, {
311
- default: C(() => [...a[12] || (a[12] = [
312
- n("svg", {
313
- width: "20",
314
- height: "20",
315
- viewBox: "0 0 20 20",
316
- fill: "none",
317
- stroke: "currentColor",
318
- "stroke-width": "1.8",
319
- "stroke-linecap": "round",
320
- "aria-hidden": "true"
321
- }, [
322
- n("path", { d: "M5.5 5.5l9 9M14.5 5.5l-9 9" })
323
- ], -1)
324
- ])]),
325
- _: 1
326
- })
327
- ]),
328
- n("div", Oe, [
329
- e.modal.done.value ? (b(), N("div", Je, [
330
- n("div", Qe, [
331
- a[16] || (a[16] = n("span", {
332
- class: "cg-done-tick",
333
- "aria-hidden": "true"
334
- }, "✓", -1)),
335
- n("div", We, [
336
- n("b", null, f(e.modal.done.value.name), 1),
337
- 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)
338
- ])
339
- ]),
340
- e.modal.done.value.failed ? (b(), N("div", Xe, 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)
341
- ])) : (b(), N("div", ze, [
342
- n("div", je, [
343
- a[13] || (a[13] = n("label", {
344
- class: "ce-label",
345
- for: "skName"
346
- }, "Position name", -1)),
347
- se(n("input", {
348
- id: "skName",
349
- "onUpdate:modelValue": a[1] || (a[1] = (t) => e.modal.name.value = t),
350
- class: "sch-input ce-input",
351
- maxlength: "40",
352
- placeholder: "e.g. FOH, Kitchen, Manager, Cashier…",
353
- autocomplete: "off",
354
- onInput: a[2] || (a[2] = (t) => e.modal.nameError.value = !1),
355
- onKeyup: a[3] || (a[3] = we((t) => e.modal.save(), ["enter"]))
356
- }, null, 544), [
357
- [oe, e.modal.name.value]
358
- ]),
359
- n("div", {
360
- class: ie(["ce-err", { show: e.modal.nameError.value || e.modal.nameTaken.value }])
361
- }, f(e.modal.nameTaken.value ? "A position with this name already exists" : "Give the position a name"), 3)
362
- ]),
363
- n("div", De, [
364
- n("div", Le, [
365
- a[14] || (a[14] = n("span", { class: "asg-lbl" }, "Employees with this position", -1)),
366
- R(O, {
367
- hierarchy: "ghost",
368
- size: "sm",
369
- class: "ce-add-link asg-all",
370
- type: "button",
371
- onClick: a[4] || (a[4] = (t) => e.modal.toggleAll())
372
- }, {
373
- default: C(() => [
374
- M(f(e.modal.allPicked.value ? "Clear all" : "Select all"), 1)
375
- ]),
376
- _: 1
377
- }),
378
- n("span", Ve, f(e.modal.pickedIds.value.length) + " selected", 1)
379
- ]),
380
- se(n("input", {
381
- "onUpdate:modelValue": a[5] || (a[5] = (t) => e.modal.search.value = t),
382
- class: "sch-input ce-input asg-search",
383
- placeholder: "Search team…",
384
- autocomplete: "off"
385
- }, null, 512), [
386
- [oe, e.modal.search.value]
387
- ]),
388
- n("div", Be, [
389
- (b(!0), N(de, null, Ne(e.modal.visible.value, (t) => (b(), N("label", {
390
- key: t.employeeId,
391
- class: "asg-row"
392
- }, [
393
- n("input", {
394
- type: "checkbox",
395
- class: "sch-checkbox asg-check",
396
- checked: !!e.modal.picks[t.employeeId],
397
- onChange: (c) => e.modal.toggle(t.employeeId),
398
- "data-platform": "desktop"
399
- }, null, 40, Fe),
400
- n("span", Ke, f(t.initials), 1),
401
- n("span", Re, [
402
- n("span", {
403
- class: "asg-nm",
404
- title: t.name
405
- }, f(t.name), 9, Ue),
406
- n("span", qe, [
407
- t.held.length ? (b(), N(de, { key: 0 }, [
408
- M(f(t.held.join(", ")), 1)
409
- ], 64)) : (b(), N("i", Ge, "No positions added"))
410
- ])
411
- ])
412
- ]))), 128)),
413
- e.modal.visible.value.length ? G("", !0) : (b(), N("div", He, " No one matches. "))
414
- ]),
415
- a[15] || (a[15] = n("div", { class: "ce-hint" }, "Ticked people can work this position.", -1))
416
- ]),
417
- n("div", {
418
- class: ie(["ce-err", { show: !!e.modal.error.value }])
419
- }, f(e.modal.error.value), 3)
420
- ]))
421
- ]),
422
- n("div", Ye, [
423
- a[19] || (a[19] = n("div", { class: "am-cost-preview" }, null, -1)),
424
- e.modal.done.value ? (b(), N("div", _e, [
425
- e.modal.editingId.value ? G("", !0) : (b(), Q(O, {
426
- key: 0,
427
- hierarchy: "secondary",
428
- size: "sm",
429
- class: "am-btn am-btn-sec",
430
- type: "button",
431
- onClick: a[9] || (a[9] = (t) => e.modal.another())
432
- }, {
433
- default: C(() => [...a[18] || (a[18] = [
434
- M("Add another", -1)
435
- ])]),
436
- _: 1
437
- })),
438
- R(O, {
439
- hierarchy: "primary",
440
- size: "sm",
441
- class: "am-btn am-btn-primary",
442
- type: "button",
443
- onClick: a[10] || (a[10] = (t) => e.modal.close())
444
- }, {
445
- default: C(() => [
446
- M(f(q(s)("scheduling.common.done")), 1)
447
- ]),
448
- _: 1
449
- })
450
- ])) : (b(), N("div", Ze, [
451
- R(O, {
452
- hierarchy: "secondary",
453
- size: "sm",
454
- class: "am-btn am-btn-sec",
455
- type: "button",
456
- onClick: a[6] || (a[6] = (t) => e.modal.close())
457
- }, {
458
- default: C(() => [
459
- M(f(q(s)("scheduling.common.cancel")), 1)
460
- ]),
461
- _: 1
462
- }),
463
- e.modal.editingId.value ? G("", !0) : (b(), Q(O, {
464
- key: 0,
465
- hierarchy: "secondary",
466
- size: "sm",
467
- class: "am-btn am-btn-sec",
468
- type: "button",
469
- disabled: !e.modal.canSave.value,
470
- onClick: a[7] || (a[7] = (t) => e.modal.saveAndAnother())
471
- }, {
472
- default: C(() => [...a[17] || (a[17] = [
473
- M(" Save & add another ", -1)
474
- ])]),
475
- _: 1
476
- }, 8, ["disabled"])),
477
- R(O, {
478
- hierarchy: "primary",
479
- size: "sm",
480
- class: "am-btn am-btn-primary",
481
- type: "button",
482
- disabled: !e.modal.canSave.value,
483
- onClick: a[8] || (a[8] = (t) => e.modal.save())
484
- }, {
485
- default: C(() => [
486
- M(f(e.modal.editingId.value ? e.modal.saving.value ? "Saving…" : "Save changes" : e.modal.saving.value ? "Adding…" : "Add position"), 1)
487
- ]),
488
- _: 1
489
- }, 8, ["disabled"])
490
- ]))
491
- ])
492
- ]),
493
- _: 1
494
- }, 8, ["open"]));
495
- }
496
- });
497
- export {
498
- sa as _,
499
- na as a,
500
- ta as u
501
- };