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