@feedmepos/mf-hrm-portal 2.3.0-dev.2 → 2.3.0-dev.20

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.
Files changed (126) hide show
  1. package/dist/{ApprovalCodeList-CJaNPHZC.js → ApprovalCodeList-ChZm8Cqn.js} +7 -7
  2. package/dist/{AuditLogList-CHA98ZqW.js → AuditLogList-DNb_HY2b.js} +18 -19
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C7rvthEI.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C1FZLRtw.js} +2 -2
  4. package/dist/{EmployeeList-CVmMKt71.js → EmployeeList-D0_eAXnx.js} +255 -266
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js → FormItem.vue_vue_type_script_setup_true_lang-DZEUOnX-.js} +6 -6
  6. package/dist/{GrantUserList-MYjgt5-F.js → GrantUserList-HHl1a4dz.js} +8 -8
  7. package/dist/{Main-BgB9lD4K.js → Main-B35_MSKW.js} +11 -11
  8. package/dist/{Main-C0cnqQ3B.js → Main-DFk9nc3J.js} +8 -8
  9. package/dist/{Main-hlcHtrsc.js → Main-DMsmgQyL.js} +5 -5
  10. package/dist/{PermissionSetList-5f1WIaVa.js → PermissionSetList-CglEdefD.js} +19 -18
  11. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CFoTAGIX.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-9tG8k0mR.js} +1011 -1011
  12. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-fe-Rdwn4.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js} +1 -1
  13. package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
  14. package/dist/{RoleList-DNR4miXr.js → RoleList-_UsStsN7.js} +21 -20
  15. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DYhMssqd.js +530 -0
  16. package/dist/ScheduleGeneralPage-CP3Vb4XJ.js +776 -0
  17. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-B_OqKDw_.js +2439 -0
  18. package/dist/SchedulePage-5cbZyAow.js +19250 -0
  19. package/dist/{SchedulePositionPage-DyRckyUx.js → SchedulePositionPage-DwgNOVe8.js} +78 -80
  20. package/dist/{SelectFilter-CG13h83-.js → SelectFilter-BWM2fbe4.js} +1 -1
  21. package/dist/{TeamMemberList-mw5OveZG.js → TeamMemberList-CiYROtup.js} +27 -27
  22. package/dist/{TimesheetList-BzXarZbM.js → TimesheetList-ohxQpGBt.js} +52 -53
  23. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-Dq5i4poN.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CHgKOFjZ.js} +3 -3
  24. package/dist/{app-DSsdRLHg.js → app-hqb3iLmH.js} +2891 -2474
  25. package/dist/app.js +1 -1
  26. package/dist/{approval-code-C9DmR4Md.js → approval-code-BXUiojPH.js} +1 -1
  27. package/dist/{dayjs.min-B6xBXQtU.js → dayjs.min-jdSYngTL.js} +1 -1
  28. package/dist/{employee-hMhzuqk1.js → employee-DQksdva7.js} +4 -4
  29. package/dist/{grant-user-Bv-pJ9Wt.js → grant-user-CBJ3gEgW.js} +1 -1
  30. package/dist/{iteration-B34AvpNC.js → iteration-Ws9RBh0x.js} +1 -1
  31. package/dist/{lodash-1Vyuy7Mu.js → lodash-Db0CBH2I.js} +1 -1
  32. package/dist/object-Dwyg2LgX.js +16 -0
  33. package/dist/{restaurant-D7PEQjPY.js → restaurant-D2mfKHaH.js} +48 -48
  34. package/dist/{role-DKOrgO6f.js → role-C5BIFEPz.js} +2 -2
  35. package/dist/{rule-CBzQ3GeV.js → rule-CU0v7pCG.js} +3 -3
  36. package/dist/src/api/schedule/index.d.ts +9 -1
  37. package/dist/src/components/layout/SchedulePromoBanner.vue.d.ts +2 -0
  38. package/dist/src/composables/useDiscardConfirm.d.ts +3 -1
  39. package/dist/src/types/schedule.d.ts +3 -4
  40. package/dist/src/views/audit-log/locales/index.d.ts +252 -0
  41. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +4 -8
  42. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +1 -4
  43. package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +0 -2
  44. package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +0 -7
  45. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +5 -0
  46. package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +0 -6
  47. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +1 -0
  48. package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +0 -1
  49. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +4 -1
  50. package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +1 -5
  51. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +5 -0
  52. package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +0 -1
  53. package/dist/src/views/scheduling/components/{ScheduleAssignEmployeePopover.vue.d.ts → ScheduleOnboardingAssignPositionModal.vue.d.ts} +2 -2
  54. package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +6 -0
  55. package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +2 -0
  56. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +10 -0
  57. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +0 -10
  58. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +2 -1
  59. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +4 -2
  60. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +12 -8
  61. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +4 -0
  62. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +1 -3
  63. package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +13 -1
  64. package/dist/src/views/scheduling/composables/schedule-error.d.ts +3 -0
  65. package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +22 -0
  66. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +3 -0
  67. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +6 -0
  68. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +29 -11
  69. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +3 -11
  70. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +0 -13
  71. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +2 -9
  72. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +11 -3
  73. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +84 -11
  74. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +3 -10
  75. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +13 -1
  76. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +0 -1
  77. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +16 -5
  78. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +3 -5
  79. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +13 -3
  80. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +1 -0
  81. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +20 -7
  82. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +1 -1
  83. package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +5 -1
  84. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +5 -0
  85. package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +2 -2
  86. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +2 -0
  87. package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +1 -1
  88. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +47 -3
  89. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +406 -29
  90. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +11 -8
  91. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +3 -1
  92. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +1 -0
  93. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +0 -4
  94. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +1 -0
  95. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +7 -1
  96. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +2 -0
  97. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +70 -4
  98. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +7 -2
  99. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +2 -2
  100. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +41 -3
  101. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -0
  102. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +47 -6
  103. package/dist/src/views/scheduling/country-rules/index.d.ts +9 -4
  104. package/dist/src/views/scheduling/data.d.ts +22 -1
  105. package/dist/src/views/scheduling/locales/index.d.ts +28 -0
  106. package/dist/src/views/scheduling/schedule-state.d.ts +272 -208
  107. package/dist/src/views/scheduling/schedule-store.d.ts +36 -11
  108. package/dist/src/views/scheduling/types.d.ts +29 -5
  109. package/dist/style.css +1 -1
  110. package/dist/tsconfig.app.tsbuildinfo +1 -1
  111. package/dist/{useAppStore-d_nHyK5u.js → useAppStore-DZCdxlCd.js} +1 -1
  112. package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
  113. package/dist/{useLoading-JFoghhRz.js → useLoading-Nygx2zn8.js} +1 -1
  114. package/dist/{useReportPermissions-B2ev0j4w.js → useReportPermissions-DeJMpuw7.js} +3 -3
  115. package/package.json +1 -1
  116. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B4VUyKW3.js +0 -470
  117. package/dist/ScheduleGeneralPage-Cd5AlY4z.js +0 -666
  118. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-Cf0l2MRg.js +0 -2188
  119. package/dist/SchedulePage-C8m0-m3l.js +0 -18257
  120. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  121. package/dist/src/views/scheduling/components/ScheduleAllShiftsRow.vue.d.ts +0 -22
  122. package/dist/src/views/scheduling/components/ScheduleStackPopover.vue.d.ts +0 -14
  123. package/dist/src/views/scheduling/composables/useScheduleAllShiftsRow.d.ts +0 -77
  124. package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +0 -124
  125. package/dist/src/views/scheduling/composables/useScheduleOpenShiftCard.d.ts +0 -23
  126. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
