@feedmepos/mf-hrm-portal 2.2.5-dev.5 → 2.2.5-dev.7
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-DqR6ouRS.js → ApprovalCodeList-dn-WwNAd.js} +4 -4
- package/dist/{AuditLogList-CG2BiQX6.js → AuditLogList-BqVp9fxD.js} +18 -17
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C7nMXx8R.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DnAet2oc.js} +2 -2
- package/dist/{EmployeeList-CGZzol7v.js → EmployeeList-BwTJre5k.js} +29 -27
- 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-D1fBv1KQ.js → GrantUserList-CZek1r4F.js} +5 -5
- package/dist/{Main-BOt-Y1wv.js → Main-CbmA-SYo.js} +9 -9
- package/dist/{Main-zg7fbEtx.js → Main-DVA51sj2.js} +2 -2
- package/dist/{Main-CFoZot3K.js → Main-MjSYZdOq.js} +5 -5
- package/dist/{PermissionSetList-bJpwD62u.js → PermissionSetList-lkHmXhNm.js} +11 -10
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C4C8Cvf4.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-cFQDQCal.js} +1174 -1173
- package/dist/{RoleList-DUVZ7dkO.js → RoleList-BSs0SmFo.js} +7 -7
- package/dist/ScheduleGeneralPage-DD9n2TUe.js +242 -0
- package/dist/SchedulePage-B0X97zVC.js +10761 -0
- package/dist/SchedulePositionPage-BXz1USn3.js +220 -0
- package/dist/ScheduleSelect.vue_vue_type_script_setup_true_lang-DAHke2rH.js +201 -0
- package/dist/SelectFilter-CG13h83-.js +264 -0
- package/dist/{TeamMemberList-DAnM-DSd.js → TeamMemberList-Dit_nV6d.js} +36 -34
- package/dist/{TimesheetList-5sdcWjEf.js → TimesheetList-B-FlRO7E.js} +54 -53
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-GhPw_mCW.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DZUJR8K_.js} +2 -2
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/{app-D-cQzgkr.js → app-BpnOPodL.js} +2947 -2362
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DqFS0ebn.js → dayjs.min-4GLfSOGZ.js} +1 -1
- package/dist/employee-ChdVnSmd.js +139 -0
- package/dist/index-CilJxsY7.js +70 -0
- package/dist/{iteration-BjW8Cs9e.js → index-DYoVJQTd.js} +698 -726
- package/dist/iteration-CcXrOMQe.js +30 -0
- package/dist/{lodash-wjhSWqez.js → lodash-CcFIMCiJ.js} +1 -1
- package/dist/{role-CEUcSmA6.js → role-OXCiWTVq.js} +4 -3
- package/dist/{rule-Df8LOhxm.js → rule-8iyCO_LZ.js} +71 -70
- package/dist/src/api/schedule/index.d.ts +44 -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/router/shared.d.ts +4 -1
- package/dist/src/types/schedule.d.ts +232 -0
- package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +4 -0
- package/dist/src/views/scheduling/SchedulePage.vue.d.ts +4 -0
- package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +4 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +6 -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 +6 -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/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 +6 -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/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/ScheduleLeaveEditModal.vue.d.ts +6 -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 +6 -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 +24 -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 +31 -0
- package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +6 -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 +14 -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 +16 -0
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +54 -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 +22 -0
- package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +67 -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-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/useScheduleAddEmployee.d.ts +86 -0
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +66 -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 +113 -0
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +136 -0
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +415 -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 +17 -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 +82 -0
- package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +68 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +45 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +139 -0
- package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +22 -0
- package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +32 -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 +80 -0
- package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +20 -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 +179 -0
- package/dist/src/views/scheduling/composables/useScheduleOpenShiftCard.d.ts +23 -0
- package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +19 -0
- package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +32 -0
- package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +91 -0
- package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +18 -0
- package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +183 -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 +225 -0
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +174 -0
- package/dist/src/views/scheduling/composables/useScheduleStaffRail.d.ts +20 -0
- package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +25 -0
- package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +44 -0
- package/dist/src/views/scheduling/composables/useScheduleTopbar.d.ts +10 -0
- package/dist/src/views/scheduling/data.d.ts +105 -0
- package/dist/src/views/scheduling/locales/index.d.ts +496 -0
- package/dist/src/views/scheduling/schedule-store.d.ts +116 -0
- package/dist/src/views/scheduling/types.d.ts +311 -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/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-4wm7pJcK.js → useReportPermissions-C3fuFTUC.js} +3 -3
- package/dist/useScheduleOutlet-TPZJHgSY.js +546 -0
- package/dist/useSchedulePositions-DCkaKHQm.js +103 -0
- package/package.json +1 -1
- package/dist/SelectFilter-ATOm0hdn.js +0 -269
- package/dist/employee-DvvnCQMK.js +0 -204
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ScheduleBoardApi } from './useScheduleBoard';
|
|
2
|
+
import type { ScheduleDemandApi } from './useScheduleDemand';
|
|
3
|
+
export interface ScheduleAddPickState {
|
|
4
|
+
open: boolean;
|
|
5
|
+
empId: number | null;
|
|
6
|
+
dayIdx: number | null;
|
|
7
|
+
left: number;
|
|
8
|
+
/** Only one of `top`/`bottom` is live at a time, picked by `openAbove` — anchoring from the
|
|
9
|
+
* bottom when flipped up lets the box grow with its own content (the query input plus
|
|
10
|
+
* however many pick-list rows there are) instead of a height guessed in JS. */
|
|
11
|
+
top: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
openAbove: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface ScheduleAddPickLeaveOption {
|
|
16
|
+
reason: string;
|
|
17
|
+
swatch: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ScheduleAddPickSuggestion {
|
|
20
|
+
start: string;
|
|
21
|
+
end: string;
|
|
22
|
+
short: number;
|
|
23
|
+
label: string;
|
|
24
|
+
title: string;
|
|
25
|
+
}
|
|
26
|
+
/** The "+ Add" quick-pick popover on an employee's empty cell — ported from the mockup's
|
|
27
|
+
* openAddShiftPicker()/renderAddPickList(), scoped to what this board actually has: our one
|
|
28
|
+
* active shift pattern, a fixed leave-reason list, and a demand-gap suggestion, all committed
|
|
29
|
+
* directly (no clash confirmation dialogs — this board has no such infrastructure yet, and none
|
|
30
|
+
* of its existing write paths gate on one either). Leave picks write a full-day approved leave
|
|
31
|
+
* immediately rather than opening a creation form — there's no "book a leave" authoring flow
|
|
32
|
+
* anywhere in this port yet, only the existing pending-request review modal, which assumes the
|
|
33
|
+
* leave already exists. The mockup's "On this day" (join an existing open-shift group) section is
|
|
34
|
+
* left out — it needs split-shift/group-joining machinery this board doesn't model. */
|
|
35
|
+
export declare function useScheduleAddPick(board: ScheduleBoardApi, demand: ScheduleDemandApi, handlers: {
|
|
36
|
+
onCommitted: (message: string) => void;
|
|
37
|
+
onOpenFullEditor: (empId: number, dayIdx: number) => void;
|
|
38
|
+
}): {
|
|
39
|
+
state: {
|
|
40
|
+
open: boolean;
|
|
41
|
+
empId: number | null;
|
|
42
|
+
dayIdx: number | null;
|
|
43
|
+
left: number;
|
|
44
|
+
top: number;
|
|
45
|
+
bottom: number;
|
|
46
|
+
openAbove: boolean;
|
|
47
|
+
};
|
|
48
|
+
query: import("vue").Ref<string, string>;
|
|
49
|
+
parsedRange: import("vue").ComputedRef<{
|
|
50
|
+
start: string;
|
|
51
|
+
end: string;
|
|
52
|
+
} | null>;
|
|
53
|
+
suggested: import("vue").ComputedRef<ScheduleAddPickSuggestion | null>;
|
|
54
|
+
filteredPatterns: import("vue").ComputedRef<import("../types").ShiftTemplate[]>;
|
|
55
|
+
filteredLeaves: import("vue").ComputedRef<ScheduleAddPickLeaveOption[]>;
|
|
56
|
+
hasResults: import("vue").ComputedRef<boolean>;
|
|
57
|
+
openFor: (empId: number, dayIdx: number, anchor: HTMLElement) => void;
|
|
58
|
+
close: () => void;
|
|
59
|
+
pickSuggested: () => void;
|
|
60
|
+
pickPattern: (key: string) => void;
|
|
61
|
+
pickTypedRange: (start: string, end: string) => void;
|
|
62
|
+
pickLeave: (reason: string) => void;
|
|
63
|
+
submitQuery: () => void;
|
|
64
|
+
openBlank: () => void;
|
|
65
|
+
};
|
|
66
|
+
export type ScheduleAddPickApi = ReturnType<typeof useScheduleAddPick>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Employee, OpenShift } from '../types';
|
|
2
|
+
import type { ScheduleBoardApi } from './useScheduleBoard';
|
|
3
|
+
export interface ScheduleShiftPart {
|
|
4
|
+
start: string;
|
|
5
|
+
end: string;
|
|
6
|
+
}
|
|
7
|
+
/** One shift on the All-shifts row, whichever way it was authored. A split shift is ONE
|
|
8
|
+
* entry carrying both of its periods — two periods one person works is one shift, and
|
|
9
|
+
* counting it twice made a day of three split shifts report as six. */
|
|
10
|
+
export interface ScheduleRowEntry {
|
|
11
|
+
/** Stable across redraws, so the row can be keyed on it. */
|
|
12
|
+
key: string;
|
|
13
|
+
kind: 'open' | 'emp';
|
|
14
|
+
/** The demand record this came from, when it came from one. */
|
|
15
|
+
open?: OpenShift;
|
|
16
|
+
/** Whoever holds it, or null while it is still asking for somebody. */
|
|
17
|
+
who: Employee | null;
|
|
18
|
+
parts: ScheduleShiftPart[];
|
|
19
|
+
position: string;
|
|
20
|
+
/** A shift with a name of its own ("Weekend cover"), distinct from its position. */
|
|
21
|
+
label?: string;
|
|
22
|
+
filled: boolean;
|
|
23
|
+
hours: number;
|
|
24
|
+
}
|
|
25
|
+
export interface ScheduleStackState {
|
|
26
|
+
open: boolean;
|
|
27
|
+
dayIdx: number | null;
|
|
28
|
+
left: number;
|
|
29
|
+
top: number;
|
|
30
|
+
}
|
|
31
|
+
/** The "Open shifts" row: a pseudo-row above the people holding the shifts nobody is on yet.
|
|
32
|
+
*
|
|
33
|
+
* It used to be the "All shifts" row and it used to LEAD this view, carrying every shift on
|
|
34
|
+
* the day whichever way it was authored. The coverage band has both of those now — and the
|
|
35
|
+
* band measures something this row could not, because a shift with nobody on it contributes
|
|
36
|
+
* zero to coverage, so counting untaken records was never an answer to "is this week staffed".
|
|
37
|
+
*
|
|
38
|
+
* What is left is the job only this row can do. An unassigned shift has no person, so the
|
|
39
|
+
* employee rows have nowhere to draw it; the old row would have shown it alongside every
|
|
40
|
+
* other shift, which is the same cards twice — once here and once on the row of whoever is on
|
|
41
|
+
* them. So the subject narrows to the shifts still waiting for somebody, and the row renders
|
|
42
|
+
* only while at least one exists. That makes it a to-do list rather than furniture: it appears
|
|
43
|
+
* when you author open demand and disappears the moment the last of it is staffed, which is
|
|
44
|
+
* the completion signal the old row had to paint itself green to fake. */
|
|
45
|
+
export declare function useScheduleAllShiftsRow(board: ScheduleBoardApi): {
|
|
46
|
+
dayEntries: (dayIdx: number) => ScheduleRowEntry[];
|
|
47
|
+
dayStack: (dayIdx: number) => {
|
|
48
|
+
entries: ScheduleRowEntry[];
|
|
49
|
+
done: number;
|
|
50
|
+
total: number;
|
|
51
|
+
hours: number;
|
|
52
|
+
allOpen: boolean;
|
|
53
|
+
mixShown: {
|
|
54
|
+
name: string;
|
|
55
|
+
n: number;
|
|
56
|
+
}[];
|
|
57
|
+
mixRest: number;
|
|
58
|
+
title: string;
|
|
59
|
+
};
|
|
60
|
+
summary: import("vue").ComputedRef<{
|
|
61
|
+
count: number;
|
|
62
|
+
meta: string;
|
|
63
|
+
tip: string;
|
|
64
|
+
}>;
|
|
65
|
+
hasPending: import("vue").ComputedRef<boolean>;
|
|
66
|
+
stack: {
|
|
67
|
+
open: boolean;
|
|
68
|
+
dayIdx: number | null;
|
|
69
|
+
left: number;
|
|
70
|
+
top: number;
|
|
71
|
+
};
|
|
72
|
+
stackEntries: import("vue").ComputedRef<ScheduleRowEntry[]>;
|
|
73
|
+
openStack: (dayIdx: number, anchor: HTMLElement) => void;
|
|
74
|
+
closeStack: () => void;
|
|
75
|
+
whenOf: (e: ScheduleRowEntry) => string;
|
|
76
|
+
};
|
|
77
|
+
export type ScheduleAllShiftsRowApi = ReturnType<typeof useScheduleAllShiftsRow>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ScheduleBoardApi } from './useScheduleBoard';
|
|
2
|
+
import type { Employee, WorkSlot } from '../types';
|
|
3
|
+
export interface ScheduleAssignedSlot {
|
|
4
|
+
emp: Employee;
|
|
5
|
+
slot: WorkSlot;
|
|
6
|
+
}
|
|
7
|
+
export interface SchedulePositionCellMeta {
|
|
8
|
+
required: number;
|
|
9
|
+
filled: number;
|
|
10
|
+
open: number;
|
|
11
|
+
short: number;
|
|
12
|
+
}
|
|
13
|
+
/** Shared by the week and day area views, so a position's colour never disagrees between them. */
|
|
14
|
+
export declare function positionSwatchClass(position: string): string;
|
|
15
|
+
/** Whether this employee can be put on `position` — ported from the mockup's qualifiedFor().
|
|
16
|
+
* Nobody having a named position yet reads as "any station", the same way an unspecialised
|
|
17
|
+
* new-account roster does in the reference: rostering shouldn't be blocked on the Positions
|
|
18
|
+
* page being filled in first. */
|
|
19
|
+
export declare function qualifiedFor(emp: Employee, position: string): boolean;
|
|
20
|
+
/** Week-by-area grouping: rows are positions (a RULES.coverage.full key), not employees.
|
|
21
|
+
* Ported from the mockup's positionRows()/renderPositionBlock() — scoped to this board's single
|
|
22
|
+
* "Unassigned" section and its existing WorkSlot/OpenShift model, so no split shifts and
|
|
23
|
+
* no locked/closed-day states (neither exists anywhere in this port yet). */
|
|
24
|
+
export declare function useScheduleAreaBoard(board: ScheduleBoardApi): {
|
|
25
|
+
positionRows: import("vue").ComputedRef<string[]>;
|
|
26
|
+
assignedOn: (dayIdx: number, position: string) => ScheduleAssignedSlot[];
|
|
27
|
+
unfilledOpenShiftsOn: (dayIdx: number, position: string) => {
|
|
28
|
+
id: number;
|
|
29
|
+
dayIdx: number;
|
|
30
|
+
position: string;
|
|
31
|
+
required: number;
|
|
32
|
+
filledBy: number | null;
|
|
33
|
+
sen?: "junior" | "senior" | undefined;
|
|
34
|
+
empType?: "full" | "part" | undefined;
|
|
35
|
+
name?: string | undefined;
|
|
36
|
+
start: string;
|
|
37
|
+
end: string;
|
|
38
|
+
breakMins?: number | undefined;
|
|
39
|
+
}[];
|
|
40
|
+
poolFor: (position: string) => Employee[];
|
|
41
|
+
cellMeta: (dayIdx: number, position: string) => SchedulePositionCellMeta;
|
|
42
|
+
positionWeekMeta: (position: string) => {
|
|
43
|
+
required: number;
|
|
44
|
+
filled: number;
|
|
45
|
+
open: number;
|
|
46
|
+
short: number;
|
|
47
|
+
pool: number;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export type ScheduleAreaBoardApi = ReturnType<typeof useScheduleAreaBoard>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ScheduleBoardApi } from './useScheduleBoard';
|
|
2
|
+
import type { ScheduleAreaBoardApi } from './useScheduleAreaBoard';
|
|
3
|
+
/** Dragging a person from the staff rail onto a position/day cell — ported from the mockup's
|
|
4
|
+
* dropStaffOnCell(), scoped to this board's model (no "unspecialised, so ask what they can
|
|
5
|
+
* do" grant flow, no split shifts): dropping fills an existing open shift for that position/day
|
|
6
|
+
* if there is one, otherwise opens the shift editor pre-filled with this person, day and
|
|
7
|
+
* position so the manager sets the hours. */
|
|
8
|
+
export declare function useScheduleAreaDragDrop(board: ScheduleBoardApi, areaBoard: ScheduleAreaBoardApi, handlers: {
|
|
9
|
+
onFillOpenShift: (openId: number, empId: number) => void;
|
|
10
|
+
onCreateShift: (empId: number, dayIdx: number, position: string) => void;
|
|
11
|
+
onNotQualified: (empName: string, position: string) => void;
|
|
12
|
+
}): {
|
|
13
|
+
draggingEmpId: import("vue").Ref<number | null, number | null>;
|
|
14
|
+
startRailDrag: (empId: number) => void;
|
|
15
|
+
endRailDrag: () => void;
|
|
16
|
+
dropOnCell: (dayIdx: number, position: string) => void;
|
|
17
|
+
};
|
|
18
|
+
export type ScheduleAreaDragDropApi = ReturnType<typeof useScheduleAreaDragDrop>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { ScheduleBoardApi } from './useScheduleBoard';
|
|
2
|
+
import type { ScheduleClashDetectionApi } from './useScheduleClashDetection';
|
|
3
|
+
import type { ScheduleDemandApi } from './useScheduleDemand';
|
|
4
|
+
/** What this sitting is trying to fill — an on-screen open-shift row (never backed by a
|
|
5
|
+
* persisted Shift doc; `openShiftId` only ever identifies it within this session) or a raw
|
|
6
|
+
* demand gap. Either way the assignment created is a plain one-off, same shape as the +Add
|
|
7
|
+
* popover's — nothing here carries a shift/assignment linkage back to the server. */
|
|
8
|
+
export interface ScheduleAssignTarget {
|
|
9
|
+
dayIdx: number;
|
|
10
|
+
position: string;
|
|
11
|
+
start: string;
|
|
12
|
+
end: string;
|
|
13
|
+
breakMins?: number;
|
|
14
|
+
openShiftId?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ScheduleAssignState {
|
|
17
|
+
open: boolean;
|
|
18
|
+
target: ScheduleAssignTarget | null;
|
|
19
|
+
/** How many heads this sitting is answering, and how many it has landed so far — the
|
|
20
|
+
* footer's "N still needed" note. Tracked locally rather than re-derived from
|
|
21
|
+
* `demand.coverageSegments` on every assign: a fresh assign can reshape segment boundaries
|
|
22
|
+
* entirely (met/short is a function of ALL current coverage, not just this one target), so a
|
|
23
|
+
* simple running count is the honest thing to show without re-deriving segment math here. */
|
|
24
|
+
required: number;
|
|
25
|
+
scheduled: number;
|
|
26
|
+
}
|
|
27
|
+
/** `free` — no shift that day, the ordinary case. `busy` — has a shift, but this is the
|
|
28
|
+
* manager's call to override (soft clash, asks first). `leave` — approved leave, a hard block:
|
|
29
|
+
* inert, not something a second tap should be able to push past. `mine` — already the one
|
|
30
|
+
* filling THIS open shift; only meaningful when the target has an `openShiftId` (a demand gap
|
|
31
|
+
* has no single "holder"), and the tile becomes the unassign control instead. */
|
|
32
|
+
export type ScheduleAssignTileState = 'free' | 'busy' | 'leave' | 'mine';
|
|
33
|
+
export interface ScheduleAssignTile {
|
|
34
|
+
id: number;
|
|
35
|
+
name: string;
|
|
36
|
+
initials: string;
|
|
37
|
+
weekHours: number;
|
|
38
|
+
cap: number;
|
|
39
|
+
over: boolean;
|
|
40
|
+
state: ScheduleAssignTileState;
|
|
41
|
+
title: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ScheduleAssignGroup {
|
|
44
|
+
label: string;
|
|
45
|
+
tiles: ScheduleAssignTile[];
|
|
46
|
+
}
|
|
47
|
+
/** One entry in the day's shift rail — either the thing this sitting was opened to answer (the
|
|
48
|
+
* ORIGIN, always first), or another shift already on the same day, so a manager can jump to
|
|
49
|
+
* reassigning it without leaving the panel. Every entry is a `target` the tile grid can be
|
|
50
|
+
* pointed at via `switchTo`. */
|
|
51
|
+
export interface ScheduleAssignSlot {
|
|
52
|
+
key: string;
|
|
53
|
+
position: string;
|
|
54
|
+
start: string;
|
|
55
|
+
end: string;
|
|
56
|
+
chip: string;
|
|
57
|
+
full: boolean;
|
|
58
|
+
sub: string;
|
|
59
|
+
who: string;
|
|
60
|
+
whoNone: boolean;
|
|
61
|
+
on: boolean;
|
|
62
|
+
target: ScheduleAssignTarget;
|
|
63
|
+
required: number;
|
|
64
|
+
scheduled: number;
|
|
65
|
+
}
|
|
66
|
+
/** Assign panel — the one modal both the open-shifts row and a demand gap's "Assign employee"
|
|
67
|
+
* button open, per the reference's own note that they are "the same assign panel". Every pick
|
|
68
|
+
* lands immediately (through the canonical `commitShift` mutator, so it persists exactly like
|
|
69
|
+
* any other assignment); a soft clash — the person already has a shift that day — asks first via
|
|
70
|
+
* the shared clash-confirmation dialog, and approved leave is a hard block the tile itself
|
|
71
|
+
* refuses rather than asking about. */
|
|
72
|
+
export declare function useScheduleAssign(board: ScheduleBoardApi, demand: ScheduleDemandApi, clash: ScheduleClashDetectionApi): {
|
|
73
|
+
state: {
|
|
74
|
+
open: boolean;
|
|
75
|
+
target: {
|
|
76
|
+
dayIdx: number;
|
|
77
|
+
position: string;
|
|
78
|
+
start: string;
|
|
79
|
+
end: string;
|
|
80
|
+
breakMins?: number | undefined;
|
|
81
|
+
openShiftId?: number | undefined;
|
|
82
|
+
} | null;
|
|
83
|
+
required: number;
|
|
84
|
+
scheduled: number;
|
|
85
|
+
};
|
|
86
|
+
search: import("vue").Ref<string, string>;
|
|
87
|
+
activeOpenShift: import("vue").ComputedRef<{
|
|
88
|
+
id: number;
|
|
89
|
+
dayIdx: number;
|
|
90
|
+
position: string;
|
|
91
|
+
required: number;
|
|
92
|
+
filledBy: number | null;
|
|
93
|
+
sen?: "junior" | "senior" | undefined;
|
|
94
|
+
empType?: "full" | "part" | undefined;
|
|
95
|
+
name?: string | undefined;
|
|
96
|
+
start: string;
|
|
97
|
+
end: string;
|
|
98
|
+
breakMins?: number | undefined;
|
|
99
|
+
} | null>;
|
|
100
|
+
title: import("vue").ComputedRef<string>;
|
|
101
|
+
sub: import("vue").ComputedRef<string>;
|
|
102
|
+
footLead: import("vue").ComputedRef<string>;
|
|
103
|
+
footRest: import("vue").ComputedRef<string>;
|
|
104
|
+
groups: import("vue").ComputedRef<ScheduleAssignGroup[]>;
|
|
105
|
+
shiftSlots: import("vue").ComputedRef<ScheduleAssignSlot[]>;
|
|
106
|
+
switchTo: (slot: ScheduleAssignSlot) => void;
|
|
107
|
+
openFor: (openShiftId: number) => void;
|
|
108
|
+
openForGap: (dayIdx: number, position: string, start: string, end: string, required: number, scheduled: number, gapFrom: number, gapTo: number) => void;
|
|
109
|
+
close: () => void;
|
|
110
|
+
fillOpenShift: (openShiftId: number, empId: number) => void;
|
|
111
|
+
armAssign: (empId: number) => void;
|
|
112
|
+
};
|
|
113
|
+
export type ScheduleAssignApi = ReturnType<typeof useScheduleAssign>;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { FdtoScheduleAutoScheduleObjective, FdtoScheduleAutoScheduleResult } from '@/types/schedule';
|
|
2
|
+
import type { Proposal } from '../types';
|
|
3
|
+
import type { ScheduleBoardApi } from './useScheduleBoard';
|
|
4
|
+
import type { ScheduleDemandApi } from './useScheduleDemand';
|
|
5
|
+
export type ScheduleAutoScheduleStep = 'options' | 'summary';
|
|
6
|
+
export interface ScheduleAutoScheduleOptions {
|
|
7
|
+
fillGaps: boolean;
|
|
8
|
+
objective: FdtoScheduleAutoScheduleObjective;
|
|
9
|
+
allowOvertime: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Backend-powered draft generation and local proposal review. Generation never writes;
|
|
12
|
+
* accepted proposals use the board's existing assignment persistence path. */
|
|
13
|
+
export declare function useScheduleAutoSchedule(board: ScheduleBoardApi, demand: ScheduleDemandApi): {
|
|
14
|
+
wizardOpen: import("vue").Ref<boolean, boolean>;
|
|
15
|
+
step: import("vue").Ref<ScheduleAutoScheduleStep, ScheduleAutoScheduleStep>;
|
|
16
|
+
options: {
|
|
17
|
+
fillGaps: boolean;
|
|
18
|
+
objective: FdtoScheduleAutoScheduleObjective;
|
|
19
|
+
allowOvertime: boolean;
|
|
20
|
+
};
|
|
21
|
+
generating: import("vue").Ref<boolean, boolean>;
|
|
22
|
+
generateError: import("vue").Ref<string | null, string | null>;
|
|
23
|
+
result: import("vue").Ref<{
|
|
24
|
+
proposals: {
|
|
25
|
+
employeeId: string;
|
|
26
|
+
date: string;
|
|
27
|
+
startTime: string;
|
|
28
|
+
endTime: string;
|
|
29
|
+
position: string;
|
|
30
|
+
}[];
|
|
31
|
+
unfilledCount: number;
|
|
32
|
+
metrics: {
|
|
33
|
+
minimumCoveragePercent: number;
|
|
34
|
+
recommendedCoveragePercent: number;
|
|
35
|
+
totalHours: number;
|
|
36
|
+
estimatedLabourCost: number | null;
|
|
37
|
+
costCoveragePercent: number;
|
|
38
|
+
overtimeHours: number;
|
|
39
|
+
targetHoursVariance: number;
|
|
40
|
+
unfilledIntervals: number;
|
|
41
|
+
};
|
|
42
|
+
readiness: {
|
|
43
|
+
ready: boolean;
|
|
44
|
+
capabilities: string[];
|
|
45
|
+
issues: {
|
|
46
|
+
code: string;
|
|
47
|
+
severity: "BLOCKER" | "WARNING" | "INFO";
|
|
48
|
+
message: string;
|
|
49
|
+
}[];
|
|
50
|
+
coverage: {
|
|
51
|
+
position: number;
|
|
52
|
+
availability: number;
|
|
53
|
+
wage: number;
|
|
54
|
+
targetHours: number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
explanations: string[];
|
|
58
|
+
solver: string;
|
|
59
|
+
} | null, FdtoScheduleAutoScheduleResult | {
|
|
60
|
+
proposals: {
|
|
61
|
+
employeeId: string;
|
|
62
|
+
date: string;
|
|
63
|
+
startTime: string;
|
|
64
|
+
endTime: string;
|
|
65
|
+
position: string;
|
|
66
|
+
}[];
|
|
67
|
+
unfilledCount: number;
|
|
68
|
+
metrics: {
|
|
69
|
+
minimumCoveragePercent: number;
|
|
70
|
+
recommendedCoveragePercent: number;
|
|
71
|
+
totalHours: number;
|
|
72
|
+
estimatedLabourCost: number | null;
|
|
73
|
+
costCoveragePercent: number;
|
|
74
|
+
overtimeHours: number;
|
|
75
|
+
targetHoursVariance: number;
|
|
76
|
+
unfilledIntervals: number;
|
|
77
|
+
};
|
|
78
|
+
readiness: {
|
|
79
|
+
ready: boolean;
|
|
80
|
+
capabilities: string[];
|
|
81
|
+
issues: {
|
|
82
|
+
code: string;
|
|
83
|
+
severity: "BLOCKER" | "WARNING" | "INFO";
|
|
84
|
+
message: string;
|
|
85
|
+
}[];
|
|
86
|
+
coverage: {
|
|
87
|
+
position: number;
|
|
88
|
+
availability: number;
|
|
89
|
+
wage: number;
|
|
90
|
+
targetHours: number;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
explanations: string[];
|
|
94
|
+
solver: string;
|
|
95
|
+
} | null>;
|
|
96
|
+
gapCount: import("vue").ComputedRef<number>;
|
|
97
|
+
openWizard: () => void;
|
|
98
|
+
closeWizard: () => void;
|
|
99
|
+
next: () => void;
|
|
100
|
+
back: () => void;
|
|
101
|
+
generate: () => Promise<void>;
|
|
102
|
+
reviewMode: import("vue").Ref<boolean, boolean>;
|
|
103
|
+
proposals: import("vue").Ref<{
|
|
104
|
+
id: number;
|
|
105
|
+
empId: number;
|
|
106
|
+
dayIdx: number;
|
|
107
|
+
start: string;
|
|
108
|
+
end: string;
|
|
109
|
+
role: string;
|
|
110
|
+
openId?: number | undefined;
|
|
111
|
+
status: "pending" | "rejected";
|
|
112
|
+
}[], Proposal[] | {
|
|
113
|
+
id: number;
|
|
114
|
+
empId: number;
|
|
115
|
+
dayIdx: number;
|
|
116
|
+
start: string;
|
|
117
|
+
end: string;
|
|
118
|
+
role: string;
|
|
119
|
+
openId?: number | undefined;
|
|
120
|
+
status: "pending" | "rejected";
|
|
121
|
+
}[]>;
|
|
122
|
+
unmetCount: import("vue").Ref<number, number>;
|
|
123
|
+
acceptedCount: import("vue").ComputedRef<number>;
|
|
124
|
+
rejectedCount: import("vue").ComputedRef<number>;
|
|
125
|
+
removedCount: import("vue").ComputedRef<number>;
|
|
126
|
+
changedCount: import("vue").ComputedRef<number>;
|
|
127
|
+
unqualifiedCount: import("vue").ComputedRef<number>;
|
|
128
|
+
conflictCount: import("vue").ComputedRef<number>;
|
|
129
|
+
projectedCost: import("vue").ComputedRef<number | null>;
|
|
130
|
+
proposalAt: (empId: number, dayIdx: number) => Proposal | undefined;
|
|
131
|
+
toggleReject: (id: number) => void;
|
|
132
|
+
rejectAll: () => void;
|
|
133
|
+
exitReview: () => void;
|
|
134
|
+
apply: () => number;
|
|
135
|
+
};
|
|
136
|
+
export type ScheduleAutoScheduleApi = ReturnType<typeof useScheduleAutoSchedule>;
|