@feedmepos/mf-hrm-portal 2.2.5-dev.9 → 2.3.0-dev
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.
- package/dist/{ApprovalCodeList-D5l9vIsE.js → ApprovalCodeList-cG0zmQVJ.js} +5 -5
- package/dist/{AuditLogList-ByTa5UJY.js → AuditLogList-BTifJhO1.js} +4 -4
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-mNdn1TYV.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-qr5TwLTK.js} +2 -2
- package/dist/{EmployeeList-Bv6ANk-P.js → EmployeeList-DzcMtxJ3.js} +6 -6
- package/dist/{GrantUserList-Bt8w3p4j.js → GrantUserList-D5b7tJ8Y.js} +6 -6
- package/dist/{Main-DqiGpT4v.js → Main-B2r59IOW.js} +5 -5
- package/dist/{Main-DHJcgePj.js → Main-DFwdAWqn.js} +8 -8
- package/dist/{Main-DkP8dWgn.js → Main-DkLBemi7.js} +11 -11
- package/dist/{PermissionSetList-BIGv1u67.js → PermissionSetList-B80hrfMW.js} +7 -7
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DjNcJQM9.js +4167 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-fe-Rdwn4.js} +1 -1
- package/dist/{RoleList-CH6NDKPU.js → RoleList-DHO4JRKF.js} +9 -9
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B-XtB64L.js +452 -0
- package/dist/ScheduleGeneralPage-WlBM8bxV.js +629 -0
- package/dist/SchedulePage-Nm0krGVU.js +17056 -0
- package/dist/SchedulePositionPage-C0hrO11d.js +263 -0
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-DTDXir_7.js +1150 -0
- package/dist/{TeamMemberList-BwfG3go2.js → TeamMemberList-CgFWLRBM.js} +10 -10
- package/dist/{TimesheetList-DcoqzbLO.js → TimesheetList-Dp40G-0I.js} +7 -7
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RyhiKTSd.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BFjrMhUG.js} +3 -3
- package/dist/{app-BcZ6C8M8.js → app-CmBSTvaI.js} +851 -739
- package/dist/app.js +1 -1
- package/dist/{approval-code-jIjkeVEb.js → approval-code-C9DmR4Md.js} +1 -1
- package/dist/{dayjs.min-Ch0iysTG.js → dayjs.min-CfL2DQ3d.js} +1 -1
- package/dist/{employee-DwYHFacQ.js → employee-DQcHjoij.js} +4 -4
- package/dist/{grant-user-SNiDV22U.js → grant-user-Bv-pJ9Wt.js} +1 -1
- package/dist/{iteration-D1uWLp0V.js → iteration-BlavheWG.js} +1 -1
- package/dist/{lodash-DErxm7xf.js → lodash-QerqayrJ.js} +1 -1
- package/dist/{restaurant-BTpBmfBV.js → restaurant-D7PEQjPY.js} +257 -251
- package/dist/{role-B9VanAny.js → role-RM2YLO7n.js} +2 -2
- package/dist/{rule-C4f_Ilzr.js → rule-DjlvYIuP.js} +3 -3
- package/dist/src/api/restaurant/index.d.ts +2 -0
- package/dist/src/api/schedule/index.d.ts +12 -2
- package/dist/src/composables/useMessage.d.ts +8 -2
- package/dist/src/types/schedule.d.ts +10 -218
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +11 -0
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/{ScheduleLegendBar.vue.d.ts → ScheduleCoach.vue.d.ts} +2 -2
- package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +9 -1
- package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleExportDoneDialog.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +0 -2
- package/dist/src/views/scheduling/components/ScheduleOnboardingComplete.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +1 -2
- package/dist/src/views/scheduling/components/ScheduleShiftCardMenu.vue.d.ts +2 -2
- package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +6 -6
- package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +0 -2
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +6 -6
- package/dist/src/views/scheduling/components/ScheduleTourAllSet.vue.d.ts +6 -0
- package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +33 -0
- package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +5 -0
- package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +7 -0
- package/dist/src/views/scheduling/composables/onboarding-types.d.ts +50 -0
- package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +8 -2
- package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +22 -1
- package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +3 -0
- package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +2 -8
- package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +12 -0
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +11 -8
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +10 -2
- package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +158 -12
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +110 -13
- package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +11 -1
- package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +19 -0
- package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +80 -0
- package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +0 -3
- package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +24 -1
- package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +4 -2
- package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +33 -1
- package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +17 -0
- package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +1 -3
- package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +20 -31
- package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +327 -75
- package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +5 -3
- package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +20 -0
- package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +2 -0
- package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +0 -5
- package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +25 -0
- package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +53 -1
- package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +7 -4
- package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +8 -9
- package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +63 -92
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +30 -2
- package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +5 -11
- package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +0 -1
- package/dist/src/views/scheduling/composables/useScheduleTopbar.d.ts +4 -4
- package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +93 -0
- package/dist/src/views/scheduling/data.d.ts +6 -19
- package/dist/src/views/scheduling/locales/index.d.ts +116 -4
- package/dist/src/views/scheduling/schedule-state.d.ts +679 -0
- package/dist/src/views/scheduling/schedule-store.d.ts +16 -60
- package/dist/src/views/scheduling/types.d.ts +29 -2
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-DCwd8GWN.js → useAppStore-d_nHyK5u.js} +1 -1
- package/dist/{useLoading-CXzTpIVv.js → useLoading-JFoghhRz.js} +1 -1
- package/dist/{useReportPermissions-CTr56kBo.js → useReportPermissions-Bl6Br79r.js} +3 -3
- package/package.json +3 -2
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-niywl_DX.js +0 -4167
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-T1ACkX_6.js +0 -426
- package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-BzQuLLf5.js +0 -690
- package/dist/ScheduleGeneralPage-DJPENJZ2.js +0 -320
- package/dist/SchedulePage-C1egcbIC.js +0 -14421
- package/dist/SchedulePositionPage-OhL_hsqG.js +0 -293
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-B8W4sTsA.js +0 -242
- package/dist/src/views/scheduling/composables/scheduleAutoSolver.d.ts +0 -21
- package/dist/src/views/scheduling/composables/useScheduleLegendBar.d.ts +0 -35
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
import { ref as c, watch as ve, computed as C, reactive as ye, nextTick as fe, defineComponent as he, createElementBlock as k, createCommentVNode as D, openBlock as v, withModifiers as ge, createElementVNode as n, createVNode as L, toDisplayString as y, withCtx as N, withDirectives as Y, withKeys as ke, vModelText as Z, normalizeClass as _, createTextVNode as A, Fragment as ee, renderList as be, createBlock as ae } from "vue";
|
|
2
|
+
import { a9 as q, a as we, aa as pe, ab as le, f as F, ac as Ie, ad as Pe, k as U, p as K, a4 as $ } from "./ScheduleSelect.vue_vue_type_script_setup_true_lang-DTDXir_7.js";
|
|
3
|
+
function te() {
|
|
4
|
+
return q.map((e) => ({ id: e.id, name: e.name }));
|
|
5
|
+
}
|
|
6
|
+
function Ye() {
|
|
7
|
+
const e = c(te());
|
|
8
|
+
ve(
|
|
9
|
+
() => q.map((i) => `${i.id}:${i.name}`).join(" "),
|
|
10
|
+
() => {
|
|
11
|
+
e.value = te();
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
const h = C(() => we()), a = c(!1), l = c(""), s = c(null), b = c(!1), g = c(null);
|
|
15
|
+
function x(i) {
|
|
16
|
+
return h.value.filter((f) => f.positions.includes(i)).length;
|
|
17
|
+
}
|
|
18
|
+
function T(i) {
|
|
19
|
+
return e.value.some((f) => f.name.toLowerCase() === i.toLowerCase());
|
|
20
|
+
}
|
|
21
|
+
function p() {
|
|
22
|
+
a.value = !0, l.value = "", s.value = null, g.value = null;
|
|
23
|
+
}
|
|
24
|
+
function M() {
|
|
25
|
+
a.value = !1, l.value = "";
|
|
26
|
+
}
|
|
27
|
+
async function S() {
|
|
28
|
+
const i = l.value.trim().slice(0, 40);
|
|
29
|
+
if (!(!i || T(i))) {
|
|
30
|
+
b.value = !0, g.value = null;
|
|
31
|
+
try {
|
|
32
|
+
await le({ name: i }), a.value = !1, l.value = "";
|
|
33
|
+
} catch (f) {
|
|
34
|
+
g.value = f instanceof Error ? f.message : "Could not add this position";
|
|
35
|
+
} finally {
|
|
36
|
+
b.value = !1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function I(i) {
|
|
41
|
+
s.value = i;
|
|
42
|
+
}
|
|
43
|
+
function O() {
|
|
44
|
+
s.value = null;
|
|
45
|
+
}
|
|
46
|
+
async function R(i) {
|
|
47
|
+
b.value = !0, g.value = null;
|
|
48
|
+
try {
|
|
49
|
+
await pe(i), s.value = null;
|
|
50
|
+
} catch (f) {
|
|
51
|
+
g.value = f instanceof Error ? f.message : "Could not delete this position";
|
|
52
|
+
} finally {
|
|
53
|
+
b.value = !1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const j = C(() => e.value.length);
|
|
57
|
+
return {
|
|
58
|
+
positions: e,
|
|
59
|
+
count: j,
|
|
60
|
+
isAdding: a,
|
|
61
|
+
newName: l,
|
|
62
|
+
pendingDeleteId: s,
|
|
63
|
+
saving: b,
|
|
64
|
+
error: g,
|
|
65
|
+
usageCountFor: x,
|
|
66
|
+
startAdd: p,
|
|
67
|
+
cancelAdd: M,
|
|
68
|
+
confirmAdd: S,
|
|
69
|
+
askDelete: I,
|
|
70
|
+
cancelDelete: O,
|
|
71
|
+
confirmDelete: R
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function Ce(e) {
|
|
75
|
+
var a;
|
|
76
|
+
const h = e.trim().split(/\s+/).filter(Boolean);
|
|
77
|
+
return h.length ? (h[0][0] + (((a = h[1]) == null ? void 0 : a[0]) ?? "")).toUpperCase() : "??";
|
|
78
|
+
}
|
|
79
|
+
function Ze(e) {
|
|
80
|
+
const h = c(!1), a = c(""), l = c(""), s = ye({}), b = c(!1), g = c(null), x = c(null), T = c(!1), p = c(null);
|
|
81
|
+
let M = "", S = /* @__PURE__ */ new Set();
|
|
82
|
+
const I = C(() => {
|
|
83
|
+
var u;
|
|
84
|
+
const t = new Map((((u = F.value) == null ? void 0 : u.employees) ?? []).map((d) => [d.employeeId, d]));
|
|
85
|
+
return Ie.value.map((d) => {
|
|
86
|
+
var E;
|
|
87
|
+
const r = t.get(d._id), m = [
|
|
88
|
+
(E = r == null ? void 0 : r.primaryPosition) == null ? void 0 : E.positionName,
|
|
89
|
+
...((r == null ? void 0 : r.secondaryPositions) ?? []).map((o) => o.positionName)
|
|
90
|
+
].filter((o) => !!o);
|
|
91
|
+
return { employeeId: d._id, name: d.name, initials: Ce(d.name), held: m };
|
|
92
|
+
});
|
|
93
|
+
}), O = C(() => {
|
|
94
|
+
const t = l.value.trim().toLowerCase();
|
|
95
|
+
return I.value.filter((u) => !t || u.name.toLowerCase().includes(t));
|
|
96
|
+
}), R = C(
|
|
97
|
+
() => I.value.filter((t) => s[t.employeeId]).map((t) => t.employeeId)
|
|
98
|
+
), j = C(
|
|
99
|
+
() => O.value.length > 0 && O.value.every((t) => s[t.employeeId])
|
|
100
|
+
), i = C(() => a.value.trim().slice(0, 40)), f = C(
|
|
101
|
+
() => !!i.value && q.some(
|
|
102
|
+
(t) => t.id !== p.value && t.name.toLowerCase() === i.value.toLowerCase()
|
|
103
|
+
)
|
|
104
|
+
), G = C(() => !!i.value && !f.value && !b.value);
|
|
105
|
+
function V() {
|
|
106
|
+
a.value = "", l.value = "", Object.keys(s).forEach((t) => delete s[t]), g.value = null, T.value = !1, x.value = null, p.value = null, M = "", S = /* @__PURE__ */ new Set();
|
|
107
|
+
}
|
|
108
|
+
function ne() {
|
|
109
|
+
V(), h.value = !0;
|
|
110
|
+
}
|
|
111
|
+
function oe(t, u) {
|
|
112
|
+
V(), p.value = t, a.value = u, M = u, S = new Set(
|
|
113
|
+
I.value.filter((d) => d.held.includes(u)).map((d) => d.employeeId)
|
|
114
|
+
), S.forEach((d) => s[d] = !0), h.value = !0;
|
|
115
|
+
}
|
|
116
|
+
function se() {
|
|
117
|
+
h.value = !1, V();
|
|
118
|
+
}
|
|
119
|
+
function ie(t) {
|
|
120
|
+
s[t] = !s[t];
|
|
121
|
+
}
|
|
122
|
+
function de() {
|
|
123
|
+
if (j.value) {
|
|
124
|
+
Object.keys(s).forEach((t) => delete s[t]);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
O.value.forEach((t) => s[t.employeeId] = !0);
|
|
128
|
+
}
|
|
129
|
+
function H(t, u) {
|
|
130
|
+
const d = !!(t != null && t.primaryPosition), r = ((t == null ? void 0 : t.secondaryPositions) ?? []).map((m) => m.positionName);
|
|
131
|
+
return {
|
|
132
|
+
...d ? {} : { primaryPosition: K(u) },
|
|
133
|
+
secondaryPositions: (d ? [...r, u] : r).map((m) => K(m)).filter((m) => !!m)
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
async function ue() {
|
|
137
|
+
const t = i.value;
|
|
138
|
+
await le({ name: t }), await fe(), e == null || e(t);
|
|
139
|
+
const u = I.value.filter((m) => s[m.employeeId]), r = (await Promise.allSettled(
|
|
140
|
+
u.map((m) => {
|
|
141
|
+
var o;
|
|
142
|
+
const E = (o = F.value) == null ? void 0 : o.employees.find((w) => w.employeeId === m.employeeId);
|
|
143
|
+
return U(m.employeeId, {
|
|
144
|
+
employeeName: m.name,
|
|
145
|
+
...H(E, t)
|
|
146
|
+
});
|
|
147
|
+
})
|
|
148
|
+
)).filter((m) => m.status === "rejected").length;
|
|
149
|
+
return x.value = { name: t, assigned: u.length - r, failed: r }, !0;
|
|
150
|
+
}
|
|
151
|
+
async function me(t) {
|
|
152
|
+
const u = i.value;
|
|
153
|
+
await Pe(t, { name: u }), e == null || e(u);
|
|
154
|
+
const d = I.value.filter(
|
|
155
|
+
(o) => s[o.employeeId] && !S.has(o.employeeId)
|
|
156
|
+
), r = I.value.filter(
|
|
157
|
+
(o) => !s[o.employeeId] && S.has(o.employeeId)
|
|
158
|
+
), E = (await Promise.allSettled([
|
|
159
|
+
...d.map((o) => {
|
|
160
|
+
var z;
|
|
161
|
+
const w = (z = F.value) == null ? void 0 : z.employees.find((B) => B.employeeId === o.employeeId);
|
|
162
|
+
return U(o.employeeId, {
|
|
163
|
+
employeeName: o.name,
|
|
164
|
+
...H(w, u)
|
|
165
|
+
});
|
|
166
|
+
}),
|
|
167
|
+
...r.map((o) => {
|
|
168
|
+
var W, X;
|
|
169
|
+
const w = (W = F.value) == null ? void 0 : W.employees.find((P) => P.employeeId === o.employeeId), z = ((w == null ? void 0 : w.secondaryPositions) ?? []).map((P) => P.positionName).filter((P) => P !== M), B = ((X = w == null ? void 0 : w.primaryPosition) == null ? void 0 : X.positionName) === M, ce = B ? z.shift() : void 0;
|
|
170
|
+
return U(o.employeeId, {
|
|
171
|
+
employeeName: o.name,
|
|
172
|
+
...B ? { primaryPosition: K(ce ?? "") ?? null } : {},
|
|
173
|
+
secondaryPositions: z.map((P) => K(P)).filter((P) => !!P)
|
|
174
|
+
});
|
|
175
|
+
})
|
|
176
|
+
])).filter((o) => o.status === "rejected").length;
|
|
177
|
+
return x.value = { name: u, assigned: Math.max(0, d.length - E), failed: E }, !0;
|
|
178
|
+
}
|
|
179
|
+
async function J() {
|
|
180
|
+
if (!i.value)
|
|
181
|
+
return T.value = !0, !1;
|
|
182
|
+
if (!G.value) return !1;
|
|
183
|
+
b.value = !0, g.value = null;
|
|
184
|
+
try {
|
|
185
|
+
return await (p.value ? me(p.value) : ue());
|
|
186
|
+
} catch (t) {
|
|
187
|
+
return g.value = t instanceof Error ? t.message : `Could not ${p.value ? "save" : "add"} this position`, !1;
|
|
188
|
+
} finally {
|
|
189
|
+
b.value = !1;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function Q() {
|
|
193
|
+
V();
|
|
194
|
+
}
|
|
195
|
+
async function re() {
|
|
196
|
+
await J() && Q();
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
open: h,
|
|
200
|
+
name: a,
|
|
201
|
+
search: l,
|
|
202
|
+
picks: s,
|
|
203
|
+
saving: b,
|
|
204
|
+
error: g,
|
|
205
|
+
done: x,
|
|
206
|
+
nameError: T,
|
|
207
|
+
people: I,
|
|
208
|
+
visible: O,
|
|
209
|
+
pickedIds: R,
|
|
210
|
+
allPicked: j,
|
|
211
|
+
nameTaken: f,
|
|
212
|
+
canSave: G,
|
|
213
|
+
editingId: p,
|
|
214
|
+
openNew: ne,
|
|
215
|
+
openEdit: oe,
|
|
216
|
+
close: se,
|
|
217
|
+
toggle: ie,
|
|
218
|
+
toggleAll: de,
|
|
219
|
+
save: J,
|
|
220
|
+
saveAndAnother: re,
|
|
221
|
+
another: Q
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
const Se = {
|
|
225
|
+
class: "ce-modal",
|
|
226
|
+
style: { width: "min(480px, 95vw)" }
|
|
227
|
+
}, Ee = { class: "am-head" }, Ne = { class: "am-title" }, Ae = { class: "ce-body" }, $e = { key: 0 }, xe = { class: "ce-field" }, Me = {
|
|
228
|
+
class: "ce-field asg-field",
|
|
229
|
+
style: { "margin-bottom": "0" }
|
|
230
|
+
}, Oe = { class: "asg-head" }, Te = { class: "asg-count" }, ze = { class: "asg-list" }, De = ["checked", "onChange"], Le = { class: "asg-av" }, je = { class: "asg-id" }, Ve = { class: "asg-nm" }, Be = { class: "asg-sub" }, Fe = { key: 1 }, Ke = {
|
|
231
|
+
key: 0,
|
|
232
|
+
class: "asg-sub",
|
|
233
|
+
style: { padding: "10px" }
|
|
234
|
+
}, Re = { key: 1 }, Ue = { class: "cg-done" }, qe = { class: "cg-st-main" }, Ge = {
|
|
235
|
+
key: 0,
|
|
236
|
+
class: "cg-done-also"
|
|
237
|
+
}, He = { class: "am-foot" }, Je = {
|
|
238
|
+
key: 0,
|
|
239
|
+
class: "am-foot-btns"
|
|
240
|
+
}, Qe = {
|
|
241
|
+
key: 1,
|
|
242
|
+
class: "am-foot-btns"
|
|
243
|
+
}, _e = /* @__PURE__ */ he({
|
|
244
|
+
__name: "ScheduleAddPositionModal",
|
|
245
|
+
props: {
|
|
246
|
+
modal: {}
|
|
247
|
+
},
|
|
248
|
+
setup(e) {
|
|
249
|
+
return (h, a) => e.modal.open.value ? (v(), k("div", {
|
|
250
|
+
key: 0,
|
|
251
|
+
class: "modal-overlay open",
|
|
252
|
+
onClick: a[11] || (a[11] = ge((l) => e.modal.close(), ["self"]))
|
|
253
|
+
}, [
|
|
254
|
+
n("div", Se, [
|
|
255
|
+
n("div", Ee, [
|
|
256
|
+
n("div", Ne, y(e.modal.editingId.value ? "Edit Position" : "Add Position"), 1),
|
|
257
|
+
L($, {
|
|
258
|
+
hierarchy: "ghost",
|
|
259
|
+
size: "xs",
|
|
260
|
+
"icon-only": "",
|
|
261
|
+
class: "ce-close-x",
|
|
262
|
+
type: "button",
|
|
263
|
+
"aria-label": "Close",
|
|
264
|
+
onClick: a[0] || (a[0] = (l) => e.modal.close())
|
|
265
|
+
}, {
|
|
266
|
+
default: N(() => [...a[12] || (a[12] = [
|
|
267
|
+
n("svg", {
|
|
268
|
+
width: "20",
|
|
269
|
+
height: "20",
|
|
270
|
+
viewBox: "0 0 20 20",
|
|
271
|
+
fill: "none",
|
|
272
|
+
stroke: "currentColor",
|
|
273
|
+
"stroke-width": "1.8",
|
|
274
|
+
"stroke-linecap": "round",
|
|
275
|
+
"aria-hidden": "true"
|
|
276
|
+
}, [
|
|
277
|
+
n("path", { d: "M5.5 5.5l9 9M14.5 5.5l-9 9" })
|
|
278
|
+
], -1)
|
|
279
|
+
])]),
|
|
280
|
+
_: 1
|
|
281
|
+
})
|
|
282
|
+
]),
|
|
283
|
+
n("div", Ae, [
|
|
284
|
+
e.modal.done.value ? (v(), k("div", Re, [
|
|
285
|
+
n("div", Ue, [
|
|
286
|
+
a[16] || (a[16] = n("span", {
|
|
287
|
+
class: "cg-done-tick",
|
|
288
|
+
"aria-hidden": "true"
|
|
289
|
+
}, "✓", -1)),
|
|
290
|
+
n("div", qe, [
|
|
291
|
+
n("b", null, y(e.modal.done.value.name), 1),
|
|
292
|
+
n("small", null, y(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)
|
|
293
|
+
])
|
|
294
|
+
]),
|
|
295
|
+
e.modal.done.value.failed ? (v(), k("div", Ge, y(e.modal.done.value.failed) + " " + y(e.modal.done.value.failed === 1 ? "employee" : "employees") + " could not be updated. Add the position to them from their profile. ", 1)) : D("", !0)
|
|
296
|
+
])) : (v(), k("div", $e, [
|
|
297
|
+
n("div", xe, [
|
|
298
|
+
a[13] || (a[13] = n("label", {
|
|
299
|
+
class: "ce-label",
|
|
300
|
+
for: "skName"
|
|
301
|
+
}, "Position name", -1)),
|
|
302
|
+
Y(n("input", {
|
|
303
|
+
id: "skName",
|
|
304
|
+
"onUpdate:modelValue": a[1] || (a[1] = (l) => e.modal.name.value = l),
|
|
305
|
+
class: "sch-input ce-input",
|
|
306
|
+
maxlength: "40",
|
|
307
|
+
placeholder: "e.g. FOH, Kitchen, Manager, Cashier…",
|
|
308
|
+
autocomplete: "off",
|
|
309
|
+
onInput: a[2] || (a[2] = (l) => e.modal.nameError.value = !1),
|
|
310
|
+
onKeyup: a[3] || (a[3] = ke((l) => e.modal.save(), ["enter"]))
|
|
311
|
+
}, null, 544), [
|
|
312
|
+
[Z, e.modal.name.value]
|
|
313
|
+
]),
|
|
314
|
+
n("div", {
|
|
315
|
+
class: _(["ce-err", { show: e.modal.nameError.value || e.modal.nameTaken.value }])
|
|
316
|
+
}, y(e.modal.nameTaken.value ? "A position with this name already exists" : "Give the position a name"), 3)
|
|
317
|
+
]),
|
|
318
|
+
n("div", Me, [
|
|
319
|
+
n("div", Oe, [
|
|
320
|
+
a[14] || (a[14] = n("span", { class: "asg-lbl" }, "Employees with this position", -1)),
|
|
321
|
+
L($, {
|
|
322
|
+
hierarchy: "ghost",
|
|
323
|
+
size: "sm",
|
|
324
|
+
class: "ce-add-link asg-all",
|
|
325
|
+
type: "button",
|
|
326
|
+
onClick: a[4] || (a[4] = (l) => e.modal.toggleAll())
|
|
327
|
+
}, {
|
|
328
|
+
default: N(() => [
|
|
329
|
+
A(y(e.modal.allPicked.value ? "Clear all" : "Select all"), 1)
|
|
330
|
+
]),
|
|
331
|
+
_: 1
|
|
332
|
+
}),
|
|
333
|
+
n("span", Te, y(e.modal.pickedIds.value.length) + " selected", 1)
|
|
334
|
+
]),
|
|
335
|
+
Y(n("input", {
|
|
336
|
+
"onUpdate:modelValue": a[5] || (a[5] = (l) => e.modal.search.value = l),
|
|
337
|
+
class: "sch-input ce-input asg-search",
|
|
338
|
+
placeholder: "Search team…",
|
|
339
|
+
autocomplete: "off"
|
|
340
|
+
}, null, 512), [
|
|
341
|
+
[Z, e.modal.search.value]
|
|
342
|
+
]),
|
|
343
|
+
n("div", ze, [
|
|
344
|
+
(v(!0), k(ee, null, be(e.modal.visible.value, (l) => (v(), k("label", {
|
|
345
|
+
key: l.employeeId,
|
|
346
|
+
class: "asg-row"
|
|
347
|
+
}, [
|
|
348
|
+
n("input", {
|
|
349
|
+
type: "checkbox",
|
|
350
|
+
class: "sch-checkbox asg-check",
|
|
351
|
+
checked: !!e.modal.picks[l.employeeId],
|
|
352
|
+
onChange: (s) => e.modal.toggle(l.employeeId),
|
|
353
|
+
"data-platform": "desktop"
|
|
354
|
+
}, null, 40, De),
|
|
355
|
+
n("span", Le, y(l.initials), 1),
|
|
356
|
+
n("span", je, [
|
|
357
|
+
n("span", Ve, y(l.name), 1),
|
|
358
|
+
n("span", Be, [
|
|
359
|
+
l.held.length ? (v(), k(ee, { key: 0 }, [
|
|
360
|
+
A(y(l.held.join(", ")), 1)
|
|
361
|
+
], 64)) : (v(), k("i", Fe, "No positions added"))
|
|
362
|
+
])
|
|
363
|
+
])
|
|
364
|
+
]))), 128)),
|
|
365
|
+
e.modal.visible.value.length ? D("", !0) : (v(), k("div", Ke, " No one matches. "))
|
|
366
|
+
]),
|
|
367
|
+
a[15] || (a[15] = n("div", { class: "ce-hint" }, "Ticked people can work this position.", -1))
|
|
368
|
+
]),
|
|
369
|
+
n("div", {
|
|
370
|
+
class: _(["ce-err", { show: !!e.modal.error.value }])
|
|
371
|
+
}, y(e.modal.error.value), 3)
|
|
372
|
+
]))
|
|
373
|
+
]),
|
|
374
|
+
n("div", He, [
|
|
375
|
+
a[21] || (a[21] = n("div", { class: "am-cost-preview" }, null, -1)),
|
|
376
|
+
e.modal.done.value ? (v(), k("div", Qe, [
|
|
377
|
+
e.modal.editingId.value ? D("", !0) : (v(), ae($, {
|
|
378
|
+
key: 0,
|
|
379
|
+
hierarchy: "secondary",
|
|
380
|
+
size: "sm",
|
|
381
|
+
class: "am-btn am-btn-sec",
|
|
382
|
+
type: "button",
|
|
383
|
+
onClick: a[9] || (a[9] = (l) => e.modal.another())
|
|
384
|
+
}, {
|
|
385
|
+
default: N(() => [...a[19] || (a[19] = [
|
|
386
|
+
A("Add another", -1)
|
|
387
|
+
])]),
|
|
388
|
+
_: 1
|
|
389
|
+
})),
|
|
390
|
+
L($, {
|
|
391
|
+
hierarchy: "primary",
|
|
392
|
+
size: "sm",
|
|
393
|
+
class: "am-btn am-btn-primary",
|
|
394
|
+
type: "button",
|
|
395
|
+
onClick: a[10] || (a[10] = (l) => e.modal.close())
|
|
396
|
+
}, {
|
|
397
|
+
default: N(() => [...a[20] || (a[20] = [
|
|
398
|
+
A("Done", -1)
|
|
399
|
+
])]),
|
|
400
|
+
_: 1
|
|
401
|
+
})
|
|
402
|
+
])) : (v(), k("div", Je, [
|
|
403
|
+
L($, {
|
|
404
|
+
hierarchy: "secondary",
|
|
405
|
+
size: "sm",
|
|
406
|
+
class: "am-btn am-btn-sec",
|
|
407
|
+
type: "button",
|
|
408
|
+
onClick: a[6] || (a[6] = (l) => e.modal.close())
|
|
409
|
+
}, {
|
|
410
|
+
default: N(() => [...a[17] || (a[17] = [
|
|
411
|
+
A("Cancel", -1)
|
|
412
|
+
])]),
|
|
413
|
+
_: 1
|
|
414
|
+
}),
|
|
415
|
+
e.modal.editingId.value ? D("", !0) : (v(), ae($, {
|
|
416
|
+
key: 0,
|
|
417
|
+
hierarchy: "secondary",
|
|
418
|
+
size: "sm",
|
|
419
|
+
class: "am-btn am-btn-sec",
|
|
420
|
+
type: "button",
|
|
421
|
+
disabled: !e.modal.canSave.value,
|
|
422
|
+
onClick: a[7] || (a[7] = (l) => e.modal.saveAndAnother())
|
|
423
|
+
}, {
|
|
424
|
+
default: N(() => [...a[18] || (a[18] = [
|
|
425
|
+
A(" Save & add another ", -1)
|
|
426
|
+
])]),
|
|
427
|
+
_: 1
|
|
428
|
+
}, 8, ["disabled"])),
|
|
429
|
+
L($, {
|
|
430
|
+
hierarchy: "primary",
|
|
431
|
+
size: "sm",
|
|
432
|
+
class: "am-btn am-btn-primary",
|
|
433
|
+
type: "button",
|
|
434
|
+
disabled: !e.modal.canSave.value,
|
|
435
|
+
onClick: a[8] || (a[8] = (l) => e.modal.save())
|
|
436
|
+
}, {
|
|
437
|
+
default: N(() => [
|
|
438
|
+
A(y(e.modal.editingId.value ? e.modal.saving.value ? "Saving…" : "Save changes" : e.modal.saving.value ? "Adding…" : "Add position"), 1)
|
|
439
|
+
]),
|
|
440
|
+
_: 1
|
|
441
|
+
}, 8, ["disabled"])
|
|
442
|
+
]))
|
|
443
|
+
])
|
|
444
|
+
])
|
|
445
|
+
])) : D("", !0);
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
export {
|
|
449
|
+
_e as _,
|
|
450
|
+
Ze as a,
|
|
451
|
+
Ye as u
|
|
452
|
+
};
|