@@ -1,6 +1,6 @@
1
1
  import ScheduleAPI from '@/api/schedule';
2
2
  import type { IFdtoPosUserSummary } from '@/types/employee';
3
- import type { FdtoScheduleAssignment, FdtoScheduleAutoScheduleApplyReq, FdtoScheduleAutoScheduleApplyResult, FdtoScheduleAutoScheduleCapabilities, FdtoScheduleAutoScheduleGenerateReq, FdtoScheduleAutoScheduleResult, FdtoScheduleBulkUpdateAssignmentStatusReq, FdtoScheduleCreateEmployeeProfileReq, FdtoScheduleSaveAssignmentReq, FdtoScheduleSavePositionReq, FdtoScheduleSaveScheduleDayReq, FdtoScheduleUpdateEmployeeProfileReq, FdtoScheduleCreateTimeOffReq, FdtoScheduleTimeOff, FdtoScheduleUpdateTimeOffStatusReq, FdtoScheduleSaveEmployeeConfigsReq, ScheduleReplaceDemandReq } from '@/types/schedule';
3
+ import type { FdtoScheduleAssignment, FdtoScheduleAutoScheduleApplyReq, FdtoScheduleAutoScheduleApplyResult, FdtoScheduleAutoScheduleCapabilities, FdtoScheduleAutoScheduleGenerateReq, FdtoScheduleAutoScheduleResult, FdtoScheduleBulkUpdateAssignmentStatusReq, FdtoScheduleCreateEmployeeProfileReq, FdtoScheduleSaveAssignmentReq, FdtoScheduleSavePositionReq, FdtoScheduleSaveScheduleDayReq, FdtoScheduleSaveSettingsReq, FdtoScheduleSettings, FdtoScheduleUpdateEmployeeProfileReq, FdtoScheduleValidatePosAccessReq, FdtoScheduleCreateTimeOffReq, FdtoScheduleTimeOff, FdtoScheduleUpdateTimeOffStatusReq, FdtoScheduleSaveEmployeeConfigsReq, ScheduleReplaceDemandReq } from '@/types/schedule';
4
4
  import { isoDateKey } from './composables/schedule-calendar';
