@feedmepos/mf-hrm-portal 2.2.5-dev → 2.2.5-dev.10
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-DgcWZ3SZ.js → ApprovalCodeList-BsDMMSIz.js} +4 -4
- package/dist/{AuditLogList-vWKMMGvd.js → AuditLogList-CGNZdtmn.js} +18 -17
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DuhXogXK.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C6MoToqi.js} +2 -2
- package/dist/EmployeeList-B_OuDWWQ.js +787 -0
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js → FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js} +1 -1
- package/dist/{GrantUserList-BAW0C1bA.js → GrantUserList-Bd0lXmFo.js} +5 -5
- package/dist/{Main-NzpdRNB3.js → Main-B66lSeOv.js} +5 -5
- package/dist/{Main-Wr6cTqfM.js → Main-CzHSNHsH.js} +2 -2
- package/dist/{Main-B7Nn8CLQ.js → Main-njRQ1tFk.js} +9 -9
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
- package/dist/{PermissionSetList-D6AFOleD.js → PermissionSetList-GTI6Cwj5.js} +18 -18
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bzq2_BMn.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C-QEQ-js.js} +1052 -1052
- package/dist/{RoleList-BuqpmXn_.js → RoleList-CmHgtM0m.js} +7 -7
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-SFqxftRx.js +426 -0
- package/dist/ScheduleButton.vue_vue_type_script_setup_true_lang-CrWfo-zF.js +690 -0
- package/dist/ScheduleGeneralPage-DxFxJN5j.js +320 -0
- package/dist/SchedulePage-cJDI3-E7.js +14647 -0
- package/dist/SchedulePositionPage-n1wUShIM.js +293 -0
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-B8W4sTsA.js +242 -0
- package/dist/SelectFilter-CG13h83-.js +264 -0
- package/dist/TeamMemberList-ByZt3VqN.js +1154 -0
- package/dist/{TimesheetList-B5FyVyCz.js → TimesheetList-Dv0-W--W.js} +54 -53
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-C99Jr6Ax.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIo6h5-a.js} +2 -2
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/{app-8samJY5z.js → app-SCXGJ95F.js} +3146 -2553
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-Ba4X_9nY.js → dayjs.min-DqMLPYv-.js} +1 -1
- package/dist/{employee-BcFgm8Rt.js → employee-DT_xYQkz.js} +3 -3
- package/dist/{iteration-Dhdew1jW.js → iteration-B5dB9ecy.js} +1 -1
- package/dist/{lodash-CJ3mHku0.js → lodash-CRHFapxI.js} +1 -1
- package/dist/{role-BViYS7RK.js → role-CJm8pXaw.js} +1 -1
- package/dist/{rule-Dxt1ZSQS.js → rule-AJm-eVzJ.js} +276 -272
- package/dist/src/api/schedule/index.d.ts +41 -0
- package/dist/src/components/form/OutletRoleAssignment.vue.d.ts +16 -0
- package/dist/src/components/layout/AppSidebar.vue.d.ts +2 -0
- package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
- package/dist/src/components/layout/withShell.d.ts +14 -0
- package/dist/src/helpers/outlet-role-assignment.d.ts +40 -0
- package/dist/src/helpers/rule.d.ts +15 -0
- package/dist/src/router/shared.d.ts +4 -1
- package/dist/src/types/schedule.d.ts +232 -0
- package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
- package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
- package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAllShiftsRow.vue.d.ts +22 -0
- package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +34 -0
- package/dist/src/views/scheduling/components/ScheduleAssignEmployeePopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
- package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +24 -0
- package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
- package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
- package/dist/src/views/scheduling/components/ScheduleEmployeeMenu.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
- package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
- package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
- package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleLegendBar.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
- package/dist/src/views/scheduling/components/ScheduleOpenShiftCardMenu.vue.d.ts +14 -0
- package/dist/src/views/scheduling/components/SchedulePdfPreview.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +54 -0
- package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleShiftCardMenu.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
- package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
- package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
- package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
- package/dist/src/views/scheduling/components/ScheduleStackPopover.vue.d.ts +14 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +18 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +60 -0
- package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
- package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
- package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
- package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +72 -0
- package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +38 -0
- package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +29 -0
- package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
- package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
- package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +14 -0
- package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +10 -0
- package/dist/src/views/scheduling/composables/scheduleAutoSolver.d.ts +21 -0
- package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +98 -0
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +73 -0
- package/dist/src/views/scheduling/composables/useScheduleAllShiftsRow.d.ts +77 -0
- package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
- package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +122 -0
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +143 -0
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +426 -0
- package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
- package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +19 -0
- package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +43 -0
- package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +48 -0
- package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +77 -0
- package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +76 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +45 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +145 -0
- package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +22 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +41 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +35 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
- package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +26 -0
- package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
- package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +82 -0
- package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +70 -0
- package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
- package/dist/src/views/scheduling/composables/useScheduleLegendBar.d.ts +35 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1316 -0
- package/dist/src/views/scheduling/composables/useScheduleOpenShiftCard.d.ts +23 -0
- package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +20 -0
- package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +50 -0
- package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +32 -0
- package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +93 -0
- package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
- package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +189 -0
- package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +54 -0
- package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +163 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +181 -0
- package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +23 -0
- package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +25 -0
- package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
- package/dist/src/views/scheduling/composables/useScheduleTopbar.d.ts +10 -0
- package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
- package/dist/src/views/scheduling/data.d.ts +110 -0
- package/dist/src/views/scheduling/locales/index.d.ts +496 -0
- package/dist/src/views/scheduling/schedule-store.d.ts +151 -0
- package/dist/src/views/scheduling/types.d.ts +324 -0
- package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
- package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
- package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +12 -3
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-BiyAfGvZ.js → useReportPermissions-Cg3lV70m.js} +3 -3
- package/package.json +1 -1
- package/dist/EmployeeList-Cu4RxVQX.js +0 -889
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-BUI0Xsgc.js +0 -85
- package/dist/SelectFilter-ATOm0hdn.js +0 -269
- package/dist/TeamMemberList-M6HA9BWu.js +0 -1248
|
@@ -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 "./iteration-
|
|
2
|
+
import { e as D } from "./iteration-B5dB9ecy.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-SCXGJ95F.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-AJm-eVzJ.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-CJm8pXaw.js";
|
|
11
|
+
import { u as Ne } from "./useReportPermissions-Cg3lV70m.js";
|
|
12
|
+
import { l as re } from "./lodash-CRHFapxI.js";
|
|
13
|
+
import { u as ds, _ as ps, a as Le } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C6MoToqi.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 X, normalizeClass as Y, toDisplayString as m, createTextVNode as x, Fragment as Z, renderList as oe } from "vue";
|
|
2
|
+
import { X as R, a as ie, Y as de, Z as ue, $ as _, e as J, a0 as re, j as me, p as Q, _ as S } from "./ScheduleButton.vue_vue_type_script_setup_true_lang-CrWfo-zF.js";
|
|
3
|
+
function W() {
|
|
4
|
+
return R.map((a) => ({ id: a.id, name: a.name }));
|
|
5
|
+
}
|
|
6
|
+
function je() {
|
|
7
|
+
const a = d(W());
|
|
8
|
+
ee(
|
|
9
|
+
() => R.map((s) => `${s.id}:${s.name}`).join(" "),
|
|
10
|
+
() => {
|
|
11
|
+
a.value = W();
|
|
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 L(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 O() {
|
|
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 F(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 K = C(() => a.value.length);
|
|
79
|
+
return {
|
|
80
|
+
positions: a,
|
|
81
|
+
count: K,
|
|
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: L,
|
|
94
|
+
cancelEdit: O,
|
|
95
|
+
saveEdit: z,
|
|
96
|
+
askDelete: j,
|
|
97
|
+
cancelDelete: B,
|
|
98
|
+
confirmDelete: F
|
|
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 = J.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)), L = C(
|
|
126
|
+
() => !!I.value && R.some((n) => n.name.toLowerCase() === I.value.toLowerCase())
|
|
127
|
+
), O = C(() => !!I.value && !L.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 F(n) {
|
|
138
|
+
i[n] = !i[n];
|
|
139
|
+
}
|
|
140
|
+
function K() {
|
|
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 (!O.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 = J.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: Q(n) },
|
|
159
|
+
secondaryPositions: (T ? [...q, n] : q).map((A) => Q(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: L,
|
|
190
|
+
canSave: O,
|
|
191
|
+
openNew: j,
|
|
192
|
+
close: B,
|
|
193
|
+
toggle: F,
|
|
194
|
+
toggleAll: K,
|
|
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
|
+
}, Le = {
|
|
217
|
+
key: 1,
|
|
218
|
+
class: "am-foot-btns"
|
|
219
|
+
}, Fe = /* @__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: "sch-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
|
+
[X, a.modal.name.value]
|
|
289
|
+
]),
|
|
290
|
+
t("div", {
|
|
291
|
+
class: Y(["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: "sch-input ce-input asg-search",
|
|
314
|
+
placeholder: "Search team…",
|
|
315
|
+
autocomplete: "off"
|
|
316
|
+
}, null, 512), [
|
|
317
|
+
[X, a.modal.search.value]
|
|
318
|
+
]),
|
|
319
|
+
t("div", we, [
|
|
320
|
+
(y(!0), f(Z, 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: "sch-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(Z, { 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: Y(["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", Le, [
|
|
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
|
+
Fe as _,
|
|
424
|
+
Be as a,
|
|
425
|
+
je as u
|
|
426
|
+
};
|