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

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 (127) hide show
  1. package/dist/{ApprovalCodeList-CJaNPHZC.js → ApprovalCodeList-DuPmMQ8Z.js} +7 -7
  2. package/dist/{AuditLogList-CHA98ZqW.js → AuditLogList-BeRA_284.js} +18 -19
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C7rvthEI.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-StnBAQOk.js} +2 -2
  4. package/dist/{EmployeeList-CVmMKt71.js → EmployeeList-qmjsbCjj.js} +255 -266
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-CUnlKsxk.js → FormItem.vue_vue_type_script_setup_true_lang-oQJgMciC.js} +6 -6
  6. package/dist/{GrantUserList-MYjgt5-F.js → GrantUserList--WUK7zrV.js} +8 -8
  7. package/dist/{Main-hlcHtrsc.js → Main-9X2iCXoX.js} +5 -5
  8. package/dist/{Main-C0cnqQ3B.js → Main-BIAeEQV9.js} +8 -8
  9. package/dist/{Main-BgB9lD4K.js → Main-tPL_YTwT.js} +11 -11
  10. package/dist/{PermissionSetList-5f1WIaVa.js → PermissionSetList-ByTyQe0s.js} +19 -18
  11. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bp9WwlnI.js +4167 -0
  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-INlydQmP.js} +21 -20
  15. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-d8KDvgNu.js +530 -0
  16. package/dist/ScheduleGeneralPage-DbOoP9Ez.js +776 -0
  17. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-UowMybGr.js +2439 -0
  18. package/dist/SchedulePage-CjOZtRlK.js +19291 -0
  19. package/dist/{SchedulePositionPage-DyRckyUx.js → SchedulePositionPage-CnDqkvL9.js} +78 -80
  20. package/dist/{SelectFilter-CG13h83-.js → SelectFilter-BWw4B9tM.js} +1 -1
  21. package/dist/{TeamMemberList-mw5OveZG.js → TeamMemberList-BgYtoXht.js} +27 -27
  22. package/dist/{TimesheetList-BzXarZbM.js → TimesheetList-Dg0QYsWO.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-eTd4J1CB.js} +3 -3
  24. package/dist/{app-DSsdRLHg.js → app-CDo04LrB.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-KFBmxZF3.js} +1 -1
  28. package/dist/{employee-hMhzuqk1.js → employee-BRaYoaOY.js} +4 -4
  29. package/dist/{grant-user-Bv-pJ9Wt.js → grant-user-CBJ3gEgW.js} +1 -1
  30. package/dist/{iteration-B34AvpNC.js → iteration-p-TjO05t.js} +1 -1
  31. package/dist/{lodash-1Vyuy7Mu.js → lodash-D72lpJgs.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-a35Vc8gC.js} +2 -2
  35. package/dist/{rule-CBzQ3GeV.js → rule-BRRw0K7p.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 +1 -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 +86 -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 +408 -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 +30 -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-Ca-9DEOI.js} +3 -3
  115. package/package.json +1 -1
  116. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CFoTAGIX.js +0 -4167
  117. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B4VUyKW3.js +0 -470
  118. package/dist/ScheduleGeneralPage-Cd5AlY4z.js +0 -666
  119. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-Cf0l2MRg.js +0 -2188
  120. package/dist/SchedulePage-C8m0-m3l.js +0 -18257
  121. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  122. package/dist/src/views/scheduling/components/ScheduleAllShiftsRow.vue.d.ts +0 -22
  123. package/dist/src/views/scheduling/components/ScheduleStackPopover.vue.d.ts +0 -14
  124. package/dist/src/views/scheduling/composables/useScheduleAllShiftsRow.d.ts +0 -77
  125. package/dist/src/views/scheduling/composables/useScheduleAssign.d.ts +0 -124
  126. package/dist/src/views/scheduling/composables/useScheduleOpenShiftCard.d.ts +0 -23
  127. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
@@ -1,16 +1,18 @@
1
1
  import type { ScheduleSelectOption } from '../components/ScheduleSelect.vue';