5
5
  export { businessEmployees, dataVersion, employeeOutletIds, loadError, loading, outletId, payload, restaurantEmployees, employeeConfigs, rosterLoading, scheduleSetupCompleted, } from './schedule-state';
6
6
  /** dayjs-free local-date key — the board's own isoDateKey, repeated here so the store does not
@@ -21,6 +21,8 @@ export declare function setOutlet(restaurantId: string): boolean;
21
21
  * headcounts sit nowhere near it. */
22
22
  export declare function ensureRestaurantEmployeesLoaded(restaurantId: string): Promise<void>;
23
23
  export declare function saveEmployeeConfigs(configs: FdtoScheduleSaveEmployeeConfigsReq['configs']): Promise<void>;
24
+ /** Saves outlet settings and keeps the board payload authoritative for any later cache rebuild. */
25
+ export declare function saveScheduleSettings(req: FdtoScheduleSaveSettingsReq): Promise<FdtoScheduleSettings>;
24
26
  export declare function setEmployeeSchedulingEnabled(employeeId: string, enabled: boolean): Promise<void>;
25
27
  /** Re-reads this outlet's POS roster. The roster is what the board's rows are built from and is
26
28
  * otherwise fetched once per outlet, so any write that changes who works here (add, remove)
@@ -30,11 +32,32 @@ export declare function refreshRestaurantEmployees(): Promise<void>;
30
32
  export declare function addEmployeeToOutlet(employeeId: string, roleId: string): Promise<void>;
31
33
  /** Adds an employee to several outlets at once. Scheduling does not require a POS role, so the
32
34
  * caller may pass an empty role id and assign the POS role later from Employee. */
33
- export declare function addEmployeeToOutlets(employeeId: string, restaurantIds: string[], roleId?: string): Promise<void>;
35
+ export declare function addEmployeeToOutlets(employeeId: string, restaurantIds: string[], roleId?: string, enableScheduling?: boolean): Promise<void>;
34
36
  /** Takes a POS user off the given outlets' rosters; their other outlets are untouched. */
35
37
  export declare function removeEmployeeFromOutlets(employeeId: string, restaurantIds: string[]): Promise<void>;
36
38
  /** Takes a POS user off this outlet's roster only. */
37
39
  export declare function removeEmployeeFromOutlet(employeeId: string): Promise<void>;
40
+ /** Sets the POS role each of these outlets grants a user — every other outlet on their roster
41
+ * is untouched. An empty roleId means "linked to this outlet, no role assigned" (the same thing
42
+ * `addEmployeeToOutlets`' default gives), not "remove them from it" — use
43
+ * `removeEmployeeFromOutlets` for that. A duplicate restaurantId keeps only the last entry. */
44
+ export declare function setEmployeePosRoles(employeeId: string, assignments: {
45
+ restaurantId: string;
46
+ roleId: string;
47
+ }[]): Promise<void>;
48
+ /** Saves the POS-owned part of an existing scheduling employee. The scheduling profile and the
49
+ * POS user are separate records, so passcode/master-user changes must use the POS user API too.
50
+ * A normalized comparison avoids rewriting the POS user when the employee form was unchanged. */
51
+ export declare function saveEmployeePosAccess(employeeId: string, request: {
52
+ name: string;
53
+ passcode: string;
54
+ masterUser: boolean;
55
+ masterCode: string;
56
+ roles: {
57
+ restaurantId: string;
58
+ roleId: string;
59
+ }[];
60
+ }): Promise<void>;
38
61
  /** The cached business roster, fetched on first use. `force` re-reads it (after a write, or to
39
62
  * refresh a list that is already on screen). Concurrent callers share one request. */
40
63
  export declare function ensureBusinessEmployees(force?: boolean): Promise<IFdtoPosUserSummary[]>;
@@ -54,6 +77,7 @@ export declare function reload(): Promise<void>;
54
77
  * Throws on failure (a duplicate profile, a network error) — the caller decides how to show
55
78
  * that, this just doesn't pretend it succeeded. */
