@feedmepos/mf-hrm-portal 2.3.0 → 2.3.1-dev.1
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-DwubNElp.js → ApprovalCodeList-CDU3yUHy.js} +7 -7
- package/dist/AuditLogList-BU11Q5sF.js +1950 -0
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CmLLNcB4.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BjHwyaXu.js} +2 -2
- package/dist/{EmployeeList-DEAJPx9F.js → EmployeeList-BqzXg3uA.js} +8 -8
- package/dist/{FormItem.vue_vue_type_script_setup_true_lang-OAvd6eHM.js → FormItem.vue_vue_type_script_setup_true_lang-Clh43Y-8.js} +1 -1
- package/dist/{GrantUserList-Dx4jF2qJ.js → GrantUserList-Cw8RkFqf.js} +8 -8
- package/dist/{Main-BirWXk7o.js → Main-BxcRbcce.js} +5 -5
- package/dist/{Main-CL5JYCPg.js → Main-CL-ysWRu.js} +8 -8
- package/dist/{Main-C2PBSCte.js → Main-Dlar77Zq.js} +11 -11
- package/dist/{PermissionSetList-BtYcqPiO.js → PermissionSetList-_8aBzGy7.js} +7 -7
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BXw4aX39.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CNgtAtYH.js} +1292 -1292
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DaAx79pC.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js} +1 -1
- package/dist/{RoleList-YS_LBfoJ.js → RoleList-C3n_zOB3.js} +9 -9
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CnrbCggg.js +544 -0
- package/dist/ScheduleGeneralPage-DGHKW_ww.js +811 -0
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-CnKzVz3I.js → ScheduleModal.vue_vue_type_script_setup_true_lang-AfTAGsh1.js} +933 -834
- package/dist/SchedulePage-UzDPRldO.js +19458 -0
- package/dist/SchedulePositionPage-RHETW36P.js +282 -0
- package/dist/{SelectFilter-Dh3eY1hV.js → SelectFilter-CeBV_Kug.js} +1 -1
- package/dist/{TeamMemberList-Bv6_2bzs.js → TeamMemberList-B-qR7VS3.js} +11 -11
- package/dist/{TimesheetList-B3BmpH0I.js → TimesheetList-BqRIZBt1.js} +8 -8
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-C4rbnZh1.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-oIBUAjtv.js} +3 -3
- package/dist/{app-CyS8c8dx.js → app-DFL6Nv_p.js} +10360 -3848
- package/dist/app.js +1 -1
- package/dist/{approval-code-BIpLingm.js → approval-code-BXUiojPH.js} +1 -1
- package/dist/{dayjs.min-BRlEc3-d.js → dayjs.min-CH-gVmsz.js} +1 -1
- package/dist/{employee-CcdjLOLQ.js → employee-3xpIjR6i.js} +4 -4
- package/dist/{grant-user-uZmvD_bw.js → grant-user-CBJ3gEgW.js} +1 -1
- package/dist/{iteration-CL1RDmws.js → iteration-D6wutq5U.js} +1 -1
- package/dist/{lodash-C00ieagp.js → lodash-D5kU1nPN.js} +1 -1
- package/dist/{restaurant-CHpkjUPy.js → restaurant-D2mfKHaH.js} +2 -2
- package/dist/{role-DtatkKp9.js → role-B7nu6hH1.js} +2 -2
- package/dist/{rule-DJJMpkoG.js → rule-CMd6SL3n.js} +3 -3
- package/dist/src/api/audit-log/index.d.ts +4 -0
- package/dist/src/views/audit-log/constants.d.ts +9 -30
- package/dist/src/views/audit-log/locales/index.d.ts +236 -0
- package/dist/src/views/audit-log/pos-row.d.ts +27 -0
- package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +0 -2
- package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +5 -3
- package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +2 -0
- package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +1 -1
- package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +10 -0
- package/dist/src/views/scheduling/composables/schedule-cost.d.ts +5 -0
- package/dist/src/views/scheduling/composables/schedule-currency.d.ts +22 -0
- package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +1 -1
- package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +4 -0
- package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +2 -1
- package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +5 -5
- package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +2 -0
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +5 -5
- package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +2 -2
- package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +9 -12
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +7 -6
- package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +12 -0
- package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
- package/dist/src/views/scheduling/country-rules/index.d.ts +5 -1
- package/dist/src/views/scheduling/locales/index.d.ts +6272 -0
- package/dist/src/views/scheduling/schedule-store.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-Bp0PwbAN.js → useAppStore-DZCdxlCd.js} +1 -1
- package/dist/{useLoading-sgL8DRUz.js → useLoading-Nygx2zn8.js} +1 -1
- package/dist/{useReportPermissions-DI-xg3OX.js → useReportPermissions-BcxIKxlF.js} +3 -3
- package/package.json +1 -1
- package/dist/AuditLogList-CTeMbyHL.js +0 -1778
- package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BorKuXxL.js +0 -530
- package/dist/ScheduleGeneralPage-C1p2mivt.js +0 -780
- package/dist/SchedulePage-BP7x7JAl.js +0 -19485
- package/dist/SchedulePositionPage-BogOQZVW.js +0 -262
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { onMounted as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { useCoreStore as
|
|
4
|
-
import { g
|
|
5
|
-
import { E as
|
|
6
|
-
import { t as
|
|
7
|
-
function
|
|
1
|
+
import { onMounted as Re, onBeforeUnmount as $e, ref as S, reactive as T, shallowRef as Ae, watch as Be, computed as Y, defineComponent as xe, createElementBlock as M, openBlock as C, renderSlot as Xe, useAttrs as ha, nextTick as ke, normalizeClass as pe, createElementVNode as x, createBlock as pa, mergeProps as va, toDisplayString as z, Teleport as ga, createCommentVNode as G, withDirectives as Da, unref as Ee, vModelText as wa, Fragment as be, renderList as Ha, createTextVNode as Aa, withModifiers as Ea, normalizeStyle as ba } from "vue";
|
|
2
|
+
import { useRoute as Pa, useRouter as Sa } from "vue-router";
|
|
3
|
+
import { useCoreStore as Je, useI18n as ka } from "@feedmepos/mf-common";
|
|
4
|
+
import { g, b as h, u as Ca } from "./restaurant-D2mfKHaH.js";
|
|
5
|
+
import { E as Ce, u as Ze } from "./employee-3xpIjR6i.js";
|
|
6
|
+
import { t as Fe, q as Ma } from "./rule-CMd6SL3n.js";
|
|
7
|
+
function so(e) {
|
|
8
8
|
let a = null;
|
|
9
9
|
function t() {
|
|
10
10
|
if (!a) return;
|
|
@@ -12,109 +12,109 @@ function Qn(e) {
|
|
|
12
12
|
const n = a.getBoundingClientRect().top;
|
|
13
13
|
a.style.height = `${Math.max(0, window.innerHeight - n)}px`;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
Re(() => {
|
|
16
16
|
var n;
|
|
17
17
|
a = ((n = e.value) == null ? void 0 : n.closest(".sch-page")) ?? null, t(), window.addEventListener("resize", t);
|
|
18
|
-
}),
|
|
18
|
+
}), $e(() => {
|
|
19
19
|
window.removeEventListener("resize", t), a && (a.style.height = "");
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Me(e) {
|
|
23
23
|
const [a, t] = String(e || "0:0").split(":").map(Number);
|
|
24
24
|
return (Number.isFinite(a) ? a : 0) * 60 + (Number.isFinite(t) ? t : 0);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function Na(e) {
|
|
27
27
|
const a = Math.max(0, Math.min(1439, Math.round(e)));
|
|
28
28
|
return `${String(Math.floor(a / 60)).padStart(2, "0")}:${String(a % 60).padStart(2, "0")}`;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
const t =
|
|
32
|
-
let n =
|
|
30
|
+
function La(e, a) {
|
|
31
|
+
const t = Me(e);
|
|
32
|
+
let n = Me(a);
|
|
33
33
|
return n <= t && (n += 1440), [t, n];
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
const [t, n] =
|
|
35
|
+
function qe(e, a) {
|
|
36
|
+
const [t, n] = La(e, a);
|
|
37
37
|
return Math.max(0, n - t);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
const a = (
|
|
39
|
+
function Oa(e) {
|
|
40
|
+
const a = (Me(e) % 1440 + 1440) % 1440, t = Math.floor(a / 60), n = a % 60, o = t < 12 ? "am" : "pm", i = t % 12 || 12;
|
|
41
41
|
return n ? `${i}:${String(n).padStart(2, "0")}${o}` : `${i}${o}`;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return Na(
|
|
43
|
+
function io(e) {
|
|
44
|
+
return Oa(Na(e % 1440));
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function ea(e) {
|
|
47
47
|
const a = Array.isArray(e) ? e : e == null ? void 0 : e.breaks;
|
|
48
48
|
return a != null && a.length ? a.reduce((t, n) => {
|
|
49
49
|
if (n.type === "DURATION") return t + n.minutes;
|
|
50
|
-
const [o, i] = n.startTime.split(":").map(Number), [
|
|
51
|
-
let d =
|
|
50
|
+
const [o, i] = n.startTime.split(":").map(Number), [u, s] = n.endTime.split(":").map(Number);
|
|
51
|
+
let d = u * 60 + s - (o * 60 + i);
|
|
52
52
|
return d < 0 && (d += 24 * 60), t + d;
|
|
53
53
|
}, 0) : Math.max(0, e && !Array.isArray(e) ? e.breakMins ?? 0 : 0);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function ro(e, a) {
|
|
56
56
|
var o;
|
|
57
|
-
const t = a ??
|
|
57
|
+
const t = a ?? qe(e.start, e.end), n = (o = e.breaks) != null && o.length ? e.breaks.reduce((i, u) => i + (u.breakPayType === "UNPAID" ? ea([u]) : 0), 0) : Math.max(0, e.breakMins ?? 0);
|
|
58
58
|
return Math.max(0, t - Math.min(t, n));
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function lo(e) {
|
|
61
61
|
const a = Math.max(0, Math.round(e ?? 0));
|
|
62
62
|
return a ? [{ type: "DURATION", minutes: a, breakPayType: "UNPAID" }] : [];
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const ne = 500, Ia = 10, _e = 6, uo = 1500, aa = 1e6, w = {
|
|
65
65
|
async completeOnboarding(e, a) {
|
|
66
|
-
return
|
|
67
|
-
await
|
|
66
|
+
return g(
|
|
67
|
+
await h(`restaurants/${e}/schedules`).post("onboarding", a)
|
|
68
68
|
);
|
|
69
69
|
},
|
|
70
70
|
async listEmployeeProfiles(e) {
|
|
71
|
-
return
|
|
72
|
-
await
|
|
71
|
+
return g(
|
|
72
|
+
await h("schedules").get("employees", {
|
|
73
73
|
params: e != null && e.length ? { ids: e.join(",") } : void 0
|
|
74
74
|
})
|
|
75
75
|
);
|
|
76
76
|
},
|
|
77
77
|
async listEmployeeConfigs(e) {
|
|
78
|
-
return
|
|
79
|
-
await
|
|
78
|
+
return g(
|
|
79
|
+
await h(`restaurants/${e}/schedules`).get("employee-configs")
|
|
80
80
|
);
|
|
81
81
|
},
|
|
82
82
|
async saveEmployeeConfigs(e, a) {
|
|
83
|
-
return
|
|
84
|
-
await
|
|
83
|
+
return g(
|
|
84
|
+
await h(`restaurants/${e}/schedules`).post(
|
|
85
85
|
"employee-configs/reorder",
|
|
86
86
|
a
|
|
87
87
|
)
|
|
88
88
|
);
|
|
89
89
|
},
|
|
90
90
|
async getSettings(e) {
|
|
91
|
-
return
|
|
92
|
-
await
|
|
91
|
+
return g(
|
|
92
|
+
await h(`restaurants/${e}/schedules`).get("settings")
|
|
93
93
|
);
|
|
94
94
|
},
|
|
95
95
|
async saveSettings(e, a) {
|
|
96
|
-
return
|
|
97
|
-
await
|
|
96
|
+
return g(
|
|
97
|
+
await h(`restaurants/${e}/schedules`).post("settings", a)
|
|
98
98
|
);
|
|
99
99
|
},
|
|
100
100
|
async generateAutoSchedule(e, a) {
|
|
101
|
-
return
|
|
102
|
-
await
|
|
101
|
+
return g(
|
|
102
|
+
await h(`restaurants/${e}/schedules`).post(
|
|
103
103
|
"auto-schedule/generate",
|
|
104
104
|
a
|
|
105
105
|
)
|
|
106
106
|
);
|
|
107
107
|
},
|
|
108
108
|
async getAutoScheduleCapabilities(e) {
|
|
109
|
-
return
|
|
110
|
-
await
|
|
109
|
+
return g(
|
|
110
|
+
await h(`restaurants/${e}/schedules`).get(
|
|
111
111
|
"auto-schedule/capabilities"
|
|
112
112
|
)
|
|
113
113
|
);
|
|
114
114
|
},
|
|
115
115
|
async applyAutoSchedule(e, a) {
|
|
116
|
-
return
|
|
117
|
-
await
|
|
116
|
+
return g(
|
|
117
|
+
await h(`restaurants/${e}/schedules`).post(
|
|
118
118
|
"auto-schedule/apply",
|
|
119
119
|
a
|
|
120
120
|
)
|
|
@@ -122,75 +122,75 @@ const te = 500, ka = 10, xe = 6, qn = 1500, Je = 1e6, H = {
|
|
|
122
122
|
},
|
|
123
123
|
/** One outlet's whole board over `[from, to]` (inclusive, 'YYYY-MM-DD'). */
|
|
124
124
|
async readBoard(e, a, t) {
|
|
125
|
-
return
|
|
126
|
-
await
|
|
125
|
+
return g(
|
|
126
|
+
await h(`restaurants/${e}/schedules`).get("board", {
|
|
127
127
|
params: { from: a, to: t }
|
|
128
128
|
})
|
|
129
129
|
);
|
|
130
130
|
},
|
|
131
131
|
async createTimeOff(e, a) {
|
|
132
|
-
return
|
|
133
|
-
await
|
|
132
|
+
return g(
|
|
133
|
+
await h(`restaurants/${e}/schedules`).post("time-off", a)
|
|
134
134
|
);
|
|
135
135
|
},
|
|
136
136
|
async updateTimeOffStatus(e, a, t) {
|
|
137
|
-
return
|
|
138
|
-
await
|
|
137
|
+
return g(
|
|
138
|
+
await h(`restaurants/${e}/schedules`).post(
|
|
139
139
|
`time-off/${a}/status`,
|
|
140
140
|
t
|
|
141
141
|
)
|
|
142
142
|
);
|
|
143
143
|
},
|
|
144
144
|
async deleteTimeOff(e, a) {
|
|
145
|
-
await
|
|
145
|
+
await h(`restaurants/${e}/schedules`).delete(`time-off/${a}`);
|
|
146
146
|
},
|
|
147
147
|
/** Creates or updates the employee's shared business-level scheduling profile. */
|
|
148
148
|
async createEmployeeProfile(e, a) {
|
|
149
|
-
return
|
|
149
|
+
return g(await h("schedules").post("employees", a));
|
|
150
150
|
},
|
|
151
151
|
/** Edits the employee's shared business-level scheduling profile. */
|
|
152
152
|
async updateEmployeeProfile(e, a, t) {
|
|
153
|
-
return
|
|
154
|
-
await
|
|
153
|
+
return g(
|
|
154
|
+
await h("schedules").post("employees", { employeeId: a, ...t })
|
|
155
155
|
);
|
|
156
156
|
},
|
|
157
157
|
async validatePosAccess(e) {
|
|
158
|
-
await
|
|
158
|
+
await h("schedules").post("employees/validate-pos-access", e);
|
|
159
159
|
},
|
|
160
160
|
/** Positions are shared across the business. */
|
|
161
161
|
async createPosition(e) {
|
|
162
|
-
return
|
|
162
|
+
return g(await h("schedules").post("positions", e));
|
|
163
163
|
},
|
|
164
164
|
async updatePosition(e, a) {
|
|
165
|
-
return
|
|
165
|
+
return g(await h("schedules").post(`positions/${e}`, a));
|
|
166
166
|
},
|
|
167
167
|
/** Deleting one position is `deletePositions` with a single-id array — the backend's
|
|
168
168
|
* `DELETE positions/:id` route is gone; this is now `DELETE positions?ids=`. */
|
|
169
169
|
async deletePosition(e) {
|
|
170
|
-
await
|
|
170
|
+
await h("schedules").delete("positions", {
|
|
171
171
|
params: { ids: e }
|
|
172
172
|
});
|
|
173
173
|
},
|
|
174
174
|
/** Creates one flat demand interval. */
|
|
175
175
|
async createDemand(e, a) {
|
|
176
|
-
return
|
|
177
|
-
await
|
|
176
|
+
return g(
|
|
177
|
+
await h(`restaurants/${e}/schedules`).post("demands", a)
|
|
178
178
|
);
|
|
179
179
|
},
|
|
180
180
|
/** Deletes a batch of demands in one request — e.g. `saveDemand` replacing a whole
|
|
181
181
|
* day/weekday's demand rows wholesale. Deleting one demand is just this with a single-id
|
|
182
182
|
* array. */
|
|
183
183
|
async deleteDemands(e, a) {
|
|
184
|
-
return
|
|
185
|
-
await
|
|
184
|
+
return g(
|
|
185
|
+
await h(`restaurants/${e}/schedules`).delete("demands", {
|
|
186
186
|
params: { ids: a.join(",") }
|
|
187
187
|
})
|
|
188
188
|
);
|
|
189
189
|
},
|
|
190
190
|
/** Atomically replaces one date/weekday's flattened demand rows. */
|
|
191
191
|
async replaceDemands(e, a) {
|
|
192
|
-
return
|
|
193
|
-
await
|
|
192
|
+
return g(
|
|
193
|
+
await h(`restaurants/${e}/schedules`).post(
|
|
194
194
|
"demands/replace",
|
|
195
195
|
a
|
|
196
196
|
)
|
|
@@ -198,8 +198,8 @@ const te = 500, ka = 10, xe = 6, qn = 1500, Je = 1e6, H = {
|
|
|
198
198
|
},
|
|
199
199
|
/** Atomically replaces several date/weekday demand generations. */
|
|
200
200
|
async bulkReplaceDemands(e, a) {
|
|
201
|
-
return
|
|
202
|
-
await
|
|
201
|
+
return g(
|
|
202
|
+
await h(`restaurants/${e}/schedules`).post(
|
|
203
203
|
"demands/bulk-replace",
|
|
204
204
|
a
|
|
205
205
|
)
|
|
@@ -207,8 +207,8 @@ const te = 500, ka = 10, xe = 6, qn = 1500, Je = 1e6, H = {
|
|
|
207
207
|
},
|
|
208
208
|
/** Replaces one date's note/holiday-mark. All three fields back to empty/false clears it. */
|
|
209
209
|
async saveScheduleDay(e, a, t) {
|
|
210
|
-
return
|
|
211
|
-
await
|
|
210
|
+
return g(
|
|
211
|
+
await h(`restaurants/${e}/schedules`).post(
|
|
212
212
|
`days/${a}`,
|
|
213
213
|
t
|
|
214
214
|
)
|
|
@@ -216,13 +216,13 @@ const te = 500, ka = 10, xe = 6, qn = 1500, Je = 1e6, H = {
|
|
|
216
216
|
},
|
|
217
217
|
/** A one-off shift assignment. */
|
|
218
218
|
async createAssignment(e, a) {
|
|
219
|
-
return
|
|
220
|
-
await
|
|
219
|
+
return g(
|
|
220
|
+
await h(`restaurants/${e}/schedules`).post("assignments", a)
|
|
221
221
|
);
|
|
222
222
|
},
|
|
223
223
|
async updateAssignment(e, a, t) {
|
|
224
|
-
return
|
|
225
|
-
await
|
|
224
|
+
return g(
|
|
225
|
+
await h(`restaurants/${e}/schedules`).patch(
|
|
226
226
|
`assignments/${a}`,
|
|
227
227
|
t
|
|
228
228
|
)
|
|
@@ -230,8 +230,8 @@ const te = 500, ka = 10, xe = 6, qn = 1500, Je = 1e6, H = {
|
|
|
230
230
|
},
|
|
231
231
|
/** Atomically applies assignment updates, creates, and deletes used by moves and swaps. */
|
|
232
232
|
async bulkSaveAssignments(e, a) {
|
|
233
|
-
return
|
|
234
|
-
await
|
|
233
|
+
return g(
|
|
234
|
+
await h(`restaurants/${e}/schedules`).post(
|
|
235
235
|
"assignments/bulk",
|
|
236
236
|
a
|
|
237
237
|
)
|
|
@@ -239,30 +239,30 @@ const te = 500, ka = 10, xe = 6, qn = 1500, Je = 1e6, H = {
|
|
|
239
239
|
},
|
|
240
240
|
/** Replaces demand and/or assignments in one backend transaction. */
|
|
241
241
|
async copySchedule(e, a) {
|
|
242
|
-
return
|
|
243
|
-
await
|
|
242
|
+
return g(
|
|
243
|
+
await h(`restaurants/${e}/schedules`).post("copy", a)
|
|
244
244
|
);
|
|
245
245
|
},
|
|
246
246
|
/** Clears demand and/or assignments in one backend transaction. */
|
|
247
247
|
async clearSchedule(e, a) {
|
|
248
|
-
return
|
|
249
|
-
await
|
|
248
|
+
return g(
|
|
249
|
+
await h(`restaurants/${e}/schedules`).post("clear", a)
|
|
250
250
|
);
|
|
251
251
|
},
|
|
252
252
|
/** Deletes a batch of assignments in one request — e.g. a shift split into several segments
|
|
253
253
|
* getting replaced wholesale. Deleting one assignment is just this with a single-id
|
|
254
254
|
* array. */
|
|
255
255
|
async deleteAssignments(e, a) {
|
|
256
|
-
return
|
|
257
|
-
await
|
|
256
|
+
return g(
|
|
257
|
+
await h(`restaurants/${e}/schedules`).delete("assignments", {
|
|
258
258
|
params: { ids: a.join(",") }
|
|
259
259
|
})
|
|
260
260
|
);
|
|
261
261
|
},
|
|
262
262
|
/** Removes all assignments for an employee from the inclusive removal date onward. */
|
|
263
263
|
async deleteEmployeeFutureAssignments(e, a, t) {
|
|
264
|
-
return
|
|
265
|
-
await
|
|
264
|
+
return g(
|
|
265
|
+
await h(`restaurants/${e}/schedules`).delete(
|
|
266
266
|
"assignments/employee-future",
|
|
267
267
|
{ params: { employeeId: a, from: t } }
|
|
268
268
|
)
|
|
@@ -271,37 +271,37 @@ const te = 500, ka = 10, xe = 6, qn = 1500, Je = 1e6, H = {
|
|
|
271
271
|
/** Flips a batch of assignments to one status in a single request — e.g. Publish sending
|
|
272
272
|
* every DRAFT shift on the board to PUBLISHED at once. */
|
|
273
273
|
async bulkUpdateAssignmentStatus(e, a) {
|
|
274
|
-
return
|
|
275
|
-
await
|
|
274
|
+
return g(
|
|
275
|
+
await h(`restaurants/${e}/schedules`).patch(
|
|
276
276
|
"assignments/bulk-status",
|
|
277
277
|
a
|
|
278
278
|
)
|
|
279
279
|
);
|
|
280
280
|
}
|
|
281
|
-
},
|
|
282
|
-
payload:
|
|
283
|
-
loading:
|
|
284
|
-
rosterLoading:
|
|
285
|
-
loadError:
|
|
286
|
-
scheduleSetupCompleted:
|
|
287
|
-
dataVersion:
|
|
288
|
-
outletId:
|
|
289
|
-
restaurantEmployees:
|
|
290
|
-
employeeConfigs:
|
|
291
|
-
employeeOutletIds:
|
|
292
|
-
businessEmployees:
|
|
293
|
-
positions:
|
|
294
|
-
positionRecords:
|
|
295
|
-
rolePositions:
|
|
296
|
-
outlet:
|
|
297
|
-
locationOptions:
|
|
298
|
-
locationLabelById:
|
|
299
|
-
departmentOptions:
|
|
300
|
-
compensationGroupOptions:
|
|
301
|
-
compensationGroupMeta:
|
|
302
|
-
existingStaff:
|
|
303
|
-
shiftTemplates:
|
|
304
|
-
rules:
|
|
281
|
+
}, ta = {
|
|
282
|
+
payload: Ae(null),
|
|
283
|
+
loading: S(!1),
|
|
284
|
+
rosterLoading: S(!1),
|
|
285
|
+
loadError: S(null),
|
|
286
|
+
scheduleSetupCompleted: S(!1),
|
|
287
|
+
dataVersion: S(0),
|
|
288
|
+
outletId: S(""),
|
|
289
|
+
restaurantEmployees: S([]),
|
|
290
|
+
employeeConfigs: S([]),
|
|
291
|
+
employeeOutletIds: Ae({}),
|
|
292
|
+
businessEmployees: Ae([]),
|
|
293
|
+
positions: T([]),
|
|
294
|
+
positionRecords: T([]),
|
|
295
|
+
rolePositions: T({}),
|
|
296
|
+
outlet: T({ name: "" }),
|
|
297
|
+
locationOptions: T([]),
|
|
298
|
+
locationLabelById: T({}),
|
|
299
|
+
departmentOptions: T([]),
|
|
300
|
+
compensationGroupOptions: T([]),
|
|
301
|
+
compensationGroupMeta: T({}),
|
|
302
|
+
existingStaff: T([]),
|
|
303
|
+
shiftTemplates: T([]),
|
|
304
|
+
rules: T({
|
|
305
305
|
coverage: {},
|
|
306
306
|
openFrom: "00:00",
|
|
307
307
|
openTo: "24:00",
|
|
@@ -332,29 +332,29 @@ const te = 500, ka = 10, xe = 6, qn = 1500, Je = 1e6, H = {
|
|
|
332
332
|
})
|
|
333
333
|
}, {
|
|
334
334
|
payload: r,
|
|
335
|
-
loading:
|
|
336
|
-
rosterLoading:
|
|
337
|
-
loadError:
|
|
338
|
-
scheduleSetupCompleted:
|
|
335
|
+
loading: Ue,
|
|
336
|
+
rosterLoading: We,
|
|
337
|
+
loadError: ve,
|
|
338
|
+
scheduleSetupCompleted: ge,
|
|
339
339
|
dataVersion: J,
|
|
340
340
|
outletId: m,
|
|
341
|
-
restaurantEmployees:
|
|
342
|
-
employeeConfigs:
|
|
343
|
-
employeeOutletIds:
|
|
344
|
-
businessEmployees:
|
|
345
|
-
positions:
|
|
346
|
-
positionRecords:
|
|
347
|
-
rolePositions:
|
|
348
|
-
outlet:
|
|
349
|
-
locationOptions:
|
|
350
|
-
locationLabelById:
|
|
351
|
-
compensationGroupMeta:
|
|
352
|
-
existingStaff:
|
|
353
|
-
shiftTemplates:
|
|
354
|
-
rules:
|
|
355
|
-
} =
|
|
356
|
-
function
|
|
357
|
-
const e =
|
|
341
|
+
restaurantEmployees: le,
|
|
342
|
+
employeeConfigs: V,
|
|
343
|
+
employeeOutletIds: na,
|
|
344
|
+
businessEmployees: Pe,
|
|
345
|
+
positions: Ta,
|
|
346
|
+
positionRecords: W,
|
|
347
|
+
rolePositions: co,
|
|
348
|
+
outlet: Ra,
|
|
349
|
+
locationOptions: Ke,
|
|
350
|
+
locationLabelById: se,
|
|
351
|
+
compensationGroupMeta: mo,
|
|
352
|
+
existingStaff: yo,
|
|
353
|
+
shiftTemplates: fo,
|
|
354
|
+
rules: N
|
|
355
|
+
} = ta;
|
|
356
|
+
function $a() {
|
|
357
|
+
const e = ta.rules;
|
|
358
358
|
Object.keys(e.coverage).forEach((a) => delete e.coverage[a]), e.openFrom = "00:00", e.openTo = "24:00", e.dayHours.splice(0, e.dayHours.length, ...Array.from({ length: 7 }, () => [])), Object.assign(e.payRate.NORMAL, { overtime: 1.5 }), Object.assign(e.payRate.REST_DAY, { regular: 1, overtime: 2 }), Object.assign(e.payRate.PUBLIC_HOLIDAY, { regular: 2, overtime: 3 }), e.salesForecast = 0, e.closedWeekdays.splice(0, e.closedWeekdays.length), e.labourTarget = 0, e.budgetFromSales = !1, e.budget = 0, e.otCapHours = null, e.workingHours = {
|
|
359
359
|
minHoursPerDay: null,
|
|
360
360
|
maxHoursPerDay: 8,
|
|
@@ -366,101 +366,121 @@ function Ma() {
|
|
|
366
366
|
defaults: { wa: !1, push: !1, email: !1 }
|
|
367
367
|
});
|
|
368
368
|
}
|
|
369
|
-
const
|
|
370
|
-
function
|
|
369
|
+
const Ne = 7;
|
|
370
|
+
function Ba(e) {
|
|
371
371
|
const a = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
372
372
|
return `${a}-${t}-${n}`;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function ie(e, a) {
|
|
375
375
|
const t = new Date(e);
|
|
376
376
|
return t.setDate(t.getDate() + a), t;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function Le(e) {
|
|
379
379
|
const a = new Date(e);
|
|
380
380
|
return a.setHours(0, 0, 0, 0), a.setDate(a.getDate() - (a.getDay() + 6) % 7), a;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
const t =
|
|
384
|
-
return Array.from({ length:
|
|
382
|
+
function ho(e, a = /* @__PURE__ */ new Date()) {
|
|
383
|
+
const t = ie(Le(a), e * Ne);
|
|
384
|
+
return Array.from({ length: Ne }, (n, o) => ie(t, o));
|
|
385
|
+
}
|
|
386
|
+
function po(e, a) {
|
|
387
|
+
const t = (i) => Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()), n = t(Le(e)), o = t(Le(a));
|
|
388
|
+
return Math.trunc((o - n) / (Ne * 24 * 60 * 60 * 1e3));
|
|
389
|
+
}
|
|
390
|
+
const oa = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
|
|
391
|
+
function vo(e) {
|
|
392
|
+
return `scheduling.days.short.${oa[(e % 7 + 7) % 7]}`;
|
|
393
|
+
}
|
|
394
|
+
function go(e) {
|
|
395
|
+
return `scheduling.days.long.${oa[(e % 7 + 7) % 7]}`;
|
|
385
396
|
}
|
|
386
|
-
function
|
|
387
|
-
|
|
388
|
-
return Math.trunc((o - n) / (Se * 24 * 60 * 60 * 1e3));
|
|
397
|
+
function Do(e, a = "en-US") {
|
|
398
|
+
return !e || e.startsWith("en") ? a : e.startsWith("th") ? "th-TH-u-ca-gregory" : e;
|
|
389
399
|
}
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
400
|
+
const j = Ba, xa = {
|
|
401
|
+
noOutlet: "No outlet selected",
|
|
402
|
+
employeeNotFound: "Could not find this employee",
|
|
403
|
+
keepOneLocation: "An employee must keep at least 1 location, otherwise they are deleted. To delete them, use the Employee page.",
|
|
404
|
+
loadFailed: "Could not load the schedule"
|
|
405
|
+
};
|
|
406
|
+
let Oe = null;
|
|
407
|
+
function wo(e) {
|
|
408
|
+
Oe = e;
|
|
409
|
+
}
|
|
410
|
+
function A(e) {
|
|
411
|
+
return Oe ? Oe(`scheduling.store.${e}`) : xa[e];
|
|
412
|
+
}
|
|
413
|
+
let Z = null, q = null, Q = null, oe = 0, De = null;
|
|
414
|
+
function ze(e) {
|
|
415
|
+
return e === m.value ? !1 : ($a(), m.value = e, r.value = null, Z = null, q = null, ve.value = null, De = null, ge.value = !1, le.value = [], V.value = [], Q = null, oe += 1, J.value += 1, !0);
|
|
394
416
|
}
|
|
395
|
-
async function
|
|
396
|
-
if (!(!e ||
|
|
397
|
-
|
|
417
|
+
async function Ie(e) {
|
|
418
|
+
if (!(!e || De === e)) {
|
|
419
|
+
We.value = !0;
|
|
398
420
|
try {
|
|
399
|
-
await
|
|
421
|
+
await Ya(e);
|
|
400
422
|
} finally {
|
|
401
|
-
|
|
423
|
+
We.value = !1;
|
|
402
424
|
}
|
|
403
425
|
}
|
|
404
426
|
}
|
|
405
|
-
async function
|
|
406
|
-
const a = await
|
|
407
|
-
limit:
|
|
427
|
+
async function Ya(e) {
|
|
428
|
+
const a = await Ce.readEmployeesPage({
|
|
429
|
+
limit: ne,
|
|
408
430
|
offset: 0,
|
|
409
431
|
restaurantIds: [e]
|
|
410
432
|
});
|
|
411
|
-
e === m.value && (
|
|
412
|
-
e === m.value && (
|
|
433
|
+
e === m.value && (le.value = a.items, V.value = await w.listEmployeeConfigs(e), De = e, J.value += 1, Ka().then((t) => {
|
|
434
|
+
e === m.value && (na.value = t, J.value += 1);
|
|
413
435
|
}));
|
|
414
436
|
}
|
|
415
|
-
async function
|
|
437
|
+
async function Fa(e) {
|
|
416
438
|
const a = m.value;
|
|
417
439
|
if (!a || !e.length) return;
|
|
418
|
-
const t = await
|
|
419
|
-
|
|
440
|
+
const t = await w.saveEmployeeConfigs(a, { configs: e });
|
|
441
|
+
V.value = t, J.value += 1;
|
|
420
442
|
}
|
|
421
|
-
async function
|
|
443
|
+
async function Ho(e) {
|
|
422
444
|
const a = m.value;
|
|
423
|
-
if (!a) throw new Error("
|
|
424
|
-
const t = await
|
|
445
|
+
if (!a) throw new Error(A("noOutlet"));
|
|
446
|
+
const t = await w.saveSettings(a, e);
|
|
425
447
|
return m.value === a && r.value && (r.value = { ...r.value, settings: t }), t;
|
|
426
448
|
}
|
|
427
|
-
function
|
|
428
|
-
!
|
|
449
|
+
function sa() {
|
|
450
|
+
!ge.value && r.value && r.value.demands.length > 0 && r.value.assignments.length > 0 && (ge.value = !0);
|
|
429
451
|
}
|
|
430
|
-
async function
|
|
431
|
-
const t =
|
|
452
|
+
async function _a(e, a) {
|
|
453
|
+
const t = V.value.find((o) => o.employeeId === e), n = (t == null ? void 0 : t.displayOrder) ?? (a && V.value.some((o) => o.displayOrder !== null) ? Math.max(
|
|
432
454
|
0,
|
|
433
|
-
...
|
|
455
|
+
...V.value.filter(
|
|
434
456
|
(o) => o.displayOrder !== null
|
|
435
457
|
).map((o) => o.displayOrder)
|
|
436
458
|
) + 100 : null);
|
|
437
|
-
await
|
|
459
|
+
await Fa([{ employeeId: e, enabled: a, displayOrder: n }]);
|
|
438
460
|
}
|
|
439
|
-
async function
|
|
461
|
+
async function Ao(e, a = j(/* @__PURE__ */ new Date())) {
|
|
440
462
|
const t = m.value;
|
|
441
|
-
if (!t) throw new Error("
|
|
442
|
-
await
|
|
463
|
+
if (!t) throw new Error(A("noOutlet"));
|
|
464
|
+
await w.deleteEmployeeFutureAssignments(t, e, a), r.value && (r.value = {
|
|
443
465
|
...r.value,
|
|
444
466
|
assignments: r.value.assignments.filter(
|
|
445
467
|
(n) => n.employeeId !== e || n.date < a
|
|
446
468
|
)
|
|
447
469
|
});
|
|
448
470
|
}
|
|
449
|
-
async function
|
|
471
|
+
async function Te() {
|
|
450
472
|
const e = m.value;
|
|
451
|
-
e && (
|
|
473
|
+
e && (De = null, await Ie(e));
|
|
452
474
|
}
|
|
453
|
-
async function
|
|
454
|
-
const t =
|
|
455
|
-
if (!n) throw new Error("
|
|
475
|
+
async function Ua(e, a) {
|
|
476
|
+
const t = Ze(), n = (await X(!0)).find((s) => s._id === e);
|
|
477
|
+
if (!n) throw new Error(A("employeeNotFound"));
|
|
456
478
|
const o = n.restaurantRole.map((s) => ({
|
|
457
479
|
restaurantId: s.restaurantId,
|
|
458
480
|
roleId: s.roleId
|
|
459
481
|
})), i = a(o);
|
|
460
482
|
if (!i.length)
|
|
461
|
-
throw new Error(
|
|
462
|
-
"An employee must keep at least 1 location, otherwise they are deleted. To delete them, use the Employee page."
|
|
463
|
-
);
|
|
483
|
+
throw new Error(A("keepOneLocation"));
|
|
464
484
|
(n.isMasterUser ? "master" : "user") === "master" ? await t.updateMasterEmployee(e, {
|
|
465
485
|
user: { name: n.name, passcode: n.passcode, code: n.code ?? "" },
|
|
466
486
|
roles: i,
|
|
@@ -471,44 +491,44 @@ async function Oa(e, a) {
|
|
|
471
491
|
previousRoles: o
|
|
472
492
|
}), await X(!0);
|
|
473
493
|
}
|
|
474
|
-
async function
|
|
494
|
+
async function Eo(e, a, t = "", n = !0) {
|
|
475
495
|
const o = [...new Set(a.filter(Boolean))];
|
|
476
|
-
o.length && (await
|
|
477
|
-
...i.filter((
|
|
478
|
-
...o.map((
|
|
479
|
-
]), n && m.value && o.includes(m.value) && await
|
|
480
|
-
}
|
|
481
|
-
async function
|
|
482
|
-
const n =
|
|
483
|
-
if (!o) throw new Error("
|
|
484
|
-
const i = (
|
|
485
|
-
if (!
|
|
486
|
-
const d = o.restaurantRole.map((
|
|
487
|
-
restaurantId:
|
|
488
|
-
roleId:
|
|
489
|
-
})),
|
|
490
|
-
if (
|
|
491
|
-
const
|
|
496
|
+
o.length && (await Ua(e, (i) => [
|
|
497
|
+
...i.filter((u) => !o.includes(u.restaurantId)),
|
|
498
|
+
...o.map((u) => ({ restaurantId: u, roleId: t }))
|
|
499
|
+
]), n && m.value && o.includes(m.value) && await _a(e, !0), await Te());
|
|
500
|
+
}
|
|
501
|
+
async function bo(e, a, t) {
|
|
502
|
+
const n = Ze(), o = (t == null ? void 0 : t._id) === e ? t : (await X(!0)).find((p) => p._id === e);
|
|
503
|
+
if (!o) throw new Error(A("employeeNotFound"));
|
|
504
|
+
const i = (p) => p.slice().sort((H, $) => H.restaurantId.localeCompare($.restaurantId)).map((H) => `${H.restaurantId}:${H.roleId}`).join("|"), u = i(o.restaurantRole) !== i(a.roles), s = o.name !== a.name || o.passcode !== a.passcode || o.isMasterUser !== a.masterUser || a.masterUser && (o.code ?? "") !== a.masterCode;
|
|
505
|
+
if (!u && !s) return;
|
|
506
|
+
const d = o.restaurantRole.map((p) => ({
|
|
507
|
+
restaurantId: p.restaurantId,
|
|
508
|
+
roleId: p.roleId
|
|
509
|
+
})), D = o.isMasterUser ? (await Fe.readTeamMembers()).find((p) => p.doc.posUserId === e) : void 0;
|
|
510
|
+
if (D) {
|
|
511
|
+
const p = Ma(), H = p.getPermissionAssignmentByUserId(D.id) ?? await p.readPermissionAssignmentByUserId(D.id), $ = a.masterUser ? {
|
|
492
512
|
code: a.masterCode,
|
|
493
513
|
name: a.name,
|
|
494
514
|
passcode: a.passcode,
|
|
495
515
|
roles: a.roles
|
|
496
516
|
} : null;
|
|
497
|
-
await
|
|
498
|
-
permissions:
|
|
499
|
-
customPermissions: (
|
|
500
|
-
permissionSetIds: (
|
|
501
|
-
posUser:
|
|
502
|
-
}), await X(!0), await
|
|
517
|
+
await Fe.updateTeamMember(D.id, {
|
|
518
|
+
permissions: D.permissions,
|
|
519
|
+
customPermissions: (H == null ? void 0 : H.customPermissions) ?? D.permissions,
|
|
520
|
+
permissionSetIds: (H == null ? void 0 : H.permissionSetIds) ?? D.doc.permissionSetIds ?? [],
|
|
521
|
+
posUser: $
|
|
522
|
+
}), await X(!0), await Te();
|
|
503
523
|
return;
|
|
504
524
|
}
|
|
505
525
|
if (a.masterUser) {
|
|
506
|
-
const
|
|
526
|
+
const p = {
|
|
507
527
|
user: { name: a.name, passcode: a.passcode, code: a.masterCode },
|
|
508
528
|
roles: a.roles,
|
|
509
529
|
previousRoles: d
|
|
510
530
|
};
|
|
511
|
-
o.isMasterUser ? await n.updateMasterEmployee(e,
|
|
531
|
+
o.isMasterUser ? await n.updateMasterEmployee(e, p) : await n.migrateToMasterUser(e, p);
|
|
512
532
|
} else
|
|
513
533
|
o.isMasterUser ? await n.updateMasterEmployee(e, {
|
|
514
534
|
user: { name: o.name, passcode: o.passcode, code: o.code ?? "" },
|
|
@@ -519,20 +539,20 @@ async function uo(e, a, t) {
|
|
|
519
539
|
roles: a.roles,
|
|
520
540
|
previousRoles: d
|
|
521
541
|
});
|
|
522
|
-
await X(!0), await
|
|
542
|
+
await X(!0), await Te();
|
|
523
543
|
}
|
|
524
|
-
let
|
|
525
|
-
async function
|
|
526
|
-
const e = await
|
|
527
|
-
limit:
|
|
544
|
+
let te = null;
|
|
545
|
+
async function Wa() {
|
|
546
|
+
const e = await Ce.readEmployeesPage({
|
|
547
|
+
limit: ne,
|
|
528
548
|
offset: 0,
|
|
529
549
|
includeEmptyPasscode: !0
|
|
530
|
-
}), a = Math.min(
|
|
550
|
+
}), a = Math.min(Ia, Math.ceil(e.total / ne)), t = await Promise.all(
|
|
531
551
|
Array.from(
|
|
532
552
|
{ length: Math.max(0, a - 1) },
|
|
533
|
-
(n, o) =>
|
|
534
|
-
limit:
|
|
535
|
-
offset: (o + 1) *
|
|
553
|
+
(n, o) => Ce.readEmployeesPage({
|
|
554
|
+
limit: ne,
|
|
555
|
+
offset: (o + 1) * ne,
|
|
536
556
|
includeEmptyPasscode: !0
|
|
537
557
|
})
|
|
538
558
|
)
|
|
@@ -541,15 +561,15 @@ async function $a() {
|
|
|
541
561
|
}
|
|
542
562
|
function X(e = !1) {
|
|
543
563
|
if (!e) {
|
|
544
|
-
if (
|
|
545
|
-
if (
|
|
564
|
+
if (te) return te;
|
|
565
|
+
if (Pe.value.length) return Promise.resolve(Pe.value);
|
|
546
566
|
}
|
|
547
|
-
const a =
|
|
548
|
-
|
|
567
|
+
const a = Wa().then((t) => (Pe.value = t, t)).finally(() => {
|
|
568
|
+
te === a && (te = null);
|
|
549
569
|
});
|
|
550
|
-
return
|
|
570
|
+
return te = a, a;
|
|
551
571
|
}
|
|
552
|
-
async function
|
|
572
|
+
async function Ka() {
|
|
553
573
|
const e = {};
|
|
554
574
|
try {
|
|
555
575
|
(await X()).forEach((a) => {
|
|
@@ -560,30 +580,30 @@ async function xa() {
|
|
|
560
580
|
}
|
|
561
581
|
return e;
|
|
562
582
|
}
|
|
563
|
-
function
|
|
583
|
+
function Ve(e, a) {
|
|
564
584
|
return Z !== null && q !== null && Z <= e && q >= a;
|
|
565
585
|
}
|
|
566
|
-
async function
|
|
567
|
-
const a =
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
586
|
+
async function za(e) {
|
|
587
|
+
const a = j(e), t = j(ie(e, 6));
|
|
588
|
+
Ve(a, t) || Q && (await Q, Ve(a, t)) || await ia(
|
|
589
|
+
ie(e, -7 * _e),
|
|
590
|
+
ie(e, 7 * _e)
|
|
571
591
|
);
|
|
572
592
|
}
|
|
573
|
-
async function
|
|
574
|
-
!Z || !q || await
|
|
593
|
+
async function Po() {
|
|
594
|
+
!Z || !q || await ia(/* @__PURE__ */ new Date(`${Z}T00:00:00`), /* @__PURE__ */ new Date(`${q}T00:00:00`));
|
|
575
595
|
}
|
|
576
|
-
async function
|
|
577
|
-
if (!m.value) throw new Error("
|
|
578
|
-
const a = await
|
|
596
|
+
async function So(e) {
|
|
597
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
598
|
+
const a = await w.createEmployeeProfile(m.value, e);
|
|
579
599
|
r.value && (r.value.employees.push(a), J.value += 1);
|
|
580
600
|
}
|
|
581
|
-
async function
|
|
582
|
-
await
|
|
601
|
+
async function ko(e) {
|
|
602
|
+
await w.validatePosAccess(e);
|
|
583
603
|
}
|
|
584
|
-
async function
|
|
585
|
-
if (!m.value) throw new Error("
|
|
586
|
-
const t = await
|
|
604
|
+
async function Co(e, a) {
|
|
605
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
606
|
+
const t = await w.updateEmployeeProfile(m.value, e, a);
|
|
587
607
|
if (r.value) {
|
|
588
608
|
const n = r.value.employees.findIndex((o) => o.employeeId === e);
|
|
589
609
|
n > -1 && (r.value = {
|
|
@@ -592,12 +612,12 @@ async function po(e, a) {
|
|
|
592
612
|
});
|
|
593
613
|
}
|
|
594
614
|
}
|
|
595
|
-
async function
|
|
596
|
-
const a = await
|
|
615
|
+
async function Mo(e) {
|
|
616
|
+
const a = await w.createPosition(e);
|
|
597
617
|
r.value && (r.value = { ...r.value, positions: [...r.value.positions, a] });
|
|
598
618
|
}
|
|
599
|
-
async function
|
|
600
|
-
const t = await
|
|
619
|
+
async function No(e, a) {
|
|
620
|
+
const t = await w.updatePosition(e, a);
|
|
601
621
|
if (r.value) {
|
|
602
622
|
const n = r.value.positions.find((i) => i.id === e), o = (i) => i.positionId === e || !i.positionId && i.positionName === (n == null ? void 0 : n.name);
|
|
603
623
|
r.value = {
|
|
@@ -607,41 +627,41 @@ async function ho(e, a) {
|
|
|
607
627
|
...i,
|
|
608
628
|
primaryPosition: i.primaryPosition && o(i.primaryPosition) ? { ...i.primaryPosition, positionName: t.name } : i.primaryPosition,
|
|
609
629
|
secondaryPositions: i.secondaryPositions.map(
|
|
610
|
-
(
|
|
630
|
+
(u) => o(u) ? { ...u, positionName: t.name } : u
|
|
611
631
|
)
|
|
612
632
|
}))
|
|
613
633
|
};
|
|
614
634
|
}
|
|
615
635
|
}
|
|
616
|
-
async function
|
|
617
|
-
await
|
|
636
|
+
async function Lo(e) {
|
|
637
|
+
await w.deletePosition(e), r.value && (r.value = {
|
|
618
638
|
...r.value,
|
|
619
639
|
positions: r.value.positions.filter((a) => a.id !== e)
|
|
620
640
|
});
|
|
621
641
|
}
|
|
622
|
-
async function
|
|
642
|
+
async function Oo(e, a) {
|
|
623
643
|
var o;
|
|
624
|
-
if (!m.value) throw new Error("
|
|
625
|
-
const t = (o = r.value) == null ? void 0 : o.days.find((i) => i.date === e), n = await
|
|
644
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
645
|
+
const t = (o = r.value) == null ? void 0 : o.days.find((i) => i.date === e), n = await w.saveScheduleDay(m.value, e, {
|
|
626
646
|
...a,
|
|
627
647
|
expectedUpdatedAt: a.expectedUpdatedAt ?? (t == null ? void 0 : t.updatedAt)
|
|
628
648
|
});
|
|
629
649
|
if (r.value) {
|
|
630
|
-
const i = r.value.days.filter((
|
|
650
|
+
const i = r.value.days.filter((u) => u.date !== e);
|
|
631
651
|
n && i.push(n), r.value = { ...r.value, days: i };
|
|
632
652
|
}
|
|
633
653
|
}
|
|
634
|
-
function
|
|
654
|
+
function Va(e) {
|
|
635
655
|
const a = e.periods.flatMap((t) => {
|
|
636
|
-
const n = (t.roles ?? []).filter((
|
|
656
|
+
const n = (t.roles ?? []).filter((u) => u.positionName && u.headcount > 0), o = n.reduce((u, s) => u + s.headcount, 0), i = {
|
|
637
657
|
startTime: t.startTime,
|
|
638
658
|
endTime: t.endTime
|
|
639
659
|
};
|
|
640
660
|
return [
|
|
641
|
-
...n.map((
|
|
661
|
+
...n.map((u) => ({
|
|
642
662
|
...i,
|
|
643
|
-
headcount:
|
|
644
|
-
position: { positionId:
|
|
663
|
+
headcount: u.headcount,
|
|
664
|
+
position: { positionId: u.positionId, positionName: u.positionName }
|
|
645
665
|
})),
|
|
646
666
|
...t.headcount > o ? [{ ...i, headcount: t.headcount - o }] : []
|
|
647
667
|
];
|
|
@@ -651,65 +671,65 @@ function Ba(e) {
|
|
|
651
671
|
demands: a
|
|
652
672
|
};
|
|
653
673
|
}
|
|
654
|
-
async function
|
|
655
|
-
if (!m.value) throw new Error("
|
|
674
|
+
async function Io(e) {
|
|
675
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
656
676
|
if (!e.length) return;
|
|
657
|
-
const a = e.map(
|
|
677
|
+
const a = e.map(Va), t = e.length === 1 ? await w.replaceDemands(m.value, a[0]) : await w.bulkReplaceDemands(m.value, { replacements: a });
|
|
658
678
|
if (r.value) {
|
|
659
679
|
const n = new Set(e.map((i) => i.date)), o = r.value.demands.filter((i) => i.date === null || !n.has(i.date));
|
|
660
680
|
r.value = { ...r.value, demands: [...o, ...t] };
|
|
661
681
|
}
|
|
662
|
-
|
|
682
|
+
sa();
|
|
663
683
|
}
|
|
664
|
-
async function
|
|
665
|
-
if (!m.value) throw new Error("
|
|
666
|
-
return
|
|
684
|
+
async function To(e) {
|
|
685
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
686
|
+
return w.generateAutoSchedule(m.value, e);
|
|
667
687
|
}
|
|
668
|
-
async function
|
|
669
|
-
if (!m.value) throw new Error("
|
|
670
|
-
return
|
|
688
|
+
async function Ro() {
|
|
689
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
690
|
+
return w.getAutoScheduleCapabilities(m.value);
|
|
671
691
|
}
|
|
672
|
-
async function
|
|
673
|
-
if (!m.value) throw new Error("
|
|
674
|
-
return
|
|
692
|
+
async function $o(e) {
|
|
693
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
694
|
+
return w.applyAutoSchedule(m.value, e);
|
|
675
695
|
}
|
|
676
|
-
async function
|
|
677
|
-
if (!m.value) throw new Error("
|
|
678
|
-
const a = await
|
|
696
|
+
async function Bo(e) {
|
|
697
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
698
|
+
const a = await w.bulkSaveAssignments(m.value, e);
|
|
679
699
|
if (r.value) {
|
|
680
700
|
const t = new Set(e.deleteIds), n = new Map(
|
|
681
701
|
r.value.assignments.filter((o) => !t.has(o.id)).map((o) => [o.id, o])
|
|
682
702
|
);
|
|
683
703
|
a.updated.forEach((o) => n.set(o.id, o)), a.created.forEach((o) => n.set(o.id, o)), r.value = { ...r.value, assignments: [...n.values()] };
|
|
684
704
|
}
|
|
685
|
-
return
|
|
705
|
+
return sa(), a;
|
|
686
706
|
}
|
|
687
|
-
async function
|
|
688
|
-
if (!m.value) throw new Error("
|
|
689
|
-
return
|
|
707
|
+
async function xo(e) {
|
|
708
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
709
|
+
return w.copySchedule(m.value, e);
|
|
690
710
|
}
|
|
691
|
-
async function
|
|
711
|
+
async function Yo(e) {
|
|
692
712
|
var t;
|
|
693
|
-
if (!m.value) throw new Error("
|
|
694
|
-
const a = await
|
|
713
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
714
|
+
const a = await w.clearSchedule(m.value, e);
|
|
695
715
|
if (r.value) {
|
|
696
716
|
const n = new Set(
|
|
697
|
-
(((t = e.demand) == null ? void 0 : t.replacements) ?? []).map((
|
|
717
|
+
(((t = e.demand) == null ? void 0 : t.replacements) ?? []).map((u) => u.date)
|
|
698
718
|
), o = new Set(a.deletedAssignmentIds), i = a.demand;
|
|
699
719
|
r.value = {
|
|
700
720
|
...r.value,
|
|
701
721
|
demands: [
|
|
702
|
-
...r.value.demands.filter((
|
|
722
|
+
...r.value.demands.filter((u) => u.date === null || !n.has(u.date)),
|
|
703
723
|
...i
|
|
704
724
|
],
|
|
705
|
-
assignments: r.value.assignments.filter((
|
|
725
|
+
assignments: r.value.assignments.filter((u) => !o.has(u.id))
|
|
706
726
|
};
|
|
707
727
|
}
|
|
708
728
|
return a;
|
|
709
729
|
}
|
|
710
|
-
async function
|
|
711
|
-
if (!m.value) throw new Error("
|
|
712
|
-
if (e.length && (await
|
|
730
|
+
async function Fo(e) {
|
|
731
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
732
|
+
if (e.length && (await w.deleteAssignments(m.value, e), r.value)) {
|
|
713
733
|
const a = new Set(e);
|
|
714
734
|
r.value = {
|
|
715
735
|
...r.value,
|
|
@@ -717,29 +737,29 @@ async function No(e) {
|
|
|
717
737
|
};
|
|
718
738
|
}
|
|
719
739
|
}
|
|
720
|
-
async function
|
|
721
|
-
if (!m.value) throw new Error("
|
|
722
|
-
const a = await
|
|
740
|
+
async function _o(e) {
|
|
741
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
742
|
+
const a = await w.createTimeOff(m.value, e);
|
|
723
743
|
return r.value && (r.value = { ...r.value, timeOff: [...r.value.timeOff, a] }), a;
|
|
724
744
|
}
|
|
725
|
-
async function
|
|
726
|
-
if (!m.value) throw new Error("
|
|
727
|
-
const t = await
|
|
745
|
+
async function Uo(e, a) {
|
|
746
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
747
|
+
const t = await w.updateTimeOffStatus(m.value, e, a);
|
|
728
748
|
return t && r.value && (r.value = {
|
|
729
749
|
...r.value,
|
|
730
750
|
timeOff: r.value.timeOff.map((n) => n.id === e ? t : n)
|
|
731
751
|
}), t;
|
|
732
752
|
}
|
|
733
|
-
async function
|
|
734
|
-
if (!m.value) throw new Error("
|
|
735
|
-
await
|
|
753
|
+
async function Wo(e) {
|
|
754
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
755
|
+
await w.deleteTimeOff(m.value, e), r.value && (r.value = {
|
|
736
756
|
...r.value,
|
|
737
757
|
timeOff: r.value.timeOff.filter((a) => a.id !== e)
|
|
738
758
|
});
|
|
739
759
|
}
|
|
740
|
-
async function
|
|
741
|
-
if (!m.value) throw new Error("
|
|
742
|
-
const a = await
|
|
760
|
+
async function Ko(e) {
|
|
761
|
+
if (!m.value) throw new Error(A("noOutlet"));
|
|
762
|
+
const a = await w.bulkUpdateAssignmentStatus(m.value, e);
|
|
743
763
|
if (r.value && a.length) {
|
|
744
764
|
const t = new Map(a.map((n) => [n.id, n]));
|
|
745
765
|
r.value = {
|
|
@@ -751,34 +771,34 @@ async function Mo(e) {
|
|
|
751
771
|
}
|
|
752
772
|
return a;
|
|
753
773
|
}
|
|
754
|
-
async function
|
|
774
|
+
async function ia(e, a) {
|
|
755
775
|
const t = m.value;
|
|
756
776
|
if (!t) {
|
|
757
|
-
|
|
777
|
+
ve.value = A("noOutlet");
|
|
758
778
|
return;
|
|
759
779
|
}
|
|
760
|
-
const n =
|
|
761
|
-
|
|
762
|
-
const
|
|
780
|
+
const n = j(e), o = j(a), i = ++oe;
|
|
781
|
+
Ue.value = !0, ve.value = null;
|
|
782
|
+
const u = (async () => {
|
|
763
783
|
try {
|
|
764
|
-
const s = await
|
|
765
|
-
if (m.value !== t || i !==
|
|
766
|
-
r.value = s,
|
|
784
|
+
const s = await w.readBoard(t, n, o);
|
|
785
|
+
if (m.value !== t || i !== oe) return;
|
|
786
|
+
r.value = s, ge.value = s.settings.setupCompleted, Z = n, q = o, J.value += 1;
|
|
767
787
|
} catch (s) {
|
|
768
|
-
if (m.value !== t || i !==
|
|
769
|
-
|
|
788
|
+
if (m.value !== t || i !== oe) return;
|
|
789
|
+
ve.value = s instanceof Error ? s.message : A("loadFailed");
|
|
770
790
|
} finally {
|
|
771
|
-
m.value === t && i ===
|
|
791
|
+
m.value === t && i === oe && (Ue.value = !1);
|
|
772
792
|
}
|
|
773
793
|
})();
|
|
774
|
-
Q =
|
|
794
|
+
Q = u;
|
|
775
795
|
try {
|
|
776
|
-
await
|
|
796
|
+
await u;
|
|
777
797
|
} finally {
|
|
778
|
-
Q ===
|
|
798
|
+
Q === u && (Q = null);
|
|
779
799
|
}
|
|
780
800
|
}
|
|
781
|
-
const
|
|
801
|
+
const ja = "AE", Ga = "Asia/Dubai", Qa = {
|
|
782
802
|
NORMAL: {
|
|
783
803
|
overtime: 1.25
|
|
784
804
|
},
|
|
@@ -790,9 +810,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
790
810
|
regular: 2.5,
|
|
791
811
|
overtime: 1.5
|
|
792
812
|
}
|
|
793
|
-
},
|
|
813
|
+
}, Xa = {
|
|
794
814
|
maxHoursPerMonth: null
|
|
795
|
-
},
|
|
815
|
+
}, Ja = {
|
|
796
816
|
fullTime: {
|
|
797
817
|
minHoursPerDay: null,
|
|
798
818
|
maxHoursPerDay: 8,
|
|
@@ -801,7 +821,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
801
821
|
partTime: {
|
|
802
822
|
maxHoursPerWeek: 32
|
|
803
823
|
}
|
|
804
|
-
},
|
|
824
|
+
}, Za = [
|
|
805
825
|
{
|
|
806
826
|
month: 1,
|
|
807
827
|
day: 1,
|
|
@@ -817,7 +837,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
817
837
|
day: 3,
|
|
818
838
|
name: "UAE National Day Holiday"
|
|
819
839
|
}
|
|
820
|
-
],
|
|
840
|
+
], qa = {
|
|
821
841
|
2026: {
|
|
822
842
|
"2026-01-01": "Gregorian New Year",
|
|
823
843
|
"2026-03-20": "Eid Al-Fitr Holiday",
|
|
@@ -847,15 +867,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
847
867
|
"2027-12-02": "UAE National Day",
|
|
848
868
|
"2027-12-03": "UAE National Day Holiday"
|
|
849
869
|
}
|
|
850
|
-
},
|
|
851
|
-
countryCode:
|
|
852
|
-
timezone:
|
|
853
|
-
payRate:
|
|
854
|
-
overtime:
|
|
855
|
-
workingHours:
|
|
856
|
-
recurringPublicHolidays:
|
|
857
|
-
publicHolidays:
|
|
858
|
-
},
|
|
870
|
+
}, et = {
|
|
871
|
+
countryCode: ja,
|
|
872
|
+
timezone: Ga,
|
|
873
|
+
payRate: Qa,
|
|
874
|
+
overtime: Xa,
|
|
875
|
+
workingHours: Ja,
|
|
876
|
+
recurringPublicHolidays: Za,
|
|
877
|
+
publicHolidays: qa
|
|
878
|
+
}, at = "BN", tt = "Asia/Brunei", nt = {
|
|
859
879
|
NORMAL: {
|
|
860
880
|
overtime: 1.5
|
|
861
881
|
},
|
|
@@ -867,9 +887,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
867
887
|
regular: 2,
|
|
868
888
|
overtime: 3
|
|
869
889
|
}
|
|
870
|
-
},
|
|
890
|
+
}, ot = {
|
|
871
891
|
maxHoursPerMonth: 72
|
|
872
|
-
},
|
|
892
|
+
}, st = {
|
|
873
893
|
fullTime: {
|
|
874
894
|
minHoursPerDay: null,
|
|
875
895
|
maxHoursPerDay: 8,
|
|
@@ -878,7 +898,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
878
898
|
partTime: {
|
|
879
899
|
maxHoursPerWeek: 30
|
|
880
900
|
}
|
|
881
|
-
},
|
|
901
|
+
}, it = [
|
|
882
902
|
{
|
|
883
903
|
month: 1,
|
|
884
904
|
day: 1,
|
|
@@ -904,7 +924,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
904
924
|
day: 25,
|
|
905
925
|
name: "Christmas Day"
|
|
906
926
|
}
|
|
907
|
-
],
|
|
927
|
+
], rt = {
|
|
908
928
|
2026: {
|
|
909
929
|
"2026-01-01": "New Year's Day",
|
|
910
930
|
"2026-02-17": "Chinese New Year",
|
|
@@ -934,15 +954,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
934
954
|
"2027-08-15": "Prophet Muhammad's Birthday",
|
|
935
955
|
"2027-12-25": "Christmas Day"
|
|
936
956
|
}
|
|
937
|
-
},
|
|
938
|
-
countryCode:
|
|
939
|
-
timezone:
|
|
940
|
-
payRate:
|
|
941
|
-
overtime:
|
|
942
|
-
workingHours:
|
|
943
|
-
recurringPublicHolidays:
|
|
944
|
-
publicHolidays:
|
|
945
|
-
},
|
|
957
|
+
}, lt = {
|
|
958
|
+
countryCode: at,
|
|
959
|
+
timezone: tt,
|
|
960
|
+
payRate: nt,
|
|
961
|
+
overtime: ot,
|
|
962
|
+
workingHours: st,
|
|
963
|
+
recurringPublicHolidays: it,
|
|
964
|
+
publicHolidays: rt
|
|
965
|
+
}, ut = "ID", dt = "Asia/Jakarta", ct = {
|
|
946
966
|
NORMAL: {
|
|
947
967
|
overtime: 1.5
|
|
948
968
|
},
|
|
@@ -954,9 +974,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
954
974
|
regular: 2,
|
|
955
975
|
overtime: 2
|
|
956
976
|
}
|
|
957
|
-
},
|
|
977
|
+
}, mt = {
|
|
958
978
|
maxHoursPerMonth: 72
|
|
959
|
-
},
|
|
979
|
+
}, yt = {
|
|
960
980
|
fullTime: {
|
|
961
981
|
minHoursPerDay: null,
|
|
962
982
|
maxHoursPerDay: 8,
|
|
@@ -965,7 +985,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
965
985
|
partTime: {
|
|
966
986
|
maxHoursPerWeek: null
|
|
967
987
|
}
|
|
968
|
-
},
|
|
988
|
+
}, ft = [
|
|
969
989
|
{
|
|
970
990
|
month: 1,
|
|
971
991
|
day: 1,
|
|
@@ -986,7 +1006,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
986
1006
|
day: 25,
|
|
987
1007
|
name: "Christmas Day"
|
|
988
1008
|
}
|
|
989
|
-
],
|
|
1009
|
+
], ht = {
|
|
990
1010
|
2026: {
|
|
991
1011
|
"2026-01-01": "New Year's Day",
|
|
992
1012
|
"2026-01-16": "Isra Mi'raj",
|
|
@@ -1026,15 +1046,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1026
1046
|
"2027-12-25": "Christmas Day",
|
|
1027
1047
|
"2027-12-26": "Isra Mi'raj"
|
|
1028
1048
|
}
|
|
1029
|
-
},
|
|
1030
|
-
countryCode:
|
|
1031
|
-
timezone:
|
|
1032
|
-
payRate:
|
|
1033
|
-
overtime:
|
|
1034
|
-
workingHours:
|
|
1035
|
-
recurringPublicHolidays:
|
|
1036
|
-
publicHolidays:
|
|
1037
|
-
},
|
|
1049
|
+
}, pt = {
|
|
1050
|
+
countryCode: ut,
|
|
1051
|
+
timezone: dt,
|
|
1052
|
+
payRate: ct,
|
|
1053
|
+
overtime: mt,
|
|
1054
|
+
workingHours: yt,
|
|
1055
|
+
recurringPublicHolidays: ft,
|
|
1056
|
+
publicHolidays: ht
|
|
1057
|
+
}, vt = "MO", gt = "Asia/Macau", Dt = {
|
|
1038
1058
|
NORMAL: {
|
|
1039
1059
|
overtime: 1.5
|
|
1040
1060
|
},
|
|
@@ -1046,9 +1066,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1046
1066
|
regular: 2,
|
|
1047
1067
|
overtime: 3
|
|
1048
1068
|
}
|
|
1049
|
-
},
|
|
1069
|
+
}, wt = {
|
|
1050
1070
|
maxHoursPerMonth: null
|
|
1051
|
-
},
|
|
1071
|
+
}, Ht = {
|
|
1052
1072
|
fullTime: {
|
|
1053
1073
|
minHoursPerDay: null,
|
|
1054
1074
|
maxHoursPerDay: 8,
|
|
@@ -1057,7 +1077,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1057
1077
|
partTime: {
|
|
1058
1078
|
maxHoursPerWeek: null
|
|
1059
1079
|
}
|
|
1060
|
-
},
|
|
1080
|
+
}, At = [
|
|
1061
1081
|
{
|
|
1062
1082
|
month: 1,
|
|
1063
1083
|
day: 1,
|
|
@@ -1083,7 +1103,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1083
1103
|
day: 25,
|
|
1084
1104
|
name: "Christmas Day"
|
|
1085
1105
|
}
|
|
1086
|
-
],
|
|
1106
|
+
], Et = {
|
|
1087
1107
|
2026: {
|
|
1088
1108
|
"2026-01-01": "New Year's Day",
|
|
1089
1109
|
"2026-02-17": "Lunar New Year's Day",
|
|
@@ -1140,15 +1160,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1140
1160
|
"2027-12-25": "Christmas Day",
|
|
1141
1161
|
"2027-12-27": "Compensatory rest day"
|
|
1142
1162
|
}
|
|
1143
|
-
},
|
|
1144
|
-
countryCode:
|
|
1145
|
-
timezone:
|
|
1146
|
-
payRate:
|
|
1147
|
-
overtime:
|
|
1148
|
-
workingHours:
|
|
1149
|
-
recurringPublicHolidays:
|
|
1150
|
-
publicHolidays:
|
|
1151
|
-
},
|
|
1163
|
+
}, bt = {
|
|
1164
|
+
countryCode: vt,
|
|
1165
|
+
timezone: gt,
|
|
1166
|
+
payRate: Dt,
|
|
1167
|
+
overtime: wt,
|
|
1168
|
+
workingHours: Ht,
|
|
1169
|
+
recurringPublicHolidays: At,
|
|
1170
|
+
publicHolidays: Et
|
|
1171
|
+
}, Pt = "MV", St = "Indian/Maldives", kt = {
|
|
1152
1172
|
NORMAL: {
|
|
1153
1173
|
overtime: 1.5
|
|
1154
1174
|
},
|
|
@@ -1160,9 +1180,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1160
1180
|
regular: 2,
|
|
1161
1181
|
overtime: 3
|
|
1162
1182
|
}
|
|
1163
|
-
},
|
|
1183
|
+
}, Ct = {
|
|
1164
1184
|
maxHoursPerMonth: null
|
|
1165
|
-
},
|
|
1185
|
+
}, Mt = {
|
|
1166
1186
|
fullTime: {
|
|
1167
1187
|
minHoursPerDay: null,
|
|
1168
1188
|
maxHoursPerDay: 8,
|
|
@@ -1171,7 +1191,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1171
1191
|
partTime: {
|
|
1172
1192
|
maxHoursPerWeek: null
|
|
1173
1193
|
}
|
|
1174
|
-
},
|
|
1194
|
+
}, Nt = [
|
|
1175
1195
|
{
|
|
1176
1196
|
month: 1,
|
|
1177
1197
|
day: 1,
|
|
@@ -1197,7 +1217,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1197
1217
|
day: 11,
|
|
1198
1218
|
name: "Republic Day"
|
|
1199
1219
|
}
|
|
1200
|
-
],
|
|
1220
|
+
], Lt = {
|
|
1201
1221
|
2026: {
|
|
1202
1222
|
"2026-01-01": "New Year's Day",
|
|
1203
1223
|
"2026-03-20": "Eid al-Fitr Holiday",
|
|
@@ -1235,15 +1255,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1235
1255
|
"2027-11-03": "Victory Day",
|
|
1236
1256
|
"2027-11-11": "Republic Day"
|
|
1237
1257
|
}
|
|
1238
|
-
},
|
|
1239
|
-
countryCode:
|
|
1240
|
-
timezone:
|
|
1241
|
-
payRate:
|
|
1242
|
-
overtime:
|
|
1243
|
-
workingHours:
|
|
1244
|
-
recurringPublicHolidays:
|
|
1245
|
-
publicHolidays:
|
|
1246
|
-
},
|
|
1258
|
+
}, Ot = {
|
|
1259
|
+
countryCode: Pt,
|
|
1260
|
+
timezone: St,
|
|
1261
|
+
payRate: kt,
|
|
1262
|
+
overtime: Ct,
|
|
1263
|
+
workingHours: Mt,
|
|
1264
|
+
recurringPublicHolidays: Nt,
|
|
1265
|
+
publicHolidays: Lt
|
|
1266
|
+
}, It = "MY", Tt = "Asia/Kuala_Lumpur", Rt = {
|
|
1247
1267
|
NORMAL: {
|
|
1248
1268
|
overtime: 1.5
|
|
1249
1269
|
},
|
|
@@ -1255,9 +1275,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1255
1275
|
regular: 2,
|
|
1256
1276
|
overtime: 3
|
|
1257
1277
|
}
|
|
1258
|
-
},
|
|
1278
|
+
}, $t = {
|
|
1259
1279
|
maxHoursPerMonth: 104
|
|
1260
|
-
},
|
|
1280
|
+
}, Bt = {
|
|
1261
1281
|
fullTime: {
|
|
1262
1282
|
minHoursPerDay: null,
|
|
1263
1283
|
maxHoursPerDay: 8,
|
|
@@ -1266,7 +1286,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1266
1286
|
partTime: {
|
|
1267
1287
|
maxHoursPerWeek: 31.5
|
|
1268
1288
|
}
|
|
1269
|
-
},
|
|
1289
|
+
}, xt = [
|
|
1270
1290
|
{
|
|
1271
1291
|
month: 1,
|
|
1272
1292
|
day: 1,
|
|
@@ -1292,7 +1312,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1292
1312
|
day: 25,
|
|
1293
1313
|
name: "Christmas Day"
|
|
1294
1314
|
}
|
|
1295
|
-
],
|
|
1315
|
+
], Yt = {
|
|
1296
1316
|
2026: {
|
|
1297
1317
|
"2026-01-01": "New Year's Day",
|
|
1298
1318
|
"2026-02-17": "Chinese New Year",
|
|
@@ -1330,15 +1350,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1330
1350
|
"2027-10-28": "Deepavali",
|
|
1331
1351
|
"2027-12-25": "Christmas Day"
|
|
1332
1352
|
}
|
|
1333
|
-
},
|
|
1334
|
-
countryCode:
|
|
1335
|
-
timezone:
|
|
1336
|
-
payRate:
|
|
1337
|
-
overtime:
|
|
1338
|
-
workingHours:
|
|
1339
|
-
recurringPublicHolidays:
|
|
1340
|
-
publicHolidays:
|
|
1341
|
-
},
|
|
1353
|
+
}, Ft = {
|
|
1354
|
+
countryCode: It,
|
|
1355
|
+
timezone: Tt,
|
|
1356
|
+
payRate: Rt,
|
|
1357
|
+
overtime: $t,
|
|
1358
|
+
workingHours: Bt,
|
|
1359
|
+
recurringPublicHolidays: xt,
|
|
1360
|
+
publicHolidays: Yt
|
|
1361
|
+
}, _t = "PK", Ut = "Asia/Karachi", Wt = {
|
|
1342
1362
|
NORMAL: {
|
|
1343
1363
|
overtime: 1.5
|
|
1344
1364
|
},
|
|
@@ -1350,9 +1370,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1350
1370
|
regular: 2,
|
|
1351
1371
|
overtime: 3
|
|
1352
1372
|
}
|
|
1353
|
-
},
|
|
1373
|
+
}, Kt = {
|
|
1354
1374
|
maxHoursPerMonth: null
|
|
1355
|
-
},
|
|
1375
|
+
}, zt = {
|
|
1356
1376
|
fullTime: {
|
|
1357
1377
|
minHoursPerDay: null,
|
|
1358
1378
|
maxHoursPerDay: 9,
|
|
@@ -1361,7 +1381,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1361
1381
|
partTime: {
|
|
1362
1382
|
maxHoursPerWeek: null
|
|
1363
1383
|
}
|
|
1364
|
-
},
|
|
1384
|
+
}, Vt = [
|
|
1365
1385
|
{
|
|
1366
1386
|
month: 1,
|
|
1367
1387
|
day: 1,
|
|
@@ -1392,7 +1412,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1392
1412
|
day: 25,
|
|
1393
1413
|
name: "Quaid-e-Azam Day and Christmas Day"
|
|
1394
1414
|
}
|
|
1395
|
-
],
|
|
1415
|
+
], jt = {
|
|
1396
1416
|
2026: {
|
|
1397
1417
|
"2026-01-01": "New Year's Day",
|
|
1398
1418
|
"2026-02-05": "Kashmir Day",
|
|
@@ -1417,15 +1437,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1417
1437
|
"2027-08-15": "Eid Milad-un-Nabi",
|
|
1418
1438
|
"2027-12-25": "Quaid-e-Azam Day and Christmas Day"
|
|
1419
1439
|
}
|
|
1420
|
-
},
|
|
1421
|
-
countryCode:
|
|
1422
|
-
timezone:
|
|
1423
|
-
payRate:
|
|
1424
|
-
overtime:
|
|
1425
|
-
workingHours:
|
|
1426
|
-
recurringPublicHolidays:
|
|
1427
|
-
publicHolidays:
|
|
1428
|
-
},
|
|
1440
|
+
}, Gt = {
|
|
1441
|
+
countryCode: _t,
|
|
1442
|
+
timezone: Ut,
|
|
1443
|
+
payRate: Wt,
|
|
1444
|
+
overtime: Kt,
|
|
1445
|
+
workingHours: zt,
|
|
1446
|
+
recurringPublicHolidays: Vt,
|
|
1447
|
+
publicHolidays: jt
|
|
1448
|
+
}, Qt = "SG", Xt = "Asia/Singapore", Jt = {
|
|
1429
1449
|
NORMAL: {
|
|
1430
1450
|
overtime: 1.5
|
|
1431
1451
|
},
|
|
@@ -1437,9 +1457,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1437
1457
|
regular: 2,
|
|
1438
1458
|
overtime: 1.5
|
|
1439
1459
|
}
|
|
1440
|
-
},
|
|
1460
|
+
}, Zt = {
|
|
1441
1461
|
maxHoursPerMonth: 72
|
|
1442
|
-
},
|
|
1462
|
+
}, qt = {
|
|
1443
1463
|
fullTime: {
|
|
1444
1464
|
minHoursPerDay: null,
|
|
1445
1465
|
maxHoursPerDay: 12,
|
|
@@ -1448,7 +1468,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1448
1468
|
partTime: {
|
|
1449
1469
|
maxHoursPerWeek: 35
|
|
1450
1470
|
}
|
|
1451
|
-
},
|
|
1471
|
+
}, en = [
|
|
1452
1472
|
{
|
|
1453
1473
|
month: 1,
|
|
1454
1474
|
day: 1,
|
|
@@ -1469,7 +1489,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1469
1489
|
day: 25,
|
|
1470
1490
|
name: "Christmas Day"
|
|
1471
1491
|
}
|
|
1472
|
-
],
|
|
1492
|
+
], an = {
|
|
1473
1493
|
2026: {
|
|
1474
1494
|
"2026-01-01": "New Year's Day",
|
|
1475
1495
|
"2026-02-17": "Chinese New Year's Day",
|
|
@@ -1500,15 +1520,15 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1500
1520
|
"2027-10-28": "Deepavali",
|
|
1501
1521
|
"2027-12-25": "Christmas Day"
|
|
1502
1522
|
}
|
|
1503
|
-
},
|
|
1504
|
-
countryCode:
|
|
1505
|
-
timezone:
|
|
1506
|
-
payRate:
|
|
1507
|
-
overtime:
|
|
1508
|
-
workingHours:
|
|
1509
|
-
recurringPublicHolidays:
|
|
1510
|
-
publicHolidays:
|
|
1511
|
-
},
|
|
1523
|
+
}, tn = {
|
|
1524
|
+
countryCode: Qt,
|
|
1525
|
+
timezone: Xt,
|
|
1526
|
+
payRate: Jt,
|
|
1527
|
+
overtime: Zt,
|
|
1528
|
+
workingHours: qt,
|
|
1529
|
+
recurringPublicHolidays: en,
|
|
1530
|
+
publicHolidays: an
|
|
1531
|
+
}, nn = "TH", on = "Asia/Bangkok", sn = {
|
|
1512
1532
|
NORMAL: {
|
|
1513
1533
|
overtime: 1.5
|
|
1514
1534
|
},
|
|
@@ -1520,9 +1540,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1520
1540
|
regular: 2,
|
|
1521
1541
|
overtime: 3
|
|
1522
1542
|
}
|
|
1523
|
-
},
|
|
1543
|
+
}, rn = {
|
|
1524
1544
|
maxHoursPerMonth: 36
|
|
1525
|
-
},
|
|
1545
|
+
}, ln = {
|
|
1526
1546
|
fullTime: {
|
|
1527
1547
|
minHoursPerDay: null,
|
|
1528
1548
|
maxHoursPerDay: 8,
|
|
@@ -1531,7 +1551,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1531
1551
|
partTime: {
|
|
1532
1552
|
maxHoursPerWeek: null
|
|
1533
1553
|
}
|
|
1534
|
-
},
|
|
1554
|
+
}, un = [
|
|
1535
1555
|
{
|
|
1536
1556
|
month: 1,
|
|
1537
1557
|
day: 1,
|
|
@@ -1542,30 +1562,60 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1542
1562
|
day: 6,
|
|
1543
1563
|
name: "Chakri Memorial Day"
|
|
1544
1564
|
},
|
|
1565
|
+
{
|
|
1566
|
+
month: 4,
|
|
1567
|
+
day: 13,
|
|
1568
|
+
name: "Songkran Festival"
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
month: 4,
|
|
1572
|
+
day: 14,
|
|
1573
|
+
name: "Songkran Festival"
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
month: 4,
|
|
1577
|
+
day: 15,
|
|
1578
|
+
name: "Songkran Festival"
|
|
1579
|
+
},
|
|
1545
1580
|
{
|
|
1546
1581
|
month: 5,
|
|
1547
1582
|
day: 1,
|
|
1548
1583
|
name: "National Labour Day"
|
|
1549
1584
|
},
|
|
1585
|
+
{
|
|
1586
|
+
month: 5,
|
|
1587
|
+
day: 4,
|
|
1588
|
+
name: "Coronation Day"
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
month: 6,
|
|
1592
|
+
day: 3,
|
|
1593
|
+
name: "Queen Suthida's Birthday"
|
|
1594
|
+
},
|
|
1550
1595
|
{
|
|
1551
1596
|
month: 7,
|
|
1552
1597
|
day: 28,
|
|
1553
|
-
name: "King's Birthday"
|
|
1598
|
+
name: "King Vajiralongkorn's Birthday"
|
|
1554
1599
|
},
|
|
1555
1600
|
{
|
|
1556
1601
|
month: 8,
|
|
1557
1602
|
day: 12,
|
|
1558
|
-
name: "Queen Mother's Birthday"
|
|
1603
|
+
name: "Queen Mother's Birthday and Mother's Day"
|
|
1559
1604
|
},
|
|
1560
1605
|
{
|
|
1561
1606
|
month: 10,
|
|
1562
1607
|
day: 13,
|
|
1563
|
-
name: "Memorial Day"
|
|
1608
|
+
name: "King Bhumibol Memorial Day"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
month: 10,
|
|
1612
|
+
day: 23,
|
|
1613
|
+
name: "King Chulalongkorn Memorial Day"
|
|
1564
1614
|
},
|
|
1565
1615
|
{
|
|
1566
1616
|
month: 12,
|
|
1567
1617
|
day: 5,
|
|
1568
|
-
name: "King Bhumibol's Birthday"
|
|
1618
|
+
name: "King Bhumibol's Birthday, National Day and Father's Day"
|
|
1569
1619
|
},
|
|
1570
1620
|
{
|
|
1571
1621
|
month: 12,
|
|
@@ -1577,7 +1627,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1577
1627
|
day: 31,
|
|
1578
1628
|
name: "New Year's Eve"
|
|
1579
1629
|
}
|
|
1580
|
-
],
|
|
1630
|
+
], dn = {
|
|
1581
1631
|
2026: {
|
|
1582
1632
|
"2026-01-01": "New Year's Day",
|
|
1583
1633
|
"2026-03-03": "Makha Bucha Day",
|
|
@@ -1589,43 +1639,82 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1589
1639
|
"2026-05-04": "Coronation Day",
|
|
1590
1640
|
"2026-05-13": "Royal Ploughing Ceremony",
|
|
1591
1641
|
"2026-05-31": "Visakha Bucha Day",
|
|
1592
|
-
"2026-06-01": "Visakha Bucha
|
|
1593
|
-
"2026-
|
|
1594
|
-
"2026-
|
|
1595
|
-
"2026-
|
|
1596
|
-
"2026-
|
|
1597
|
-
"2026-12
|
|
1642
|
+
"2026-06-01": "Substitution for Visakha Bucha Day",
|
|
1643
|
+
"2026-06-03": "Queen Suthida's Birthday",
|
|
1644
|
+
"2026-07-28": "King Vajiralongkorn's Birthday",
|
|
1645
|
+
"2026-07-29": "Asarnha Bucha Day",
|
|
1646
|
+
"2026-07-30": "Buddhist Lent Day",
|
|
1647
|
+
"2026-08-12": "Queen Mother's Birthday and Mother's Day",
|
|
1648
|
+
"2026-10-13": "King Bhumibol Memorial Day",
|
|
1649
|
+
"2026-10-23": "King Chulalongkorn Memorial Day",
|
|
1650
|
+
"2026-12-05": "King Bhumibol's Birthday, National Day and Father's Day",
|
|
1651
|
+
"2026-12-07": "Substitution for National Day and Father's Day",
|
|
1598
1652
|
"2026-12-10": "Constitution Day",
|
|
1599
1653
|
"2026-12-31": "New Year's Eve"
|
|
1600
1654
|
},
|
|
1601
1655
|
2027: {
|
|
1602
1656
|
"2027-01-01": "New Year's Day",
|
|
1603
|
-
"2027-02-
|
|
1657
|
+
"2027-02-21": "Makha Bucha Day",
|
|
1658
|
+
"2027-02-22": "Substitution for Makha Bucha Day",
|
|
1604
1659
|
"2027-04-06": "Chakri Memorial Day",
|
|
1605
1660
|
"2027-04-13": "Songkran Festival",
|
|
1606
1661
|
"2027-04-14": "Songkran Festival",
|
|
1607
1662
|
"2027-04-15": "Songkran Festival",
|
|
1608
1663
|
"2027-05-01": "National Labour Day",
|
|
1609
|
-
"2027-05-03": "Labour Day
|
|
1664
|
+
"2027-05-03": "Substitution for National Labour Day",
|
|
1610
1665
|
"2027-05-04": "Coronation Day",
|
|
1611
|
-
"2027-
|
|
1612
|
-
"2027-
|
|
1613
|
-
"2027-
|
|
1614
|
-
"2027-
|
|
1615
|
-
"2027-
|
|
1616
|
-
"2027-
|
|
1666
|
+
"2027-05-20": "Visakha Bucha Day",
|
|
1667
|
+
"2027-06-03": "Queen Suthida's Birthday",
|
|
1668
|
+
"2027-07-18": "Asarnha Bucha Day",
|
|
1669
|
+
"2027-07-19": "Buddhist Lent Day",
|
|
1670
|
+
"2027-07-20": "Substitution for Asarnha Bucha Day",
|
|
1671
|
+
"2027-07-28": "King Vajiralongkorn's Birthday",
|
|
1672
|
+
"2027-08-12": "Queen Mother's Birthday and Mother's Day",
|
|
1673
|
+
"2027-10-13": "King Bhumibol Memorial Day",
|
|
1674
|
+
"2027-10-23": "King Chulalongkorn Memorial Day",
|
|
1675
|
+
"2027-10-25": "Substitution for King Chulalongkorn Memorial Day",
|
|
1676
|
+
"2027-12-05": "King Bhumibol's Birthday, National Day and Father's Day",
|
|
1677
|
+
"2027-12-06": "Substitution for National Day and Father's Day",
|
|
1617
1678
|
"2027-12-10": "Constitution Day",
|
|
1618
1679
|
"2027-12-31": "New Year's Eve"
|
|
1619
1680
|
}
|
|
1620
|
-
},
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1681
|
+
}, cn = {
|
|
1682
|
+
th: {
|
|
1683
|
+
"New Year's Day": "วันขึ้นปีใหม่",
|
|
1684
|
+
"Makha Bucha Day": "วันมาฆบูชา",
|
|
1685
|
+
"Substitution for Makha Bucha Day": "วันหยุดชดเชยวันมาฆบูชา",
|
|
1686
|
+
"Chakri Memorial Day": "วันจักรี",
|
|
1687
|
+
"Songkran Festival": "วันสงกรานต์",
|
|
1688
|
+
"National Labour Day": "วันแรงงานแห่งชาติ",
|
|
1689
|
+
"Substitution for National Labour Day": "วันหยุดชดเชยวันแรงงานแห่งชาติ",
|
|
1690
|
+
"Coronation Day": "วันฉัตรมงคล",
|
|
1691
|
+
"Royal Ploughing Ceremony": "วันพืชมงคล",
|
|
1692
|
+
"Visakha Bucha Day": "วันวิสาขบูชา",
|
|
1693
|
+
"Substitution for Visakha Bucha Day": "วันหยุดชดเชยวันวิสาขบูชา",
|
|
1694
|
+
"Queen Suthida's Birthday": "วันเฉลิมพระชนมพรรษาสมเด็จพระราชินี",
|
|
1695
|
+
"Asarnha Bucha Day": "วันอาสาฬหบูชา",
|
|
1696
|
+
"Substitution for Asarnha Bucha Day": "วันหยุดชดเชยวันอาสาฬหบูชา",
|
|
1697
|
+
"Buddhist Lent Day": "วันเข้าพรรษา",
|
|
1698
|
+
"King Vajiralongkorn's Birthday": "วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระเจ้าอยู่หัว",
|
|
1699
|
+
"Queen Mother's Birthday and Mother's Day": "วันเฉลิมพระชนมพรรษาพระพันปีหลวง และวันแม่แห่งชาติ",
|
|
1700
|
+
"King Bhumibol Memorial Day": "วันนวมินทรมหาราช",
|
|
1701
|
+
"King Chulalongkorn Memorial Day": "วันปิยมหาราช",
|
|
1702
|
+
"Substitution for King Chulalongkorn Memorial Day": "วันหยุดชดเชยวันปิยมหาราช",
|
|
1703
|
+
"King Bhumibol's Birthday, National Day and Father's Day": "วันชาติ และวันพ่อแห่งชาติ",
|
|
1704
|
+
"Substitution for National Day and Father's Day": "วันหยุดชดเชยวันชาติ และวันพ่อแห่งชาติ",
|
|
1705
|
+
"Constitution Day": "วันรัฐธรรมนูญ",
|
|
1706
|
+
"New Year's Eve": "วันสิ้นปี"
|
|
1707
|
+
}
|
|
1708
|
+
}, mn = {
|
|
1709
|
+
countryCode: nn,
|
|
1710
|
+
timezone: on,
|
|
1711
|
+
payRate: sn,
|
|
1712
|
+
overtime: rn,
|
|
1713
|
+
workingHours: ln,
|
|
1714
|
+
recurringPublicHolidays: un,
|
|
1715
|
+
publicHolidays: dn,
|
|
1716
|
+
holidayNames: cn
|
|
1717
|
+
}, yn = "VN", fn = "Asia/Ho_Chi_Minh", hn = {
|
|
1629
1718
|
NORMAL: {
|
|
1630
1719
|
overtime: 1.5
|
|
1631
1720
|
},
|
|
@@ -1637,9 +1726,9 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1637
1726
|
regular: 2,
|
|
1638
1727
|
overtime: 3
|
|
1639
1728
|
}
|
|
1640
|
-
},
|
|
1729
|
+
}, pn = {
|
|
1641
1730
|
maxHoursPerMonth: 40
|
|
1642
|
-
},
|
|
1731
|
+
}, vn = {
|
|
1643
1732
|
fullTime: {
|
|
1644
1733
|
minHoursPerDay: null,
|
|
1645
1734
|
maxHoursPerDay: 8,
|
|
@@ -1648,7 +1737,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1648
1737
|
partTime: {
|
|
1649
1738
|
maxHoursPerWeek: null
|
|
1650
1739
|
}
|
|
1651
|
-
},
|
|
1740
|
+
}, gn = [
|
|
1652
1741
|
{
|
|
1653
1742
|
month: 1,
|
|
1654
1743
|
day: 1,
|
|
@@ -1669,7 +1758,7 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1669
1758
|
day: 2,
|
|
1670
1759
|
name: "National Day"
|
|
1671
1760
|
}
|
|
1672
|
-
],
|
|
1761
|
+
], Dn = {
|
|
1673
1762
|
2026: {
|
|
1674
1763
|
"2026-01-01": "New Year's Day",
|
|
1675
1764
|
"2026-02-16": "Tet Holiday",
|
|
@@ -1697,16 +1786,16 @@ const _a = "AE", Fa = "Asia/Dubai", Ua = {
|
|
|
1697
1786
|
"2027-09-02": "National Day",
|
|
1698
1787
|
"2027-09-03": "National Day Holiday"
|
|
1699
1788
|
}
|
|
1700
|
-
},
|
|
1701
|
-
countryCode:
|
|
1702
|
-
timezone:
|
|
1703
|
-
payRate:
|
|
1704
|
-
overtime:
|
|
1705
|
-
workingHours:
|
|
1706
|
-
recurringPublicHolidays:
|
|
1707
|
-
publicHolidays:
|
|
1708
|
-
},
|
|
1709
|
-
function
|
|
1789
|
+
}, wn = {
|
|
1790
|
+
countryCode: yn,
|
|
1791
|
+
timezone: fn,
|
|
1792
|
+
payRate: hn,
|
|
1793
|
+
overtime: pn,
|
|
1794
|
+
workingHours: vn,
|
|
1795
|
+
recurringPublicHolidays: gn,
|
|
1796
|
+
publicHolidays: Dn
|
|
1797
|
+
}, je = { AE: et, BN: lt, ID: pt, MO: bt, MV: Ot, MY: Ft, PK: Gt, SG: tn, TH: mn, VN: wn };
|
|
1798
|
+
function Hn(e) {
|
|
1710
1799
|
if (typeof e == "string") return e.toUpperCase();
|
|
1711
1800
|
if (e && typeof e == "object" && "code" in e) {
|
|
1712
1801
|
const a = e.code;
|
|
@@ -1714,17 +1803,22 @@ function yn(e) {
|
|
|
1714
1803
|
}
|
|
1715
1804
|
return "MY";
|
|
1716
1805
|
}
|
|
1717
|
-
function
|
|
1718
|
-
return
|
|
1806
|
+
function An(e) {
|
|
1807
|
+
return je[Hn(e)] ?? je.MY;
|
|
1808
|
+
}
|
|
1809
|
+
function zo(e, a, t) {
|
|
1810
|
+
var o, i;
|
|
1811
|
+
const n = En(e, a);
|
|
1812
|
+
return !n || !t ? n : ((i = (o = e.holidayNames) == null ? void 0 : o[t.slice(0, 2).toLowerCase()]) == null ? void 0 : i[n]) ?? n;
|
|
1719
1813
|
}
|
|
1720
|
-
function
|
|
1721
|
-
var i,
|
|
1814
|
+
function En(e, a) {
|
|
1815
|
+
var i, u;
|
|
1722
1816
|
const t = (i = e.publicHolidays[a.slice(0, 4)]) == null ? void 0 : i[a];
|
|
1723
1817
|
if (t) return t;
|
|
1724
1818
|
const n = Number(a.slice(5, 7)), o = Number(a.slice(8, 10));
|
|
1725
|
-
return ((
|
|
1819
|
+
return ((u = e.recurringPublicHolidays.find((s) => s.month === n && s.day === o)) == null ? void 0 : u.name) ?? null;
|
|
1726
1820
|
}
|
|
1727
|
-
const
|
|
1821
|
+
const bn = Je(), ra = "unassigned", Vo = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], jo = "All Stations", Go = [{ id: ra, label: "Assigned", roles: [], system: !0 }], Ge = [
|
|
1728
1822
|
"#903E1F",
|
|
1729
1823
|
"#5F090A",
|
|
1730
1824
|
"#0A5384",
|
|
@@ -1734,105 +1828,105 @@ const fn = Ge(), ta = "unassigned", Io = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sa
|
|
|
1734
1828
|
"#0F5C5C",
|
|
1735
1829
|
"#6E2142"
|
|
1736
1830
|
];
|
|
1737
|
-
function
|
|
1831
|
+
function Pn(e) {
|
|
1738
1832
|
var t;
|
|
1739
1833
|
const a = e.trim().toLocaleLowerCase();
|
|
1740
|
-
return (t =
|
|
1834
|
+
return (t = W.find((n) => n.name.toLocaleLowerCase() === a)) == null ? void 0 : t.id;
|
|
1741
1835
|
}
|
|
1742
|
-
function
|
|
1836
|
+
function Qo(e, a) {
|
|
1743
1837
|
if (e)
|
|
1744
|
-
return { positionId: a ??
|
|
1838
|
+
return { positionId: a ?? Pn(e), positionName: e };
|
|
1745
1839
|
}
|
|
1746
|
-
function
|
|
1840
|
+
function re(e, a = W) {
|
|
1747
1841
|
var t;
|
|
1748
1842
|
if (e)
|
|
1749
1843
|
return (e.positionId && ((t = a.find((n) => n.id === e.positionId)) == null ? void 0 : t.name)) ?? e.positionName;
|
|
1750
1844
|
}
|
|
1751
|
-
function
|
|
1845
|
+
function Xo(e, a = W) {
|
|
1752
1846
|
var t, n;
|
|
1753
1847
|
if (e)
|
|
1754
1848
|
return e.positionId ? (t = a.find((o) => o.id === e.positionId)) == null ? void 0 : t.name : (n = a.find((o) => o.name.toLocaleLowerCase() === e.positionName.toLocaleLowerCase())) == null ? void 0 : n.name;
|
|
1755
1849
|
}
|
|
1756
|
-
function
|
|
1757
|
-
return a ? !
|
|
1850
|
+
function Jo(e, a) {
|
|
1851
|
+
return a ? !W.some((t) => t.id === a) : !!e && !W.some((t) => t.name.toLocaleLowerCase() === e.toLocaleLowerCase());
|
|
1758
1852
|
}
|
|
1759
|
-
const
|
|
1760
|
-
function
|
|
1853
|
+
const Zo = [1, 1, 1, 1, 1, 1, 1];
|
|
1854
|
+
function ue(e) {
|
|
1761
1855
|
return (e + 6) % 7;
|
|
1762
1856
|
}
|
|
1763
|
-
function
|
|
1857
|
+
function qo(e) {
|
|
1764
1858
|
return (e + 1) % 7;
|
|
1765
1859
|
}
|
|
1766
|
-
function
|
|
1860
|
+
function he(e, a) {
|
|
1767
1861
|
e.splice(0, e.length, ...a);
|
|
1768
1862
|
}
|
|
1769
|
-
function
|
|
1770
|
-
return
|
|
1863
|
+
function Sn(e, a) {
|
|
1864
|
+
return qe(e, a) / 60;
|
|
1771
1865
|
}
|
|
1772
|
-
function
|
|
1866
|
+
function kn(e) {
|
|
1773
1867
|
var t;
|
|
1774
1868
|
const a = e.trim().split(/\s+/).filter(Boolean);
|
|
1775
1869
|
return a.length ? (a[0][0] + (((t = a[1]) == null ? void 0 : t[0]) ?? "")).toUpperCase() : "??";
|
|
1776
1870
|
}
|
|
1777
|
-
const
|
|
1778
|
-
function
|
|
1779
|
-
return
|
|
1871
|
+
const la = /* @__PURE__ */ new Map(), Se = /* @__PURE__ */ new Map();
|
|
1872
|
+
function es(e) {
|
|
1873
|
+
return la.get(e);
|
|
1780
1874
|
}
|
|
1781
|
-
function
|
|
1782
|
-
const a =
|
|
1875
|
+
function Cn(e) {
|
|
1876
|
+
const a = Se.get(e);
|
|
1783
1877
|
if (a !== void 0) return a;
|
|
1784
|
-
const t =
|
|
1785
|
-
return
|
|
1878
|
+
const t = aa + Se.size + 1;
|
|
1879
|
+
return Se.set(e, t), la.set(t, e), t;
|
|
1786
1880
|
}
|
|
1787
|
-
function
|
|
1881
|
+
function as(e) {
|
|
1788
1882
|
return e.sourceId || String(e.id);
|
|
1789
1883
|
}
|
|
1790
|
-
function
|
|
1791
|
-
|
|
1884
|
+
function Mn(e) {
|
|
1885
|
+
Ra.name = (e == null ? void 0 : e.outlet.name) ?? "", he(Ta, (e == null ? void 0 : e.positions.map((s) => s.name)) ?? []), he(W, (e == null ? void 0 : e.positions) ?? []);
|
|
1792
1886
|
const a = (e == null ? void 0 : e.restaurantProfile.operatingHours) ?? [], t = Array.from({ length: 7 }, () => []);
|
|
1793
|
-
for (const s of a) t[
|
|
1794
|
-
|
|
1887
|
+
for (const s of a) t[ue(s.dayOfWeek)] = s.closed ? [] : s.hours;
|
|
1888
|
+
he(N.dayHours, t);
|
|
1795
1889
|
const n = a.filter((s) => !s.closed).flatMap((s) => s.hours);
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
a.filter((s) => s.closed).map((s) =>
|
|
1890
|
+
N.openFrom = n.length ? n.map((s) => s.start).reduce((s, d) => d < s ? d : s) : "00:00", N.openTo = n.length ? n.map((s) => s.end).reduce((s, d) => d > s ? d : s) : "24:00", he(
|
|
1891
|
+
N.closedWeekdays,
|
|
1892
|
+
a.filter((s) => s.closed).map((s) => ue(s.dayOfWeek)).sort((s, d) => s - d)
|
|
1799
1893
|
);
|
|
1800
|
-
const o =
|
|
1801
|
-
|
|
1894
|
+
const o = An(bn.currentCountry.value), i = (e == null ? void 0 : e.settings.settingsConfigured) === !0, u = i ? e.settings.payRate : o.payRate;
|
|
1895
|
+
N.otCapHours = i ? e.settings.overtime.maxHoursPerMonth : o.overtime.maxHoursPerMonth, N.workingHours = i ? e.settings.workingHours : {
|
|
1802
1896
|
minHoursPerDay: null,
|
|
1803
1897
|
maxHoursPerDay: o.workingHours.fullTime.maxHoursPerDay,
|
|
1804
1898
|
maxHoursPerWeek: o.workingHours.fullTime.maxHoursPerWeek
|
|
1805
|
-
},
|
|
1899
|
+
}, N.payRate.NORMAL.overtime = u.NORMAL.overtime, N.payRate.REST_DAY.regular = u.REST_DAY.regular, N.payRate.REST_DAY.overtime = u.REST_DAY.overtime, N.payRate.PUBLIC_HOLIDAY.regular = u.PUBLIC_HOLIDAY.regular, N.payRate.PUBLIC_HOLIDAY.overtime = u.PUBLIC_HOLIDAY.overtime;
|
|
1806
1900
|
}
|
|
1807
|
-
|
|
1808
|
-
function
|
|
1901
|
+
Be(r, Mn, { immediate: !0 });
|
|
1902
|
+
function we(e) {
|
|
1809
1903
|
var a, t, n;
|
|
1810
1904
|
return {
|
|
1811
|
-
minHoursPerDay: ((a = e.workingHours) == null ? void 0 : a.minHoursPerDay) ??
|
|
1812
|
-
maxHoursPerDay: ((t = e.workingHours) == null ? void 0 : t.maxHoursPerDay) ??
|
|
1813
|
-
maxHoursPerWeek: ((n = e.workingHours) == null ? void 0 : n.maxHoursPerWeek) ??
|
|
1905
|
+
minHoursPerDay: ((a = e.workingHours) == null ? void 0 : a.minHoursPerDay) ?? N.workingHours.minHoursPerDay,
|
|
1906
|
+
maxHoursPerDay: ((t = e.workingHours) == null ? void 0 : t.maxHoursPerDay) ?? N.workingHours.maxHoursPerDay,
|
|
1907
|
+
maxHoursPerWeek: ((n = e.workingHours) == null ? void 0 : n.maxHoursPerWeek) ?? N.workingHours.maxHoursPerWeek
|
|
1814
1908
|
};
|
|
1815
1909
|
}
|
|
1816
|
-
function
|
|
1910
|
+
function Nn(e) {
|
|
1817
1911
|
return e.reduce(
|
|
1818
1912
|
(a, t) => {
|
|
1819
|
-
const n =
|
|
1913
|
+
const n = we(t).maxHoursPerWeek;
|
|
1820
1914
|
return t.employmentType === "FULLTIME" && n != null ? Math.max(a, n) : a;
|
|
1821
1915
|
},
|
|
1822
1916
|
0
|
|
1823
1917
|
);
|
|
1824
1918
|
}
|
|
1825
|
-
function
|
|
1919
|
+
function Ln(e, a) {
|
|
1826
1920
|
if (e.wage.type === "HOURLY") return e.wage.amount;
|
|
1827
|
-
const t =
|
|
1921
|
+
const t = we(e).maxHoursPerWeek ?? a;
|
|
1828
1922
|
return t ? e.wage.amount / (t * (52 / 12)) : 0;
|
|
1829
1923
|
}
|
|
1830
|
-
function
|
|
1924
|
+
function On(e, a) {
|
|
1831
1925
|
if (e.employmentType === "FULLTIME") return 100;
|
|
1832
|
-
const t =
|
|
1926
|
+
const t = we(e).maxHoursPerWeek;
|
|
1833
1927
|
return !a || t == null ? 0 : Math.min(99, Math.round(t / a * 100));
|
|
1834
1928
|
}
|
|
1835
|
-
function
|
|
1929
|
+
function In(e) {
|
|
1836
1930
|
var a;
|
|
1837
1931
|
return {
|
|
1838
1932
|
start: e.startTime,
|
|
@@ -1841,12 +1935,12 @@ function Pn(e) {
|
|
|
1841
1935
|
// stay blank rather than falling back to the employee's own primary position, or a reload
|
|
1842
1936
|
// silently reassigns every "Any position" shift to whatever station the employee is normally
|
|
1843
1937
|
// pinned to.
|
|
1844
|
-
role:
|
|
1938
|
+
role: re(e.position) ?? "",
|
|
1845
1939
|
positionId: ((a = e.position) == null ? void 0 : a.positionId) || void 0,
|
|
1846
1940
|
// Mongo distinguishes a draft from a published/confirmed assignment; the board's third
|
|
1847
1941
|
// state ('ot') is a costing outcome, never something stored.
|
|
1848
1942
|
status: e.status === "DRAFT" ? "pending" : "confirmed",
|
|
1849
|
-
breakMins:
|
|
1943
|
+
breakMins: ea(e.breaks),
|
|
1850
1944
|
breaks: e.breaks,
|
|
1851
1945
|
// Carried through so an edit updates this same ScheduleShiftAssignments document instead of
|
|
1852
1946
|
// creating a duplicate — see useScheduleBoard's commitShift/persistSlot.
|
|
@@ -1854,10 +1948,10 @@ function Pn(e) {
|
|
|
1854
1948
|
updatedAt: e.updatedAt
|
|
1855
1949
|
};
|
|
1856
1950
|
}
|
|
1857
|
-
function
|
|
1951
|
+
function Tn(e) {
|
|
1858
1952
|
return e.type === "OFF_DAY" ? "Off day" : e.leaveType === "MEDICAL" ? "Medical Leave" : e.leaveType === "EMERGENCY" ? "Emergency Leave" : e.leaveType === "UNPAID" ? "Unpaid Leave" : "Annual Leave";
|
|
1859
1953
|
}
|
|
1860
|
-
function
|
|
1954
|
+
function Rn(e, a) {
|
|
1861
1955
|
if (a < e.startDate || a > e.endDate) return null;
|
|
1862
1956
|
const n = e.startDate === e.endDate || a === e.startDate ? e.startPart : a === e.endDate ? e.endPart : "FULL_DAY";
|
|
1863
1957
|
return {
|
|
@@ -1865,12 +1959,12 @@ function Nn(e, a) {
|
|
|
1865
1959
|
type: e.type,
|
|
1866
1960
|
leaveType: e.leaveType ?? void 0,
|
|
1867
1961
|
timeOff: e.status === "PENDING" ? "pending" : "approved",
|
|
1868
|
-
reason:
|
|
1962
|
+
reason: Tn(e),
|
|
1869
1963
|
half: n !== "FULL_DAY",
|
|
1870
1964
|
halfPart: n === "FULL_DAY" ? void 0 : n
|
|
1871
1965
|
};
|
|
1872
1966
|
}
|
|
1873
|
-
function
|
|
1967
|
+
function $n(e) {
|
|
1874
1968
|
return {
|
|
1875
1969
|
employeeId: e._id,
|
|
1876
1970
|
name: e.name,
|
|
@@ -1881,52 +1975,52 @@ function kn(e) {
|
|
|
1881
1975
|
availability: []
|
|
1882
1976
|
};
|
|
1883
1977
|
}
|
|
1884
|
-
function
|
|
1885
|
-
const a =
|
|
1978
|
+
function Bn(e) {
|
|
1979
|
+
const a = se[m.value];
|
|
1886
1980
|
return !a || !e.includes(a) ? e : [a, ...e.filter((t) => t !== a)];
|
|
1887
1981
|
}
|
|
1888
|
-
function
|
|
1982
|
+
function xn(e) {
|
|
1889
1983
|
var n;
|
|
1890
|
-
const t = (
|
|
1891
|
-
return t.length ?
|
|
1984
|
+
const t = (na.value[e] ?? ((n = le.value.find((o) => o._id === e)) == null ? void 0 : n.restaurantRole.map((o) => o.restaurantId)) ?? []).map((o) => se[o]).filter((o) => !!o);
|
|
1985
|
+
return t.length ? Bn([...new Set(t)]) : void 0;
|
|
1892
1986
|
}
|
|
1893
|
-
function
|
|
1987
|
+
function ts(e = []) {
|
|
1894
1988
|
const a = r.value;
|
|
1895
1989
|
if (!a) return [];
|
|
1896
1990
|
const t = new Map(a.employees.map((s) => [s.employeeId, s])), n = new Map(
|
|
1897
|
-
|
|
1898
|
-
), o =
|
|
1991
|
+
V.value.map((s) => [s.employeeId, s])
|
|
1992
|
+
), o = le.value.filter((s) => {
|
|
1899
1993
|
var d;
|
|
1900
1994
|
return ((d = n.get(s._id)) == null ? void 0 : d.enabled) !== !1;
|
|
1901
|
-
}).map((s) => t.get(s._id) ??
|
|
1995
|
+
}).map((s) => t.get(s._id) ?? $n(s)), i = Nn(o), u = /* @__PURE__ */ new Map();
|
|
1902
1996
|
for (const s of a.assignments) {
|
|
1903
|
-
const d = `${s.employeeId}|${s.date}`,
|
|
1904
|
-
|
|
1997
|
+
const d = `${s.employeeId}|${s.date}`, D = u.get(d);
|
|
1998
|
+
D ? D.push(s) : u.set(d, [s]);
|
|
1905
1999
|
}
|
|
1906
2000
|
return o.map((s) => {
|
|
1907
|
-
const d =
|
|
2001
|
+
const d = le.value.find((v) => v._id === s.employeeId) ?? {
|
|
1908
2002
|
name: s.name,
|
|
1909
2003
|
code: void 0,
|
|
1910
2004
|
passcode: "",
|
|
1911
2005
|
isMasterUser: !1
|
|
1912
|
-
},
|
|
1913
|
-
...
|
|
1914
|
-
...s.secondaryPositions.filter((
|
|
1915
|
-
],
|
|
1916
|
-
const
|
|
1917
|
-
return (a.timeOff ?? []).filter((
|
|
1918
|
-
}),
|
|
1919
|
-
const
|
|
1920
|
-
return
|
|
1921
|
-
}),
|
|
2006
|
+
}, D = we(s), p = Cn(s.employeeId), H = new Set(W.map((v) => v.id)), $ = new Set(W.map((v) => v.name.toLocaleLowerCase())), F = (v) => v.positionId ? H.has(v.positionId) : $.has(v.positionName.toLocaleLowerCase()), B = re(s.primaryPosition), f = !!s.primaryPosition && F(s.primaryPosition), b = s.secondaryPositions.filter(F).map((v) => re(v)).filter((v) => !!v), _ = B ? f ? [B, ...b] : [] : b, I = [
|
|
2007
|
+
...B && !f ? [B] : [],
|
|
2008
|
+
...s.secondaryPositions.filter((v) => !F(v)).map((v) => re(v)).filter((v) => !!v)
|
|
2009
|
+
], de = _[0] ?? "", K = e.map((v) => {
|
|
2010
|
+
const k = j(v);
|
|
2011
|
+
return (a.timeOff ?? []).filter((E) => E.employeeId === s.employeeId).map((E) => Rn(E, k)).find((E) => E !== null) ?? null;
|
|
2012
|
+
}), L = e.map((v) => {
|
|
2013
|
+
const k = j(v), P = (u.get(`${s.employeeId}|${k}`) ?? []).filter((U) => U.startTime && U.endTime).map((U) => In(U)).sort((U, ye) => U.start.localeCompare(ye.start));
|
|
2014
|
+
return P.length ? P.length === 1 ? P[0] : P : null;
|
|
2015
|
+
}), ee = s.availability.length > 0, ce = Array.from(
|
|
1922
2016
|
{ length: 7 },
|
|
1923
|
-
(
|
|
1924
|
-
),
|
|
1925
|
-
const
|
|
1926
|
-
return { from: (
|
|
2017
|
+
(v, k) => ee ? s.availability.some((E) => ue(E.dayOfWeek) === k) : !0
|
|
2018
|
+
), me = Array.from({ length: 7 }, (v, k) => {
|
|
2019
|
+
const E = s.availability.find((P) => ue(P.dayOfWeek) === k);
|
|
2020
|
+
return { from: (E == null ? void 0 : E.start) ?? "", to: (E == null ? void 0 : E.end) ?? "" };
|
|
1927
2021
|
});
|
|
1928
2022
|
return {
|
|
1929
|
-
id:
|
|
2023
|
+
id: p,
|
|
1930
2024
|
sourceId: s.employeeId,
|
|
1931
2025
|
// Employee page edits update the POS employee name. Use that as the display
|
|
1932
2026
|
// source so Scheduling reflects those changes after its roster refresh.
|
|
@@ -1938,98 +2032,98 @@ function Uo(e = []) {
|
|
|
1938
2032
|
code: d.code,
|
|
1939
2033
|
masterUser: d.isMasterUser,
|
|
1940
2034
|
employmentType: s.employmentType,
|
|
1941
|
-
role:
|
|
1942
|
-
initials:
|
|
1943
|
-
color:
|
|
2035
|
+
role: de,
|
|
2036
|
+
initials: kn(d.name),
|
|
2037
|
+
color: Ge[(p - aa - 1) % Ge.length],
|
|
1944
2038
|
// Gross hours actually rostered this week — the figure the cost rail multiplies by
|
|
1945
2039
|
// the rate. Contracted hours are a separate question, answered by RULES.contract.
|
|
1946
2040
|
// Rounded to one decimal — `hoursBetween` divides by 60, so an unrounded sum reads
|
|
1947
2041
|
// as a long, meaningless float (e.g. 31.983333333333334) everywhere this is shown
|
|
1948
2042
|
// verbatim, matching the rounding `employeeLoadOf`'s own hours figure already uses.
|
|
1949
2043
|
weekHours: Math.round(
|
|
1950
|
-
|
|
1951
|
-
(
|
|
1952
|
-
(
|
|
2044
|
+
L.reduce(
|
|
2045
|
+
(v, k) => v + (Array.isArray(k) ? k : k && "start" in k ? [k] : []).reduce(
|
|
2046
|
+
(E, P) => E + Sn(P.start, P.end),
|
|
1953
2047
|
0
|
|
1954
2048
|
),
|
|
1955
2049
|
0
|
|
1956
2050
|
) * 10
|
|
1957
2051
|
) / 10,
|
|
1958
|
-
pct:
|
|
1959
|
-
contractHours:
|
|
1960
|
-
minHoursPerDay:
|
|
2052
|
+
pct: On(s, i),
|
|
2053
|
+
contractHours: D.maxHoursPerWeek ?? void 0,
|
|
2054
|
+
minHoursPerDay: D.minHoursPerDay ?? void 0,
|
|
1961
2055
|
// Keep the persisted override shape here. Consumers that need the effective value use
|
|
1962
2056
|
// effectiveWorkingHours(), so an inherited null remains distinguishable from an override.
|
|
1963
2057
|
workingHours: s.workingHours,
|
|
1964
2058
|
// Every outlet the POS says this person works at, not just this one — the Add / Edit form
|
|
1965
2059
|
// shows them, and saving keeps them.
|
|
1966
|
-
locations:
|
|
1967
|
-
rate:
|
|
1968
|
-
positions:
|
|
1969
|
-
archivedPositions:
|
|
1970
|
-
shifts:
|
|
1971
|
-
timeOff:
|
|
2060
|
+
locations: xn(s.employeeId),
|
|
2061
|
+
rate: Ln(s, i),
|
|
2062
|
+
positions: _,
|
|
2063
|
+
archivedPositions: I.length ? I : void 0,
|
|
2064
|
+
shifts: L,
|
|
2065
|
+
timeOff: K,
|
|
1972
2066
|
// Remarks live in their own collection in the older scheduling design and are not
|
|
1973
2067
|
// part of this board's payload yet.
|
|
1974
2068
|
remarks: [],
|
|
1975
|
-
section:
|
|
2069
|
+
section: ra,
|
|
1976
2070
|
payBasis: s.wage.type === "HOURLY" ? "hourly" : "monthly",
|
|
1977
2071
|
payAmount: s.wage.amount,
|
|
1978
|
-
availDays:
|
|
1979
|
-
availHours:
|
|
2072
|
+
availDays: ce,
|
|
2073
|
+
availHours: me
|
|
1980
2074
|
};
|
|
1981
2075
|
});
|
|
1982
2076
|
}
|
|
1983
|
-
function
|
|
2077
|
+
function ns() {
|
|
1984
2078
|
return [];
|
|
1985
2079
|
}
|
|
1986
|
-
function
|
|
2080
|
+
function os() {
|
|
1987
2081
|
var n, o;
|
|
1988
2082
|
const e = r.value, a = {}, t = {};
|
|
1989
2083
|
for (const i of (e == null ? void 0 : e.demands) ?? []) {
|
|
1990
|
-
const
|
|
1991
|
-
if (!
|
|
1992
|
-
let s =
|
|
1993
|
-
s || (s = { from: i.startTime, to: i.endTime, n: 0, roles: [] },
|
|
1994
|
-
position:
|
|
2084
|
+
const u = i.date ? a[n = i.date] ?? (a[n] = []) : i.dayOfWeek !== null ? t[o = ue(i.dayOfWeek)] ?? (t[o] = []) : null;
|
|
2085
|
+
if (!u) continue;
|
|
2086
|
+
let s = u.find((d) => d.from === i.startTime && d.to === i.endTime);
|
|
2087
|
+
s || (s = { from: i.startTime, to: i.endTime, n: 0, roles: [] }, u.push(s)), s.n += i.headcount, i.position && s.roles.push({
|
|
2088
|
+
position: re(i.position) ?? "",
|
|
1995
2089
|
positionId: i.position.positionId || void 0,
|
|
1996
2090
|
n: i.headcount
|
|
1997
2091
|
});
|
|
1998
2092
|
}
|
|
1999
2093
|
return { byDate: a, byWeekday: t };
|
|
2000
2094
|
}
|
|
2001
|
-
function
|
|
2002
|
-
const e =
|
|
2003
|
-
let
|
|
2004
|
-
const s =
|
|
2005
|
-
() => a.value.filter((
|
|
2095
|
+
function ss() {
|
|
2096
|
+
const e = Je(), { restaurants: a, readRestaurants: t } = Ca(), n = Pa(), o = Sa(), i = S(!1);
|
|
2097
|
+
let u = () => !0;
|
|
2098
|
+
const s = Y(
|
|
2099
|
+
() => a.value.filter((f) => f.managable).map((f) => ({ value: f._id, label: f.profile.name })).sort((f, b) => f.label.localeCompare(b.label))
|
|
2006
2100
|
), d = () => {
|
|
2007
|
-
var
|
|
2008
|
-
return `hrm-schedule-outlet:${((
|
|
2009
|
-
},
|
|
2010
|
-
var
|
|
2011
|
-
return ((
|
|
2101
|
+
var f;
|
|
2102
|
+
return `hrm-schedule-outlet:${((f = e.currentBusiness.value) == null ? void 0 : f._id) ?? ""}`;
|
|
2103
|
+
}, D = Y(() => {
|
|
2104
|
+
var f;
|
|
2105
|
+
return ((f = e.currentRestaurant.value) == null ? void 0 : f._id) ?? "";
|
|
2012
2106
|
});
|
|
2013
|
-
async function
|
|
2014
|
-
return
|
|
2107
|
+
async function p(f, b) {
|
|
2108
|
+
return f !== m.value && !await u(f) || !ze(f) ? !1 : (localStorage.setItem(d(), f), n.query.restaurantId !== f && o.replace({ query: { ...n.query, restaurantId: f } }), await Promise.all([Ie(f), za(b)]), !0);
|
|
2015
2109
|
}
|
|
2016
|
-
function
|
|
2017
|
-
|
|
2110
|
+
function H(f) {
|
|
2111
|
+
u = f;
|
|
2018
2112
|
}
|
|
2019
|
-
const
|
|
2020
|
-
async function
|
|
2021
|
-
var
|
|
2022
|
-
await t(),
|
|
2023
|
-
const
|
|
2024
|
-
return b &&
|
|
2113
|
+
const $ = (f) => !!f && s.value.some((b) => b.value === f);
|
|
2114
|
+
async function F() {
|
|
2115
|
+
var _;
|
|
2116
|
+
await t(), Ke.splice(0, Ke.length, ...s.value.map((I) => I.label)), Object.keys(se).forEach((I) => delete se[I]), a.value.forEach((I) => se[I._id] = I.profile.name);
|
|
2117
|
+
const f = localStorage.getItem(d()) ?? "", b = [m.value, f, D.value].find($) ?? ((_ = s.value[0]) == null ? void 0 : _.value) ?? "";
|
|
2118
|
+
return b && ze(b), i.value = !0, b;
|
|
2025
2119
|
}
|
|
2026
|
-
async function
|
|
2027
|
-
const
|
|
2028
|
-
return
|
|
2120
|
+
async function B() {
|
|
2121
|
+
const f = await F();
|
|
2122
|
+
return f && await Ie(f), f;
|
|
2029
2123
|
}
|
|
2030
|
-
return { options: s, ready: i, outletId: m, resolve:
|
|
2124
|
+
return { options: s, ready: i, outletId: m, resolve: B, resolveOutlet: F, switchTo: p, setBeforeSwitch: H };
|
|
2031
2125
|
}
|
|
2032
|
-
const
|
|
2126
|
+
const Yn = ["data-hierarchy", "data-size", "data-icon"], is = /* @__PURE__ */ xe({
|
|
2033
2127
|
__name: "ScheduleButton",
|
|
2034
2128
|
props: {
|
|
2035
2129
|
hierarchy: { default: "primary" },
|
|
@@ -2037,32 +2131,32 @@ const Mn = ["data-hierarchy", "data-size", "data-icon"], Ko = /* @__PURE__ */ Oe
|
|
|
2037
2131
|
iconOnly: { type: Boolean, default: !1 }
|
|
2038
2132
|
},
|
|
2039
2133
|
setup(e) {
|
|
2040
|
-
return (a, t) => (
|
|
2134
|
+
return (a, t) => (C(), M("button", {
|
|
2041
2135
|
type: "button",
|
|
2042
2136
|
class: "sch-button",
|
|
2043
2137
|
"data-hierarchy": e.hierarchy,
|
|
2044
2138
|
"data-size": e.size,
|
|
2045
2139
|
"data-icon": e.iconOnly ? "only" : void 0
|
|
2046
2140
|
}, [
|
|
2047
|
-
|
|
2048
|
-
], 8,
|
|
2141
|
+
Xe(a.$slots, "default")
|
|
2142
|
+
], 8, Yn));
|
|
2049
2143
|
}
|
|
2050
|
-
}),
|
|
2144
|
+
}), Fn = ["disabled", "aria-expanded"], _n = { class: "fx-btn-label" }, Un = { class: "sch" }, Wn = ["aria-multiselectable"], Kn = {
|
|
2051
2145
|
key: 0,
|
|
2052
2146
|
class: "fx-pop-head"
|
|
2053
|
-
},
|
|
2147
|
+
}, zn = {
|
|
2054
2148
|
key: 1,
|
|
2055
2149
|
class: "fx-pop-search"
|
|
2056
|
-
},
|
|
2150
|
+
}, Vn = ["placeholder", "aria-label"], jn = {
|
|
2057
2151
|
key: 2,
|
|
2058
2152
|
class: "fx-opt is-off"
|
|
2059
|
-
},
|
|
2153
|
+
}, Gn = {
|
|
2060
2154
|
key: 0,
|
|
2061
2155
|
class: "fx-grp"
|
|
2062
|
-
},
|
|
2156
|
+
}, Qn = ["aria-selected", "onClick"], Xn = {
|
|
2063
2157
|
key: 0,
|
|
2064
2158
|
class: "fx-opt-text"
|
|
2065
|
-
},
|
|
2159
|
+
}, Jn = { key: 0 }, rs = /* @__PURE__ */ xe({
|
|
2066
2160
|
inheritAttrs: !1,
|
|
2067
2161
|
__name: "ScheduleSelect",
|
|
2068
2162
|
props: {
|
|
@@ -2080,204 +2174,204 @@ const Mn = ["data-hierarchy", "data-size", "data-icon"], Ko = /* @__PURE__ */ Oe
|
|
|
2080
2174
|
},
|
|
2081
2175
|
emits: ["update:modelValue", "toggle"],
|
|
2082
2176
|
setup(e, { emit: a }) {
|
|
2083
|
-
const t =
|
|
2084
|
-
|
|
2085
|
-
|
|
2177
|
+
const { t } = ka(), n = e, o = a, i = ha(), u = Y(() => i.class ?? ""), s = S(!1), d = S(!1), D = S(null), p = S(null), H = S(null), $ = Y(() => n.teleport !== !1 && d.value);
|
|
2178
|
+
Re(() => {
|
|
2179
|
+
d.value = typeof document < "u" && !!document.body;
|
|
2086
2180
|
});
|
|
2087
|
-
const
|
|
2088
|
-
var
|
|
2089
|
-
if (
|
|
2090
|
-
if (
|
|
2091
|
-
const c = ((
|
|
2092
|
-
return c ?
|
|
2181
|
+
const F = Y(() => {
|
|
2182
|
+
var l, y;
|
|
2183
|
+
if (n.selectedLabel != null) return n.selectedLabel;
|
|
2184
|
+
if (n.multiple) {
|
|
2185
|
+
const c = ((l = n.selected) == null ? void 0 : l.length) ?? 0;
|
|
2186
|
+
return c ? t("scheduling.filter.selectedCount", { count: c }) : n.placeholder ?? "";
|
|
2093
2187
|
}
|
|
2094
|
-
return ((y =
|
|
2188
|
+
return ((y = n.options.find((c) => c.value === n.modelValue)) == null ? void 0 : y.label) ?? n.placeholder ?? "";
|
|
2095
2189
|
});
|
|
2096
|
-
function
|
|
2190
|
+
function B(l) {
|
|
2097
2191
|
var y;
|
|
2098
|
-
return
|
|
2192
|
+
return n.multiple ? !!((y = n.selected) != null && y.includes(l.value)) : n.selectedId != null ? l.id === n.selectedId : l.value === n.modelValue;
|
|
2099
2193
|
}
|
|
2100
|
-
const
|
|
2101
|
-
const
|
|
2102
|
-
return !
|
|
2103
|
-
}),
|
|
2104
|
-
const
|
|
2194
|
+
const f = Y(() => !!n.menuTitle || n.options.some((l) => l.hint)), b = S(""), _ = S(null), I = Y(() => {
|
|
2195
|
+
const l = b.value.trim().toLowerCase();
|
|
2196
|
+
return !n.searchable || !l ? n.options : n.options.filter((y) => `${y.label} ${y.hint ?? ""}`.toLowerCase().includes(l));
|
|
2197
|
+
}), de = Y(() => {
|
|
2198
|
+
const l = [];
|
|
2105
2199
|
let y;
|
|
2106
|
-
for (const c of
|
|
2107
|
-
c.group !== y && (y = c.group, y &&
|
|
2108
|
-
return
|
|
2109
|
-
}),
|
|
2110
|
-
function
|
|
2111
|
-
const
|
|
2112
|
-
if (!
|
|
2113
|
-
const c = y.getBoundingClientRect(),
|
|
2114
|
-
|
|
2115
|
-
const
|
|
2116
|
-
|
|
2117
|
-
const
|
|
2118
|
-
let
|
|
2119
|
-
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2200
|
+
for (const c of I.value)
|
|
2201
|
+
c.group !== y && (y = c.group, y && l.push({ heading: y })), l.push({ option: c });
|
|
2202
|
+
return l;
|
|
2203
|
+
}), K = 5, L = 8;
|
|
2204
|
+
function ee() {
|
|
2205
|
+
const l = H.value, y = p.value;
|
|
2206
|
+
if (!l || !y) return;
|
|
2207
|
+
const c = y.getBoundingClientRect(), O = window.innerWidth || document.documentElement.clientWidth, R = window.innerHeight || document.documentElement.clientHeight;
|
|
2208
|
+
l.style.minWidth = `${Math.round(c.width)}px`, l.style.maxWidth = `${Math.max(180, Math.round(O - L * 2))}px`;
|
|
2209
|
+
const ae = R - c.bottom - K - L, ma = c.top - K - L;
|
|
2210
|
+
l.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(ae, ma)))}px`;
|
|
2211
|
+
const fe = l.offsetHeight, ya = l.offsetWidth;
|
|
2212
|
+
let He = c.bottom + K;
|
|
2213
|
+
He + fe > R - L && (He = c.top - K - fe >= L ? c.top - K - fe : Math.max(L, R - fe - L));
|
|
2214
|
+
const fa = Math.min(Math.max(L, c.left), Math.max(L, O - ya - L));
|
|
2215
|
+
l.style.top = `${Math.round(He)}px`, l.style.left = `${Math.round(fa)}px`, l.style.visibility = "visible";
|
|
2122
2216
|
}
|
|
2123
|
-
function
|
|
2124
|
-
var c,
|
|
2125
|
-
const y =
|
|
2126
|
-
y && ((c =
|
|
2217
|
+
function ce(l) {
|
|
2218
|
+
var c, O;
|
|
2219
|
+
const y = l.target;
|
|
2220
|
+
y && ((c = D.value) != null && c.contains(y) || (O = H.value) != null && O.contains(y)) || P();
|
|
2127
2221
|
}
|
|
2128
|
-
function
|
|
2129
|
-
const y =
|
|
2222
|
+
function me(l) {
|
|
2223
|
+
const y = H.value, c = l.target;
|
|
2130
2224
|
if (y && c && c !== document && y.contains(c)) return;
|
|
2131
|
-
const
|
|
2132
|
-
if (!
|
|
2133
|
-
const R =
|
|
2134
|
-
if (R.bottom < 0 || R.top >
|
|
2135
|
-
|
|
2225
|
+
const O = p.value;
|
|
2226
|
+
if (!O) return;
|
|
2227
|
+
const R = O.getBoundingClientRect(), ae = window.innerHeight || document.documentElement.clientHeight;
|
|
2228
|
+
if (R.bottom < 0 || R.top > ae) {
|
|
2229
|
+
P();
|
|
2136
2230
|
return;
|
|
2137
2231
|
}
|
|
2138
|
-
|
|
2232
|
+
ee();
|
|
2139
2233
|
}
|
|
2140
|
-
function
|
|
2141
|
-
document.addEventListener("click",
|
|
2234
|
+
function v() {
|
|
2235
|
+
document.addEventListener("click", ce), document.addEventListener("scroll", me, !0), window.addEventListener("resize", P);
|
|
2142
2236
|
}
|
|
2143
|
-
function
|
|
2144
|
-
document.removeEventListener("click",
|
|
2237
|
+
function k() {
|
|
2238
|
+
document.removeEventListener("click", ce), document.removeEventListener("scroll", me, !0), window.removeEventListener("resize", P);
|
|
2145
2239
|
}
|
|
2146
2240
|
async function E() {
|
|
2147
|
-
var
|
|
2148
|
-
|
|
2241
|
+
var l, y, c;
|
|
2242
|
+
n.disabled || s.value || (b.value = "", s.value = !0, await ke(), ee(), (l = _.value) == null || l.focus(), (c = (y = H.value) == null ? void 0 : y.querySelector(".fx-opt.is-on")) == null || c.scrollIntoView({ block: "nearest" }), v());
|
|
2149
2243
|
}
|
|
2150
|
-
function
|
|
2151
|
-
|
|
2244
|
+
function P() {
|
|
2245
|
+
s.value && (s.value = !1, b.value = "", k());
|
|
2152
2246
|
}
|
|
2153
|
-
|
|
2154
|
-
|
|
2247
|
+
Be(b, async () => {
|
|
2248
|
+
s.value && (await ke(), ee());
|
|
2155
2249
|
});
|
|
2156
|
-
function
|
|
2250
|
+
function U(l) {
|
|
2157
2251
|
var y;
|
|
2158
|
-
if (
|
|
2159
|
-
|
|
2160
|
-
else if (
|
|
2161
|
-
|
|
2162
|
-
const c =
|
|
2163
|
-
c &&
|
|
2252
|
+
if (l.key === "Escape")
|
|
2253
|
+
l.preventDefault(), P(), (y = p.value) == null || y.focus();
|
|
2254
|
+
else if (l.key === "Enter") {
|
|
2255
|
+
l.preventDefault();
|
|
2256
|
+
const c = I.value.find((O) => !O.disabled);
|
|
2257
|
+
c && Ye(c);
|
|
2164
2258
|
}
|
|
2165
2259
|
}
|
|
2166
|
-
function
|
|
2167
|
-
|
|
2260
|
+
function ye() {
|
|
2261
|
+
s.value ? P() : E();
|
|
2168
2262
|
}
|
|
2169
|
-
function
|
|
2170
|
-
if (!
|
|
2171
|
-
if (
|
|
2172
|
-
|
|
2263
|
+
function Ye(l) {
|
|
2264
|
+
if (!l.disabled) {
|
|
2265
|
+
if (n.multiple && !l.command) {
|
|
2266
|
+
o("toggle", l.value);
|
|
2173
2267
|
return;
|
|
2174
2268
|
}
|
|
2175
|
-
if (
|
|
2176
|
-
|
|
2269
|
+
if (P(), n.multiple) {
|
|
2270
|
+
o("update:modelValue", l.value);
|
|
2177
2271
|
return;
|
|
2178
2272
|
}
|
|
2179
|
-
|
|
2273
|
+
l.value !== n.modelValue && o("update:modelValue", l.value);
|
|
2180
2274
|
}
|
|
2181
2275
|
}
|
|
2182
|
-
const
|
|
2183
|
-
function
|
|
2184
|
-
const y =
|
|
2185
|
-
if (
|
|
2276
|
+
const ua = Y(() => n.options.filter((l) => !l.disabled));
|
|
2277
|
+
function da(l) {
|
|
2278
|
+
const y = ua.value;
|
|
2279
|
+
if (n.multiple || !y.length) {
|
|
2186
2280
|
E();
|
|
2187
2281
|
return;
|
|
2188
2282
|
}
|
|
2189
|
-
const c = y.findIndex((
|
|
2190
|
-
R && R.value !==
|
|
2283
|
+
const c = y.findIndex((ae) => ae.value === n.modelValue), O = l === "Home" ? 0 : l === "End" ? y.length - 1 : l === "ArrowDown" ? Math.min(y.length - 1, (c < 0 ? -1 : c) + 1) : Math.max(0, (c < 0 ? 1 : c) - 1), R = y[O];
|
|
2284
|
+
R && R.value !== n.modelValue ? o("update:modelValue", R.value) : E();
|
|
2191
2285
|
}
|
|
2192
|
-
function
|
|
2286
|
+
function ca(l) {
|
|
2193
2287
|
var y;
|
|
2194
|
-
if (
|
|
2195
|
-
if (!
|
|
2196
|
-
|
|
2288
|
+
if (l.key === "Escape") {
|
|
2289
|
+
if (!s.value) return;
|
|
2290
|
+
l.preventDefault(), P(), (y = p.value) == null || y.focus();
|
|
2197
2291
|
return;
|
|
2198
2292
|
}
|
|
2199
|
-
if (
|
|
2200
|
-
|
|
2293
|
+
if (l.key === "Enter" || l.key === " ") {
|
|
2294
|
+
l.preventDefault(), ye();
|
|
2201
2295
|
return;
|
|
2202
2296
|
}
|
|
2203
|
-
|
|
2297
|
+
l.key !== "ArrowDown" && l.key !== "ArrowUp" && l.key !== "Home" && l.key !== "End" || (l.preventDefault(), da(l.key));
|
|
2204
2298
|
}
|
|
2205
|
-
return
|
|
2299
|
+
return $e(k), (l, y) => (C(), M("div", {
|
|
2206
2300
|
ref_key: "rootEl",
|
|
2207
|
-
ref:
|
|
2208
|
-
class: pe(["fx-sel",
|
|
2301
|
+
ref: D,
|
|
2302
|
+
class: pe(["fx-sel", u.value])
|
|
2209
2303
|
}, [
|
|
2210
|
-
|
|
2304
|
+
x("button", va({
|
|
2211
2305
|
ref_key: "btnEl",
|
|
2212
|
-
ref:
|
|
2213
|
-
},
|
|
2306
|
+
ref: p
|
|
2307
|
+
}, l.$attrs, {
|
|
2214
2308
|
type: "button",
|
|
2215
|
-
class: ["sch-input fx-btn", { "is-open":
|
|
2309
|
+
class: ["sch-input fx-btn", { "is-open": s.value }],
|
|
2216
2310
|
disabled: e.disabled,
|
|
2217
2311
|
"aria-haspopup": "listbox",
|
|
2218
|
-
"aria-expanded":
|
|
2219
|
-
onClick: y[0] || (y[0] = (c) =>
|
|
2220
|
-
onKeydown:
|
|
2312
|
+
"aria-expanded": s.value,
|
|
2313
|
+
onClick: y[0] || (y[0] = (c) => ye()),
|
|
2314
|
+
onKeydown: ca
|
|
2221
2315
|
}), [
|
|
2222
|
-
|
|
2223
|
-
], 16,
|
|
2224
|
-
(
|
|
2316
|
+
x("span", _n, z(F.value), 1)
|
|
2317
|
+
], 16, Fn),
|
|
2318
|
+
(C(), pa(ga, {
|
|
2225
2319
|
to: "body",
|
|
2226
|
-
disabled:
|
|
2320
|
+
disabled: !$.value
|
|
2227
2321
|
}, [
|
|
2228
|
-
|
|
2229
|
-
|
|
2322
|
+
x("div", Un, [
|
|
2323
|
+
s.value ? (C(), M("div", {
|
|
2230
2324
|
key: 0,
|
|
2231
2325
|
ref_key: "popEl",
|
|
2232
|
-
ref:
|
|
2233
|
-
class: pe(["fx-pop", { "fx-pop-rich":
|
|
2326
|
+
ref: H,
|
|
2327
|
+
class: pe(["fx-pop", { "fx-pop-rich": f.value }]),
|
|
2234
2328
|
role: "listbox",
|
|
2235
2329
|
"aria-multiselectable": e.multiple || void 0,
|
|
2236
2330
|
style: { visibility: "hidden" }
|
|
2237
2331
|
}, [
|
|
2238
|
-
e.menuTitle ? (
|
|
2239
|
-
e.searchable ? (
|
|
2240
|
-
|
|
2332
|
+
e.menuTitle ? (C(), M("div", Kn, z(e.menuTitle), 1)) : G("", !0),
|
|
2333
|
+
e.searchable ? (C(), M("div", zn, [
|
|
2334
|
+
Da(x("input", {
|
|
2241
2335
|
ref_key: "searchEl",
|
|
2242
|
-
ref:
|
|
2243
|
-
"onUpdate:modelValue": y[1] || (y[1] = (c) =>
|
|
2336
|
+
ref: _,
|
|
2337
|
+
"onUpdate:modelValue": y[1] || (y[1] = (c) => b.value = c),
|
|
2244
2338
|
class: "sch-input fx-pop-q",
|
|
2245
2339
|
type: "search",
|
|
2246
|
-
placeholder: "
|
|
2340
|
+
placeholder: Ee(t)("scheduling.filter.search"),
|
|
2247
2341
|
autocomplete: "off",
|
|
2248
2342
|
spellcheck: "false",
|
|
2249
|
-
"aria-label": "
|
|
2250
|
-
onKeydown:
|
|
2251
|
-
}, null,
|
|
2252
|
-
[
|
|
2343
|
+
"aria-label": Ee(t)("scheduling.filter.search"),
|
|
2344
|
+
onKeydown: U
|
|
2345
|
+
}, null, 40, Vn), [
|
|
2346
|
+
[wa, b.value]
|
|
2253
2347
|
])
|
|
2254
|
-
])) :
|
|
2255
|
-
e.searchable && !
|
|
2256
|
-
(
|
|
2348
|
+
])) : G("", !0),
|
|
2349
|
+
e.searchable && !de.value.length ? (C(), M("div", jn, z(Ee(t)("scheduling.filter.noMatches")), 1)) : G("", !0),
|
|
2350
|
+
(C(!0), M(be, null, Ha(de.value, (c) => (C(), M(be, {
|
|
2257
2351
|
key: "heading" in c ? `heading:${c.heading}` : `option:${c.option.value}`
|
|
2258
2352
|
}, [
|
|
2259
|
-
"heading" in c ? (
|
|
2353
|
+
"heading" in c ? (C(), M("div", Gn, z(c.heading), 1)) : (C(), M("div", {
|
|
2260
2354
|
key: 1,
|
|
2261
2355
|
class: pe(["fx-opt", {
|
|
2262
|
-
"is-on":
|
|
2356
|
+
"is-on": B(c.option),
|
|
2263
2357
|
"is-off": c.option.disabled,
|
|
2264
2358
|
"is-new": c.option.command
|
|
2265
2359
|
}]),
|
|
2266
2360
|
role: "option",
|
|
2267
|
-
"aria-selected":
|
|
2268
|
-
onClick: (
|
|
2361
|
+
"aria-selected": B(c.option),
|
|
2362
|
+
onClick: (O) => Ye(c.option)
|
|
2269
2363
|
}, [
|
|
2270
|
-
y[2] || (y[2] =
|
|
2364
|
+
y[2] || (y[2] = x("span", {
|
|
2271
2365
|
class: "fx-tick",
|
|
2272
2366
|
"aria-hidden": "true"
|
|
2273
2367
|
}, [
|
|
2274
|
-
|
|
2368
|
+
x("svg", {
|
|
2275
2369
|
width: "11",
|
|
2276
2370
|
height: "11",
|
|
2277
2371
|
viewBox: "0 0 16 16",
|
|
2278
2372
|
fill: "none"
|
|
2279
2373
|
}, [
|
|
2280
|
-
|
|
2374
|
+
x("path", {
|
|
2281
2375
|
d: "m3.5 8.4 3 3 6-7",
|
|
2282
2376
|
stroke: "currentColor",
|
|
2283
2377
|
"stroke-width": "2.2",
|
|
@@ -2286,20 +2380,20 @@ const Mn = ["data-hierarchy", "data-size", "data-icon"], Ko = /* @__PURE__ */ Oe
|
|
|
2286
2380
|
})
|
|
2287
2381
|
])
|
|
2288
2382
|
], -1)),
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
c.option.hint ? (
|
|
2292
|
-
])) : (
|
|
2293
|
-
|
|
2383
|
+
f.value ? (C(), M("span", Xn, [
|
|
2384
|
+
x("b", null, z(c.option.label), 1),
|
|
2385
|
+
c.option.hint ? (C(), M("small", Jn, z(c.option.hint), 1)) : G("", !0)
|
|
2386
|
+
])) : (C(), M(be, { key: 1 }, [
|
|
2387
|
+
Aa(z(c.option.label), 1)
|
|
2294
2388
|
], 64))
|
|
2295
|
-
], 10,
|
|
2389
|
+
], 10, Qn))
|
|
2296
2390
|
], 64))), 128))
|
|
2297
|
-
], 10,
|
|
2391
|
+
], 10, Wn)) : G("", !0)
|
|
2298
2392
|
])
|
|
2299
2393
|
], 8, ["disabled"]))
|
|
2300
2394
|
], 2));
|
|
2301
2395
|
}
|
|
2302
|
-
}),
|
|
2396
|
+
}), Zn = ["id", "aria-labelledby", "aria-label"], Qe = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', ls = /* @__PURE__ */ xe({
|
|
2303
2397
|
__name: "ScheduleModal",
|
|
2304
2398
|
props: {
|
|
2305
2399
|
open: { type: Boolean },
|
|
@@ -2311,12 +2405,12 @@ const Mn = ["data-hierarchy", "data-size", "data-icon"], Ko = /* @__PURE__ */ Oe
|
|
|
2311
2405
|
},
|
|
2312
2406
|
emits: ["close"],
|
|
2313
2407
|
setup(e, { emit: a }) {
|
|
2314
|
-
const t = e, n = a, o =
|
|
2408
|
+
const t = e, n = a, o = S(null);
|
|
2315
2409
|
let i = null;
|
|
2316
|
-
function
|
|
2317
|
-
|
|
2410
|
+
function u() {
|
|
2411
|
+
ke(() => {
|
|
2318
2412
|
const d = o.value;
|
|
2319
|
-
d && (d.querySelector(
|
|
2413
|
+
d && (d.querySelector(Qe) ?? d).focus();
|
|
2320
2414
|
});
|
|
2321
2415
|
}
|
|
2322
2416
|
function s(d) {
|
|
@@ -2326,132 +2420,137 @@ const Mn = ["data-hierarchy", "data-size", "data-icon"], Ko = /* @__PURE__ */ Oe
|
|
|
2326
2420
|
return;
|
|
2327
2421
|
}
|
|
2328
2422
|
if (d.key !== "Tab" || !o.value) return;
|
|
2329
|
-
const
|
|
2330
|
-
if (!
|
|
2331
|
-
const
|
|
2332
|
-
d.shiftKey && document.activeElement ===
|
|
2423
|
+
const D = Array.from(o.value.querySelectorAll(Qe));
|
|
2424
|
+
if (!D.length) return;
|
|
2425
|
+
const p = D[0], H = D[D.length - 1];
|
|
2426
|
+
d.shiftKey && document.activeElement === p ? (d.preventDefault(), H.focus()) : !d.shiftKey && document.activeElement === H && (d.preventDefault(), p.focus());
|
|
2333
2427
|
}
|
|
2334
|
-
return
|
|
2428
|
+
return Be(
|
|
2335
2429
|
() => t.open,
|
|
2336
2430
|
(d) => {
|
|
2337
|
-
d ? (i = document.activeElement instanceof HTMLElement ? document.activeElement : null,
|
|
2431
|
+
d ? (i = document.activeElement instanceof HTMLElement ? document.activeElement : null, u()) : (i == null || i.focus(), i = null);
|
|
2338
2432
|
},
|
|
2339
2433
|
{ immediate: !0 }
|
|
2340
|
-
),
|
|
2434
|
+
), Re(() => document.addEventListener("keydown", s)), $e(() => {
|
|
2341
2435
|
document.removeEventListener("keydown", s), i = null;
|
|
2342
|
-
}), (d,
|
|
2436
|
+
}), (d, D) => e.open ? (C(), M("div", {
|
|
2343
2437
|
key: 0,
|
|
2344
2438
|
class: "modal-overlay open",
|
|
2345
|
-
onClick:
|
|
2439
|
+
onClick: D[0] || (D[0] = Ea((p) => n("close"), ["self"]))
|
|
2346
2440
|
}, [
|
|
2347
|
-
|
|
2441
|
+
x("div", {
|
|
2348
2442
|
id: e.id,
|
|
2349
2443
|
ref_key: "panel",
|
|
2350
2444
|
ref: o,
|
|
2351
2445
|
class: pe(["schedule-modal-panel", e.panelClass]),
|
|
2352
|
-
style:
|
|
2446
|
+
style: ba(e.panelStyle),
|
|
2353
2447
|
role: "dialog",
|
|
2354
2448
|
"aria-modal": "true",
|
|
2355
2449
|
"aria-labelledby": e.labelledBy,
|
|
2356
2450
|
"aria-label": e.label,
|
|
2357
2451
|
tabindex: "-1"
|
|
2358
2452
|
}, [
|
|
2359
|
-
|
|
2360
|
-
], 14,
|
|
2361
|
-
])) :
|
|
2453
|
+
Xe(d.$slots, "default")
|
|
2454
|
+
], 14, Zn)
|
|
2455
|
+
])) : G("", !0);
|
|
2362
2456
|
}
|
|
2363
2457
|
});
|
|
2364
2458
|
export {
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2459
|
+
yo as $,
|
|
2460
|
+
jo as A,
|
|
2461
|
+
Pn as B,
|
|
2462
|
+
mo as C,
|
|
2463
|
+
uo as D,
|
|
2464
|
+
as as E,
|
|
2465
|
+
ro as F,
|
|
2466
|
+
qe as G,
|
|
2467
|
+
Me as H,
|
|
2468
|
+
Oa as I,
|
|
2469
|
+
fo as J,
|
|
2470
|
+
Co as K,
|
|
2471
|
+
Jo as L,
|
|
2472
|
+
Na as M,
|
|
2473
|
+
Wo as N,
|
|
2474
|
+
Uo as O,
|
|
2475
|
+
Ta as P,
|
|
2476
|
+
_o as Q,
|
|
2477
|
+
co as R,
|
|
2478
|
+
Go as S,
|
|
2479
|
+
ge as T,
|
|
2480
|
+
ra as U,
|
|
2481
|
+
Ho as V,
|
|
2482
|
+
Vo as W,
|
|
2483
|
+
V as X,
|
|
2484
|
+
Fa as Y,
|
|
2485
|
+
Ke as Z,
|
|
2486
|
+
qo as _,
|
|
2487
|
+
ts as a,
|
|
2488
|
+
Bn as a0,
|
|
2489
|
+
w as a1,
|
|
2490
|
+
ue as a2,
|
|
2491
|
+
re as a3,
|
|
2492
|
+
se as a4,
|
|
2493
|
+
bo as a5,
|
|
2494
|
+
So as a6,
|
|
2495
|
+
Te as a7,
|
|
2496
|
+
X as a8,
|
|
2497
|
+
Eo as a9,
|
|
2498
|
+
so as aA,
|
|
2499
|
+
ss as aB,
|
|
2500
|
+
wo as aC,
|
|
2501
|
+
Lo as aD,
|
|
2502
|
+
Mo as aE,
|
|
2503
|
+
le as aF,
|
|
2504
|
+
No as aG,
|
|
2505
|
+
_a as aa,
|
|
2506
|
+
ko as ab,
|
|
2507
|
+
j as ac,
|
|
2508
|
+
Cn as ad,
|
|
2509
|
+
$o as ae,
|
|
2510
|
+
To as af,
|
|
2511
|
+
Ro as ag,
|
|
2512
|
+
Zo as ah,
|
|
2513
|
+
za as ai,
|
|
2514
|
+
xo as aj,
|
|
2515
|
+
Ra as ak,
|
|
2516
|
+
io as al,
|
|
2517
|
+
Io as am,
|
|
2518
|
+
go as an,
|
|
2519
|
+
Ue as ao,
|
|
2520
|
+
os as ap,
|
|
2521
|
+
We as aq,
|
|
2522
|
+
ve as ar,
|
|
2523
|
+
Ie as as,
|
|
2524
|
+
Yo as at,
|
|
2525
|
+
Ao as au,
|
|
2526
|
+
is as av,
|
|
2527
|
+
oa as aw,
|
|
2528
|
+
rs as ax,
|
|
2529
|
+
ls as ay,
|
|
2530
|
+
W as az,
|
|
2531
|
+
N as b,
|
|
2532
|
+
ns as c,
|
|
2434
2533
|
J as d,
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2534
|
+
Qo as e,
|
|
2535
|
+
lo as f,
|
|
2536
|
+
An as g,
|
|
2537
|
+
zo as h,
|
|
2538
|
+
Ba as i,
|
|
2539
|
+
Oo as j,
|
|
2540
|
+
es as k,
|
|
2541
|
+
Bo as l,
|
|
2542
|
+
Fo as m,
|
|
2543
|
+
Ko as n,
|
|
2445
2544
|
m as o,
|
|
2446
2545
|
r as p,
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2546
|
+
Do as q,
|
|
2547
|
+
Po as r,
|
|
2548
|
+
La as s,
|
|
2549
|
+
Le as t,
|
|
2550
|
+
po as u,
|
|
2551
|
+
ie as v,
|
|
2552
|
+
ho as w,
|
|
2553
|
+
Ne as x,
|
|
2554
|
+
Xo as y,
|
|
2555
|
+
vo as z
|
|
2457
2556
|
};
|