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