56
79
  export declare function createEmployeeProfile(req: FdtoScheduleCreateEmployeeProfileReq): Promise<void>;
80
+ export declare function validateSchedulePosAccess(req: FdtoScheduleValidatePosAccessReq): Promise<void>;
57
81
  /** Edits a profile already on this outlet's schedule. The caller (useScheduleAddEmployee's
58
82
  * `updateExisting`) applies the form to the live `Employee` object itself for instant feedback,
59
83
  * so this does not bump `dataVersion` — nothing needs a board cache rebuild. The raw payload is
@@ -77,28 +101,29 @@ export declare function deletePosition(id: string): Promise<void>;
77
101
  * to land there for that seed to stay correct — without a `dataVersion` bump, which would
78
102
  * invalidate the per-week employee cache and risk reverting an unsaved shift. */
79
103
  export declare function saveScheduleDay(date: string, req: FdtoScheduleSaveScheduleDayReq): Promise<void>;
80
- /** Replaces one date/weekday's UI demand by expanding every period into flat ShiftDemand rows.
104
+ /** Replaces one date's UI demand by expanding every period into flat ShiftDemand rows.
81
105
  * Position-specific headcount becomes its own row; any remaining headcount becomes an
82
106
  * unpositioned row for the same time range. */
83
107
  export declare function saveDemand(req: ScheduleReplaceDemandReq): Promise<void>;
108
+ export declare function saveDemandsBulk(requests: ScheduleReplaceDemandReq[]): Promise<void>;
84
109
  /** Copies one date's own demand rows onto another date, as that date's own rows. A date that
85
110
  * already has demand of its own is left alone (nothing is overwritten), and a source date with
86
- * none has nothing to copy: the standing weekday rule already covers the same weekday in every
87
- * week, so repeating it per date would only shadow later edits to the rule. Returns how many rows
88
- * were written. */
111
+ * no explicit rows has nothing to copy. Returns how many rows were written. */
89
112
  export declare function copyDateDemand(fromDate: string, toDate: string): Promise<number>;
90
113
  export declare function generateAutoSchedule(req: FdtoScheduleAutoScheduleGenerateReq): Promise<FdtoScheduleAutoScheduleResult>;
91
114
  export declare function getAutoScheduleCapabilities(): Promise<FdtoScheduleAutoScheduleCapabilities>;
92
115
  export declare function applyAutoSchedule(req: FdtoScheduleAutoScheduleApplyReq): Promise<FdtoScheduleAutoScheduleApplyResult>;
93
116
  /** A one-off shift assignment — someone working these hours on this date, not answering any
94
- * Shift requirement. Deliberately does not reload: unlike `createEmployeeProfile` above, there
95
- * is nothing here a reload could bring back that the caller doesn't already have — `commitShift`
96
- * writes `assignmentId` onto the slot itself once this resolves, and a reload would only risk
97
- * discarding some OTHER unsaved shift elsewhere on the board (shifts have no write path of
98
- * their own to read back from yet). */
117
+ * Shift requirement. Keep the raw payload in sync without bumping `dataVersion`: the current
118
+ * board owns the live draft, while a later roster refresh may rebuild the week cache from this
119
+ * payload. */
99
120
  export declare function createAssignment(req: FdtoScheduleSaveAssignmentReq): Promise<FdtoScheduleAssignment>;
100
121
  export declare function updateAssignment(id: string, req: FdtoScheduleSaveAssignmentReq): Promise<FdtoScheduleAssignment | null>;
101
122
  export declare function bulkSaveAssignments(req: Parameters<typeof ScheduleAPI.bulkSaveAssignments>[1]): Promise<Awaited<ReturnType<typeof ScheduleAPI.bulkSaveAssignments>>>;
123
+ /** Replaces demand and/or assignments in one backend transaction. */
124
+ export declare function copySchedule(req: Parameters<typeof ScheduleAPI.copySchedule>[1]): Promise<Awaited<ReturnType<typeof ScheduleAPI.copySchedule>>>;
125
+ /** Clears demand and/or assignments in one backend transaction. */
126
+ export declare function clearSchedule(req: Parameters<typeof ScheduleAPI.clearSchedule>[1]): Promise<Awaited<ReturnType<typeof ScheduleAPI.clearSchedule>>>;
102
127
  /** Deletes a batch of existing assignments in a single request — see
103
128
  * `ScheduleAPI.deleteAssignments`. Deleting one is just this with a single-id array. */
104
129
  export declare function deleteAssignments(ids: string[]): Promise<void>;
