@feedmepos/mf-hrm-portal 2.3.0-dev.18 → 2.3.0-dev.19
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-B10IvyLu.js → ApprovalCodeList-INrLNl4W.js} +7 -7
- package/dist/{AuditLogList-BJ8GXIzu.js → AuditLogList-BDgSBAPi.js} +5 -5
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DfXqKPnU.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BQS6Y708.js} +2 -2
- package/dist/{EmployeeList-CNj262HG.js → EmployeeList-DsuNI7P7.js} +264 -254
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-BvSLGM1C.js → FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js} +6 -6
- package/dist/{GrantUserList-R259wy0R.js → GrantUserList-Bmgie1HE.js} +8 -8
- package/dist/{Main-DZ5T4TP1.js → Main-B1e9eyqv.js} +11 -11
- package/dist/{Main-yUEWFlC3.js → Main-BKt8r7Ut.js} +8 -8
- package/dist/{Main-DLgW7BX_.js → Main-SBhiLPdR.js} +5 -5
- package/dist/{PermissionSetList-Xrzkx52n.js → PermissionSetList-CMOKTS_m.js} +18 -19
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BhR3MM-s.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-K1Ad4e-f.js} +1071 -1071
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js} +1 -1
- package/dist/{RoleList-RRDkrVmu.js → RoleList-DcbQo51I.js} +20 -21
- package/dist/SelectFilter-ATOm0hdn.js +269 -0
- package/dist/{TeamMemberList-CPpBsvi7.js → TeamMemberList-Bvjq14lE.js} +24 -25
- package/dist/{TimesheetList-CWl2faUZ.js → TimesheetList-CybTPHdT.js} +10 -10
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-Dc0_djRp.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-CGmVMnqS.js} +3 -3
- package/dist/{app-COWpQb6i.js → app-CEcv-vMB.js} +2893 -3966
- package/dist/app.js +1 -1
- package/dist/{approval-code-BXUiojPH.js → approval-code-jIjkeVEb.js} +1 -1
- package/dist/{dayjs.min-Dv2S110T.js → dayjs.min-yw8fgQPr.js} +1 -1
- package/dist/{employee-Drs22uVf.js → employee-ByRgP_2p.js} +28 -29
- package/dist/{grant-user-CBJ3gEgW.js → grant-user-SNiDV22U.js} +1 -1
- package/dist/{iteration-B23jisFZ.js → iteration-B3Z1Ojal.js} +1 -1
- package/dist/{lodash-CQM_jgZN.js → lodash-D2BUlQJ1.js} +1 -1
- package/dist/{restaurant-D2mfKHaH.js → restaurant-BTpBmfBV.js} +224 -230
- package/dist/{role-k4mdt-op.js → role-_BDO50Cj.js} +2 -2
- package/dist/{rule-xOAXApqp.js → rule-FuP71XrW.js} +36 -36
- package/dist/src/api/restaurant/index.d.ts +0 -2
- package/dist/src/composables/useDiscardConfirm.d.ts +1 -3
- package/dist/src/composables/useMessage.d.ts +2 -8
- package/dist/src/router/shared.d.ts +1 -4
- package/dist/src/types/employee.d.ts +0 -1
- package/dist/src/views/audit-log/locales/index.d.ts +0 -252
- 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/{useAppStore-DZCdxlCd.js → useAppStore-DCwd8GWN.js} +1 -1
- package/dist/useDiscardConfirm-DPhEV6v0.js +157 -0
- package/dist/{useLoading-Nygx2zn8.js → useLoading-CXzTpIVv.js} +1 -1
- package/dist/{useReportPermissions-BB4JiYDf.js → useReportPermissions-5AYWAQ8e.js} +3 -3
- package/package.json +2 -4
- package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +0 -132
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BhkmMQxt.js +0 -532
- package/dist/ScheduleGeneralPage-CfcIh0Fy.js +0 -776
- package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-WYuVJxed.js +0 -2435
- package/dist/SchedulePage-CHu1VI-U.js +0 -19201
- package/dist/SchedulePositionPage-Dx2fZ1QI.js +0 -262
- package/dist/SelectFilter-DoeKbbjT.js +0 -264
- package/dist/object-Dwyg2LgX.js +0 -16
- package/dist/src/api/schedule/index.d.ts +0 -63
- package/dist/src/components/layout/PortalShell.vue.d.ts +0 -12
- package/dist/src/components/layout/withScheduleShell.d.ts +0 -10
- package/dist/src/types/schedule.d.ts +0 -23
- package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +0 -3
- package/dist/src/views/scheduling/SchedulePage.vue.d.ts +0 -3
- package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +0 -3
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +0 -10
- package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +0 -41
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleModal.vue.d.ts +0 -10
- package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +0 -25
- package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +0 -17
- package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +0 -31
- package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +0 -29
- package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +0 -32
- package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +0 -26
- package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +0 -17
- package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +0 -38
- package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +0 -22
- package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +0 -23
- package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleCoach.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleCompletionDialog.vue.d.ts +0 -15
- package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +0 -35
- package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +0 -17
- package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +0 -2
- package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +0 -17
- package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +0 -23
- package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +0 -10
- package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +0 -2
- package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +0 -17
- package/dist/src/views/scheduling/components/ScheduleExportPreview.vue.d.ts +0 -7
- package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +0 -18
- package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +0 -18
- package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +0 -2
- package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +0 -9
- package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +0 -26
- package/dist/src/views/scheduling/components/ScheduleOnboardingAssignPositionModal.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOnboardingClosedDayConfirm.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOnboardingDemandDays.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +0 -2
- package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +0 -10
- package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +0 -11
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +0 -9
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +0 -11
- package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +0 -2
- package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +0 -70
- package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +0 -35
- package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +0 -10
- package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +0 -16
- package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +0 -25
- package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +0 -16
- package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +0 -50
- package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +0 -12
- package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +0 -8
- package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +0 -6
- package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +0 -20
- package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +0 -33
- package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +0 -5
- package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +0 -7
- package/dist/src/views/scheduling/composables/onboarding-types.d.ts +0 -51
- package/dist/src/views/scheduling/composables/remyPrompt.d.ts +0 -15
- package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +0 -82
- package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +0 -63
- package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +0 -9
- package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +0 -7
- package/dist/src/views/scheduling/composables/schedule-cost.d.ts +0 -19
- package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +0 -21
- package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +0 -23
- package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +0 -7
- package/dist/src/views/scheduling/composables/schedule-error.d.ts +0 -3
- package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +0 -14
- package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +0 -16
- package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +0 -22
- package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +0 -29
- package/dist/src/views/scheduling/composables/schedule-time.d.ts +0 -8
- package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +0 -7
- package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +0 -9
- package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +0 -16
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +0 -119
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +0 -73
- package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +0 -50
- package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +0 -11
- package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +0 -13
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +0 -297
- package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +0 -612
- package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +0 -27
- package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +0 -28
- package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +0 -21
- package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +0 -80
- package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +0 -12
- package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +0 -60
- package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +0 -44
- package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +0 -111
- package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +0 -59
- package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +0 -47
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +0 -166
- package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +0 -55
- package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +0 -24
- package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +0 -13
- package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +0 -30
- package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +0 -7
- package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +0 -22
- package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +0 -50
- package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +0 -38
- package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +0 -30
- package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +0 -16
- package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +0 -18
- package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +0 -51
- package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +0 -14
- package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +0 -79
- package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +0 -59
- package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +0 -15
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +0 -58
- package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +0 -45
- package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +0 -231
- package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +0 -9
- package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +0 -15
- package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +0 -11
- package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +0 -13
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +0 -1521
- package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +0 -25
- package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +0 -18
- package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +0 -9
- package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +0 -21
- package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +0 -20
- package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +0 -21
- package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +0 -22
- package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +0 -21
- package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +0 -19
- package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +0 -55
- package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +0 -35
- package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +0 -126
- package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +0 -11
- package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +0 -27
- package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +0 -313
- package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +0 -40
- package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +0 -17
- package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +0 -245
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +0 -63
- package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +0 -17
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +0 -255
- package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +0 -27
- package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +0 -49
- package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +0 -95
- package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +0 -9
- package/dist/src/views/scheduling/country-rules/index.d.ts +0 -29
- package/dist/src/views/scheduling/data.d.ts +0 -123
- package/dist/src/views/scheduling/locales/index.d.ts +0 -688
- package/dist/src/views/scheduling/schedule-constants.d.ts +0 -7
- package/dist/src/views/scheduling/schedule-state.d.ts +0 -767
- package/dist/src/views/scheduling/schedule-store.d.ts +0 -135
- package/dist/src/views/scheduling/types.d.ts +0 -380
- package/dist/useDiscardConfirm-CzZSPyvh.js +0 -28
|
@@ -1,2435 +0,0 @@
|
|
|
1
|
-
import { onMounted as Le, onBeforeUnmount as Ie, ref as E, reactive as I, shallowRef as we, watch as Te, computed as B, defineComponent as Re, createElementBlock as k, openBlock as b, renderSlot as Ve, useAttrs as ua, nextTick as Pe, normalizeClass as pe, createElementVNode as Y, createBlock as da, mergeProps as ca, toDisplayString as V, Teleport as ma, createCommentVNode as K, withDirectives as ya, vModelText as pa, Fragment as He, renderList as fa, createTextVNode as ha, withModifiers as va, normalizeStyle as ga } from "vue";
|
|
2
|
-
import { useRoute as Da, useRouter as wa } from "vue-router";
|
|
3
|
-
import { useCoreStore as Ke } from "@feedmepos/mf-common";
|
|
4
|
-
import { g, b as h, u as Ha } from "./restaurant-D2mfKHaH.js";
|
|
5
|
-
import { E as be, u as Ge } from "./employee-Drs22uVf.js";
|
|
6
|
-
import { t as Oe, q as Aa } from "./rule-xOAXApqp.js";
|
|
7
|
-
function jn(e) {
|
|
8
|
-
let a = null;
|
|
9
|
-
function t() {
|
|
10
|
-
if (!a) return;
|
|
11
|
-
a.style.height = "";
|
|
12
|
-
const n = a.getBoundingClientRect().top;
|
|
13
|
-
a.style.height = `${Math.max(0, window.innerHeight - n)}px`;
|
|
14
|
-
}
|
|
15
|
-
Le(() => {
|
|
16
|
-
var n;
|
|
17
|
-
a = ((n = e.value) == null ? void 0 : n.closest(".sch-page")) ?? null, t(), window.addEventListener("resize", t);
|
|
18
|
-
}), Ie(() => {
|
|
19
|
-
window.removeEventListener("resize", t), a && (a.style.height = "");
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
function ke(e) {
|
|
23
|
-
const [a, t] = String(e || "0:0").split(":").map(Number);
|
|
24
|
-
return (Number.isFinite(a) ? a : 0) * 60 + (Number.isFinite(t) ? t : 0);
|
|
25
|
-
}
|
|
26
|
-
function Ea(e) {
|
|
27
|
-
const a = Math.max(0, Math.min(1439, Math.round(e)));
|
|
28
|
-
return `${String(Math.floor(a / 60)).padStart(2, "0")}:${String(a % 60).padStart(2, "0")}`;
|
|
29
|
-
}
|
|
30
|
-
function Pa(e, a) {
|
|
31
|
-
const t = ke(e);
|
|
32
|
-
let n = ke(a);
|
|
33
|
-
return n <= t && (n += 1440), [t, n];
|
|
34
|
-
}
|
|
35
|
-
function je(e, a) {
|
|
36
|
-
const [t, n] = Pa(e, a);
|
|
37
|
-
return Math.max(0, n - t);
|
|
38
|
-
}
|
|
39
|
-
function ba(e) {
|
|
40
|
-
const a = (ke(e) % 1440 + 1440) % 1440, t = Math.floor(a / 60), n = a % 60, s = t < 12 ? "am" : "pm", i = t % 12 || 12;
|
|
41
|
-
return n ? `${i}:${String(n).padStart(2, "0")}${s}` : `${i}${s}`;
|
|
42
|
-
}
|
|
43
|
-
function Qn(e) {
|
|
44
|
-
return ba(Ea(e % 1440));
|
|
45
|
-
}
|
|
46
|
-
function Qe(e) {
|
|
47
|
-
const a = Array.isArray(e) ? e : e == null ? void 0 : e.breaks;
|
|
48
|
-
return a != null && a.length ? a.reduce((t, n) => {
|
|
49
|
-
if (n.type === "DURATION") return t + n.minutes;
|
|
50
|
-
const [s, i] = n.startTime.split(":").map(Number), [r, o] = n.endTime.split(":").map(Number);
|
|
51
|
-
let d = r * 60 + o - (s * 60 + i);
|
|
52
|
-
return d < 0 && (d += 24 * 60), t + d;
|
|
53
|
-
}, 0) : Math.max(0, e && !Array.isArray(e) ? e.breakMins ?? 0 : 0);
|
|
54
|
-
}
|
|
55
|
-
function Xn(e, a) {
|
|
56
|
-
var s;
|
|
57
|
-
const t = a ?? je(e.start, e.end), n = (s = e.breaks) != null && s.length ? e.breaks.reduce((i, r) => i + (r.breakPayType === "UNPAID" ? Qe([r]) : 0), 0) : Math.max(0, e.breakMins ?? 0);
|
|
58
|
-
return Math.max(0, t - Math.min(t, n));
|
|
59
|
-
}
|
|
60
|
-
function Jn(e) {
|
|
61
|
-
const a = Math.max(0, Math.round(e ?? 0));
|
|
62
|
-
return a ? [{ type: "DURATION", minutes: a, breakPayType: "UNPAID" }] : [];
|
|
63
|
-
}
|
|
64
|
-
const te = 500, ka = 10, $e = 6, Zn = 1500, Xe = 1e6, H = {
|
|
65
|
-
async completeOnboarding(e, a) {
|
|
66
|
-
return g(
|
|
67
|
-
await h(`restaurants/${e}/schedules`).post("onboarding", a)
|
|
68
|
-
);
|
|
69
|
-
},
|
|
70
|
-
async listEmployeeProfiles(e) {
|
|
71
|
-
return g(
|
|
72
|
-
await h("schedules").get("employees", {
|
|
73
|
-
params: e != null && e.length ? { ids: e.join(",") } : void 0
|
|
74
|
-
})
|
|
75
|
-
);
|
|
76
|
-
},
|
|
77
|
-
async listEmployeeConfigs(e) {
|
|
78
|
-
return g(
|
|
79
|
-
await h(`restaurants/${e}/schedules`).get("employee-configs")
|
|
80
|
-
);
|
|
81
|
-
},
|
|
82
|
-
async saveEmployeeConfigs(e, a) {
|
|
83
|
-
return g(
|
|
84
|
-
await h(`restaurants/${e}/schedules`).post(
|
|
85
|
-
"employee-configs/reorder",
|
|
86
|
-
a
|
|
87
|
-
)
|
|
88
|
-
);
|
|
89
|
-
},
|
|
90
|
-
async getSettings(e) {
|
|
91
|
-
return g(
|
|
92
|
-
await h(`restaurants/${e}/schedules`).get("settings")
|
|
93
|
-
);
|
|
94
|
-
},
|
|
95
|
-
async saveSettings(e, a) {
|
|
96
|
-
return g(
|
|
97
|
-
await h(`restaurants/${e}/schedules`).post("settings", a)
|
|
98
|
-
);
|
|
99
|
-
},
|
|
100
|
-
async generateAutoSchedule(e, a) {
|
|
101
|
-
return g(
|
|
102
|
-
await h(`restaurants/${e}/schedules`).post(
|
|
103
|
-
"auto-schedule/generate",
|
|
104
|
-
a
|
|
105
|
-
)
|
|
106
|
-
);
|
|
107
|
-
},
|
|
108
|
-
async getAutoScheduleCapabilities(e) {
|
|
109
|
-
return g(
|
|
110
|
-
await h(`restaurants/${e}/schedules`).get(
|
|
111
|
-
"auto-schedule/capabilities"
|
|
112
|
-
)
|
|
113
|
-
);
|
|
114
|
-
},
|
|
115
|
-
async applyAutoSchedule(e, a) {
|
|
116
|
-
return g(
|
|
117
|
-
await h(`restaurants/${e}/schedules`).post(
|
|
118
|
-
"auto-schedule/apply",
|
|
119
|
-
a
|
|
120
|
-
)
|
|
121
|
-
);
|
|
122
|
-
},
|
|
123
|
-
/** One outlet's whole board over `[from, to]` (inclusive, 'YYYY-MM-DD'). */
|
|
124
|
-
async readBoard(e, a, t) {
|
|
125
|
-
return g(
|
|
126
|
-
await h(`restaurants/${e}/schedules`).get("board", {
|
|
127
|
-
params: { from: a, to: t }
|
|
128
|
-
})
|
|
129
|
-
);
|
|
130
|
-
},
|
|
131
|
-
async createTimeOff(e, a) {
|
|
132
|
-
return g(
|
|
133
|
-
await h(`restaurants/${e}/schedules`).post("time-off", a)
|
|
134
|
-
);
|
|
135
|
-
},
|
|
136
|
-
async updateTimeOffStatus(e, a, t) {
|
|
137
|
-
return g(
|
|
138
|
-
await h(`restaurants/${e}/schedules`).post(
|
|
139
|
-
`time-off/${a}/status`,
|
|
140
|
-
t
|
|
141
|
-
)
|
|
142
|
-
);
|
|
143
|
-
},
|
|
144
|
-
async deleteTimeOff(e, a) {
|
|
145
|
-
await h(`restaurants/${e}/schedules`).delete(`time-off/${a}`);
|
|
146
|
-
},
|
|
147
|
-
/** Creates or updates the employee's shared business-level scheduling profile. */
|
|
148
|
-
async createEmployeeProfile(e, a) {
|
|
149
|
-
return g(await h("schedules").post("employees", a));
|
|
150
|
-
},
|
|
151
|
-
/** Edits the employee's shared business-level scheduling profile. */
|
|
152
|
-
async updateEmployeeProfile(e, a, t) {
|
|
153
|
-
return g(
|
|
154
|
-
await h("schedules").post("employees", { employeeId: a, ...t })
|
|
155
|
-
);
|
|
156
|
-
},
|
|
157
|
-
async validatePosAccess(e) {
|
|
158
|
-
await h("schedules").post("employees/validate-pos-access", e);
|
|
159
|
-
},
|
|
160
|
-
/** Positions are shared across the business. */
|
|
161
|
-
async createPosition(e) {
|
|
162
|
-
return g(await h("schedules").post("positions", e));
|
|
163
|
-
},
|
|
164
|
-
async updatePosition(e, a) {
|
|
165
|
-
return g(await h("schedules").post(`positions/${e}`, a));
|
|
166
|
-
},
|
|
167
|
-
/** Deleting one position is `deletePositions` with a single-id array — the backend's
|
|
168
|
-
* `DELETE positions/:id` route is gone; this is now `DELETE positions?ids=`. */
|
|
169
|
-
async deletePosition(e) {
|
|
170
|
-
await h("schedules").delete("positions", {
|
|
171
|
-
params: { ids: e }
|
|
172
|
-
});
|
|
173
|
-
},
|
|
174
|
-
/** Creates one flat demand interval. */
|
|
175
|
-
async createDemand(e, a) {
|
|
176
|
-
return g(
|
|
177
|
-
await h(`restaurants/${e}/schedules`).post("demands", a)
|
|
178
|
-
);
|
|
179
|
-
},
|
|
180
|
-
/** Deletes a batch of demands in one request — e.g. `saveDemand` replacing a whole
|
|
181
|
-
* day/weekday's demand rows wholesale. Deleting one demand is just this with a single-id
|
|
182
|
-
* array. */
|
|
183
|
-
async deleteDemands(e, a) {
|
|
184
|
-
return g(
|
|
185
|
-
await h(`restaurants/${e}/schedules`).delete("demands", {
|
|
186
|
-
params: { ids: a.join(",") }
|
|
187
|
-
})
|
|
188
|
-
);
|
|
189
|
-
},
|
|
190
|
-
/** Atomically replaces one date/weekday's flattened demand rows. */
|
|
191
|
-
async replaceDemands(e, a) {
|
|
192
|
-
return g(
|
|
193
|
-
await h(`restaurants/${e}/schedules`).post(
|
|
194
|
-
"demands/replace",
|
|
195
|
-
a
|
|
196
|
-
)
|
|
197
|
-
);
|
|
198
|
-
},
|
|
199
|
-
/** Atomically replaces several date/weekday demand generations. */
|
|
200
|
-
async bulkReplaceDemands(e, a) {
|
|
201
|
-
return g(
|
|
202
|
-
await h(`restaurants/${e}/schedules`).post(
|
|
203
|
-
"demands/bulk-replace",
|
|
204
|
-
a
|
|
205
|
-
)
|
|
206
|
-
);
|
|
207
|
-
},
|
|
208
|
-
/** Replaces one date's note/holiday-mark. All three fields back to empty/false clears it. */
|
|
209
|
-
async saveScheduleDay(e, a, t) {
|
|
210
|
-
return g(
|
|
211
|
-
await h(`restaurants/${e}/schedules`).post(
|
|
212
|
-
`days/${a}`,
|
|
213
|
-
t
|
|
214
|
-
)
|
|
215
|
-
);
|
|
216
|
-
},
|
|
217
|
-
/** A one-off shift assignment. */
|
|
218
|
-
async createAssignment(e, a) {
|
|
219
|
-
return g(
|
|
220
|
-
await h(`restaurants/${e}/schedules`).post("assignments", a)
|
|
221
|
-
);
|
|
222
|
-
},
|
|
223
|
-
async updateAssignment(e, a, t) {
|
|
224
|
-
return g(
|
|
225
|
-
await h(`restaurants/${e}/schedules`).patch(
|
|
226
|
-
`assignments/${a}`,
|
|
227
|
-
t
|
|
228
|
-
)
|
|
229
|
-
);
|
|
230
|
-
},
|
|
231
|
-
/** Atomically applies assignment updates, creates, and deletes used by moves and swaps. */
|
|
232
|
-
async bulkSaveAssignments(e, a) {
|
|
233
|
-
return g(
|
|
234
|
-
await h(`restaurants/${e}/schedules`).post(
|
|
235
|
-
"assignments/bulk",
|
|
236
|
-
a
|
|
237
|
-
)
|
|
238
|
-
);
|
|
239
|
-
},
|
|
240
|
-
/** Replaces demand and/or assignments in one backend transaction. */
|
|
241
|
-
async copySchedule(e, a) {
|
|
242
|
-
return g(
|
|
243
|
-
await h(`restaurants/${e}/schedules`).post("copy", a)
|
|
244
|
-
);
|
|
245
|
-
},
|
|
246
|
-
/** Clears demand and/or assignments in one backend transaction. */
|
|
247
|
-
async clearSchedule(e, a) {
|
|
248
|
-
return g(
|
|
249
|
-
await h(`restaurants/${e}/schedules`).post("clear", a)
|
|
250
|
-
);
|
|
251
|
-
},
|
|
252
|
-
/** Deletes a batch of assignments in one request — e.g. a shift split into several segments
|
|
253
|
-
* getting replaced wholesale. Deleting one assignment is just this with a single-id
|
|
254
|
-
* array. */
|
|
255
|
-
async deleteAssignments(e, a) {
|
|
256
|
-
return g(
|
|
257
|
-
await h(`restaurants/${e}/schedules`).delete("assignments", {
|
|
258
|
-
params: { ids: a.join(",") }
|
|
259
|
-
})
|
|
260
|
-
);
|
|
261
|
-
},
|
|
262
|
-
/** Flips a batch of assignments to one status in a single request — e.g. Publish sending
|
|
263
|
-
* every DRAFT shift on the board to PUBLISHED at once. */
|
|
264
|
-
async bulkUpdateAssignmentStatus(e, a) {
|
|
265
|
-
return g(
|
|
266
|
-
await h(`restaurants/${e}/schedules`).patch(
|
|
267
|
-
"assignments/bulk-status",
|
|
268
|
-
a
|
|
269
|
-
)
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
}, Je = {
|
|
273
|
-
payload: we(null),
|
|
274
|
-
loading: E(!1),
|
|
275
|
-
rosterLoading: E(!1),
|
|
276
|
-
loadError: E(null),
|
|
277
|
-
scheduleSetupCompleted: E(!1),
|
|
278
|
-
dataVersion: E(0),
|
|
279
|
-
outletId: E(""),
|
|
280
|
-
restaurantEmployees: E([]),
|
|
281
|
-
employeeConfigs: E([]),
|
|
282
|
-
employeeOutletIds: we({}),
|
|
283
|
-
businessEmployees: we([]),
|
|
284
|
-
positions: I([]),
|
|
285
|
-
positionRecords: I([]),
|
|
286
|
-
rolePositions: I({}),
|
|
287
|
-
outlet: I({ name: "" }),
|
|
288
|
-
locationOptions: I([]),
|
|
289
|
-
locationLabelById: I({}),
|
|
290
|
-
departmentOptions: I([]),
|
|
291
|
-
compensationGroupOptions: I([]),
|
|
292
|
-
compensationGroupMeta: I({}),
|
|
293
|
-
existingStaff: I([]),
|
|
294
|
-
shiftTemplates: I([]),
|
|
295
|
-
rules: I({
|
|
296
|
-
coverage: {},
|
|
297
|
-
openFrom: "00:00",
|
|
298
|
-
openTo: "24:00",
|
|
299
|
-
dayHours: Array.from({ length: 7 }, () => []),
|
|
300
|
-
payRate: {
|
|
301
|
-
NORMAL: { overtime: 1.5 },
|
|
302
|
-
REST_DAY: { regular: 1, overtime: 2 },
|
|
303
|
-
PUBLIC_HOLIDAY: { regular: 2, overtime: 3 }
|
|
304
|
-
},
|
|
305
|
-
salesForecast: 0,
|
|
306
|
-
closedWeekdays: [],
|
|
307
|
-
labourTarget: 0,
|
|
308
|
-
budgetFromSales: !1,
|
|
309
|
-
budget: 0,
|
|
310
|
-
otCapHours: null,
|
|
311
|
-
workingHours: {
|
|
312
|
-
minHoursPerDay: null,
|
|
313
|
-
maxHoursPerDay: 8,
|
|
314
|
-
maxHoursPerWeek: 45
|
|
315
|
-
},
|
|
316
|
-
otBudget: 0,
|
|
317
|
-
notify: {
|
|
318
|
-
waConnected: !1,
|
|
319
|
-
waNumber: "",
|
|
320
|
-
waDisplayName: "",
|
|
321
|
-
defaults: { wa: !1, push: !1, email: !1 }
|
|
322
|
-
}
|
|
323
|
-
})
|
|
324
|
-
}, {
|
|
325
|
-
payload: l,
|
|
326
|
-
loading: xe,
|
|
327
|
-
rosterLoading: Ye,
|
|
328
|
-
loadError: fe,
|
|
329
|
-
scheduleSetupCompleted: Ze,
|
|
330
|
-
dataVersion: Q,
|
|
331
|
-
outletId: m,
|
|
332
|
-
restaurantEmployees: re,
|
|
333
|
-
employeeConfigs: W,
|
|
334
|
-
employeeOutletIds: qe,
|
|
335
|
-
businessEmployees: Ae,
|
|
336
|
-
positions: Na,
|
|
337
|
-
positionRecords: F,
|
|
338
|
-
rolePositions: qn,
|
|
339
|
-
outlet: Sa,
|
|
340
|
-
locationOptions: Be,
|
|
341
|
-
locationLabelById: oe,
|
|
342
|
-
compensationGroupMeta: eo,
|
|
343
|
-
existingStaff: ao,
|
|
344
|
-
shiftTemplates: to,
|
|
345
|
-
rules: N
|
|
346
|
-
} = Je;
|
|
347
|
-
function Ca() {
|
|
348
|
-
const e = Je.rules;
|
|
349
|
-
Object.keys(e.coverage).forEach((a) => delete e.coverage[a]), e.openFrom = "00:00", e.openTo = "24:00", e.dayHours.splice(0, e.dayHours.length, ...Array.from({ length: 7 }, () => [])), Object.assign(e.payRate.NORMAL, { overtime: 1.5 }), Object.assign(e.payRate.REST_DAY, { regular: 1, overtime: 2 }), Object.assign(e.payRate.PUBLIC_HOLIDAY, { regular: 2, overtime: 3 }), e.salesForecast = 0, e.closedWeekdays.splice(0, e.closedWeekdays.length), e.labourTarget = 0, e.budgetFromSales = !1, e.budget = 0, e.otCapHours = null, e.workingHours = {
|
|
350
|
-
minHoursPerDay: null,
|
|
351
|
-
maxHoursPerDay: 8,
|
|
352
|
-
maxHoursPerWeek: 45
|
|
353
|
-
}, e.otBudget = 0, Object.assign(e.notify, {
|
|
354
|
-
waConnected: !1,
|
|
355
|
-
waNumber: "",
|
|
356
|
-
waDisplayName: "",
|
|
357
|
-
defaults: { wa: !1, push: !1, email: !1 }
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
const Ne = 7;
|
|
361
|
-
function Ma(e) {
|
|
362
|
-
const a = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
363
|
-
return `${a}-${t}-${n}`;
|
|
364
|
-
}
|
|
365
|
-
function se(e, a) {
|
|
366
|
-
const t = new Date(e);
|
|
367
|
-
return t.setDate(t.getDate() + a), t;
|
|
368
|
-
}
|
|
369
|
-
function Se(e) {
|
|
370
|
-
const a = new Date(e);
|
|
371
|
-
return a.setHours(0, 0, 0, 0), a.setDate(a.getDate() - (a.getDay() + 6) % 7), a;
|
|
372
|
-
}
|
|
373
|
-
function no(e, a = /* @__PURE__ */ new Date()) {
|
|
374
|
-
const t = se(Se(a), e * Ne);
|
|
375
|
-
return Array.from({ length: Ne }, (n, s) => se(t, s));
|
|
376
|
-
}
|
|
377
|
-
function oo(e, a) {
|
|
378
|
-
const t = (i) => Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()), n = t(Se(e)), s = t(Se(a));
|
|
379
|
-
return Math.trunc((s - n) / (Ne * 24 * 60 * 60 * 1e3));
|
|
380
|
-
}
|
|
381
|
-
const X = Ma;
|
|
382
|
-
let J = null, Z = null, G = null, ne = 0, he = null;
|
|
383
|
-
function _e(e) {
|
|
384
|
-
return e === m.value ? !1 : (Ca(), m.value = e, l.value = null, J = null, Z = null, fe.value = null, he = null, Ze.value = !1, re.value = [], W.value = [], G = null, ne += 1, Q.value += 1, !0);
|
|
385
|
-
}
|
|
386
|
-
async function Ce(e) {
|
|
387
|
-
if (!(!e || he === e)) {
|
|
388
|
-
Ye.value = !0;
|
|
389
|
-
try {
|
|
390
|
-
await La(e);
|
|
391
|
-
} finally {
|
|
392
|
-
Ye.value = !1;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
async function La(e) {
|
|
397
|
-
const a = await be.readEmployeesPage({
|
|
398
|
-
limit: te,
|
|
399
|
-
offset: 0,
|
|
400
|
-
restaurantIds: [e]
|
|
401
|
-
});
|
|
402
|
-
e === m.value && (re.value = a.items, W.value = await H.listEmployeeConfigs(e), he = e, Q.value += 1, $a().then((t) => {
|
|
403
|
-
e === m.value && (qe.value = t, Q.value += 1);
|
|
404
|
-
}));
|
|
405
|
-
}
|
|
406
|
-
async function Ia(e) {
|
|
407
|
-
const a = m.value;
|
|
408
|
-
if (!a || !e.length) return;
|
|
409
|
-
const t = await H.saveEmployeeConfigs(a, { configs: e });
|
|
410
|
-
W.value = t, Q.value += 1;
|
|
411
|
-
}
|
|
412
|
-
async function so(e) {
|
|
413
|
-
const a = m.value;
|
|
414
|
-
if (!a) throw new Error("No outlet selected");
|
|
415
|
-
const t = await H.saveSettings(a, e);
|
|
416
|
-
return m.value === a && l.value && (l.value = { ...l.value, settings: t }), t;
|
|
417
|
-
}
|
|
418
|
-
async function Ta(e, a) {
|
|
419
|
-
const t = W.value.find((s) => s.employeeId === e), n = (t == null ? void 0 : t.displayOrder) ?? (a && W.value.some((s) => s.displayOrder !== null) ? Math.max(
|
|
420
|
-
0,
|
|
421
|
-
...W.value.filter(
|
|
422
|
-
(s) => s.displayOrder !== null
|
|
423
|
-
).map((s) => s.displayOrder)
|
|
424
|
-
) + 100 : null);
|
|
425
|
-
await Ia([{ employeeId: e, enabled: a, displayOrder: n }]);
|
|
426
|
-
}
|
|
427
|
-
async function Me() {
|
|
428
|
-
const e = m.value;
|
|
429
|
-
e && (he = null, await Ce(e));
|
|
430
|
-
}
|
|
431
|
-
async function Ra(e, a) {
|
|
432
|
-
const t = Ge(), n = (await j(!0)).find((o) => o._id === e);
|
|
433
|
-
if (!n) throw new Error("Could not find this employee");
|
|
434
|
-
const s = n.restaurantRole.map((o) => ({
|
|
435
|
-
restaurantId: o.restaurantId,
|
|
436
|
-
roleId: o.roleId
|
|
437
|
-
})), i = a(s);
|
|
438
|
-
if (!i.length)
|
|
439
|
-
throw new Error(
|
|
440
|
-
"An employee must keep at least 1 location, otherwise they are deleted. To delete them, use the Employee page."
|
|
441
|
-
);
|
|
442
|
-
(n.isMasterUser ? "master" : "user") === "master" ? await t.updateMasterEmployee(e, {
|
|
443
|
-
user: { name: n.name, passcode: n.passcode, code: n.code ?? "" },
|
|
444
|
-
roles: i,
|
|
445
|
-
previousRoles: s
|
|
446
|
-
}) : await t.updateEmployee(e, {
|
|
447
|
-
user: { name: n.name, passcode: n.passcode },
|
|
448
|
-
roles: i,
|
|
449
|
-
previousRoles: s
|
|
450
|
-
}), await j(!0);
|
|
451
|
-
}
|
|
452
|
-
async function io(e, a, t = "", n = !0) {
|
|
453
|
-
const s = [...new Set(a.filter(Boolean))];
|
|
454
|
-
s.length && (await Ra(e, (i) => [
|
|
455
|
-
...i.filter((r) => !s.includes(r.restaurantId)),
|
|
456
|
-
...s.map((r) => ({ restaurantId: r, roleId: t }))
|
|
457
|
-
]), n && m.value && s.includes(m.value) && await Ta(e, !0), await Me());
|
|
458
|
-
}
|
|
459
|
-
async function ro(e, a) {
|
|
460
|
-
const t = Ge(), n = (await j(!0)).find(
|
|
461
|
-
(f) => f._id === e
|
|
462
|
-
);
|
|
463
|
-
if (!n) throw new Error("Could not find this employee");
|
|
464
|
-
const s = (f) => f.slice().sort((D, C) => D.restaurantId.localeCompare(C.restaurantId)).map((D) => `${D.restaurantId}:${D.roleId}`).join("|"), i = s(n.restaurantRole) !== s(a.roles), r = n.name !== a.name || n.passcode !== a.passcode || n.isMasterUser !== a.masterUser || a.masterUser && (n.code ?? "") !== a.masterCode;
|
|
465
|
-
if (!i && !r) return;
|
|
466
|
-
const o = n.restaurantRole.map((f) => ({
|
|
467
|
-
restaurantId: f.restaurantId,
|
|
468
|
-
roleId: f.roleId
|
|
469
|
-
})), d = n.isMasterUser ? (await Oe.readTeamMembers()).find((f) => f.doc.posUserId === e) : void 0;
|
|
470
|
-
if (d) {
|
|
471
|
-
const f = Aa(), D = f.getPermissionAssignmentByUserId(d.id) ?? await f.readPermissionAssignmentByUserId(d.id), C = a.masterUser ? {
|
|
472
|
-
code: a.masterCode,
|
|
473
|
-
name: a.name,
|
|
474
|
-
passcode: a.passcode,
|
|
475
|
-
roles: a.roles
|
|
476
|
-
} : null;
|
|
477
|
-
await Oe.updateTeamMember(d.id, {
|
|
478
|
-
permissions: d.permissions,
|
|
479
|
-
customPermissions: (D == null ? void 0 : D.customPermissions) ?? d.permissions,
|
|
480
|
-
permissionSetIds: (D == null ? void 0 : D.permissionSetIds) ?? d.doc.permissionSetIds ?? [],
|
|
481
|
-
posUser: C
|
|
482
|
-
}), await j(!0), await Me();
|
|
483
|
-
return;
|
|
484
|
-
}
|
|
485
|
-
if (a.masterUser) {
|
|
486
|
-
const f = {
|
|
487
|
-
user: { name: a.name, passcode: a.passcode, code: a.masterCode },
|
|
488
|
-
roles: a.roles,
|
|
489
|
-
previousRoles: o
|
|
490
|
-
};
|
|
491
|
-
n.isMasterUser ? await t.updateMasterEmployee(e, f) : await t.migrateToMasterUser(e, f);
|
|
492
|
-
} else
|
|
493
|
-
n.isMasterUser ? await t.updateMasterEmployee(e, {
|
|
494
|
-
user: { name: n.name, passcode: n.passcode, code: n.code ?? "" },
|
|
495
|
-
roles: [],
|
|
496
|
-
previousRoles: o
|
|
497
|
-
}) : await t.updateEmployee(e, {
|
|
498
|
-
user: { name: a.name, passcode: a.passcode },
|
|
499
|
-
roles: a.roles,
|
|
500
|
-
previousRoles: o
|
|
501
|
-
});
|
|
502
|
-
await j(!0), await Me();
|
|
503
|
-
}
|
|
504
|
-
let ae = null;
|
|
505
|
-
async function Oa() {
|
|
506
|
-
const e = await be.readEmployeesPage({
|
|
507
|
-
limit: te,
|
|
508
|
-
offset: 0,
|
|
509
|
-
includeEmptyPasscode: !0
|
|
510
|
-
}), a = Math.min(ka, Math.ceil(e.total / te)), t = await Promise.all(
|
|
511
|
-
Array.from(
|
|
512
|
-
{ length: Math.max(0, a - 1) },
|
|
513
|
-
(n, s) => be.readEmployeesPage({
|
|
514
|
-
limit: te,
|
|
515
|
-
offset: (s + 1) * te,
|
|
516
|
-
includeEmptyPasscode: !0
|
|
517
|
-
})
|
|
518
|
-
)
|
|
519
|
-
);
|
|
520
|
-
return [...e.items, ...t.flatMap((n) => n.items)];
|
|
521
|
-
}
|
|
522
|
-
function j(e = !1) {
|
|
523
|
-
if (!e) {
|
|
524
|
-
if (ae) return ae;
|
|
525
|
-
if (Ae.value.length) return Promise.resolve(Ae.value);
|
|
526
|
-
}
|
|
527
|
-
const a = Oa().then((t) => (Ae.value = t, t)).finally(() => {
|
|
528
|
-
ae === a && (ae = null);
|
|
529
|
-
});
|
|
530
|
-
return ae = a, a;
|
|
531
|
-
}
|
|
532
|
-
async function $a() {
|
|
533
|
-
const e = {};
|
|
534
|
-
try {
|
|
535
|
-
(await j()).forEach((a) => {
|
|
536
|
-
e[a._id] = [...new Set(a.restaurantRole.map((t) => t.restaurantId))];
|
|
537
|
-
});
|
|
538
|
-
} catch {
|
|
539
|
-
return e;
|
|
540
|
-
}
|
|
541
|
-
return e;
|
|
542
|
-
}
|
|
543
|
-
function Fe(e, a) {
|
|
544
|
-
return J !== null && Z !== null && J <= e && Z >= a;
|
|
545
|
-
}
|
|
546
|
-
async function xa(e) {
|
|
547
|
-
const a = X(e), t = X(se(e, 6));
|
|
548
|
-
Fe(a, t) || G && (await G, Fe(a, t)) || await ea(
|
|
549
|
-
se(e, -7 * $e),
|
|
550
|
-
se(e, 7 * $e)
|
|
551
|
-
);
|
|
552
|
-
}
|
|
553
|
-
async function lo() {
|
|
554
|
-
!J || !Z || await ea(/* @__PURE__ */ new Date(`${J}T00:00:00`), /* @__PURE__ */ new Date(`${Z}T00:00:00`));
|
|
555
|
-
}
|
|
556
|
-
async function uo(e) {
|
|
557
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
558
|
-
const a = await H.createEmployeeProfile(m.value, e);
|
|
559
|
-
l.value && (l.value.employees.push(a), Q.value += 1);
|
|
560
|
-
}
|
|
561
|
-
async function co(e) {
|
|
562
|
-
await H.validatePosAccess(e);
|
|
563
|
-
}
|
|
564
|
-
async function mo(e, a) {
|
|
565
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
566
|
-
const t = await H.updateEmployeeProfile(m.value, e, a);
|
|
567
|
-
if (l.value) {
|
|
568
|
-
const n = l.value.employees.findIndex((s) => s.employeeId === e);
|
|
569
|
-
n > -1 && (l.value = {
|
|
570
|
-
...l.value,
|
|
571
|
-
employees: l.value.employees.map((s, i) => i === n ? t : s)
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
async function yo(e) {
|
|
576
|
-
const a = await H.createPosition(e);
|
|
577
|
-
l.value && (l.value = { ...l.value, positions: [...l.value.positions, a] });
|
|
578
|
-
}
|
|
579
|
-
async function po(e, a) {
|
|
580
|
-
const t = await H.updatePosition(e, a);
|
|
581
|
-
if (l.value) {
|
|
582
|
-
const n = l.value.positions.find((i) => i.id === e), s = (i) => i.positionId === e || !i.positionId && i.positionName === (n == null ? void 0 : n.name);
|
|
583
|
-
l.value = {
|
|
584
|
-
...l.value,
|
|
585
|
-
positions: l.value.positions.map((i) => i.id === e ? t : i),
|
|
586
|
-
employees: l.value.employees.map((i) => ({
|
|
587
|
-
...i,
|
|
588
|
-
primaryPosition: i.primaryPosition && s(i.primaryPosition) ? { ...i.primaryPosition, positionName: t.name } : i.primaryPosition,
|
|
589
|
-
secondaryPositions: i.secondaryPositions.map(
|
|
590
|
-
(r) => s(r) ? { ...r, positionName: t.name } : r
|
|
591
|
-
)
|
|
592
|
-
}))
|
|
593
|
-
};
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
async function fo(e) {
|
|
597
|
-
await H.deletePosition(e), l.value && (l.value = {
|
|
598
|
-
...l.value,
|
|
599
|
-
positions: l.value.positions.filter((a) => a.id !== e)
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
async function ho(e, a) {
|
|
603
|
-
var s;
|
|
604
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
605
|
-
const t = (s = l.value) == null ? void 0 : s.days.find((i) => i.date === e), n = await H.saveScheduleDay(m.value, e, {
|
|
606
|
-
...a,
|
|
607
|
-
expectedUpdatedAt: a.expectedUpdatedAt ?? (t == null ? void 0 : t.updatedAt)
|
|
608
|
-
});
|
|
609
|
-
if (l.value) {
|
|
610
|
-
const i = l.value.days.filter((r) => r.date !== e);
|
|
611
|
-
n && i.push(n), l.value = { ...l.value, days: i };
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
function Ya(e) {
|
|
615
|
-
const a = e.periods.flatMap((t) => {
|
|
616
|
-
const n = (t.roles ?? []).filter((r) => r.positionName && r.headcount > 0), s = n.reduce((r, o) => r + o.headcount, 0), i = {
|
|
617
|
-
startTime: t.startTime,
|
|
618
|
-
endTime: t.endTime
|
|
619
|
-
};
|
|
620
|
-
return [
|
|
621
|
-
...n.map((r) => ({
|
|
622
|
-
...i,
|
|
623
|
-
headcount: r.headcount,
|
|
624
|
-
position: { positionId: r.positionId, positionName: r.positionName }
|
|
625
|
-
})),
|
|
626
|
-
...t.headcount > s ? [{ ...i, headcount: t.headcount - s }] : []
|
|
627
|
-
];
|
|
628
|
-
});
|
|
629
|
-
return {
|
|
630
|
-
date: e.date,
|
|
631
|
-
demands: a
|
|
632
|
-
};
|
|
633
|
-
}
|
|
634
|
-
async function vo(e) {
|
|
635
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
636
|
-
if (!e.length) return;
|
|
637
|
-
const a = e.map(Ya), t = e.length === 1 ? await H.replaceDemands(m.value, a[0]) : await H.bulkReplaceDemands(m.value, { replacements: a });
|
|
638
|
-
if (l.value) {
|
|
639
|
-
const n = new Set(e.map((i) => i.date)), s = l.value.demands.filter((i) => i.date === null || !n.has(i.date));
|
|
640
|
-
l.value = { ...l.value, demands: [...s, ...t] };
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
async function go(e) {
|
|
644
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
645
|
-
return H.generateAutoSchedule(m.value, e);
|
|
646
|
-
}
|
|
647
|
-
async function Do() {
|
|
648
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
649
|
-
return H.getAutoScheduleCapabilities(m.value);
|
|
650
|
-
}
|
|
651
|
-
async function wo(e) {
|
|
652
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
653
|
-
return H.applyAutoSchedule(m.value, e);
|
|
654
|
-
}
|
|
655
|
-
async function Ho(e) {
|
|
656
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
657
|
-
const a = await H.bulkSaveAssignments(m.value, e);
|
|
658
|
-
if (l.value) {
|
|
659
|
-
const t = new Set(e.deleteIds), n = new Map(
|
|
660
|
-
l.value.assignments.filter((s) => !t.has(s.id)).map((s) => [s.id, s])
|
|
661
|
-
);
|
|
662
|
-
a.updated.forEach((s) => n.set(s.id, s)), a.created.forEach((s) => n.set(s.id, s)), l.value = { ...l.value, assignments: [...n.values()] };
|
|
663
|
-
}
|
|
664
|
-
return a;
|
|
665
|
-
}
|
|
666
|
-
async function Ao(e) {
|
|
667
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
668
|
-
return H.copySchedule(m.value, e);
|
|
669
|
-
}
|
|
670
|
-
async function Eo(e) {
|
|
671
|
-
var t;
|
|
672
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
673
|
-
const a = await H.clearSchedule(m.value, e);
|
|
674
|
-
if (l.value) {
|
|
675
|
-
const n = new Set(
|
|
676
|
-
(((t = e.demand) == null ? void 0 : t.replacements) ?? []).map((r) => r.date)
|
|
677
|
-
), s = new Set(a.deletedAssignmentIds), i = a.demand;
|
|
678
|
-
l.value = {
|
|
679
|
-
...l.value,
|
|
680
|
-
demands: [
|
|
681
|
-
...l.value.demands.filter((r) => r.date === null || !n.has(r.date)),
|
|
682
|
-
...i
|
|
683
|
-
],
|
|
684
|
-
assignments: l.value.assignments.filter((r) => !s.has(r.id))
|
|
685
|
-
};
|
|
686
|
-
}
|
|
687
|
-
return a;
|
|
688
|
-
}
|
|
689
|
-
async function Po(e) {
|
|
690
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
691
|
-
if (e.length && (await H.deleteAssignments(m.value, e), l.value)) {
|
|
692
|
-
const a = new Set(e);
|
|
693
|
-
l.value = {
|
|
694
|
-
...l.value,
|
|
695
|
-
assignments: l.value.assignments.filter((t) => !a.has(t.id))
|
|
696
|
-
};
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
async function bo(e) {
|
|
700
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
701
|
-
const a = await H.createTimeOff(m.value, e);
|
|
702
|
-
return l.value && (l.value = { ...l.value, timeOff: [...l.value.timeOff, a] }), a;
|
|
703
|
-
}
|
|
704
|
-
async function ko(e, a) {
|
|
705
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
706
|
-
const t = await H.updateTimeOffStatus(m.value, e, a);
|
|
707
|
-
return t && l.value && (l.value = {
|
|
708
|
-
...l.value,
|
|
709
|
-
timeOff: l.value.timeOff.map((n) => n.id === e ? t : n)
|
|
710
|
-
}), t;
|
|
711
|
-
}
|
|
712
|
-
async function No(e) {
|
|
713
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
714
|
-
await H.deleteTimeOff(m.value, e), l.value && (l.value = {
|
|
715
|
-
...l.value,
|
|
716
|
-
timeOff: l.value.timeOff.filter((a) => a.id !== e)
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
async function So(e) {
|
|
720
|
-
if (!m.value) throw new Error("No outlet selected");
|
|
721
|
-
const a = await H.bulkUpdateAssignmentStatus(m.value, e);
|
|
722
|
-
if (l.value && a.length) {
|
|
723
|
-
const t = new Map(a.map((n) => [n.id, n]));
|
|
724
|
-
l.value = {
|
|
725
|
-
...l.value,
|
|
726
|
-
assignments: l.value.assignments.map(
|
|
727
|
-
(n) => t.get(n.id) ?? n
|
|
728
|
-
)
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
return a;
|
|
732
|
-
}
|
|
733
|
-
async function ea(e, a) {
|
|
734
|
-
const t = m.value;
|
|
735
|
-
if (!t) {
|
|
736
|
-
fe.value = "No outlet selected";
|
|
737
|
-
return;
|
|
738
|
-
}
|
|
739
|
-
const n = X(e), s = X(a), i = ++ne;
|
|
740
|
-
xe.value = !0, fe.value = null;
|
|
741
|
-
const r = (async () => {
|
|
742
|
-
try {
|
|
743
|
-
const o = await H.readBoard(t, n, s);
|
|
744
|
-
if (m.value !== t || i !== ne) return;
|
|
745
|
-
l.value = o, Ze.value = o.settings.setupCompleted, J = n, Z = s, Q.value += 1;
|
|
746
|
-
} catch (o) {
|
|
747
|
-
if (m.value !== t || i !== ne) return;
|
|
748
|
-
fe.value = o instanceof Error ? o.message : "Could not load the schedule";
|
|
749
|
-
} finally {
|
|
750
|
-
m.value === t && i === ne && (xe.value = !1);
|
|
751
|
-
}
|
|
752
|
-
})();
|
|
753
|
-
G = r;
|
|
754
|
-
try {
|
|
755
|
-
await r;
|
|
756
|
-
} finally {
|
|
757
|
-
G === r && (G = null);
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
const Ba = "AE", _a = "Asia/Dubai", Fa = {
|
|
761
|
-
NORMAL: {
|
|
762
|
-
overtime: 1.25
|
|
763
|
-
},
|
|
764
|
-
REST_DAY: {
|
|
765
|
-
regular: 1,
|
|
766
|
-
overtime: 2
|
|
767
|
-
},
|
|
768
|
-
PUBLIC_HOLIDAY: {
|
|
769
|
-
regular: 2.5,
|
|
770
|
-
overtime: 1.5
|
|
771
|
-
}
|
|
772
|
-
}, Ua = {
|
|
773
|
-
maxHoursPerMonth: null
|
|
774
|
-
}, Wa = {
|
|
775
|
-
fullTime: {
|
|
776
|
-
minHoursPerDay: null,
|
|
777
|
-
maxHoursPerDay: 8,
|
|
778
|
-
maxHoursPerWeek: 48
|
|
779
|
-
},
|
|
780
|
-
partTime: {
|
|
781
|
-
maxHoursPerWeek: 32
|
|
782
|
-
}
|
|
783
|
-
}, za = [
|
|
784
|
-
{
|
|
785
|
-
month: 1,
|
|
786
|
-
day: 1,
|
|
787
|
-
name: "New Year's Day"
|
|
788
|
-
},
|
|
789
|
-
{
|
|
790
|
-
month: 12,
|
|
791
|
-
day: 2,
|
|
792
|
-
name: "UAE National Day"
|
|
793
|
-
},
|
|
794
|
-
{
|
|
795
|
-
month: 12,
|
|
796
|
-
day: 3,
|
|
797
|
-
name: "UAE National Day Holiday"
|
|
798
|
-
}
|
|
799
|
-
], Va = {
|
|
800
|
-
2026: {
|
|
801
|
-
"2026-01-01": "Gregorian New Year",
|
|
802
|
-
"2026-03-20": "Eid Al-Fitr Holiday",
|
|
803
|
-
"2026-03-21": "Eid Al-Fitr Holiday",
|
|
804
|
-
"2026-03-22": "Eid Al-Fitr Holiday",
|
|
805
|
-
"2026-05-26": "Arafat Day",
|
|
806
|
-
"2026-05-27": "Eid Al-Adha Holiday",
|
|
807
|
-
"2026-05-28": "Eid Al-Adha Holiday",
|
|
808
|
-
"2026-05-29": "Eid Al-Adha Holiday",
|
|
809
|
-
"2026-06-17": "Islamic New Year",
|
|
810
|
-
"2026-08-26": "Prophet Muhammad's Birthday",
|
|
811
|
-
"2026-12-02": "UAE National Day",
|
|
812
|
-
"2026-12-03": "UAE National Day Holiday"
|
|
813
|
-
},
|
|
814
|
-
2027: {
|
|
815
|
-
"2027-01-01": "Gregorian New Year",
|
|
816
|
-
"2027-03-08": "Eid Al-Fitr Holiday",
|
|
817
|
-
"2027-03-09": "Eid Al-Fitr Holiday",
|
|
818
|
-
"2027-03-10": "Eid Al-Fitr Holiday",
|
|
819
|
-
"2027-03-11": "Eid Al-Fitr Holiday",
|
|
820
|
-
"2027-05-15": "Arafat Day",
|
|
821
|
-
"2027-05-16": "Eid Al-Adha Holiday",
|
|
822
|
-
"2027-05-17": "Eid Al-Adha Holiday",
|
|
823
|
-
"2027-05-18": "Eid Al-Adha Holiday",
|
|
824
|
-
"2027-06-06": "Islamic New Year",
|
|
825
|
-
"2027-08-14": "Prophet Muhammad's Birthday",
|
|
826
|
-
"2027-12-02": "UAE National Day",
|
|
827
|
-
"2027-12-03": "UAE National Day Holiday"
|
|
828
|
-
}
|
|
829
|
-
}, Ka = {
|
|
830
|
-
countryCode: Ba,
|
|
831
|
-
timezone: _a,
|
|
832
|
-
payRate: Fa,
|
|
833
|
-
overtime: Ua,
|
|
834
|
-
workingHours: Wa,
|
|
835
|
-
recurringPublicHolidays: za,
|
|
836
|
-
publicHolidays: Va
|
|
837
|
-
}, Ga = "BN", ja = "Asia/Brunei", Qa = {
|
|
838
|
-
NORMAL: {
|
|
839
|
-
overtime: 1.5
|
|
840
|
-
},
|
|
841
|
-
REST_DAY: {
|
|
842
|
-
regular: 1,
|
|
843
|
-
overtime: 2
|
|
844
|
-
},
|
|
845
|
-
PUBLIC_HOLIDAY: {
|
|
846
|
-
regular: 2,
|
|
847
|
-
overtime: 3
|
|
848
|
-
}
|
|
849
|
-
}, Xa = {
|
|
850
|
-
maxHoursPerMonth: 72
|
|
851
|
-
}, Ja = {
|
|
852
|
-
fullTime: {
|
|
853
|
-
minHoursPerDay: null,
|
|
854
|
-
maxHoursPerDay: 8,
|
|
855
|
-
maxHoursPerWeek: 44
|
|
856
|
-
},
|
|
857
|
-
partTime: {
|
|
858
|
-
maxHoursPerWeek: 30
|
|
859
|
-
}
|
|
860
|
-
}, Za = [
|
|
861
|
-
{
|
|
862
|
-
month: 1,
|
|
863
|
-
day: 1,
|
|
864
|
-
name: "New Year's Day"
|
|
865
|
-
},
|
|
866
|
-
{
|
|
867
|
-
month: 2,
|
|
868
|
-
day: 23,
|
|
869
|
-
name: "National Day"
|
|
870
|
-
},
|
|
871
|
-
{
|
|
872
|
-
month: 5,
|
|
873
|
-
day: 1,
|
|
874
|
-
name: "International Labour Day"
|
|
875
|
-
},
|
|
876
|
-
{
|
|
877
|
-
month: 7,
|
|
878
|
-
day: 15,
|
|
879
|
-
name: "Sultan's Birthday"
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
month: 12,
|
|
883
|
-
day: 25,
|
|
884
|
-
name: "Christmas Day"
|
|
885
|
-
}
|
|
886
|
-
], qa = {
|
|
887
|
-
2026: {
|
|
888
|
-
"2026-01-01": "New Year's Day",
|
|
889
|
-
"2026-02-17": "Chinese New Year",
|
|
890
|
-
"2026-02-23": "National Day",
|
|
891
|
-
"2026-03-07": "Nuzul Al-Quran",
|
|
892
|
-
"2026-03-20": "Hari Raya Aidilfitri",
|
|
893
|
-
"2026-03-21": "Hari Raya Aidilfitri Holiday",
|
|
894
|
-
"2026-03-22": "Hari Raya Aidilfitri Holiday",
|
|
895
|
-
"2026-05-01": "International Labour Day",
|
|
896
|
-
"2026-05-27": "Hari Raya Aidiladha",
|
|
897
|
-
"2026-06-17": "Islamic New Year",
|
|
898
|
-
"2026-07-15": "Sultan's Birthday",
|
|
899
|
-
"2026-08-25": "Prophet Muhammad's Birthday",
|
|
900
|
-
"2026-12-25": "Christmas Day"
|
|
901
|
-
},
|
|
902
|
-
2027: {
|
|
903
|
-
"2027-01-01": "New Year's Day",
|
|
904
|
-
"2027-02-06": "Chinese New Year",
|
|
905
|
-
"2027-02-23": "National Day",
|
|
906
|
-
"2027-03-07": "Nuzul Al-Quran",
|
|
907
|
-
"2027-03-10": "Hari Raya Aidilfitri",
|
|
908
|
-
"2027-03-11": "Hari Raya Aidilfitri Holiday",
|
|
909
|
-
"2027-05-01": "International Labour Day",
|
|
910
|
-
"2027-05-17": "Hari Raya Aidiladha",
|
|
911
|
-
"2027-06-06": "Islamic New Year",
|
|
912
|
-
"2027-07-15": "Sultan's Birthday",
|
|
913
|
-
"2027-08-15": "Prophet Muhammad's Birthday",
|
|
914
|
-
"2027-12-25": "Christmas Day"
|
|
915
|
-
}
|
|
916
|
-
}, et = {
|
|
917
|
-
countryCode: Ga,
|
|
918
|
-
timezone: ja,
|
|
919
|
-
payRate: Qa,
|
|
920
|
-
overtime: Xa,
|
|
921
|
-
workingHours: Ja,
|
|
922
|
-
recurringPublicHolidays: Za,
|
|
923
|
-
publicHolidays: qa
|
|
924
|
-
}, at = "ID", tt = "Asia/Jakarta", nt = {
|
|
925
|
-
NORMAL: {
|
|
926
|
-
overtime: 1.5
|
|
927
|
-
},
|
|
928
|
-
REST_DAY: {
|
|
929
|
-
regular: 1,
|
|
930
|
-
overtime: 2
|
|
931
|
-
},
|
|
932
|
-
PUBLIC_HOLIDAY: {
|
|
933
|
-
regular: 2,
|
|
934
|
-
overtime: 2
|
|
935
|
-
}
|
|
936
|
-
}, ot = {
|
|
937
|
-
maxHoursPerMonth: 72
|
|
938
|
-
}, st = {
|
|
939
|
-
fullTime: {
|
|
940
|
-
minHoursPerDay: null,
|
|
941
|
-
maxHoursPerDay: 8,
|
|
942
|
-
maxHoursPerWeek: 40
|
|
943
|
-
},
|
|
944
|
-
partTime: {
|
|
945
|
-
maxHoursPerWeek: null
|
|
946
|
-
}
|
|
947
|
-
}, it = [
|
|
948
|
-
{
|
|
949
|
-
month: 1,
|
|
950
|
-
day: 1,
|
|
951
|
-
name: "New Year's Day"
|
|
952
|
-
},
|
|
953
|
-
{
|
|
954
|
-
month: 5,
|
|
955
|
-
day: 1,
|
|
956
|
-
name: "International Labour Day"
|
|
957
|
-
},
|
|
958
|
-
{
|
|
959
|
-
month: 8,
|
|
960
|
-
day: 17,
|
|
961
|
-
name: "Independence Day"
|
|
962
|
-
},
|
|
963
|
-
{
|
|
964
|
-
month: 12,
|
|
965
|
-
day: 25,
|
|
966
|
-
name: "Christmas Day"
|
|
967
|
-
}
|
|
968
|
-
], rt = {
|
|
969
|
-
2026: {
|
|
970
|
-
"2026-01-01": "New Year's Day",
|
|
971
|
-
"2026-01-16": "Isra Mi'raj",
|
|
972
|
-
"2026-02-17": "Chinese New Year",
|
|
973
|
-
"2026-03-19": "Nyepi",
|
|
974
|
-
"2026-03-21": "Eid al-Fitr",
|
|
975
|
-
"2026-03-22": "Eid al-Fitr Holiday",
|
|
976
|
-
"2026-04-03": "Good Friday",
|
|
977
|
-
"2026-04-05": "Easter Sunday",
|
|
978
|
-
"2026-05-01": "International Labour Day",
|
|
979
|
-
"2026-05-14": "Ascension Day",
|
|
980
|
-
"2026-05-27": "Eid al-Adha",
|
|
981
|
-
"2026-05-31": "Vesak Day",
|
|
982
|
-
"2026-06-01": "Pancasila Day",
|
|
983
|
-
"2026-06-16": "Islamic New Year",
|
|
984
|
-
"2026-08-17": "Independence Day",
|
|
985
|
-
"2026-08-25": "Prophet Muhammad's Birthday",
|
|
986
|
-
"2026-12-25": "Christmas Day"
|
|
987
|
-
},
|
|
988
|
-
2027: {
|
|
989
|
-
"2027-01-01": "New Year's Day",
|
|
990
|
-
"2027-01-05": "Isra Mi'raj",
|
|
991
|
-
"2027-02-06": "Chinese New Year",
|
|
992
|
-
"2027-03-08": "Nyepi",
|
|
993
|
-
"2027-03-10": "Eid al-Fitr",
|
|
994
|
-
"2027-03-11": "Eid al-Fitr Holiday",
|
|
995
|
-
"2027-03-26": "Good Friday",
|
|
996
|
-
"2027-03-28": "Easter Sunday",
|
|
997
|
-
"2027-05-01": "International Labour Day",
|
|
998
|
-
"2027-05-06": "Ascension Day",
|
|
999
|
-
"2027-05-17": "Eid al-Adha",
|
|
1000
|
-
"2027-05-20": "Vesak Day",
|
|
1001
|
-
"2027-06-01": "Pancasila Day",
|
|
1002
|
-
"2027-06-06": "Islamic New Year",
|
|
1003
|
-
"2027-08-15": "Prophet Muhammad's Birthday",
|
|
1004
|
-
"2027-08-17": "Independence Day",
|
|
1005
|
-
"2027-12-25": "Christmas Day",
|
|
1006
|
-
"2027-12-26": "Isra Mi'raj"
|
|
1007
|
-
}
|
|
1008
|
-
}, lt = {
|
|
1009
|
-
countryCode: at,
|
|
1010
|
-
timezone: tt,
|
|
1011
|
-
payRate: nt,
|
|
1012
|
-
overtime: ot,
|
|
1013
|
-
workingHours: st,
|
|
1014
|
-
recurringPublicHolidays: it,
|
|
1015
|
-
publicHolidays: rt
|
|
1016
|
-
}, ut = "MO", dt = "Asia/Macau", ct = {
|
|
1017
|
-
NORMAL: {
|
|
1018
|
-
overtime: 1.5
|
|
1019
|
-
},
|
|
1020
|
-
REST_DAY: {
|
|
1021
|
-
regular: 1,
|
|
1022
|
-
overtime: 2
|
|
1023
|
-
},
|
|
1024
|
-
PUBLIC_HOLIDAY: {
|
|
1025
|
-
regular: 2,
|
|
1026
|
-
overtime: 3
|
|
1027
|
-
}
|
|
1028
|
-
}, mt = {
|
|
1029
|
-
maxHoursPerMonth: null
|
|
1030
|
-
}, yt = {
|
|
1031
|
-
fullTime: {
|
|
1032
|
-
minHoursPerDay: null,
|
|
1033
|
-
maxHoursPerDay: 8,
|
|
1034
|
-
maxHoursPerWeek: 48
|
|
1035
|
-
},
|
|
1036
|
-
partTime: {
|
|
1037
|
-
maxHoursPerWeek: null
|
|
1038
|
-
}
|
|
1039
|
-
}, pt = [
|
|
1040
|
-
{
|
|
1041
|
-
month: 1,
|
|
1042
|
-
day: 1,
|
|
1043
|
-
name: "New Year's Day"
|
|
1044
|
-
},
|
|
1045
|
-
{
|
|
1046
|
-
month: 5,
|
|
1047
|
-
day: 1,
|
|
1048
|
-
name: "Labour Day"
|
|
1049
|
-
},
|
|
1050
|
-
{
|
|
1051
|
-
month: 10,
|
|
1052
|
-
day: 1,
|
|
1053
|
-
name: "National Day"
|
|
1054
|
-
},
|
|
1055
|
-
{
|
|
1056
|
-
month: 12,
|
|
1057
|
-
day: 20,
|
|
1058
|
-
name: "Macao Special Administrative Region Establishment Day"
|
|
1059
|
-
},
|
|
1060
|
-
{
|
|
1061
|
-
month: 12,
|
|
1062
|
-
day: 25,
|
|
1063
|
-
name: "Christmas Day"
|
|
1064
|
-
}
|
|
1065
|
-
], ft = {
|
|
1066
|
-
2026: {
|
|
1067
|
-
"2026-01-01": "New Year's Day",
|
|
1068
|
-
"2026-02-17": "Lunar New Year's Day",
|
|
1069
|
-
"2026-02-18": "Second day of Lunar New Year",
|
|
1070
|
-
"2026-02-19": "Third day of Lunar New Year",
|
|
1071
|
-
"2026-04-03": "Good Friday",
|
|
1072
|
-
"2026-04-04": "Day before Easter",
|
|
1073
|
-
"2026-04-05": "Cheng Ming Festival",
|
|
1074
|
-
"2026-04-06": "Compensatory rest day",
|
|
1075
|
-
"2026-04-07": "Compensatory rest day",
|
|
1076
|
-
"2026-05-01": "Labour Day",
|
|
1077
|
-
"2026-05-24": "Buddha's Birthday",
|
|
1078
|
-
"2026-05-25": "Compensatory rest day",
|
|
1079
|
-
"2026-06-19": "Dragon Boat Festival",
|
|
1080
|
-
"2026-09-26": "Day following Mid-Autumn Festival",
|
|
1081
|
-
"2026-09-28": "Compensatory rest day",
|
|
1082
|
-
"2026-10-01": "National Day",
|
|
1083
|
-
"2026-10-02": "Day following National Day",
|
|
1084
|
-
"2026-10-18": "Chong Yeung Festival",
|
|
1085
|
-
"2026-10-19": "Compensatory rest day",
|
|
1086
|
-
"2026-11-02": "All Souls' Day",
|
|
1087
|
-
"2026-12-08": "Immaculate Conception",
|
|
1088
|
-
"2026-12-20": "Macao SAR Establishment Day",
|
|
1089
|
-
"2026-12-21": "Compensatory rest day",
|
|
1090
|
-
"2026-12-22": "Winter Solstice",
|
|
1091
|
-
"2026-12-24": "Christmas Eve",
|
|
1092
|
-
"2026-12-25": "Christmas Day"
|
|
1093
|
-
},
|
|
1094
|
-
2027: {
|
|
1095
|
-
"2027-01-01": "New Year's Day",
|
|
1096
|
-
"2027-02-06": "Lunar New Year's Day",
|
|
1097
|
-
"2027-02-07": "Second day of Lunar New Year",
|
|
1098
|
-
"2027-02-08": "Third day of Lunar New Year",
|
|
1099
|
-
"2027-02-09": "Compensatory rest day",
|
|
1100
|
-
"2027-02-10": "Compensatory rest day",
|
|
1101
|
-
"2027-03-26": "Good Friday",
|
|
1102
|
-
"2027-03-27": "Day before Easter",
|
|
1103
|
-
"2027-03-29": "Compensatory rest day",
|
|
1104
|
-
"2027-04-05": "Cheng Ming Festival",
|
|
1105
|
-
"2027-05-01": "Labour Day",
|
|
1106
|
-
"2027-05-03": "Compensatory rest day",
|
|
1107
|
-
"2027-05-13": "Buddha's Birthday",
|
|
1108
|
-
"2027-06-09": "Dragon Boat Festival",
|
|
1109
|
-
"2027-09-16": "Day following Mid-Autumn Festival",
|
|
1110
|
-
"2027-10-01": "National Day",
|
|
1111
|
-
"2027-10-02": "Day following National Day",
|
|
1112
|
-
"2027-10-04": "Compensatory rest day",
|
|
1113
|
-
"2027-10-08": "Chong Yeung Festival",
|
|
1114
|
-
"2027-11-02": "All Souls' Day",
|
|
1115
|
-
"2027-12-08": "Immaculate Conception",
|
|
1116
|
-
"2027-12-20": "Macao SAR Establishment Day",
|
|
1117
|
-
"2027-12-22": "Winter Solstice",
|
|
1118
|
-
"2027-12-24": "Christmas Eve",
|
|
1119
|
-
"2027-12-25": "Christmas Day",
|
|
1120
|
-
"2027-12-27": "Compensatory rest day"
|
|
1121
|
-
}
|
|
1122
|
-
}, ht = {
|
|
1123
|
-
countryCode: ut,
|
|
1124
|
-
timezone: dt,
|
|
1125
|
-
payRate: ct,
|
|
1126
|
-
overtime: mt,
|
|
1127
|
-
workingHours: yt,
|
|
1128
|
-
recurringPublicHolidays: pt,
|
|
1129
|
-
publicHolidays: ft
|
|
1130
|
-
}, vt = "MV", gt = "Indian/Maldives", Dt = {
|
|
1131
|
-
NORMAL: {
|
|
1132
|
-
overtime: 1.5
|
|
1133
|
-
},
|
|
1134
|
-
REST_DAY: {
|
|
1135
|
-
regular: 1,
|
|
1136
|
-
overtime: 2
|
|
1137
|
-
},
|
|
1138
|
-
PUBLIC_HOLIDAY: {
|
|
1139
|
-
regular: 2,
|
|
1140
|
-
overtime: 3
|
|
1141
|
-
}
|
|
1142
|
-
}, wt = {
|
|
1143
|
-
maxHoursPerMonth: null
|
|
1144
|
-
}, Ht = {
|
|
1145
|
-
fullTime: {
|
|
1146
|
-
minHoursPerDay: null,
|
|
1147
|
-
maxHoursPerDay: 8,
|
|
1148
|
-
maxHoursPerWeek: 48
|
|
1149
|
-
},
|
|
1150
|
-
partTime: {
|
|
1151
|
-
maxHoursPerWeek: null
|
|
1152
|
-
}
|
|
1153
|
-
}, At = [
|
|
1154
|
-
{
|
|
1155
|
-
month: 1,
|
|
1156
|
-
day: 1,
|
|
1157
|
-
name: "New Year's Day"
|
|
1158
|
-
},
|
|
1159
|
-
{
|
|
1160
|
-
month: 5,
|
|
1161
|
-
day: 1,
|
|
1162
|
-
name: "Labour Day"
|
|
1163
|
-
},
|
|
1164
|
-
{
|
|
1165
|
-
month: 7,
|
|
1166
|
-
day: 26,
|
|
1167
|
-
name: "Independence Day"
|
|
1168
|
-
},
|
|
1169
|
-
{
|
|
1170
|
-
month: 11,
|
|
1171
|
-
day: 3,
|
|
1172
|
-
name: "Victory Day"
|
|
1173
|
-
},
|
|
1174
|
-
{
|
|
1175
|
-
month: 11,
|
|
1176
|
-
day: 11,
|
|
1177
|
-
name: "Republic Day"
|
|
1178
|
-
}
|
|
1179
|
-
], Et = {
|
|
1180
|
-
2026: {
|
|
1181
|
-
"2026-01-01": "New Year's Day",
|
|
1182
|
-
"2026-03-20": "Eid al-Fitr Holiday",
|
|
1183
|
-
"2026-03-21": "Eid al-Fitr Holiday",
|
|
1184
|
-
"2026-03-22": "Eid al-Fitr Holiday",
|
|
1185
|
-
"2026-05-01": "Labour Day",
|
|
1186
|
-
"2026-05-26": "Arafah Day",
|
|
1187
|
-
"2026-05-27": "Eid al-Adha Holiday",
|
|
1188
|
-
"2026-05-28": "Eid al-Adha Holiday",
|
|
1189
|
-
"2026-05-29": "Eid al-Adha Holiday",
|
|
1190
|
-
"2026-06-17": "Islamic New Year",
|
|
1191
|
-
"2026-07-26": "Independence Day",
|
|
1192
|
-
"2026-07-27": "Independence Day Holiday",
|
|
1193
|
-
"2026-08-14": "National Day",
|
|
1194
|
-
"2026-08-25": "Prophet Muhammad's Birthday",
|
|
1195
|
-
"2026-09-13": "The Day Maldives Embraced Islam",
|
|
1196
|
-
"2026-11-03": "Victory Day",
|
|
1197
|
-
"2026-11-11": "Republic Day"
|
|
1198
|
-
},
|
|
1199
|
-
2027: {
|
|
1200
|
-
"2027-01-01": "New Year's Day",
|
|
1201
|
-
"2027-03-10": "Eid al-Fitr Holiday",
|
|
1202
|
-
"2027-03-11": "Eid al-Fitr Holiday",
|
|
1203
|
-
"2027-05-01": "Labour Day",
|
|
1204
|
-
"2027-05-15": "Arafah Day",
|
|
1205
|
-
"2027-05-16": "Eid al-Adha Holiday",
|
|
1206
|
-
"2027-05-17": "Eid al-Adha Holiday",
|
|
1207
|
-
"2027-05-18": "Eid al-Adha Holiday",
|
|
1208
|
-
"2027-06-06": "Islamic New Year",
|
|
1209
|
-
"2027-07-26": "Independence Day",
|
|
1210
|
-
"2027-07-27": "Independence Day Holiday",
|
|
1211
|
-
"2027-08-14": "National Day",
|
|
1212
|
-
"2027-08-15": "Prophet Muhammad's Birthday",
|
|
1213
|
-
"2027-09-03": "The Day Maldives Embraced Islam",
|
|
1214
|
-
"2027-11-03": "Victory Day",
|
|
1215
|
-
"2027-11-11": "Republic Day"
|
|
1216
|
-
}
|
|
1217
|
-
}, Pt = {
|
|
1218
|
-
countryCode: vt,
|
|
1219
|
-
timezone: gt,
|
|
1220
|
-
payRate: Dt,
|
|
1221
|
-
overtime: wt,
|
|
1222
|
-
workingHours: Ht,
|
|
1223
|
-
recurringPublicHolidays: At,
|
|
1224
|
-
publicHolidays: Et
|
|
1225
|
-
}, bt = "MY", kt = "Asia/Kuala_Lumpur", Nt = {
|
|
1226
|
-
NORMAL: {
|
|
1227
|
-
overtime: 1.5
|
|
1228
|
-
},
|
|
1229
|
-
REST_DAY: {
|
|
1230
|
-
regular: 1,
|
|
1231
|
-
overtime: 2
|
|
1232
|
-
},
|
|
1233
|
-
PUBLIC_HOLIDAY: {
|
|
1234
|
-
regular: 2,
|
|
1235
|
-
overtime: 3
|
|
1236
|
-
}
|
|
1237
|
-
}, St = {
|
|
1238
|
-
maxHoursPerMonth: 104
|
|
1239
|
-
}, Ct = {
|
|
1240
|
-
fullTime: {
|
|
1241
|
-
minHoursPerDay: null,
|
|
1242
|
-
maxHoursPerDay: 8,
|
|
1243
|
-
maxHoursPerWeek: 45
|
|
1244
|
-
},
|
|
1245
|
-
partTime: {
|
|
1246
|
-
maxHoursPerWeek: 31.5
|
|
1247
|
-
}
|
|
1248
|
-
}, Mt = [
|
|
1249
|
-
{
|
|
1250
|
-
month: 1,
|
|
1251
|
-
day: 1,
|
|
1252
|
-
name: "New Year's Day"
|
|
1253
|
-
},
|
|
1254
|
-
{
|
|
1255
|
-
month: 5,
|
|
1256
|
-
day: 1,
|
|
1257
|
-
name: "Labour Day"
|
|
1258
|
-
},
|
|
1259
|
-
{
|
|
1260
|
-
month: 8,
|
|
1261
|
-
day: 31,
|
|
1262
|
-
name: "Merdeka Day"
|
|
1263
|
-
},
|
|
1264
|
-
{
|
|
1265
|
-
month: 9,
|
|
1266
|
-
day: 16,
|
|
1267
|
-
name: "Malaysia Day"
|
|
1268
|
-
},
|
|
1269
|
-
{
|
|
1270
|
-
month: 12,
|
|
1271
|
-
day: 25,
|
|
1272
|
-
name: "Christmas Day"
|
|
1273
|
-
}
|
|
1274
|
-
], Lt = {
|
|
1275
|
-
2026: {
|
|
1276
|
-
"2026-01-01": "New Year's Day",
|
|
1277
|
-
"2026-02-17": "Chinese New Year",
|
|
1278
|
-
"2026-02-18": "Chinese New Year Holiday",
|
|
1279
|
-
"2026-03-07": "Nuzul Al-Quran",
|
|
1280
|
-
"2026-03-20": "Hari Raya Aidilfitri",
|
|
1281
|
-
"2026-03-21": "Hari Raya Aidilfitri Holiday",
|
|
1282
|
-
"2026-03-22": "Hari Raya Aidilfitri Holiday",
|
|
1283
|
-
"2026-03-23": "Hari Raya Aidilfitri Holiday",
|
|
1284
|
-
"2026-05-01": "Labour Day",
|
|
1285
|
-
"2026-05-27": "Hari Raya Haji",
|
|
1286
|
-
"2026-05-31": "Wesak Day",
|
|
1287
|
-
"2026-06-01": "Agong's Birthday",
|
|
1288
|
-
"2026-06-17": "Awal Muharram",
|
|
1289
|
-
"2026-08-25": "Prophet Muhammad's Birthday",
|
|
1290
|
-
"2026-08-31": "Merdeka Day",
|
|
1291
|
-
"2026-09-16": "Malaysia Day",
|
|
1292
|
-
"2026-11-08": "Deepavali",
|
|
1293
|
-
"2026-12-25": "Christmas Day"
|
|
1294
|
-
},
|
|
1295
|
-
2027: {
|
|
1296
|
-
"2027-01-01": "New Year's Day",
|
|
1297
|
-
"2027-02-06": "Chinese New Year",
|
|
1298
|
-
"2027-02-07": "Chinese New Year Holiday",
|
|
1299
|
-
"2027-03-10": "Hari Raya Aidilfitri",
|
|
1300
|
-
"2027-03-11": "Hari Raya Aidilfitri Holiday",
|
|
1301
|
-
"2027-05-01": "Labour Day",
|
|
1302
|
-
"2027-05-17": "Hari Raya Haji",
|
|
1303
|
-
"2027-05-20": "Wesak Day",
|
|
1304
|
-
"2027-06-01": "Agong's Birthday",
|
|
1305
|
-
"2027-06-06": "Awal Muharram",
|
|
1306
|
-
"2027-08-15": "Prophet Muhammad's Birthday",
|
|
1307
|
-
"2027-08-31": "Merdeka Day",
|
|
1308
|
-
"2027-09-16": "Malaysia Day",
|
|
1309
|
-
"2027-10-28": "Deepavali",
|
|
1310
|
-
"2027-12-25": "Christmas Day"
|
|
1311
|
-
}
|
|
1312
|
-
}, It = {
|
|
1313
|
-
countryCode: bt,
|
|
1314
|
-
timezone: kt,
|
|
1315
|
-
payRate: Nt,
|
|
1316
|
-
overtime: St,
|
|
1317
|
-
workingHours: Ct,
|
|
1318
|
-
recurringPublicHolidays: Mt,
|
|
1319
|
-
publicHolidays: Lt
|
|
1320
|
-
}, Tt = "PK", Rt = "Asia/Karachi", Ot = {
|
|
1321
|
-
NORMAL: {
|
|
1322
|
-
overtime: 1.5
|
|
1323
|
-
},
|
|
1324
|
-
REST_DAY: {
|
|
1325
|
-
regular: 1,
|
|
1326
|
-
overtime: 2
|
|
1327
|
-
},
|
|
1328
|
-
PUBLIC_HOLIDAY: {
|
|
1329
|
-
regular: 2,
|
|
1330
|
-
overtime: 3
|
|
1331
|
-
}
|
|
1332
|
-
}, $t = {
|
|
1333
|
-
maxHoursPerMonth: null
|
|
1334
|
-
}, xt = {
|
|
1335
|
-
fullTime: {
|
|
1336
|
-
minHoursPerDay: null,
|
|
1337
|
-
maxHoursPerDay: 9,
|
|
1338
|
-
maxHoursPerWeek: 48
|
|
1339
|
-
},
|
|
1340
|
-
partTime: {
|
|
1341
|
-
maxHoursPerWeek: null
|
|
1342
|
-
}
|
|
1343
|
-
}, Yt = [
|
|
1344
|
-
{
|
|
1345
|
-
month: 1,
|
|
1346
|
-
day: 1,
|
|
1347
|
-
name: "New Year's Day"
|
|
1348
|
-
},
|
|
1349
|
-
{
|
|
1350
|
-
month: 2,
|
|
1351
|
-
day: 5,
|
|
1352
|
-
name: "Kashmir Day"
|
|
1353
|
-
},
|
|
1354
|
-
{
|
|
1355
|
-
month: 3,
|
|
1356
|
-
day: 23,
|
|
1357
|
-
name: "Pakistan Day"
|
|
1358
|
-
},
|
|
1359
|
-
{
|
|
1360
|
-
month: 5,
|
|
1361
|
-
day: 1,
|
|
1362
|
-
name: "Labour Day"
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
month: 8,
|
|
1366
|
-
day: 14,
|
|
1367
|
-
name: "Independence Day"
|
|
1368
|
-
},
|
|
1369
|
-
{
|
|
1370
|
-
month: 12,
|
|
1371
|
-
day: 25,
|
|
1372
|
-
name: "Quaid-e-Azam Day and Christmas Day"
|
|
1373
|
-
}
|
|
1374
|
-
], Bt = {
|
|
1375
|
-
2026: {
|
|
1376
|
-
"2026-01-01": "New Year's Day",
|
|
1377
|
-
"2026-02-05": "Kashmir Day",
|
|
1378
|
-
"2026-03-23": "Pakistan Day",
|
|
1379
|
-
"2026-05-01": "Labour Day",
|
|
1380
|
-
"2026-06-27": "Eid al-Adha",
|
|
1381
|
-
"2026-06-28": "Eid al-Adha Holiday",
|
|
1382
|
-
"2026-06-29": "Eid al-Adha Holiday",
|
|
1383
|
-
"2026-08-14": "Independence Day",
|
|
1384
|
-
"2026-08-25": "Eid Milad-un-Nabi",
|
|
1385
|
-
"2026-12-25": "Quaid-e-Azam Day and Christmas Day"
|
|
1386
|
-
},
|
|
1387
|
-
2027: {
|
|
1388
|
-
"2027-01-01": "New Year's Day",
|
|
1389
|
-
"2027-02-05": "Kashmir Day",
|
|
1390
|
-
"2027-03-23": "Pakistan Day",
|
|
1391
|
-
"2027-05-01": "Labour Day",
|
|
1392
|
-
"2027-05-17": "Eid al-Adha",
|
|
1393
|
-
"2027-05-18": "Eid al-Adha Holiday",
|
|
1394
|
-
"2027-05-19": "Eid al-Adha Holiday",
|
|
1395
|
-
"2027-08-14": "Independence Day",
|
|
1396
|
-
"2027-08-15": "Eid Milad-un-Nabi",
|
|
1397
|
-
"2027-12-25": "Quaid-e-Azam Day and Christmas Day"
|
|
1398
|
-
}
|
|
1399
|
-
}, _t = {
|
|
1400
|
-
countryCode: Tt,
|
|
1401
|
-
timezone: Rt,
|
|
1402
|
-
payRate: Ot,
|
|
1403
|
-
overtime: $t,
|
|
1404
|
-
workingHours: xt,
|
|
1405
|
-
recurringPublicHolidays: Yt,
|
|
1406
|
-
publicHolidays: Bt
|
|
1407
|
-
}, Ft = "SG", Ut = "Asia/Singapore", Wt = {
|
|
1408
|
-
NORMAL: {
|
|
1409
|
-
overtime: 1.5
|
|
1410
|
-
},
|
|
1411
|
-
REST_DAY: {
|
|
1412
|
-
regular: 1,
|
|
1413
|
-
overtime: 2
|
|
1414
|
-
},
|
|
1415
|
-
PUBLIC_HOLIDAY: {
|
|
1416
|
-
regular: 2,
|
|
1417
|
-
overtime: 1.5
|
|
1418
|
-
}
|
|
1419
|
-
}, zt = {
|
|
1420
|
-
maxHoursPerMonth: 72
|
|
1421
|
-
}, Vt = {
|
|
1422
|
-
fullTime: {
|
|
1423
|
-
minHoursPerDay: null,
|
|
1424
|
-
maxHoursPerDay: 12,
|
|
1425
|
-
maxHoursPerWeek: 44
|
|
1426
|
-
},
|
|
1427
|
-
partTime: {
|
|
1428
|
-
maxHoursPerWeek: 35
|
|
1429
|
-
}
|
|
1430
|
-
}, Kt = [
|
|
1431
|
-
{
|
|
1432
|
-
month: 1,
|
|
1433
|
-
day: 1,
|
|
1434
|
-
name: "New Year's Day"
|
|
1435
|
-
},
|
|
1436
|
-
{
|
|
1437
|
-
month: 5,
|
|
1438
|
-
day: 1,
|
|
1439
|
-
name: "Labour Day"
|
|
1440
|
-
},
|
|
1441
|
-
{
|
|
1442
|
-
month: 8,
|
|
1443
|
-
day: 9,
|
|
1444
|
-
name: "National Day"
|
|
1445
|
-
},
|
|
1446
|
-
{
|
|
1447
|
-
month: 12,
|
|
1448
|
-
day: 25,
|
|
1449
|
-
name: "Christmas Day"
|
|
1450
|
-
}
|
|
1451
|
-
], Gt = {
|
|
1452
|
-
2026: {
|
|
1453
|
-
"2026-01-01": "New Year's Day",
|
|
1454
|
-
"2026-02-17": "Chinese New Year's Day",
|
|
1455
|
-
"2026-02-18": "Chinese New Year's Holiday",
|
|
1456
|
-
"2026-03-21": "Hari Raya Puasa",
|
|
1457
|
-
"2026-04-03": "Good Friday",
|
|
1458
|
-
"2026-05-01": "Labour Day",
|
|
1459
|
-
"2026-05-27": "Hari Raya Haji",
|
|
1460
|
-
"2026-05-31": "Vesak Day",
|
|
1461
|
-
"2026-06-01": "Vesak Day Holiday",
|
|
1462
|
-
"2026-08-09": "National Day",
|
|
1463
|
-
"2026-08-10": "National Day Holiday",
|
|
1464
|
-
"2026-11-08": "Deepavali",
|
|
1465
|
-
"2026-11-09": "Deepavali Holiday",
|
|
1466
|
-
"2026-12-25": "Christmas Day"
|
|
1467
|
-
},
|
|
1468
|
-
2027: {
|
|
1469
|
-
"2027-01-01": "New Year's Day",
|
|
1470
|
-
"2027-02-06": "Chinese New Year's Day",
|
|
1471
|
-
"2027-02-07": "Chinese New Year's Holiday",
|
|
1472
|
-
"2027-02-08": "Chinese New Year Holiday",
|
|
1473
|
-
"2027-03-10": "Hari Raya Puasa",
|
|
1474
|
-
"2027-03-26": "Good Friday",
|
|
1475
|
-
"2027-05-01": "Labour Day",
|
|
1476
|
-
"2027-05-17": "Hari Raya Haji",
|
|
1477
|
-
"2027-05-20": "Vesak Day",
|
|
1478
|
-
"2027-08-09": "National Day",
|
|
1479
|
-
"2027-10-28": "Deepavali",
|
|
1480
|
-
"2027-12-25": "Christmas Day"
|
|
1481
|
-
}
|
|
1482
|
-
}, jt = {
|
|
1483
|
-
countryCode: Ft,
|
|
1484
|
-
timezone: Ut,
|
|
1485
|
-
payRate: Wt,
|
|
1486
|
-
overtime: zt,
|
|
1487
|
-
workingHours: Vt,
|
|
1488
|
-
recurringPublicHolidays: Kt,
|
|
1489
|
-
publicHolidays: Gt
|
|
1490
|
-
}, Qt = "TH", Xt = "Asia/Bangkok", Jt = {
|
|
1491
|
-
NORMAL: {
|
|
1492
|
-
overtime: 1.5
|
|
1493
|
-
},
|
|
1494
|
-
REST_DAY: {
|
|
1495
|
-
regular: 1,
|
|
1496
|
-
overtime: 2
|
|
1497
|
-
},
|
|
1498
|
-
PUBLIC_HOLIDAY: {
|
|
1499
|
-
regular: 2,
|
|
1500
|
-
overtime: 3
|
|
1501
|
-
}
|
|
1502
|
-
}, Zt = {
|
|
1503
|
-
maxHoursPerMonth: 36
|
|
1504
|
-
}, qt = {
|
|
1505
|
-
fullTime: {
|
|
1506
|
-
minHoursPerDay: null,
|
|
1507
|
-
maxHoursPerDay: 8,
|
|
1508
|
-
maxHoursPerWeek: 48
|
|
1509
|
-
},
|
|
1510
|
-
partTime: {
|
|
1511
|
-
maxHoursPerWeek: null
|
|
1512
|
-
}
|
|
1513
|
-
}, en = [
|
|
1514
|
-
{
|
|
1515
|
-
month: 1,
|
|
1516
|
-
day: 1,
|
|
1517
|
-
name: "New Year's Day"
|
|
1518
|
-
},
|
|
1519
|
-
{
|
|
1520
|
-
month: 4,
|
|
1521
|
-
day: 6,
|
|
1522
|
-
name: "Chakri Memorial Day"
|
|
1523
|
-
},
|
|
1524
|
-
{
|
|
1525
|
-
month: 5,
|
|
1526
|
-
day: 1,
|
|
1527
|
-
name: "National Labour Day"
|
|
1528
|
-
},
|
|
1529
|
-
{
|
|
1530
|
-
month: 7,
|
|
1531
|
-
day: 28,
|
|
1532
|
-
name: "King's Birthday"
|
|
1533
|
-
},
|
|
1534
|
-
{
|
|
1535
|
-
month: 8,
|
|
1536
|
-
day: 12,
|
|
1537
|
-
name: "Queen Mother's Birthday"
|
|
1538
|
-
},
|
|
1539
|
-
{
|
|
1540
|
-
month: 10,
|
|
1541
|
-
day: 13,
|
|
1542
|
-
name: "Memorial Day"
|
|
1543
|
-
},
|
|
1544
|
-
{
|
|
1545
|
-
month: 12,
|
|
1546
|
-
day: 5,
|
|
1547
|
-
name: "King Bhumibol's Birthday"
|
|
1548
|
-
},
|
|
1549
|
-
{
|
|
1550
|
-
month: 12,
|
|
1551
|
-
day: 10,
|
|
1552
|
-
name: "Constitution Day"
|
|
1553
|
-
},
|
|
1554
|
-
{
|
|
1555
|
-
month: 12,
|
|
1556
|
-
day: 31,
|
|
1557
|
-
name: "New Year's Eve"
|
|
1558
|
-
}
|
|
1559
|
-
], an = {
|
|
1560
|
-
2026: {
|
|
1561
|
-
"2026-01-01": "New Year's Day",
|
|
1562
|
-
"2026-03-03": "Makha Bucha Day",
|
|
1563
|
-
"2026-04-06": "Chakri Memorial Day",
|
|
1564
|
-
"2026-04-13": "Songkran Festival",
|
|
1565
|
-
"2026-04-14": "Songkran Festival",
|
|
1566
|
-
"2026-04-15": "Songkran Festival",
|
|
1567
|
-
"2026-05-01": "National Labour Day",
|
|
1568
|
-
"2026-05-04": "Coronation Day",
|
|
1569
|
-
"2026-05-13": "Royal Ploughing Ceremony",
|
|
1570
|
-
"2026-05-31": "Visakha Bucha Day",
|
|
1571
|
-
"2026-06-01": "Visakha Bucha Holiday",
|
|
1572
|
-
"2026-07-28": "King's Birthday",
|
|
1573
|
-
"2026-08-12": "Queen Mother's Birthday",
|
|
1574
|
-
"2026-10-13": "Memorial Day",
|
|
1575
|
-
"2026-10-23": "Chulalongkorn Memorial Day",
|
|
1576
|
-
"2026-12-05": "King Bhumibol's Birthday",
|
|
1577
|
-
"2026-12-10": "Constitution Day",
|
|
1578
|
-
"2026-12-31": "New Year's Eve"
|
|
1579
|
-
},
|
|
1580
|
-
2027: {
|
|
1581
|
-
"2027-01-01": "New Year's Day",
|
|
1582
|
-
"2027-02-26": "Makha Bucha Day",
|
|
1583
|
-
"2027-04-06": "Chakri Memorial Day",
|
|
1584
|
-
"2027-04-13": "Songkran Festival",
|
|
1585
|
-
"2027-04-14": "Songkran Festival",
|
|
1586
|
-
"2027-04-15": "Songkran Festival",
|
|
1587
|
-
"2027-05-01": "National Labour Day",
|
|
1588
|
-
"2027-05-03": "Labour Day Holiday",
|
|
1589
|
-
"2027-05-04": "Coronation Day",
|
|
1590
|
-
"2027-07-28": "King's Birthday",
|
|
1591
|
-
"2027-08-12": "Queen Mother's Birthday",
|
|
1592
|
-
"2027-10-13": "Memorial Day",
|
|
1593
|
-
"2027-10-23": "Chulalongkorn Memorial Day",
|
|
1594
|
-
"2027-12-05": "King Bhumibol's Birthday",
|
|
1595
|
-
"2027-12-06": "King Bhumibol's Birthday Holiday",
|
|
1596
|
-
"2027-12-10": "Constitution Day",
|
|
1597
|
-
"2027-12-31": "New Year's Eve"
|
|
1598
|
-
}
|
|
1599
|
-
}, tn = {
|
|
1600
|
-
countryCode: Qt,
|
|
1601
|
-
timezone: Xt,
|
|
1602
|
-
payRate: Jt,
|
|
1603
|
-
overtime: Zt,
|
|
1604
|
-
workingHours: qt,
|
|
1605
|
-
recurringPublicHolidays: en,
|
|
1606
|
-
publicHolidays: an
|
|
1607
|
-
}, nn = "VN", on = "Asia/Ho_Chi_Minh", sn = {
|
|
1608
|
-
NORMAL: {
|
|
1609
|
-
overtime: 1.5
|
|
1610
|
-
},
|
|
1611
|
-
REST_DAY: {
|
|
1612
|
-
regular: 1,
|
|
1613
|
-
overtime: 2
|
|
1614
|
-
},
|
|
1615
|
-
PUBLIC_HOLIDAY: {
|
|
1616
|
-
regular: 2,
|
|
1617
|
-
overtime: 3
|
|
1618
|
-
}
|
|
1619
|
-
}, rn = {
|
|
1620
|
-
maxHoursPerMonth: 40
|
|
1621
|
-
}, ln = {
|
|
1622
|
-
fullTime: {
|
|
1623
|
-
minHoursPerDay: null,
|
|
1624
|
-
maxHoursPerDay: 8,
|
|
1625
|
-
maxHoursPerWeek: 48
|
|
1626
|
-
},
|
|
1627
|
-
partTime: {
|
|
1628
|
-
maxHoursPerWeek: null
|
|
1629
|
-
}
|
|
1630
|
-
}, un = [
|
|
1631
|
-
{
|
|
1632
|
-
month: 1,
|
|
1633
|
-
day: 1,
|
|
1634
|
-
name: "New Year's Day"
|
|
1635
|
-
},
|
|
1636
|
-
{
|
|
1637
|
-
month: 4,
|
|
1638
|
-
day: 30,
|
|
1639
|
-
name: "Reunification Day"
|
|
1640
|
-
},
|
|
1641
|
-
{
|
|
1642
|
-
month: 5,
|
|
1643
|
-
day: 1,
|
|
1644
|
-
name: "International Labour Day"
|
|
1645
|
-
},
|
|
1646
|
-
{
|
|
1647
|
-
month: 9,
|
|
1648
|
-
day: 2,
|
|
1649
|
-
name: "National Day"
|
|
1650
|
-
}
|
|
1651
|
-
], dn = {
|
|
1652
|
-
2026: {
|
|
1653
|
-
"2026-01-01": "New Year's Day",
|
|
1654
|
-
"2026-02-16": "Tet Holiday",
|
|
1655
|
-
"2026-02-17": "Tet Holiday",
|
|
1656
|
-
"2026-02-18": "Tet Holiday",
|
|
1657
|
-
"2026-02-19": "Tet Holiday",
|
|
1658
|
-
"2026-02-20": "Tet Holiday",
|
|
1659
|
-
"2026-04-26": "Hung Kings Commemoration Day",
|
|
1660
|
-
"2026-04-27": "Hung Kings Holiday",
|
|
1661
|
-
"2026-04-30": "Reunification Day",
|
|
1662
|
-
"2026-05-01": "International Labour Day",
|
|
1663
|
-
"2026-09-02": "National Day",
|
|
1664
|
-
"2026-09-03": "National Day Holiday"
|
|
1665
|
-
},
|
|
1666
|
-
2027: {
|
|
1667
|
-
"2027-01-01": "New Year's Day",
|
|
1668
|
-
"2027-02-05": "Tet Holiday",
|
|
1669
|
-
"2027-02-06": "Tet Holiday",
|
|
1670
|
-
"2027-02-07": "Tet Holiday",
|
|
1671
|
-
"2027-02-08": "Tet Holiday",
|
|
1672
|
-
"2027-02-09": "Tet Holiday",
|
|
1673
|
-
"2027-04-16": "Hung Kings Commemoration Day",
|
|
1674
|
-
"2027-04-30": "Reunification Day",
|
|
1675
|
-
"2027-05-01": "International Labour Day",
|
|
1676
|
-
"2027-09-02": "National Day",
|
|
1677
|
-
"2027-09-03": "National Day Holiday"
|
|
1678
|
-
}
|
|
1679
|
-
}, cn = {
|
|
1680
|
-
countryCode: nn,
|
|
1681
|
-
timezone: on,
|
|
1682
|
-
payRate: sn,
|
|
1683
|
-
overtime: rn,
|
|
1684
|
-
workingHours: ln,
|
|
1685
|
-
recurringPublicHolidays: un,
|
|
1686
|
-
publicHolidays: dn
|
|
1687
|
-
}, Ue = { AE: Ka, BN: et, ID: lt, MO: ht, MV: Pt, MY: It, PK: _t, SG: jt, TH: tn, VN: cn };
|
|
1688
|
-
function mn(e) {
|
|
1689
|
-
if (typeof e == "string") return e.toUpperCase();
|
|
1690
|
-
if (e && typeof e == "object" && "code" in e) {
|
|
1691
|
-
const a = e.code;
|
|
1692
|
-
if (typeof a == "string") return a.toUpperCase();
|
|
1693
|
-
}
|
|
1694
|
-
return "MY";
|
|
1695
|
-
}
|
|
1696
|
-
function yn(e) {
|
|
1697
|
-
return Ue[mn(e)] ?? Ue.MY;
|
|
1698
|
-
}
|
|
1699
|
-
function Co(e, a) {
|
|
1700
|
-
var i, r;
|
|
1701
|
-
const t = (i = e.publicHolidays[a.slice(0, 4)]) == null ? void 0 : i[a];
|
|
1702
|
-
if (t) return t;
|
|
1703
|
-
const n = Number(a.slice(5, 7)), s = Number(a.slice(8, 10));
|
|
1704
|
-
return ((r = e.recurringPublicHolidays.find((o) => o.month === n && o.day === s)) == null ? void 0 : r.name) ?? null;
|
|
1705
|
-
}
|
|
1706
|
-
const pn = Ke(), aa = "unassigned", Mo = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Lo = "All Stations", Io = [{ id: aa, label: "Assigned", roles: [], system: !0 }], We = [
|
|
1707
|
-
"#903E1F",
|
|
1708
|
-
"#5F090A",
|
|
1709
|
-
"#0A5384",
|
|
1710
|
-
"#1F5F3E",
|
|
1711
|
-
"#5B2C6F",
|
|
1712
|
-
"#7D5A00",
|
|
1713
|
-
"#0F5C5C",
|
|
1714
|
-
"#6E2142"
|
|
1715
|
-
];
|
|
1716
|
-
function fn(e) {
|
|
1717
|
-
var t;
|
|
1718
|
-
const a = e.trim().toLocaleLowerCase();
|
|
1719
|
-
return (t = F.find((n) => n.name.toLocaleLowerCase() === a)) == null ? void 0 : t.id;
|
|
1720
|
-
}
|
|
1721
|
-
function To(e, a) {
|
|
1722
|
-
if (e)
|
|
1723
|
-
return { positionId: a ?? fn(e), positionName: e };
|
|
1724
|
-
}
|
|
1725
|
-
function ie(e, a = F) {
|
|
1726
|
-
var t;
|
|
1727
|
-
if (e)
|
|
1728
|
-
return (e.positionId && ((t = a.find((n) => n.id === e.positionId)) == null ? void 0 : t.name)) ?? e.positionName;
|
|
1729
|
-
}
|
|
1730
|
-
function Ro(e, a = F) {
|
|
1731
|
-
var t, n;
|
|
1732
|
-
if (e)
|
|
1733
|
-
return e.positionId ? (t = a.find((s) => s.id === e.positionId)) == null ? void 0 : t.name : (n = a.find((s) => s.name.toLocaleLowerCase() === e.positionName.toLocaleLowerCase())) == null ? void 0 : n.name;
|
|
1734
|
-
}
|
|
1735
|
-
function Oo(e, a) {
|
|
1736
|
-
return a ? !F.some((t) => t.id === a) : !!e && !F.some((t) => t.name.toLocaleLowerCase() === e.toLocaleLowerCase());
|
|
1737
|
-
}
|
|
1738
|
-
const $o = [1, 1, 1, 1, 1, 1, 1];
|
|
1739
|
-
function le(e) {
|
|
1740
|
-
return (e + 6) % 7;
|
|
1741
|
-
}
|
|
1742
|
-
function xo(e) {
|
|
1743
|
-
return (e + 1) % 7;
|
|
1744
|
-
}
|
|
1745
|
-
function ye(e, a) {
|
|
1746
|
-
e.splice(0, e.length, ...a);
|
|
1747
|
-
}
|
|
1748
|
-
function hn(e, a) {
|
|
1749
|
-
return je(e, a) / 60;
|
|
1750
|
-
}
|
|
1751
|
-
function vn(e) {
|
|
1752
|
-
var t;
|
|
1753
|
-
const a = e.trim().split(/\s+/).filter(Boolean);
|
|
1754
|
-
return a.length ? (a[0][0] + (((t = a[1]) == null ? void 0 : t[0]) ?? "")).toUpperCase() : "??";
|
|
1755
|
-
}
|
|
1756
|
-
const ta = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Map();
|
|
1757
|
-
function Yo(e) {
|
|
1758
|
-
return ta.get(e);
|
|
1759
|
-
}
|
|
1760
|
-
function gn(e) {
|
|
1761
|
-
const a = Ee.get(e);
|
|
1762
|
-
if (a !== void 0) return a;
|
|
1763
|
-
const t = Xe + Ee.size + 1;
|
|
1764
|
-
return Ee.set(e, t), ta.set(t, e), t;
|
|
1765
|
-
}
|
|
1766
|
-
function Bo(e) {
|
|
1767
|
-
return e.sourceId || String(e.id);
|
|
1768
|
-
}
|
|
1769
|
-
function Dn(e) {
|
|
1770
|
-
Sa.name = (e == null ? void 0 : e.outlet.name) ?? "", ye(Na, (e == null ? void 0 : e.positions.map((o) => o.name)) ?? []), ye(F, (e == null ? void 0 : e.positions) ?? []);
|
|
1771
|
-
const a = (e == null ? void 0 : e.restaurantProfile.operatingHours) ?? [], t = Array.from({ length: 7 }, () => []);
|
|
1772
|
-
for (const o of a) t[le(o.dayOfWeek)] = o.closed ? [] : o.hours;
|
|
1773
|
-
ye(N.dayHours, t);
|
|
1774
|
-
const n = a.filter((o) => !o.closed).flatMap((o) => o.hours);
|
|
1775
|
-
N.openFrom = n.length ? n.map((o) => o.start).reduce((o, d) => d < o ? d : o) : "00:00", N.openTo = n.length ? n.map((o) => o.end).reduce((o, d) => d > o ? d : o) : "24:00", ye(
|
|
1776
|
-
N.closedWeekdays,
|
|
1777
|
-
a.filter((o) => o.closed).map((o) => le(o.dayOfWeek)).sort((o, d) => o - d)
|
|
1778
|
-
);
|
|
1779
|
-
const s = yn(pn.currentCountry.value), i = (e == null ? void 0 : e.settings.settingsConfigured) === !0, r = i ? e.settings.payRate : s.payRate;
|
|
1780
|
-
N.otCapHours = i ? e.settings.overtime.maxHoursPerMonth : s.overtime.maxHoursPerMonth, N.workingHours = i ? e.settings.workingHours : {
|
|
1781
|
-
minHoursPerDay: null,
|
|
1782
|
-
maxHoursPerDay: s.workingHours.fullTime.maxHoursPerDay,
|
|
1783
|
-
maxHoursPerWeek: s.workingHours.fullTime.maxHoursPerWeek
|
|
1784
|
-
}, N.payRate.NORMAL.overtime = r.NORMAL.overtime, N.payRate.REST_DAY.regular = r.REST_DAY.regular, N.payRate.REST_DAY.overtime = r.REST_DAY.overtime, N.payRate.PUBLIC_HOLIDAY.regular = r.PUBLIC_HOLIDAY.regular, N.payRate.PUBLIC_HOLIDAY.overtime = r.PUBLIC_HOLIDAY.overtime;
|
|
1785
|
-
}
|
|
1786
|
-
Te(l, Dn, { immediate: !0 });
|
|
1787
|
-
function ve(e) {
|
|
1788
|
-
var a, t, n;
|
|
1789
|
-
return {
|
|
1790
|
-
minHoursPerDay: ((a = e.workingHours) == null ? void 0 : a.minHoursPerDay) ?? N.workingHours.minHoursPerDay,
|
|
1791
|
-
maxHoursPerDay: ((t = e.workingHours) == null ? void 0 : t.maxHoursPerDay) ?? N.workingHours.maxHoursPerDay,
|
|
1792
|
-
maxHoursPerWeek: ((n = e.workingHours) == null ? void 0 : n.maxHoursPerWeek) ?? N.workingHours.maxHoursPerWeek
|
|
1793
|
-
};
|
|
1794
|
-
}
|
|
1795
|
-
function wn(e) {
|
|
1796
|
-
return e.reduce(
|
|
1797
|
-
(a, t) => {
|
|
1798
|
-
const n = ve(t).maxHoursPerWeek;
|
|
1799
|
-
return t.employmentType === "FULLTIME" && n != null ? Math.max(a, n) : a;
|
|
1800
|
-
},
|
|
1801
|
-
0
|
|
1802
|
-
);
|
|
1803
|
-
}
|
|
1804
|
-
function Hn(e, a) {
|
|
1805
|
-
if (e.wage.type === "HOURLY") return e.wage.amount;
|
|
1806
|
-
const t = ve(e).maxHoursPerWeek ?? a;
|
|
1807
|
-
return t ? e.wage.amount / (t * (52 / 12)) : 0;
|
|
1808
|
-
}
|
|
1809
|
-
function An(e, a) {
|
|
1810
|
-
if (e.employmentType === "FULLTIME") return 100;
|
|
1811
|
-
const t = ve(e).maxHoursPerWeek;
|
|
1812
|
-
return !a || t == null ? 0 : Math.min(99, Math.round(t / a * 100));
|
|
1813
|
-
}
|
|
1814
|
-
function En(e) {
|
|
1815
|
-
var a;
|
|
1816
|
-
return {
|
|
1817
|
-
start: e.startTime,
|
|
1818
|
-
end: e.endTime,
|
|
1819
|
-
// A missing position means this assignment was genuinely saved as "Any position" — it must
|
|
1820
|
-
// stay blank rather than falling back to the employee's own primary position, or a reload
|
|
1821
|
-
// silently reassigns every "Any position" shift to whatever station the employee is normally
|
|
1822
|
-
// pinned to.
|
|
1823
|
-
role: ie(e.position) ?? "",
|
|
1824
|
-
positionId: ((a = e.position) == null ? void 0 : a.positionId) || void 0,
|
|
1825
|
-
// Mongo distinguishes a draft from a published/confirmed assignment; the board's third
|
|
1826
|
-
// state ('ot') is a costing outcome, never something stored.
|
|
1827
|
-
status: e.status === "DRAFT" ? "pending" : "confirmed",
|
|
1828
|
-
breakMins: Qe(e.breaks),
|
|
1829
|
-
breaks: e.breaks,
|
|
1830
|
-
// Carried through so an edit updates this same ScheduleShiftAssignments document instead of
|
|
1831
|
-
// creating a duplicate — see useScheduleBoard's commitShift/persistSlot.
|
|
1832
|
-
assignmentId: e.id,
|
|
1833
|
-
updatedAt: e.updatedAt
|
|
1834
|
-
};
|
|
1835
|
-
}
|
|
1836
|
-
function Pn(e) {
|
|
1837
|
-
return e.type === "OFF_DAY" ? "Off day" : e.leaveType === "MEDICAL" ? "Medical Leave" : e.leaveType === "EMERGENCY" ? "Emergency Leave" : e.leaveType === "UNPAID" ? "Unpaid Leave" : "Annual Leave";
|
|
1838
|
-
}
|
|
1839
|
-
function bn(e, a) {
|
|
1840
|
-
if (a < e.startDate || a > e.endDate) return null;
|
|
1841
|
-
const n = e.startDate === e.endDate || a === e.startDate ? e.startPart : a === e.endDate ? e.endPart : "FULL_DAY";
|
|
1842
|
-
return {
|
|
1843
|
-
requestId: e.id,
|
|
1844
|
-
type: e.type,
|
|
1845
|
-
leaveType: e.leaveType ?? void 0,
|
|
1846
|
-
timeOff: e.status === "PENDING" ? "pending" : "approved",
|
|
1847
|
-
reason: Pn(e),
|
|
1848
|
-
half: n !== "FULL_DAY",
|
|
1849
|
-
halfPart: n === "FULL_DAY" ? void 0 : n
|
|
1850
|
-
};
|
|
1851
|
-
}
|
|
1852
|
-
function kn(e) {
|
|
1853
|
-
return {
|
|
1854
|
-
employeeId: e._id,
|
|
1855
|
-
name: e.name,
|
|
1856
|
-
employmentType: "FULLTIME",
|
|
1857
|
-
wage: { type: "HOURLY", amount: 0 },
|
|
1858
|
-
primaryPosition: null,
|
|
1859
|
-
secondaryPositions: [],
|
|
1860
|
-
availability: []
|
|
1861
|
-
};
|
|
1862
|
-
}
|
|
1863
|
-
function Nn(e) {
|
|
1864
|
-
const a = oe[m.value];
|
|
1865
|
-
return !a || !e.includes(a) ? e : [a, ...e.filter((t) => t !== a)];
|
|
1866
|
-
}
|
|
1867
|
-
function Sn(e) {
|
|
1868
|
-
var n;
|
|
1869
|
-
const t = (qe.value[e] ?? ((n = re.value.find((s) => s._id === e)) == null ? void 0 : n.restaurantRole.map((s) => s.restaurantId)) ?? []).map((s) => oe[s]).filter((s) => !!s);
|
|
1870
|
-
return t.length ? Nn([...new Set(t)]) : void 0;
|
|
1871
|
-
}
|
|
1872
|
-
function _o(e = []) {
|
|
1873
|
-
const a = l.value;
|
|
1874
|
-
if (!a) return [];
|
|
1875
|
-
const t = new Map(a.employees.map((o) => [o.employeeId, o])), n = new Map(
|
|
1876
|
-
W.value.map((o) => [o.employeeId, o])
|
|
1877
|
-
), s = re.value.filter((o) => {
|
|
1878
|
-
var d;
|
|
1879
|
-
return ((d = n.get(o._id)) == null ? void 0 : d.enabled) !== !1;
|
|
1880
|
-
}).map((o) => t.get(o._id) ?? kn(o)), i = wn(s), r = /* @__PURE__ */ new Map();
|
|
1881
|
-
for (const o of a.assignments) {
|
|
1882
|
-
const d = `${o.employeeId}|${o.date}`, f = r.get(d);
|
|
1883
|
-
f ? f.push(o) : r.set(d, [o]);
|
|
1884
|
-
}
|
|
1885
|
-
return s.map((o) => {
|
|
1886
|
-
const d = re.value.find((v) => v._id === o.employeeId) ?? {
|
|
1887
|
-
name: o.name,
|
|
1888
|
-
code: void 0,
|
|
1889
|
-
passcode: "",
|
|
1890
|
-
isMasterUser: !1
|
|
1891
|
-
}, f = ve(o), D = gn(o.employeeId), C = new Set(F.map((v) => v.id)), q = new Set(F.map((v) => v.name.toLocaleLowerCase())), O = (v) => v.positionId ? C.has(v.positionId) : q.has(v.positionName.toLocaleLowerCase()), $ = ie(o.primaryPosition), p = !!o.primaryPosition && O(o.primaryPosition), P = o.secondaryPositions.filter(O).map((v) => ie(v)).filter((v) => !!v), _ = $ ? p ? [$, ...P] : [] : P, M = [
|
|
1892
|
-
...$ && !p ? [$] : [],
|
|
1893
|
-
...o.secondaryPositions.filter((v) => !O(v)).map((v) => ie(v)).filter((v) => !!v)
|
|
1894
|
-
], U = _[0] ?? "", L = e.map((v) => {
|
|
1895
|
-
const A = X(v);
|
|
1896
|
-
return (a.timeOff ?? []).filter((w) => w.employeeId === o.employeeId).map((w) => bn(w, A)).find((w) => w !== null) ?? null;
|
|
1897
|
-
}), z = e.map((v) => {
|
|
1898
|
-
const A = X(v), T = (r.get(`${o.employeeId}|${A}`) ?? []).filter((x) => x.startTime && x.endTime).map((x) => En(x)).sort((x, ce) => x.start.localeCompare(ce.start));
|
|
1899
|
-
return T.length ? T.length === 1 ? T[0] : T : null;
|
|
1900
|
-
}), ue = o.availability.length > 0, de = Array.from(
|
|
1901
|
-
{ length: 7 },
|
|
1902
|
-
(v, A) => ue ? o.availability.some((w) => le(w.dayOfWeek) === A) : !0
|
|
1903
|
-
), ge = Array.from({ length: 7 }, (v, A) => {
|
|
1904
|
-
const w = o.availability.find((T) => le(T.dayOfWeek) === A);
|
|
1905
|
-
return { from: (w == null ? void 0 : w.start) ?? "", to: (w == null ? void 0 : w.end) ?? "" };
|
|
1906
|
-
});
|
|
1907
|
-
return {
|
|
1908
|
-
id: D,
|
|
1909
|
-
sourceId: o.employeeId,
|
|
1910
|
-
// Employee page edits update the POS employee name. Use that as the display
|
|
1911
|
-
// source so Scheduling reflects those changes after its roster refresh.
|
|
1912
|
-
name: d.name,
|
|
1913
|
-
// POS access belongs to the POS roster, not the scheduling profile. Keep these
|
|
1914
|
-
// fields on the board employee so the edit form can initialise its access section
|
|
1915
|
-
// from the employee's existing POS account.
|
|
1916
|
-
passcode: d.passcode || void 0,
|
|
1917
|
-
code: d.code,
|
|
1918
|
-
masterUser: d.isMasterUser,
|
|
1919
|
-
employmentType: o.employmentType,
|
|
1920
|
-
role: U,
|
|
1921
|
-
initials: vn(d.name),
|
|
1922
|
-
color: We[(D - Xe - 1) % We.length],
|
|
1923
|
-
// Gross hours actually rostered this week — the figure the cost rail multiplies by
|
|
1924
|
-
// the rate. Contracted hours are a separate question, answered by RULES.contract.
|
|
1925
|
-
// Rounded to one decimal — `hoursBetween` divides by 60, so an unrounded sum reads
|
|
1926
|
-
// as a long, meaningless float (e.g. 31.983333333333334) everywhere this is shown
|
|
1927
|
-
// verbatim, matching the rounding `employeeLoadOf`'s own hours figure already uses.
|
|
1928
|
-
weekHours: Math.round(
|
|
1929
|
-
z.reduce(
|
|
1930
|
-
(v, A) => v + (Array.isArray(A) ? A : A && "start" in A ? [A] : []).reduce(
|
|
1931
|
-
(w, T) => w + hn(T.start, T.end),
|
|
1932
|
-
0
|
|
1933
|
-
),
|
|
1934
|
-
0
|
|
1935
|
-
) * 10
|
|
1936
|
-
) / 10,
|
|
1937
|
-
pct: An(o, i),
|
|
1938
|
-
contractHours: f.maxHoursPerWeek ?? void 0,
|
|
1939
|
-
minHoursPerDay: f.minHoursPerDay ?? void 0,
|
|
1940
|
-
// Keep the persisted override shape here. Consumers that need the effective value use
|
|
1941
|
-
// effectiveWorkingHours(), so an inherited null remains distinguishable from an override.
|
|
1942
|
-
workingHours: o.workingHours,
|
|
1943
|
-
// Every outlet the POS says this person works at, not just this one — the Add / Edit form
|
|
1944
|
-
// shows them, and saving keeps them.
|
|
1945
|
-
locations: Sn(o.employeeId),
|
|
1946
|
-
rate: Hn(o, i),
|
|
1947
|
-
positions: _,
|
|
1948
|
-
archivedPositions: M.length ? M : void 0,
|
|
1949
|
-
shifts: z,
|
|
1950
|
-
timeOff: L,
|
|
1951
|
-
// Remarks live in their own collection in the older scheduling design and are not
|
|
1952
|
-
// part of this board's payload yet.
|
|
1953
|
-
remarks: [],
|
|
1954
|
-
section: aa,
|
|
1955
|
-
payBasis: o.wage.type === "HOURLY" ? "hourly" : "monthly",
|
|
1956
|
-
payAmount: o.wage.amount,
|
|
1957
|
-
availDays: de,
|
|
1958
|
-
availHours: ge
|
|
1959
|
-
};
|
|
1960
|
-
});
|
|
1961
|
-
}
|
|
1962
|
-
function Fo() {
|
|
1963
|
-
return [];
|
|
1964
|
-
}
|
|
1965
|
-
function Uo() {
|
|
1966
|
-
var n, s;
|
|
1967
|
-
const e = l.value, a = {}, t = {};
|
|
1968
|
-
for (const i of (e == null ? void 0 : e.demands) ?? []) {
|
|
1969
|
-
const r = i.date ? a[n = i.date] ?? (a[n] = []) : i.dayOfWeek !== null ? t[s = le(i.dayOfWeek)] ?? (t[s] = []) : null;
|
|
1970
|
-
if (!r) continue;
|
|
1971
|
-
let o = r.find((d) => d.from === i.startTime && d.to === i.endTime);
|
|
1972
|
-
o || (o = { from: i.startTime, to: i.endTime, n: 0, roles: [] }, r.push(o)), o.n += i.headcount, i.position && o.roles.push({
|
|
1973
|
-
position: ie(i.position) ?? "",
|
|
1974
|
-
positionId: i.position.positionId || void 0,
|
|
1975
|
-
n: i.headcount
|
|
1976
|
-
});
|
|
1977
|
-
}
|
|
1978
|
-
return { byDate: a, byWeekday: t };
|
|
1979
|
-
}
|
|
1980
|
-
function Wo() {
|
|
1981
|
-
const e = Ke(), { restaurants: a, readRestaurants: t } = Ha(), n = Da(), s = wa(), i = E(!1);
|
|
1982
|
-
let r = () => !0;
|
|
1983
|
-
const o = B(
|
|
1984
|
-
() => a.value.filter((p) => p.managable).map((p) => ({ value: p._id, label: p.profile.name })).sort((p, P) => p.label.localeCompare(P.label))
|
|
1985
|
-
), d = () => {
|
|
1986
|
-
var p;
|
|
1987
|
-
return `hrm-schedule-outlet:${((p = e.currentBusiness.value) == null ? void 0 : p._id) ?? ""}`;
|
|
1988
|
-
}, f = B(() => {
|
|
1989
|
-
var p;
|
|
1990
|
-
return ((p = e.currentRestaurant.value) == null ? void 0 : p._id) ?? "";
|
|
1991
|
-
});
|
|
1992
|
-
async function D(p, P) {
|
|
1993
|
-
return p !== m.value && !await r(p) || !_e(p) ? !1 : (localStorage.setItem(d(), p), n.query.restaurantId !== p && s.replace({ query: { ...n.query, restaurantId: p } }), await Promise.all([Ce(p), xa(P)]), !0);
|
|
1994
|
-
}
|
|
1995
|
-
function C(p) {
|
|
1996
|
-
r = p;
|
|
1997
|
-
}
|
|
1998
|
-
const q = (p) => !!p && o.value.some((P) => P.value === p);
|
|
1999
|
-
async function O() {
|
|
2000
|
-
var _;
|
|
2001
|
-
await t(), Be.splice(0, Be.length, ...o.value.map((M) => M.label)), Object.keys(oe).forEach((M) => delete oe[M]), a.value.forEach((M) => oe[M._id] = M.profile.name);
|
|
2002
|
-
const p = localStorage.getItem(d()) ?? "", P = [m.value, p, f.value].find(q) ?? ((_ = o.value[0]) == null ? void 0 : _.value) ?? "";
|
|
2003
|
-
return P && _e(P), i.value = !0, P;
|
|
2004
|
-
}
|
|
2005
|
-
async function $() {
|
|
2006
|
-
const p = await O();
|
|
2007
|
-
return p && await Ce(p), p;
|
|
2008
|
-
}
|
|
2009
|
-
return { options: o, ready: i, outletId: m, resolve: $, resolveOutlet: O, switchTo: D, setBeforeSwitch: C };
|
|
2010
|
-
}
|
|
2011
|
-
const Cn = ["data-hierarchy", "data-size", "data-icon"], zo = /* @__PURE__ */ Re({
|
|
2012
|
-
__name: "ScheduleButton",
|
|
2013
|
-
props: {
|
|
2014
|
-
hierarchy: { default: "primary" },
|
|
2015
|
-
size: { default: "sm" },
|
|
2016
|
-
iconOnly: { type: Boolean, default: !1 }
|
|
2017
|
-
},
|
|
2018
|
-
setup(e) {
|
|
2019
|
-
return (a, t) => (b(), k("button", {
|
|
2020
|
-
type: "button",
|
|
2021
|
-
class: "sch-button",
|
|
2022
|
-
"data-hierarchy": e.hierarchy,
|
|
2023
|
-
"data-size": e.size,
|
|
2024
|
-
"data-icon": e.iconOnly ? "only" : void 0
|
|
2025
|
-
}, [
|
|
2026
|
-
Ve(a.$slots, "default")
|
|
2027
|
-
], 8, Cn));
|
|
2028
|
-
}
|
|
2029
|
-
}), Mn = ["disabled", "aria-expanded"], Ln = { class: "fx-btn-label" }, In = { class: "sch" }, Tn = ["aria-multiselectable"], Rn = {
|
|
2030
|
-
key: 0,
|
|
2031
|
-
class: "fx-pop-head"
|
|
2032
|
-
}, On = {
|
|
2033
|
-
key: 1,
|
|
2034
|
-
class: "fx-pop-search"
|
|
2035
|
-
}, $n = {
|
|
2036
|
-
key: 2,
|
|
2037
|
-
class: "fx-opt is-off"
|
|
2038
|
-
}, xn = {
|
|
2039
|
-
key: 0,
|
|
2040
|
-
class: "fx-grp"
|
|
2041
|
-
}, Yn = ["aria-selected", "onClick"], Bn = {
|
|
2042
|
-
key: 0,
|
|
2043
|
-
class: "fx-opt-text"
|
|
2044
|
-
}, _n = { key: 0 }, Vo = /* @__PURE__ */ Re({
|
|
2045
|
-
inheritAttrs: !1,
|
|
2046
|
-
__name: "ScheduleSelect",
|
|
2047
|
-
props: {
|
|
2048
|
-
modelValue: {},
|
|
2049
|
-
options: {},
|
|
2050
|
-
multiple: { type: Boolean },
|
|
2051
|
-
selected: {},
|
|
2052
|
-
selectedId: {},
|
|
2053
|
-
placeholder: {},
|
|
2054
|
-
selectedLabel: {},
|
|
2055
|
-
disabled: { type: Boolean },
|
|
2056
|
-
menuTitle: {},
|
|
2057
|
-
searchable: { type: Boolean },
|
|
2058
|
-
teleport: { type: Boolean, default: !0 }
|
|
2059
|
-
},
|
|
2060
|
-
emits: ["update:modelValue", "toggle"],
|
|
2061
|
-
setup(e, { emit: a }) {
|
|
2062
|
-
const t = e, n = a, s = ua(), i = B(() => s.class ?? ""), r = E(!1), o = E(!1), d = E(null), f = E(null), D = E(null), C = B(() => t.teleport !== !1 && o.value);
|
|
2063
|
-
Le(() => {
|
|
2064
|
-
o.value = typeof document < "u" && !!document.body;
|
|
2065
|
-
});
|
|
2066
|
-
const q = B(() => {
|
|
2067
|
-
var u, y;
|
|
2068
|
-
if (t.selectedLabel != null) return t.selectedLabel;
|
|
2069
|
-
if (t.multiple) {
|
|
2070
|
-
const c = ((u = t.selected) == null ? void 0 : u.length) ?? 0;
|
|
2071
|
-
return c ? `${c} selected` : t.placeholder ?? "";
|
|
2072
|
-
}
|
|
2073
|
-
return ((y = t.options.find((c) => c.value === t.modelValue)) == null ? void 0 : y.label) ?? t.placeholder ?? "";
|
|
2074
|
-
});
|
|
2075
|
-
function O(u) {
|
|
2076
|
-
var y;
|
|
2077
|
-
return t.multiple ? !!((y = t.selected) != null && y.includes(u.value)) : t.selectedId != null ? u.id === t.selectedId : u.value === t.modelValue;
|
|
2078
|
-
}
|
|
2079
|
-
const $ = B(() => !!t.menuTitle || t.options.some((u) => u.hint)), p = E(""), P = E(null), _ = B(() => {
|
|
2080
|
-
const u = p.value.trim().toLowerCase();
|
|
2081
|
-
return !t.searchable || !u ? t.options : t.options.filter((y) => `${y.label} ${y.hint ?? ""}`.toLowerCase().includes(u));
|
|
2082
|
-
}), M = B(() => {
|
|
2083
|
-
const u = [];
|
|
2084
|
-
let y;
|
|
2085
|
-
for (const c of _.value)
|
|
2086
|
-
c.group !== y && (y = c.group, y && u.push({ heading: y })), u.push({ option: c });
|
|
2087
|
-
return u;
|
|
2088
|
-
}), U = 5, L = 8;
|
|
2089
|
-
function z() {
|
|
2090
|
-
const u = D.value, y = f.value;
|
|
2091
|
-
if (!u || !y) return;
|
|
2092
|
-
const c = y.getBoundingClientRect(), S = window.innerWidth || document.documentElement.clientWidth, R = window.innerHeight || document.documentElement.clientHeight;
|
|
2093
|
-
u.style.minWidth = `${Math.round(c.width)}px`, u.style.maxWidth = `${Math.max(180, Math.round(S - L * 2))}px`;
|
|
2094
|
-
const ee = R - c.bottom - U - L, ia = c.top - U - L;
|
|
2095
|
-
u.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(ee, ia)))}px`;
|
|
2096
|
-
const me = u.offsetHeight, ra = u.offsetWidth;
|
|
2097
|
-
let De = c.bottom + U;
|
|
2098
|
-
De + me > R - L && (De = c.top - U - me >= L ? c.top - U - me : Math.max(L, R - me - L));
|
|
2099
|
-
const la = Math.min(Math.max(L, c.left), Math.max(L, S - ra - L));
|
|
2100
|
-
u.style.top = `${Math.round(De)}px`, u.style.left = `${Math.round(la)}px`, u.style.visibility = "visible";
|
|
2101
|
-
}
|
|
2102
|
-
function ue(u) {
|
|
2103
|
-
var c, S;
|
|
2104
|
-
const y = u.target;
|
|
2105
|
-
y && ((c = d.value) != null && c.contains(y) || (S = D.value) != null && S.contains(y)) || w();
|
|
2106
|
-
}
|
|
2107
|
-
function de(u) {
|
|
2108
|
-
const y = D.value, c = u.target;
|
|
2109
|
-
if (y && c && c !== document && y.contains(c)) return;
|
|
2110
|
-
const S = f.value;
|
|
2111
|
-
if (!S) return;
|
|
2112
|
-
const R = S.getBoundingClientRect(), ee = window.innerHeight || document.documentElement.clientHeight;
|
|
2113
|
-
if (R.bottom < 0 || R.top > ee) {
|
|
2114
|
-
w();
|
|
2115
|
-
return;
|
|
2116
|
-
}
|
|
2117
|
-
z();
|
|
2118
|
-
}
|
|
2119
|
-
function ge() {
|
|
2120
|
-
document.addEventListener("click", ue), document.addEventListener("scroll", de, !0), window.addEventListener("resize", w);
|
|
2121
|
-
}
|
|
2122
|
-
function v() {
|
|
2123
|
-
document.removeEventListener("click", ue), document.removeEventListener("scroll", de, !0), window.removeEventListener("resize", w);
|
|
2124
|
-
}
|
|
2125
|
-
async function A() {
|
|
2126
|
-
var u, y, c;
|
|
2127
|
-
t.disabled || r.value || (p.value = "", r.value = !0, await Pe(), z(), (u = P.value) == null || u.focus(), (c = (y = D.value) == null ? void 0 : y.querySelector(".fx-opt.is-on")) == null || c.scrollIntoView({ block: "nearest" }), ge());
|
|
2128
|
-
}
|
|
2129
|
-
function w() {
|
|
2130
|
-
r.value && (r.value = !1, p.value = "", v());
|
|
2131
|
-
}
|
|
2132
|
-
Te(p, async () => {
|
|
2133
|
-
r.value && (await Pe(), z());
|
|
2134
|
-
});
|
|
2135
|
-
function T(u) {
|
|
2136
|
-
var y;
|
|
2137
|
-
if (u.key === "Escape")
|
|
2138
|
-
u.preventDefault(), w(), (y = f.value) == null || y.focus();
|
|
2139
|
-
else if (u.key === "Enter") {
|
|
2140
|
-
u.preventDefault();
|
|
2141
|
-
const c = _.value.find((S) => !S.disabled);
|
|
2142
|
-
c && ce(c);
|
|
2143
|
-
}
|
|
2144
|
-
}
|
|
2145
|
-
function x() {
|
|
2146
|
-
r.value ? w() : A();
|
|
2147
|
-
}
|
|
2148
|
-
function ce(u) {
|
|
2149
|
-
if (!u.disabled) {
|
|
2150
|
-
if (t.multiple && !u.command) {
|
|
2151
|
-
n("toggle", u.value);
|
|
2152
|
-
return;
|
|
2153
|
-
}
|
|
2154
|
-
if (w(), t.multiple) {
|
|
2155
|
-
n("update:modelValue", u.value);
|
|
2156
|
-
return;
|
|
2157
|
-
}
|
|
2158
|
-
u.value !== t.modelValue && n("update:modelValue", u.value);
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
const na = B(() => t.options.filter((u) => !u.disabled));
|
|
2162
|
-
function oa(u) {
|
|
2163
|
-
const y = na.value;
|
|
2164
|
-
if (t.multiple || !y.length) {
|
|
2165
|
-
A();
|
|
2166
|
-
return;
|
|
2167
|
-
}
|
|
2168
|
-
const c = y.findIndex((ee) => ee.value === t.modelValue), S = u === "Home" ? 0 : u === "End" ? y.length - 1 : u === "ArrowDown" ? Math.min(y.length - 1, (c < 0 ? -1 : c) + 1) : Math.max(0, (c < 0 ? 1 : c) - 1), R = y[S];
|
|
2169
|
-
R && R.value !== t.modelValue ? n("update:modelValue", R.value) : A();
|
|
2170
|
-
}
|
|
2171
|
-
function sa(u) {
|
|
2172
|
-
var y;
|
|
2173
|
-
if (u.key === "Escape") {
|
|
2174
|
-
if (!r.value) return;
|
|
2175
|
-
u.preventDefault(), w(), (y = f.value) == null || y.focus();
|
|
2176
|
-
return;
|
|
2177
|
-
}
|
|
2178
|
-
if (u.key === "Enter" || u.key === " ") {
|
|
2179
|
-
u.preventDefault(), x();
|
|
2180
|
-
return;
|
|
2181
|
-
}
|
|
2182
|
-
u.key !== "ArrowDown" && u.key !== "ArrowUp" && u.key !== "Home" && u.key !== "End" || (u.preventDefault(), oa(u.key));
|
|
2183
|
-
}
|
|
2184
|
-
return Ie(v), (u, y) => (b(), k("div", {
|
|
2185
|
-
ref_key: "rootEl",
|
|
2186
|
-
ref: d,
|
|
2187
|
-
class: pe(["fx-sel", i.value])
|
|
2188
|
-
}, [
|
|
2189
|
-
Y("button", ca({
|
|
2190
|
-
ref_key: "btnEl",
|
|
2191
|
-
ref: f
|
|
2192
|
-
}, u.$attrs, {
|
|
2193
|
-
type: "button",
|
|
2194
|
-
class: ["sch-input fx-btn", { "is-open": r.value }],
|
|
2195
|
-
disabled: e.disabled,
|
|
2196
|
-
"aria-haspopup": "listbox",
|
|
2197
|
-
"aria-expanded": r.value,
|
|
2198
|
-
onClick: y[0] || (y[0] = (c) => x()),
|
|
2199
|
-
onKeydown: sa
|
|
2200
|
-
}), [
|
|
2201
|
-
Y("span", Ln, V(q.value), 1)
|
|
2202
|
-
], 16, Mn),
|
|
2203
|
-
(b(), da(ma, {
|
|
2204
|
-
to: "body",
|
|
2205
|
-
disabled: !C.value
|
|
2206
|
-
}, [
|
|
2207
|
-
Y("div", In, [
|
|
2208
|
-
r.value ? (b(), k("div", {
|
|
2209
|
-
key: 0,
|
|
2210
|
-
ref_key: "popEl",
|
|
2211
|
-
ref: D,
|
|
2212
|
-
class: pe(["fx-pop", { "fx-pop-rich": $.value }]),
|
|
2213
|
-
role: "listbox",
|
|
2214
|
-
"aria-multiselectable": e.multiple || void 0,
|
|
2215
|
-
style: { visibility: "hidden" }
|
|
2216
|
-
}, [
|
|
2217
|
-
e.menuTitle ? (b(), k("div", Rn, V(e.menuTitle), 1)) : K("", !0),
|
|
2218
|
-
e.searchable ? (b(), k("div", On, [
|
|
2219
|
-
ya(Y("input", {
|
|
2220
|
-
ref_key: "searchEl",
|
|
2221
|
-
ref: P,
|
|
2222
|
-
"onUpdate:modelValue": y[1] || (y[1] = (c) => p.value = c),
|
|
2223
|
-
class: "sch-input fx-pop-q",
|
|
2224
|
-
type: "search",
|
|
2225
|
-
placeholder: "Search",
|
|
2226
|
-
autocomplete: "off",
|
|
2227
|
-
spellcheck: "false",
|
|
2228
|
-
"aria-label": "Search",
|
|
2229
|
-
onKeydown: T
|
|
2230
|
-
}, null, 544), [
|
|
2231
|
-
[pa, p.value]
|
|
2232
|
-
])
|
|
2233
|
-
])) : K("", !0),
|
|
2234
|
-
e.searchable && !M.value.length ? (b(), k("div", $n, "No matches")) : K("", !0),
|
|
2235
|
-
(b(!0), k(He, null, fa(M.value, (c) => (b(), k(He, {
|
|
2236
|
-
key: "heading" in c ? `heading:${c.heading}` : `option:${c.option.value}`
|
|
2237
|
-
}, [
|
|
2238
|
-
"heading" in c ? (b(), k("div", xn, V(c.heading), 1)) : (b(), k("div", {
|
|
2239
|
-
key: 1,
|
|
2240
|
-
class: pe(["fx-opt", {
|
|
2241
|
-
"is-on": O(c.option),
|
|
2242
|
-
"is-off": c.option.disabled,
|
|
2243
|
-
"is-new": c.option.command
|
|
2244
|
-
}]),
|
|
2245
|
-
role: "option",
|
|
2246
|
-
"aria-selected": O(c.option),
|
|
2247
|
-
onClick: (S) => ce(c.option)
|
|
2248
|
-
}, [
|
|
2249
|
-
y[2] || (y[2] = Y("span", {
|
|
2250
|
-
class: "fx-tick",
|
|
2251
|
-
"aria-hidden": "true"
|
|
2252
|
-
}, [
|
|
2253
|
-
Y("svg", {
|
|
2254
|
-
width: "11",
|
|
2255
|
-
height: "11",
|
|
2256
|
-
viewBox: "0 0 16 16",
|
|
2257
|
-
fill: "none"
|
|
2258
|
-
}, [
|
|
2259
|
-
Y("path", {
|
|
2260
|
-
d: "m3.5 8.4 3 3 6-7",
|
|
2261
|
-
stroke: "currentColor",
|
|
2262
|
-
"stroke-width": "2.2",
|
|
2263
|
-
"stroke-linecap": "round",
|
|
2264
|
-
"stroke-linejoin": "round"
|
|
2265
|
-
})
|
|
2266
|
-
])
|
|
2267
|
-
], -1)),
|
|
2268
|
-
$.value ? (b(), k("span", Bn, [
|
|
2269
|
-
Y("b", null, V(c.option.label), 1),
|
|
2270
|
-
c.option.hint ? (b(), k("small", _n, V(c.option.hint), 1)) : K("", !0)
|
|
2271
|
-
])) : (b(), k(He, { key: 1 }, [
|
|
2272
|
-
ha(V(c.option.label), 1)
|
|
2273
|
-
], 64))
|
|
2274
|
-
], 10, Yn))
|
|
2275
|
-
], 64))), 128))
|
|
2276
|
-
], 10, Tn)) : K("", !0)
|
|
2277
|
-
])
|
|
2278
|
-
], 8, ["disabled"]))
|
|
2279
|
-
], 2));
|
|
2280
|
-
}
|
|
2281
|
-
}), Fn = ["id", "aria-labelledby", "aria-label"], ze = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', Ko = /* @__PURE__ */ Re({
|
|
2282
|
-
__name: "ScheduleModal",
|
|
2283
|
-
props: {
|
|
2284
|
-
open: { type: Boolean },
|
|
2285
|
-
id: {},
|
|
2286
|
-
panelClass: { default: "ob-modal" },
|
|
2287
|
-
panelStyle: {},
|
|
2288
|
-
labelledBy: {},
|
|
2289
|
-
label: {}
|
|
2290
|
-
},
|
|
2291
|
-
emits: ["close"],
|
|
2292
|
-
setup(e, { emit: a }) {
|
|
2293
|
-
const t = e, n = a, s = E(null);
|
|
2294
|
-
let i = null;
|
|
2295
|
-
function r() {
|
|
2296
|
-
Pe(() => {
|
|
2297
|
-
const d = s.value;
|
|
2298
|
-
d && (d.querySelector(ze) ?? d).focus();
|
|
2299
|
-
});
|
|
2300
|
-
}
|
|
2301
|
-
function o(d) {
|
|
2302
|
-
if (!t.open) return;
|
|
2303
|
-
if (d.key === "Escape") {
|
|
2304
|
-
d.preventDefault(), n("close");
|
|
2305
|
-
return;
|
|
2306
|
-
}
|
|
2307
|
-
if (d.key !== "Tab" || !s.value) return;
|
|
2308
|
-
const f = Array.from(s.value.querySelectorAll(ze));
|
|
2309
|
-
if (!f.length) return;
|
|
2310
|
-
const D = f[0], C = f[f.length - 1];
|
|
2311
|
-
d.shiftKey && document.activeElement === D ? (d.preventDefault(), C.focus()) : !d.shiftKey && document.activeElement === C && (d.preventDefault(), D.focus());
|
|
2312
|
-
}
|
|
2313
|
-
return Te(
|
|
2314
|
-
() => t.open,
|
|
2315
|
-
(d) => {
|
|
2316
|
-
d ? (i = document.activeElement instanceof HTMLElement ? document.activeElement : null, r()) : (i == null || i.focus(), i = null);
|
|
2317
|
-
},
|
|
2318
|
-
{ immediate: !0 }
|
|
2319
|
-
), Le(() => document.addEventListener("keydown", o)), Ie(() => {
|
|
2320
|
-
document.removeEventListener("keydown", o), i = null;
|
|
2321
|
-
}), (d, f) => e.open ? (b(), k("div", {
|
|
2322
|
-
key: 0,
|
|
2323
|
-
class: "modal-overlay open",
|
|
2324
|
-
onClick: f[0] || (f[0] = va((D) => n("close"), ["self"]))
|
|
2325
|
-
}, [
|
|
2326
|
-
Y("div", {
|
|
2327
|
-
id: e.id,
|
|
2328
|
-
ref_key: "panel",
|
|
2329
|
-
ref: s,
|
|
2330
|
-
class: pe(["schedule-modal-panel", e.panelClass]),
|
|
2331
|
-
style: ga(e.panelStyle),
|
|
2332
|
-
role: "dialog",
|
|
2333
|
-
"aria-modal": "true",
|
|
2334
|
-
"aria-labelledby": e.labelledBy,
|
|
2335
|
-
"aria-label": e.label,
|
|
2336
|
-
tabindex: "-1"
|
|
2337
|
-
}, [
|
|
2338
|
-
Ve(d.$slots, "default")
|
|
2339
|
-
], 14, Fn)
|
|
2340
|
-
])) : K("", !0);
|
|
2341
|
-
}
|
|
2342
|
-
});
|
|
2343
|
-
export {
|
|
2344
|
-
H as $,
|
|
2345
|
-
Lo as A,
|
|
2346
|
-
Xn as B,
|
|
2347
|
-
eo as C,
|
|
2348
|
-
se as D,
|
|
2349
|
-
je as E,
|
|
2350
|
-
ke as F,
|
|
2351
|
-
ba as G,
|
|
2352
|
-
to as H,
|
|
2353
|
-
mo as I,
|
|
2354
|
-
Oo as J,
|
|
2355
|
-
Ea as K,
|
|
2356
|
-
No as L,
|
|
2357
|
-
ko as M,
|
|
2358
|
-
bo as N,
|
|
2359
|
-
Ze as O,
|
|
2360
|
-
Na as P,
|
|
2361
|
-
so as Q,
|
|
2362
|
-
qn as R,
|
|
2363
|
-
Io as S,
|
|
2364
|
-
W as T,
|
|
2365
|
-
aa as U,
|
|
2366
|
-
Ia as V,
|
|
2367
|
-
Mo as W,
|
|
2368
|
-
Be as X,
|
|
2369
|
-
xo as Y,
|
|
2370
|
-
ao as Z,
|
|
2371
|
-
j as _,
|
|
2372
|
-
_o as a,
|
|
2373
|
-
le as a0,
|
|
2374
|
-
ie as a1,
|
|
2375
|
-
Nn as a2,
|
|
2376
|
-
oe as a3,
|
|
2377
|
-
ro as a4,
|
|
2378
|
-
uo as a5,
|
|
2379
|
-
Me as a6,
|
|
2380
|
-
io as a7,
|
|
2381
|
-
Ta as a8,
|
|
2382
|
-
co as a9,
|
|
2383
|
-
po as aA,
|
|
2384
|
-
gn as aa,
|
|
2385
|
-
X as ab,
|
|
2386
|
-
wo as ac,
|
|
2387
|
-
go as ad,
|
|
2388
|
-
Do as ae,
|
|
2389
|
-
$o as af,
|
|
2390
|
-
xa as ag,
|
|
2391
|
-
Ao as ah,
|
|
2392
|
-
Sa as ai,
|
|
2393
|
-
Qn as aj,
|
|
2394
|
-
vo as ak,
|
|
2395
|
-
xe as al,
|
|
2396
|
-
Uo as am,
|
|
2397
|
-
Ye as an,
|
|
2398
|
-
fe as ao,
|
|
2399
|
-
Ce as ap,
|
|
2400
|
-
Eo as aq,
|
|
2401
|
-
zo as ar,
|
|
2402
|
-
Vo as as,
|
|
2403
|
-
Ko as at,
|
|
2404
|
-
F as au,
|
|
2405
|
-
jn as av,
|
|
2406
|
-
Wo as aw,
|
|
2407
|
-
fo as ax,
|
|
2408
|
-
yo as ay,
|
|
2409
|
-
re as az,
|
|
2410
|
-
N as b,
|
|
2411
|
-
Fo as c,
|
|
2412
|
-
Q as d,
|
|
2413
|
-
To as e,
|
|
2414
|
-
Jn as f,
|
|
2415
|
-
yn as g,
|
|
2416
|
-
Co as h,
|
|
2417
|
-
Ma as i,
|
|
2418
|
-
ho as j,
|
|
2419
|
-
Yo as k,
|
|
2420
|
-
Ho as l,
|
|
2421
|
-
Po as m,
|
|
2422
|
-
So as n,
|
|
2423
|
-
m as o,
|
|
2424
|
-
l as p,
|
|
2425
|
-
Se as q,
|
|
2426
|
-
lo as r,
|
|
2427
|
-
Pa as s,
|
|
2428
|
-
oo as t,
|
|
2429
|
-
Ro as u,
|
|
2430
|
-
Ne as v,
|
|
2431
|
-
no as w,
|
|
2432
|
-
fn as x,
|
|
2433
|
-
Zn as y,
|
|
2434
|
-
Bo as z
|
|
2435
|
-
};
|