2
2
  /** Which outlet the board is scheduling, and the picker that changes it.
3
3
  *
4
- * On entry the host shell's own selection wins — mf-common keeps `currentRestaurant` in sync
5
- * with the `?restaurantId=` in the URL, so arriving from anywhere else in the portal lands on
6
- * the outlet that was already being looked at. Only when the shell has no opinion does this
7
- * fall back to the first outlet in the business, which is better than an empty board.
4
+ * On entry the outlet last picked in the schedule wins, remembered per business in localStorage.
5
+ * The host shell (mf-common) resets its own `currentRestaurant` to the first manageable outlet
6
+ * and rewrites `?restaurantId=` on every reload, so neither the URL nor the shell's selection
7
+ * can carry the user's pick across a refresh. Only when nothing was ever picked here does the
8
+ * shell's selection decide, so arriving from elsewhere in the portal lands on the outlet that
9
+ * was already being looked at. Failing that it falls back to the first outlet in the business,
10
+ * which is better than an empty board. The picker offers only restaurants the user can manage.
8
11
  *
9
- * Switching from the picker writes the new id back into `?restaurantId=` too — via
10
- * `router.replace`, not a navigation, so it does not reload the page or add a history entry.
12
+ * Switching from the picker saves the pick and writes the new id back into `?restaurantId=` too,
13
+ * via `router.replace`, not a navigation, so it does not reload the page or add a history entry.
11
14
  * The picker already re-fetches everything the new outlet needs (see switchTo below); this just
12
- * keeps the address bar honest about which one is on screen, so a refresh or a copied link lands
13
- * back on it instead of silently snapping to whatever the shell had before. */
15
+ * keeps the address bar honest about which one is on screen. */
14
16
  export declare function useScheduleOutlet(): {
15
17
  options: import("vue").ComputedRef<ScheduleSelectOption[]>;
16
18
  ready: import("vue").Ref<boolean, boolean>;
@@ -18,5 +20,6 @@ export declare function useScheduleOutlet(): {
18
20
  resolve: () => Promise<string>;
19
21
  resolveOutlet: () => Promise<string>;
20
22
  switchTo: (restaurantId: string, weekStart: Date) => Promise<boolean>;
23
+ setBeforeSwitch: (handler: (restaurantId: string) => boolean | Promise<boolean>) => void;
21
24
  };
22
25
  export type ScheduleOutletApi = ReturnType<typeof useScheduleOutlet>;
@@ -13,6 +13,8 @@ interface UseSchedulePageCellDropOptions {
13
13
  notify: (message: string, type: 'error') => void;
14
14
  }
15
15
  export declare function useSchedulePageCellDrop(options: UseSchedulePageCellDropOptions): {
16
- onCellDrop: (empId: number, dayIdx: number, event: DragEvent) => void;
16
+ onCellDrop: (empId: number, dayIdx: number, event: DragEvent, targetSlotIndex?: number, kind?: "employee" | "position") => void;
17
+ confirmPositionSwap: (toEmpId: number, toDayIdx: number, onConfirm: () => void) => void;
18
+ confirmPositionDrop: (targetDayIdx: number, onConfirm: () => void) => void;
17
19
  };
18
20
  export {};
@@ -14,6 +14,7 @@ type Snackbar = {
14
14
  };
15
15
  export declare function useSchedulePageClearActions(board: ScheduleBoardApi, demand: ScheduleDemandApi, snackbar: Snackbar): {
16
16
  clearKind: import("vue").Ref<ClearKind | null, ClearKind | null>;
17
+ clearing: import("vue").Ref<boolean, boolean>;
17
18
  onConfirmClear: () => Promise<void>;
18
19
  };
19
20
  export type SchedulePageClearActionsApi = ReturnType<typeof useSchedulePageClearActions>;
@@ -1,9 +1,7 @@
1
1
  import { ref } from 'vue';
2
2
  import type { ScheduleAddPickApi } from './useScheduleAddPick';
3
- import type { ScheduleAllShiftsRowApi } from './useScheduleAllShiftsRow';
4
3
  import type { ScheduleDayNoteApi } from './useScheduleDayNote';
5
4
  import type { ScheduleGapPopoverApi } from './useScheduleGapPopover';
6
- import type { ScheduleOpenShiftCardApi } from './useScheduleOpenShiftCard';
7
5
  import type { ScheduleShiftActionsApi } from './useScheduleShiftActions';
8
6
  import type { ScheduleTimePickerApi } from './useScheduleTimePicker';
9
7
  export type ScheduleTopbarMenu = 'actions' | 'export';
@@ -14,12 +12,10 @@ export interface ScheduleTopbarApi {
14
12
  }
15
13
  export declare function useSchedulePageOverlays(apis: {
16
14
  dayNote: ScheduleDayNoteApi;
17
- allShiftsRow: ScheduleAllShiftsRowApi;
18
15
  gap: ScheduleGapPopoverApi;
19
16
  timePicker: ScheduleTimePickerApi;
20
17
  addPick: ScheduleAddPickApi;
21
18
  shiftActions: ScheduleShiftActionsApi;
22
- openShiftCard: ScheduleOpenShiftCardApi;
23
19
  }): {
24
20
  topbar: ScheduleTopbarApi;
25
21
  };
@@ -4,6 +4,7 @@ export interface PositionModalPerson {
4
4
  initials: string;
5
5
  /** Positions they already hold, main first — the row's second line. */
6
6
  held: string[];
7
+ heldPositionIds: string[];
7
8
  }
8
9
  export interface PositionModalDone {
9
10
  name: string;
@@ -4,6 +4,7 @@ export interface SchedulePositionRow {
4
4
  }
5
5
  export declare function useSchedulePositions(options?: {
6
6
  notify?: (message: string, type?: 'success' | 'error' | 'info') => void;
7
+ deferWrites?: boolean;
7
8
  }): {
8
9
  positions: import("vue").Ref<{
9
10
  id: string;
@@ -12,18 +13,23 @@ export declare function useSchedulePositions(options?: {
12
13
  id: string;
13
14
  name: string;
14
15
  }[]>;
16
+ pendingCreates: string[];
17
+ pendingDeletes: Set<string>;
15
18
  count: import("vue").ComputedRef<number>;
16
19
  isAdding: import("vue").Ref<boolean, boolean>;
17
20
  newName: import("vue").Ref<string, string>;
18
21
  pendingDeleteId: import("vue").Ref<string | null, string | null>;
19
22
  saving: import("vue").Ref<boolean, boolean>;
20
23
  error: import("vue").Ref<string | null, string | null>;
21
- usageCountFor: (name: string) => number;
24
+ usageCountFor: (positionId: string) => number;
22
25
  startAdd: () => void;
23
26
  cancelAdd: () => void;
24
27
  confirmAdd: () => Promise<void>;
25
28
  askDelete: (id: string) => void;
26
29
  cancelDelete: () => void;
27
30
  confirmDelete: (id: string) => Promise<void>;
31
+ commitCreates: () => Promise<void>;
32
+ commitDeletes: () => Promise<void>;
33
+ discardPending: () => void;
28
34
  };
29
35
  export type SchedulePositionsApi = ReturnType<typeof useSchedulePositions>;
@@ -37,6 +37,7 @@ export declare function useSchedulePublish(board: ScheduleBoardApi): {
37
37
  start: string;
38
38
  end: string;
39
39
  role: string;
40
+ positionId?: string | undefined;
40
41
  status: import("../types").ShiftStatus;
41
42
  clock?: {
42
43
  in: string | null;
@@ -85,6 +86,7 @@ export declare function useSchedulePublish(board: ScheduleBoardApi): {
85
86
  start: string;
86
87
  end: string;
87
88
  role: string;
89
+ positionId?: string | undefined;
88
90
  status: import("../types").ShiftStatus;
89
91
  clock?: {
90
92
  in: string | null;
@@ -22,10 +22,12 @@ export declare function useScheduleRoster(board: ScheduleBoardApi): {
22
22
  contractHours?: number | undefined;
23
23
  rate: number;
24
24
  positions: string[];
25
+ archivedPositions?: string[] | undefined;
25
26
  shifts: ({
26
27
  start: string;
27
28
  end: string;
28
29
  role: string;
30
+ positionId?: string | undefined;
29
31
  status: import("../types").ShiftStatus;
30
32
  clock?: {
31
33
  in: string | null;
@@ -74,6 +76,7 @@ export declare function useScheduleRoster(board: ScheduleBoardApi): {
74
76
  start: string;
75
77
  end: string;
76
78
  role: string;
79
+ positionId?: string | undefined;
77
80
  status: import("../types").ShiftStatus;
78
81
  clock?: {
79
82
  in: string | null;
@@ -98,6 +101,28 @@ export declare function useScheduleRoster(board: ScheduleBoardApi): {
98
101
  updatedAt?: string | undefined;
99
102
  splitGroupId?: string | undefined;
100
103
  }[] | null)[];
104
+ timeOff?: ({
105
+ timeOff: "approved" | "pending";
106
+ requestId?: string | undefined;
107
+ type?: "OFF_DAY" | "LEAVE" | undefined;
108
+ leaveType?: "ANNUAL" | "MEDICAL" | "EMERGENCY" | "UNPAID" | undefined;
109
+ reason: string;
110
+ half?: boolean | undefined;
111
+ halfPart?: "AM" | "PM" | undefined;
112
+ from?: string | undefined;
113
+ to?: string | undefined;
114
+ appliedOn?: string | undefined;
115
+ note?: string | undefined;
116
+ cert?: {
117
+ name: string;
118
+ size: string;
119
+ } | null | undefined;
120
+ bal?: {
121
+ type: string;
122
+ entitled: number;
123
+ used: number;
124
+ } | undefined;
125
+ } | null)[] | undefined;
101
126
  remarks: {
102
127
  author: string;
103
128
  date: string;
@@ -112,9 +137,16 @@ export declare function useScheduleRoster(board: ScheduleBoardApi): {
112
137
  payBasis?: "hourly" | "monthly" | undefined;
113
138
  payAmount?: number | undefined;
114
139
  maxHours?: number | undefined;
115
- maxOtHours?: number | undefined;
116
140
  minHours?: number | undefined;
117
- otAfterDaily?: number | undefined;
141
+ minHoursPerDay?: number | undefined;
142
+ workingHours?: {
143
+ minHoursPerDay: number | null;
144
+ maxHoursPerDay: number | null;
145
+ maxHoursPerWeek: number | null;
146
+ } | undefined;
147
+ overtime?: {
148
+ maxHoursPerMonth: number | null;
149
+ } | undefined;
118
150
  preferences?: string[] | undefined;
119
151
  seniority?: "senior" | "junior" | "" | undefined;
120
152
  availDays?: boolean[] | undefined;
@@ -123,6 +155,7 @@ export declare function useScheduleRoster(board: ScheduleBoardApi): {
123
155
  to: string;
124
156
  }[] | undefined;
125
157
  passcode?: string | undefined;
158
+ code?: string | undefined;
126
159
  masterUser?: boolean | undefined;
127
160
  }[]>;
128
161
  orderedEmployees: import("vue").ComputedRef<{
@@ -138,10 +171,12 @@ export declare function useScheduleRoster(board: ScheduleBoardApi): {
138
171
  contractHours?: number | undefined;
139
172
  rate: number;
140
173
  positions: string[];
174
+ archivedPositions?: string[] | undefined;
141
175
  shifts: ({
142
176
  start: string;
143
177
  end: string;
144
178
  role: string;
179
+ positionId?: string | undefined;
145
180
  status: import("../types").ShiftStatus;
146
181
  clock?: {
147
182
  in: string | null;
@@ -190,6 +225,7 @@ export declare function useScheduleRoster(board: ScheduleBoardApi): {
190
225
  start: string;
191
226
  end: string;
192
227
  role: string;
228
+ positionId?: string | undefined;
193
229
  status: import("../types").ShiftStatus;
194
230
  clock?: {
195
231
  in: string | null;
@@ -214,6 +250,28 @@ export declare function useScheduleRoster(board: ScheduleBoardApi): {
214
250
  updatedAt?: string | undefined;
215
251
  splitGroupId?: string | undefined;
216
252
  }[] | null)[];
253
+ timeOff?: ({
254
+ timeOff: "approved" | "pending";
255
+ requestId?: string | undefined;
256
+ type?: "OFF_DAY" | "LEAVE" | undefined;
257
+ leaveType?: "ANNUAL" | "MEDICAL" | "EMERGENCY" | "UNPAID" | undefined;
258
+ reason: string;
259
+ half?: boolean | undefined;
260
+ halfPart?: "AM" | "PM" | undefined;
261
+ from?: string | undefined;
262
+ to?: string | undefined;
263
+ appliedOn?: string | undefined;
264
+ note?: string | undefined;
265
+ cert?: {
266
+ name: string;
267
+ size: string;
268
+ } | null | undefined;
269
+ bal?: {
270
+ type: string;
271
+ entitled: number;
272
+ used: number;
273
+ } | undefined;
274
+ } | null)[] | undefined;
217
275
  remarks: {
218
276
  author: string;
219
277
  date: string;
@@ -228,9 +286,16 @@ export declare function useScheduleRoster(board: ScheduleBoardApi): {
228
286
  payBasis?: "hourly" | "monthly" | undefined;
229
287
  payAmount?: number | undefined;
230
288
  maxHours?: number | undefined;
231
- maxOtHours?: number | undefined;
232
289
  minHours?: number | undefined;
233
- otAfterDaily?: number | undefined;
290
+ minHoursPerDay?: number | undefined;
291
+ workingHours?: {
292
+ minHoursPerDay: number | null;
293
+ maxHoursPerDay: number | null;
294
+ maxHoursPerWeek: number | null;
295
+ } | undefined;
296
+ overtime?: {
297
+ maxHoursPerMonth: number | null;
298
+ } | undefined;
234
299
  preferences?: string[] | undefined;
235
300
  seniority?: "senior" | "junior" | "" | undefined;
236
301
  availDays?: boolean[] | undefined;
@@ -239,6 +304,7 @@ export declare function useScheduleRoster(board: ScheduleBoardApi): {
239
304
  to: string;
240
305
  }[] | undefined;
241
306
  passcode?: string | undefined;
307
+ code?: string | undefined;
242
308
  masterUser?: boolean | undefined;
243
309
  }[]>;
244
310
  order: import("vue").Ref<number[], number[]>;
@@ -1,4 +1,4 @@
1
- export type ScheduleSettingsSection = 'budget' | 'payrates' | 'overtime' | 'notify';
1
+ export type ScheduleSettingsSection = 'budget' | 'payrates' | 'overtime' | 'workingHours' | 'notify';
2
2
  /** Keep unsupported sections out of the navigation until their API fields exist. */
3
3
  export declare const SETTINGS_SECTIONS: {
4
4
  key: ScheduleSettingsSection;
@@ -22,7 +22,12 @@ export declare function useScheduleSettings(): {
22
22
  overtime: number;
23
23
  };
24
24
  };
25
- otCapHours: number;
25
+ otCapHours: number | null;
26
+ workingHours: {
27
+ minHoursPerDay: number | null;
28
+ maxHoursPerDay: number | null;
29
+ maxHoursPerWeek: number | null;
30
+ };
26
31
  };
27
32
  dirty: import("vue").ComputedRef<boolean>;
28
33
  loading: import("vue").Ref<boolean, boolean>;
@@ -1,6 +1,6 @@
1
1
  /** "Set it up" banner — shown while the outlet has not finished scheduling setup, i.e. while
2
- * `scheduleSetupCompleted` (schedule-store) is false. Dismissing is a session choice: the banner is cheap enough to see
3
- * again on the next visit while the outlet really is unconfigured.
2
+ * `scheduleSetupCompleted` (schedule-store) is false. Dismissing marks the outlet's setup complete (`setupCompleted`
3
+ * is persisted), so neither the banner nor the welcome dialog returns.
4
4
  *
5
5
  * The welcome dialog shares that same gate, plus its own session dismiss so closing it doesn't
6
6
  * also close the banner. `scheduleSetupCompleted` lands from an async fetch and starts `false`
@@ -29,7 +29,10 @@ export interface ScheduleSwapState {
29
29
  preset: {
30
30
  empId: number;
31
31
  dayIdx: number;
32
+ slotIndex?: number;
32
33
  } | null;
34
+ /** Area/Position view exchanges roles; employee view exchanges shift ownership. */
35
+ kind: 'employee' | 'position';
33
36
  }
34
37
  /** The shift card's "⋯" menu (Change employee / Swap shifts / Edit / Remove), plus the two
35
38
  * dialogs it opens that the rest of Phase 1 didn't need: handing a shift to somebody else,
@@ -69,10 +72,12 @@ export declare function useScheduleShiftActions(board: ScheduleBoardApi, options
69
72
  contractHours?: number | undefined;
70
73
  rate: number;
71
74
  positions: string[];
75
+ archivedPositions?: string[] | undefined;
72
76
  shifts: ({
73
77
  start: string;
74
78
  end: string;
75
79
  role: string;
80
+ positionId?: string | undefined;
76
81
  status: import("../types").ShiftStatus;
77
82
  clock?: {
78
83
  in: string | null;
@@ -121,6 +126,7 @@ export declare function useScheduleShiftActions(board: ScheduleBoardApi, options
121
126
  start: string;
122
127
  end: string;
123
128
  role: string;
129
+ positionId?: string | undefined;
124
130
  status: import("../types").ShiftStatus;
125
131
  clock?: {
126
132
  in: string | null;
@@ -145,6 +151,28 @@ export declare function useScheduleShiftActions(board: ScheduleBoardApi, options
145
151
  updatedAt?: string | undefined;
146
152
  splitGroupId?: string | undefined;
147
153
  }[] | null)[];
154
+ timeOff?: ({
155
+ timeOff: "approved" | "pending";
156
+ requestId?: string | undefined;
157
+ type?: "OFF_DAY" | "LEAVE" | undefined;
158
+ leaveType?: "ANNUAL" | "MEDICAL" | "EMERGENCY" | "UNPAID" | undefined;
159
+ reason: string;
160
+ half?: boolean | undefined;
161
+ halfPart?: "AM" | "PM" | undefined;
162
+ from?: string | undefined;
163
+ to?: string | undefined;
164
+ appliedOn?: string | undefined;
165
+ note?: string | undefined;
166
+ cert?: {
167
+ name: string;
168
+ size: string;
169
+ } | null | undefined;
170
+ bal?: {
171
+ type: string;
172
+ entitled: number;
173
+ used: number;
174
+ } | undefined;
175
+ } | null)[] | undefined;
148
176
  remarks: {
149
177
  author: string;
150
178
  date: string;
@@ -159,9 +187,16 @@ export declare function useScheduleShiftActions(board: ScheduleBoardApi, options
159
187
  payBasis?: "hourly" | "monthly" | undefined;
160
188
  payAmount?: number | undefined;
161
189
  maxHours?: number | undefined;
162
- maxOtHours?: number | undefined;
163
190
  minHours?: number | undefined;
164
- otAfterDaily?: number | undefined;
191
+ minHoursPerDay?: number | undefined;
192
+ workingHours?: {
193
+ minHoursPerDay: number | null;
194
+ maxHoursPerDay: number | null;
195
+ maxHoursPerWeek: number | null;
196
+ } | undefined;
197
+ overtime?: {
198
+ maxHoursPerMonth: number | null;
199
+ } | undefined;
165
200
  preferences?: string[] | undefined;
166
201
  seniority?: "senior" | "junior" | "" | undefined;
167
202
  availDays?: boolean[] | undefined;
@@ -170,6 +205,7 @@ export declare function useScheduleShiftActions(board: ScheduleBoardApi, options
170
205
  to: string;
171
206
  }[] | undefined;
172
207
  passcode?: string | undefined;
208
+ code?: string | undefined;
173
209
  masterUser?: boolean | undefined;
174
210
  }[]>;
175
211
  openChange: (empId: number, dayIdx: number, slotIndex?: number) => void;
@@ -184,7 +220,9 @@ export declare function useScheduleShiftActions(board: ScheduleBoardApi, options
184
220
  preset: {
185
221
  empId: number;
186
222
  dayIdx: number;
223
+ slotIndex?: number | undefined;
187
224
  } | null;
225
+ kind: "employee" | "position";
188
226
  };
189
227
  swapSlot: import("vue").ComputedRef<import("../types").WorkSlot[]>;
190
228
  swapCandidates: import("vue").ComputedRef<{
@@ -199,7 +237,7 @@ export declare function useScheduleShiftActions(board: ScheduleBoardApi, options
199
237
  slot: import("../types").WorkSlot[];
200
238
  soft: string | null;
201
239
  } | null>;
202
- openSwap: (empId: number, dayIdx: number, preset?: ScheduleSwapState["preset"], slotIndex?: number, slotCount?: number) => void;
240
+ openSwap: (empId: number, dayIdx: number, preset?: ScheduleSwapState["preset"], slotIndex?: number, slotCount?: number, kind?: ScheduleSwapState["kind"]) => void;
203
241
  closeSwap: () => void;
204
242
  confirmSwap: (toEmpId: number, toDayIdx: number) => void;
205
243
  removeShift: (empId: number, dayIdx: number, slotIndex?: number) => void;
@@ -25,6 +25,7 @@ export declare function useScheduleShiftDraft(): {
25
25
  end: string;
26
26
  }[]>;
27
27
  role: import("vue").Ref<string, string>;
28
+ positionId: import("vue").Ref<string | undefined, string | undefined>;
28
29
  required: import("vue").Ref<number, number>;
29
30
  sen: import("vue").Ref<"" | "senior" | "junior", "" | "senior" | "junior">;
30
31
  empType: import("vue").Ref<"" | "full" | "part", "" | "full" | "part">;
@@ -7,6 +7,10 @@ export interface ScheduleHeadcountRole {
7
7
  count: number;
8
8
  sen: '' | 'senior' | 'junior';
9
9
  }
10
+ export interface ScheduleWarningPart {
11
+ text: string;
12
+ emphasis?: boolean;
13
+ }
10
14
  /** The unified shift popover — ported from the mockup's single `.shift-pop`, which answers
11
15
  * both "who is on this shift" and "what does this shift need" from one form. Picking a real
12
16
  * person in the `who` select turns it into an assignment; leaving it on "Empty shift" turns
@@ -15,6 +19,7 @@ export interface ScheduleHeadcountRole {
15
19
  * record (single position, like an assigned shift's "Position needed" row). */
16
20
  export declare function useScheduleShiftPopover(board: ScheduleBoardApi, demand: ScheduleDemandApi, options?: {
17
21
  onToast?: (message: string, type?: 'success' | 'error' | 'info') => void;
22
+ onAvailabilityWarning?: (message: string, onConfirm: () => void) => void;
18
23
  }): {
19
24
  open: import("vue").Ref<boolean, boolean>;
20
25
  dayIdx: import("vue").Ref<number | null, number | null>;
@@ -31,6 +36,7 @@ export declare function useScheduleShiftPopover(board: ScheduleBoardApi, demand:
31
36
  end: string;
32
37
  }[]>;
33
38
  role: import("vue").Ref<string, string>;
39
+ positionId: import("vue").Ref<string | undefined, string | undefined>;
34
40
  required: import("vue").Ref<number, number>;
35
41
  sen: import("vue").Ref<"" | "senior" | "junior", "" | "senior" | "junior">;
36
42
  empType: import("vue").Ref<"" | "full" | "part", "" | "full" | "part">;
@@ -62,7 +68,8 @@ export declare function useScheduleShiftPopover(board: ScheduleBoardApi, demand:
62
68
  } | null>;
63
69
  requiresAssignment: import("vue").ComputedRef<boolean>;
64
70
  saveDisabled: import("vue").ComputedRef<boolean>;
65
- saveTitle: import("vue").ComputedRef<"" | "Choose who covers it — this shift is answering a staffing gap, and a shift with nobody on it leaves that gap exactly as it is">;
71
+ dailyLimitExceeded: import("vue").ComputedRef<boolean>;
72
+ saveTitle: import("vue").ComputedRef<string>;
66
73
  saveLabel: import("vue").ComputedRef<"Create & assign" | "Save">;
67
74
  breakChoice: import("vue").Ref<import("./schedule-shift-time").ScheduleBreakChoice, import("./schedule-shift-time").ScheduleBreakChoice>;
68
75
  breakCustomMins: import("vue").Ref<number, number>;
@@ -73,6 +80,7 @@ export declare function useScheduleShiftPopover(board: ScheduleBoardApi, demand:
73
80
  repeatDays: import("vue").Ref<boolean[], boolean[]>;
74
81
  gapNote: import("vue").Ref<string | null, string | null>;
75
82
  conflictNote: import("vue").Ref<string | null, string | null>;
83
+ availabilityConflictNote: import("vue").ComputedRef<string | null>;
76
84
  grantSkill: import("vue").Ref<boolean, boolean>;
77
85
  showGrantSkill: import("vue").ComputedRef<boolean>;
78
86
  unassignMode: import("vue").Ref<boolean, boolean>;
@@ -90,10 +98,12 @@ export declare function useScheduleShiftPopover(board: ScheduleBoardApi, demand:
90
98
  contractHours?: number | undefined;
91
99
  rate: number;
92
100
  positions: string[];
101
+ archivedPositions?: string[] | undefined;
93
102
  shifts: ({
94
103
  start: string;
95
104
  end: string;
96
105
  role: string;
106
+ positionId?: string | undefined;
97
107
  status: import("../types").ShiftStatus;
98
108
  clock?: {
99
109
  in: string | null;
@@ -142,6 +152,7 @@ export declare function useScheduleShiftPopover(board: ScheduleBoardApi, demand:
142
152
  start: string;
143
153
  end: string;
144
154
  role: string;
155
+ positionId?: string | undefined;
145
156
  status: import("../types").ShiftStatus;
146
157
  clock?: {
147
158
  in: string | null;
@@ -166,6 +177,28 @@ export declare function useScheduleShiftPopover(board: ScheduleBoardApi, demand:
166
177
  updatedAt?: string | undefined;
167
178
  splitGroupId?: string | undefined;
168
179
  }[] | null)[];
180
+ timeOff?: ({
181
+ timeOff: "approved" | "pending";
182
+ requestId?: string | undefined;
183
+ type?: "OFF_DAY" | "LEAVE" | undefined;
184
+ leaveType?: "ANNUAL" | "MEDICAL" | "EMERGENCY" | "UNPAID" | undefined;
185
+ reason: string;
186
+ half?: boolean | undefined;
187
+ halfPart?: "AM" | "PM" | undefined;
188
+ from?: string | undefined;
189
+ to?: string | undefined;
190
+ appliedOn?: string | undefined;
191
+ note?: string | undefined;
192
+ cert?: {
193
+ name: string;
194
+ size: string;
195
+ } | null | undefined;
196
+ bal?: {
197
+ type: string;
198
+ entitled: number;
199
+ used: number;
200
+ } | undefined;
201
+ } | null)[] | undefined;
169
202
  remarks: {
170
203
  author: string;
171
204
  date: string;
@@ -180,9 +213,16 @@ export declare function useScheduleShiftPopover(board: ScheduleBoardApi, demand:
180
213
  payBasis?: "hourly" | "monthly" | undefined;
181
214
  payAmount?: number | undefined;
182
215
  maxHours?: number | undefined;
183
- maxOtHours?: number | undefined;
184
216
  minHours?: number | undefined;
185
- otAfterDaily?: number | undefined;
217
+ minHoursPerDay?: number | undefined;
218
+ workingHours?: {
219
+ minHoursPerDay: number | null;
220
+ maxHoursPerDay: number | null;
221
+ maxHoursPerWeek: number | null;
222
+ } | undefined;
223
+ overtime?: {
224
+ maxHoursPerMonth: number | null;
225
+ } | undefined;
186
226
  preferences?: string[] | undefined;
187
227
  seniority?: "senior" | "junior" | "" | undefined;
188
228
  availDays?: boolean[] | undefined;
@@ -191,6 +231,7 @@ export declare function useScheduleShiftPopover(board: ScheduleBoardApi, demand:
191
231
  to: string;
192
232
  }[] | undefined;
193
233
  passcode?: string | undefined;
234
+ code?: string | undefined;
194
235
  masterUser?: boolean | undefined;
195
236
  }[]>;
196
237
  isAssigned: import("vue").ComputedRef<boolean>;
@@ -200,9 +241,9 @@ export declare function useScheduleShiftPopover(board: ScheduleBoardApi, demand:
200
241
  isSingleOpenRecord: import("vue").ComputedRef<boolean>;
201
242
  totalHours: import("vue").ComputedRef<number>;
202
243
  totalLabel: import("vue").ComputedRef<string>;
203
- warnings: import("vue").ComputedRef<string[]>;
204
- openForEmployee: (forEmpId: number, day: number, roleHint?: string, hours?: ScheduleShiftSegment, slotIndex?: number) => void;
205
- openForNewOpenShift: (day: number, roleHint?: string, hours?: ScheduleShiftSegment) => void;
244
+ warnings: import("vue").ComputedRef<ScheduleWarningPart[][]>;
245
+ openForEmployee: (forEmpId: number, day: number, roleHint?: string, hours?: ScheduleShiftSegment, slotIndex?: number, warnAvailability?: boolean) => void;
246
+ openForNewOpenShift: (day: number, roleHint?: string, hours?: ScheduleShiftSegment, requireAssignment?: boolean) => void;
206
247
  openForEditOpenShift: (openShiftId: number) => void;
207
248
  close: () => void;
208
249
  removeSegment: (i: number) => void;
@@ -4,12 +4,17 @@ export interface CountryScheduleRules {
4
4
  timezone: string;
5
5
  payRate: PayRate;
6
6
  overtime: {
7
- maxMonthlyHours: number | null;
8
- afterDailyHours: number | null;
7
+ maxHoursPerMonth: number | null;
9
8
  };
10
9
  workingHours: {
11
- standardWeeklyHours: number | null;
12
- maxDailyHours: number | null;
10
+ fullTime: {
11
+ minHoursPerDay: number | null;
12
+ maxHoursPerDay: number | null;
13
+ maxHoursPerWeek: number | null;
14
+ };
15
+ partTime: {
16
+ maxHoursPerWeek: number | null;
17
+ };
13
18
  };
14
19
  recurringPublicHolidays: Array<{
15
20
  month: number;
@@ -24,7 +24,26 @@ export declare const SECTIONS: Section[];
24
24
  export declare function positionIdOf(name: string): string | undefined;
25
25
  /** The selector shape every position-carrying save request wants — `undefined` for a blank
26
26
  * name (the field itself has nothing to name), a resolved id alongside the name otherwise. */
27
- export declare function positionSelectorOf(name: string | undefined): FdtoSchedulePositionSelectorReq | undefined;
27
+ export declare function positionSelectorOf(name: string | undefined, positionId?: string): FdtoSchedulePositionSelectorReq | undefined;
28
+ /** Position IDs are authoritative after a rename. Keep the stored name only as a fallback for
29
+ * archived or legacy references that cannot be resolved back to the active catalogue. */
30
+ export declare function positionNameOf(position: {
31
+ positionId?: string | null;
32
+ positionName: string;
33
+ } | null | undefined, catalogue?: readonly {
34
+ id: string;
35
+ name: string;
36
+ }[]): string | undefined;
37
+ /** Resolves a position only when it still exists in the active catalogue. */
38
+ export declare function activePositionNameOf(position: {
39
+ positionId?: string | null;
40
+ positionName: string;
41
+ } | null | undefined, catalogue?: readonly {
42
+ id: string;
43
+ name: string;
44
+ }[]): string | undefined;
45
+ /** A saved position reference can outlive its catalogue entry after a soft delete. */
46
+ export declare function isArchivedPosition(name: string | undefined, positionId?: string): boolean;
28
47
  /** Which coverage positions a station label counts toward. Positions ARE the roles in this
29
48
  * model — a shift records the position it is for — so nothing needs translating and this stays
30
49
  * empty, which makes `positionKeyOf()` pass a role through unchanged. */
@@ -87,6 +106,7 @@ export declare function scheduleDemand(): {
87
106
  n: number;
88
107
  roles: Array<{
89
108
  position: string;
109
+ positionId?: string;
90
110
  n: number;
91
111
  }>;
92
112
  }>>;
@@ -96,6 +116,7 @@ export declare function scheduleDemand(): {
96
116
  n: number;
97
117
  roles: Array<{
98
118
  position: string;
119
+ positionId?: string;
99
120
  n: number;
100
121
  }>;
101
122
  }>>;