@@ -8,6 +8,8 @@ export interface WorkSlot {
8
8
  start: string;
9
9
  end: string;
10
10
  role: string;
11
+ /** The persisted position identity, retained even when the position is soft-deleted. */
12
+ positionId?: string;
11
13
  status: ShiftStatus;
12
14
  clock?: ShiftClock;
13
15
  conflict?: boolean;
@@ -98,13 +100,18 @@ export interface Employee {
98
100
  /** Full-time-equivalent percentage, e.g. 100 for a full-timer, 60 for 0.6 FTE. */
99
101
  pct: number;
100
102
  /** Hours per week this person is contracted to, as agreed with them. Per-person rather than
101
- * a venue default: ScheduleSettings holds pay rates only, and EmployeeProfiles.workingHour
103
+ * a venue default: ScheduleSettings holds pay rates and employee-hour defaults, and EmployeeProfiles.workingHours
102
104
  * is where the figure is actually stated. Undefined means nobody has agreed one. */
103
105
  contractHours?: number;
104
106
  rate: number;
105
107
  positions: string[];
108
+ /** Position references that remain on the employee profile but are no longer active in the catalogue. */
109
+ archivedPositions?: string[];
106
110
  /** One entry per visible day of the horizon; null = day off. */
107
111
  shifts: DaySlot[];
112
+ /** Dated time-off records are kept beside shifts so an off/leave card remains visible when
113
+ * a manager adds a shift on the same day. */
114
+ timeOff?: Array<LeaveSlot | null>;
108
115
  remarks: EmployeeRemark[];
109
116
  section: string;
110
117
  compGroup?: string;
@@ -117,11 +124,18 @@ export interface Employee {
117
124
  * hourly figure derived from this and is what the grid actually costs shifts with. */
118
125
  payAmount?: number;
119
126
  maxHours?: number;
120
- maxOtHours?: number;
121
127
  /** Shortest shift, in hours, this person will come in for. Asking for less is allowed but
122
128
  * warned about in the shift popover. */
123
129
  minHours?: number;
124
- otAfterDaily?: number;
130
+ minHoursPerDay?: number;
131
+ workingHours?: {
132
+ minHoursPerDay: number | null;
133
+ maxHoursPerDay: number | null;
134
+ maxHoursPerWeek: number | null;
135
+ };
136
+ overtime?: {
137
+ maxHoursPerMonth: number | null;
138
+ };
125
139
  preferences?: string[];
126
140
  seniority?: 'senior' | 'junior' | '';
127
141
  /** Recurring days off (full-timer) or days available (part-timer) — see
@@ -130,6 +144,8 @@ export interface Employee {
130
144
  availHours?: EmployeeAvailHours[];
131
145
  /** POS sign-in code. Optional: rostering, costing and publishing never depend on it. */
132
146
  passcode?: string;
147
+ /** POS master-user code, when this employee is a master user. */
148
+ code?: string;
133
149
  masterUser?: boolean;
134
150
  }
135
151
  export interface Section {
@@ -200,7 +216,6 @@ export interface ScheduleRules {
200
216
  end: string;
201
217
  }>[];
202
218
  payRate: PayRate;
203
- otAfterDaily: number;
204
219
  /** Weekly sales forecast (RM) — the stats row's editable input and the figure the
205
220
  * per-day forecast curve distributes across the week. */
206
221
  salesForecast: number;
@@ -215,7 +230,12 @@ export interface ScheduleRules {
215
230
  /** Weekly labour cap (RM), editable directly when budgetFromSales is false. */
216
231
  budget: number;
217
232
  /** Monthly OT cap (hours) — Settings page "Overtime" tab. */
218
- otCapHours: number;
233
+ otCapHours: number | null;
234
+ workingHours: {
235
+ minHoursPerDay: number | null;
236
+ maxHoursPerDay: number | null;
237
+ maxHoursPerWeek: number | null;
238
+ };
219
239
  /** Monthly OT budget (RM), advisory only. */
220
240
  otBudget: number;
221
241
  notify: {
@@ -290,6 +310,8 @@ export interface ScheduleDayNote {
290
310
  * "any position" remainder, which is derived and never stored. */
291
311
  export interface DemandRole {
292
312
  position: string;
313
+ /** Persisted position identity; the name is only the display label. */
314
+ positionId?: string;
293
315
  n: number;
294
316
  }
295
317
  /** A stretch of a day and how many people the floor needs across it. Deliberately not a shift:
@@ -353,4 +375,6 @@ export interface Proposal {
353
375
  weekKey?: string;
354
376
  /** Why this person, for the card's tooltip. */
355
377
  reason?: string;
378
+ /** Set when the server already knows applying this row would be refused; it starts rejected. */
379
+ rejectReason?: string;
356
380
  }