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