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