@feedmepos/mf-hrm-portal 2.3.0-dev.3 → 2.3.0-dev.4
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-SjyWZghY.js → ApprovalCodeList-Pbk3MAP_.js} +2 -2
- package/dist/{AuditLogList-aTI3QeO0.js → AuditLogList-B4gAQD41.js} +3 -3
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang--JTV7non.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DPbHx_I8.js} +2 -2
- package/dist/{EmployeeList-D2Q_2ZE0.js → EmployeeList-0KpegAhT.js} +4 -4
- package/dist/{GrantUserList-6YXLPuHR.js → GrantUserList-BUkzqot_.js} +3 -3
- package/dist/{Main-CFIWlIaC.js → Main-CNk6IUSX.js} +2 -2
- package/dist/{Main-B-a6F9g8.js → Main-DgmmoN5E.js} +5 -5
- package/dist/{Main-dSqOeBRJ.js → Main-Dx_th1rt.js} +9 -9
- package/dist/{PermissionSetList-DxkaPCMs.js → PermissionSetList-CzZGiCsv.js} +5 -5
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DnKckKZ0.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-t_OkpC_R.js} +827 -827
- package/dist/{RoleList-DQZ_w5uM.js → RoleList-BE4zTMIf.js} +7 -7
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Dr6QruG6.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BPBc1yaM.js} +1 -1
- package/dist/{ScheduleGeneralPage-CvskrXcV.js → ScheduleGeneralPage-OvoLCcup.js} +6 -6
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-C4On5sVD.js → ScheduleModal.vue_vue_type_script_setup_true_lang-BOkU6VUe.js} +209 -178
- package/dist/SchedulePage-CujQTlC7.js +18257 -0
- package/dist/{SchedulePositionPage-BGrZBU3g.js → SchedulePositionPage-DJ7HABNZ.js} +8 -8
- package/dist/{TeamMemberList-BiTHVJwE.js → TeamMemberList-DcMBkqKA.js} +6 -6
- package/dist/{TimesheetList-CUkYacGW.js → TimesheetList-EFkDNiyH.js} +5 -5
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-B1Y587O-.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DK7LWwL3.js} +2 -2
- package/dist/{app-CAKCDrbJ.js → app-Bljy7Tiw.js} +8 -8
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-CZ8QYRoc.js → dayjs.min-6PYBuPpr.js} +1 -1
- package/dist/{employee-D56eWEFe.js → employee-BabFWzgV.js} +3 -3
- package/dist/{iteration-BVJdyLNq.js → iteration-DFJixFmV.js} +1 -1
- package/dist/{lodash-BcIRkQPW.js → lodash-CfHZzOs8.js} +1 -1
- package/dist/{role-B-eZDaBX.js → role-DzPtXGaE.js} +1 -1
- package/dist/{rule-D6AIfx8b.js → rule-DM5JuuR6.js} +2 -2
- package/dist/src/api/schedule/index.d.ts +4 -2
- package/dist/src/composables/useMessage.d.ts +8 -2
- package/dist/src/types/schedule.d.ts +1 -1
- package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
- package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +33 -0
- package/dist/src/views/scheduling/composables/remyPrompt.d.ts +13 -0
- package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +10 -0
- package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +114 -4
- package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +1 -0
- package/dist/src/views/scheduling/schedule-state.d.ts +106 -106
- package/dist/src/views/scheduling/schedule-store.d.ts +4 -2
- package/dist/src/views/scheduling/types.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-DHA0jrIr.js → useReportPermissions-vTUP3ZOL.js} +3 -3
- package/package.json +2 -1
- package/dist/SchedulePage-CW-K836l.js +0 -18248
- package/dist/src/views/scheduling/composables/scheduleAutoSolver.d.ts +0 -23
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { onMounted as
|
|
1
|
+
import { onMounted as we, onBeforeUnmount as He, ref as g, reactive as O, shallowRef as de, watch as Ee, computed as Y, defineComponent as Ae, createElementBlock as C, openBlock as N, renderSlot as Ye, useAttrs as sa, nextTick as fe, normalizeClass as oe, createElementVNode as _, createBlock as ra, mergeProps as la, toDisplayString as F, Teleport as ua, createCommentVNode as U, withDirectives as da, vModelText as ca, Fragment as ce, renderList as ya, createTextVNode as ma, withModifiers as fa, normalizeStyle as pa } from "vue";
|
|
2
2
|
import { useRoute as ha, useRouter as va } from "vue-router";
|
|
3
3
|
import { useCoreStore as Be } from "@feedmepos/mf-common";
|
|
4
4
|
import { g as v, b as h, u as Da } from "./restaurant-D7PEQjPY.js";
|
|
5
|
-
import { E as pe, u as ga } from "./employee-
|
|
5
|
+
import { E as pe, u as ga } from "./employee-BabFWzgV.js";
|
|
6
6
|
function Fn(e) {
|
|
7
7
|
let a = null;
|
|
8
8
|
function t() {
|
|
@@ -11,10 +11,10 @@ function Fn(e) {
|
|
|
11
11
|
const n = a.getBoundingClientRect().top;
|
|
12
12
|
a.style.height = `${Math.max(0, window.innerHeight - n)}px`;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
we(() => {
|
|
15
15
|
var n;
|
|
16
16
|
a = ((n = e.value) == null ? void 0 : n.closest(".sch-page")) ?? null, t(), window.addEventListener("resize", t);
|
|
17
|
-
}),
|
|
17
|
+
}), He(() => {
|
|
18
18
|
window.removeEventListener("resize", t), a && (a.style.height = "");
|
|
19
19
|
});
|
|
20
20
|
}
|
|
@@ -22,17 +22,17 @@ function he(e) {
|
|
|
22
22
|
const [a, t] = String(e || "0:0").split(":").map(Number);
|
|
23
23
|
return (Number.isFinite(a) ? a : 0) * 60 + (Number.isFinite(t) ? t : 0);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function wa(e) {
|
|
26
26
|
const a = Math.max(0, Math.min(1439, Math.round(e)));
|
|
27
27
|
return `${String(Math.floor(a / 60)).padStart(2, "0")}:${String(a % 60).padStart(2, "0")}`;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Ha(e, a) {
|
|
30
30
|
const t = he(e);
|
|
31
31
|
let n = he(a);
|
|
32
32
|
return n <= t && (n += 1440), [t, n];
|
|
33
33
|
}
|
|
34
34
|
function _e(e, a) {
|
|
35
|
-
const [t, n] =
|
|
35
|
+
const [t, n] = Ha(e, a);
|
|
36
36
|
return Math.max(0, n - t);
|
|
37
37
|
}
|
|
38
38
|
function Ea(e) {
|
|
@@ -40,15 +40,15 @@ function Ea(e) {
|
|
|
40
40
|
return n ? `${o}:${String(n).padStart(2, "0")}${s}` : `${o}${s}`;
|
|
41
41
|
}
|
|
42
42
|
function Un(e) {
|
|
43
|
-
return Ea(
|
|
43
|
+
return Ea(wa(e % 1440));
|
|
44
44
|
}
|
|
45
45
|
function xe(e) {
|
|
46
46
|
const a = Array.isArray(e) ? e : e == null ? void 0 : e.breaks;
|
|
47
47
|
return a != null && a.length ? a.reduce((t, n) => {
|
|
48
48
|
if (n.type === "DURATION") return t + n.minutes;
|
|
49
49
|
const [s, o] = n.startTime.split(":").map(Number), [r, i] = n.endTime.split(":").map(Number);
|
|
50
|
-
let
|
|
51
|
-
return
|
|
50
|
+
let m = r * 60 + i - (s * 60 + o);
|
|
51
|
+
return m < 0 && (m += 24 * 60), t + m;
|
|
52
52
|
}, 0) : Math.max(0, e && !Array.isArray(e) ? e.breakMins ?? 0 : 0);
|
|
53
53
|
}
|
|
54
54
|
function Wn(e, a) {
|
|
@@ -60,7 +60,7 @@ function zn(e) {
|
|
|
60
60
|
const a = Math.max(0, Math.round(e ?? 0));
|
|
61
61
|
return a ? [{ type: "DURATION", minutes: a, breakPayType: "UNPAID" }] : [];
|
|
62
62
|
}
|
|
63
|
-
const Q = 500, Aa = 10, ke = 6, Vn = 1500, Fe = 1e6,
|
|
63
|
+
const Q = 500, Aa = 10, ke = 6, Vn = 1500, Fe = 1e6, D = {
|
|
64
64
|
async listEmployeeProfiles(e) {
|
|
65
65
|
return v(
|
|
66
66
|
await h("schedules").get("employees", {
|
|
@@ -99,6 +99,21 @@ const Q = 500, Aa = 10, ke = 6, Vn = 1500, Fe = 1e6, g = {
|
|
|
99
99
|
)
|
|
100
100
|
);
|
|
101
101
|
},
|
|
102
|
+
async getAutoScheduleCapabilities(e) {
|
|
103
|
+
return v(
|
|
104
|
+
await h(`restaurants/${e}/schedules`).get(
|
|
105
|
+
"auto-schedule/capabilities"
|
|
106
|
+
)
|
|
107
|
+
);
|
|
108
|
+
},
|
|
109
|
+
async applyAutoSchedule(e, a) {
|
|
110
|
+
return v(
|
|
111
|
+
await h(`restaurants/${e}/schedules`).post(
|
|
112
|
+
"auto-schedule/apply",
|
|
113
|
+
a
|
|
114
|
+
)
|
|
115
|
+
);
|
|
116
|
+
},
|
|
102
117
|
/** One outlet's whole board over `[from, to]` (inclusive, 'YYYY-MM-DD'). */
|
|
103
118
|
async readBoard(e, a, t) {
|
|
104
119
|
return v(
|
|
@@ -226,14 +241,14 @@ const Q = 500, Aa = 10, ke = 6, Vn = 1500, Fe = 1e6, g = {
|
|
|
226
241
|
}
|
|
227
242
|
}, Ue = {
|
|
228
243
|
payload: de(null),
|
|
229
|
-
loading:
|
|
230
|
-
rosterLoading:
|
|
231
|
-
loadError:
|
|
232
|
-
scheduleSetupCompleted:
|
|
233
|
-
dataVersion:
|
|
234
|
-
outletId:
|
|
235
|
-
restaurantEmployees:
|
|
236
|
-
employeeConfigs:
|
|
244
|
+
loading: g(!1),
|
|
245
|
+
rosterLoading: g(!1),
|
|
246
|
+
loadError: g(null),
|
|
247
|
+
scheduleSetupCompleted: g(!1),
|
|
248
|
+
dataVersion: g(0),
|
|
249
|
+
outletId: g(""),
|
|
250
|
+
restaurantEmployees: g([]),
|
|
251
|
+
employeeConfigs: g([]),
|
|
237
252
|
employeeOutletIds: de({}),
|
|
238
253
|
businessEmployees: de([]),
|
|
239
254
|
positions: O([]),
|
|
@@ -279,7 +294,7 @@ const Q = 500, Aa = 10, ke = 6, Vn = 1500, Fe = 1e6, g = {
|
|
|
279
294
|
loadError: ie,
|
|
280
295
|
scheduleSetupCompleted: We,
|
|
281
296
|
dataVersion: z,
|
|
282
|
-
outletId:
|
|
297
|
+
outletId: y,
|
|
283
298
|
restaurantEmployees: se,
|
|
284
299
|
employeeConfigs: x,
|
|
285
300
|
employeeOutletIds: ze,
|
|
@@ -328,7 +343,7 @@ function Xn(e, a) {
|
|
|
328
343
|
const Z = Ma;
|
|
329
344
|
let V = null, K = null, W = null, q = 0, re = null;
|
|
330
345
|
function Re(e) {
|
|
331
|
-
return e ===
|
|
346
|
+
return e === y.value ? !1 : (Ca(), y.value = e, d.value = null, V = null, K = null, ie.value = null, re = null, We.value = !1, se.value = [], x.value = [], W = null, q += 1, z.value += 1, !0);
|
|
332
347
|
}
|
|
333
348
|
async function ge(e) {
|
|
334
349
|
if (!(!e || re === e)) {
|
|
@@ -346,14 +361,14 @@ async function ka(e) {
|
|
|
346
361
|
offset: 0,
|
|
347
362
|
restaurantIds: [e]
|
|
348
363
|
});
|
|
349
|
-
e ===
|
|
350
|
-
e ===
|
|
364
|
+
e === y.value && (se.value = a.items, x.value = await D.listEmployeeConfigs(e), re = e, z.value += 1, Ra().then((t) => {
|
|
365
|
+
e === y.value && (ze.value = t, z.value += 1);
|
|
351
366
|
}));
|
|
352
367
|
}
|
|
353
368
|
async function Sa(e) {
|
|
354
|
-
const a =
|
|
369
|
+
const a = y.value;
|
|
355
370
|
if (!a || !e.length) return;
|
|
356
|
-
const t = await
|
|
371
|
+
const t = await D.saveEmployeeConfigs(a, { configs: e });
|
|
357
372
|
x.value = t, z.value += 1;
|
|
358
373
|
}
|
|
359
374
|
async function La(e, a) {
|
|
@@ -364,7 +379,7 @@ async function La(e, a) {
|
|
|
364
379
|
await Sa([{ employeeId: e, enabled: a, displayOrder: n }]);
|
|
365
380
|
}
|
|
366
381
|
async function Ke() {
|
|
367
|
-
const e =
|
|
382
|
+
const e = y.value;
|
|
368
383
|
e && (re = null, await ge(e));
|
|
369
384
|
}
|
|
370
385
|
async function Ge(e, a) {
|
|
@@ -393,7 +408,7 @@ async function Jn(e, a, t = "") {
|
|
|
393
408
|
n.length && (await Ge(e, (s) => [
|
|
394
409
|
...s.filter((o) => !n.includes(o.restaurantId)),
|
|
395
410
|
...n.map((o) => ({ restaurantId: o, roleId: t }))
|
|
396
|
-
]),
|
|
411
|
+
]), y.value && n.includes(y.value) && await La(e, !0), await Ke());
|
|
397
412
|
}
|
|
398
413
|
async function Zn(e, a) {
|
|
399
414
|
const t = new Set(a);
|
|
@@ -452,13 +467,13 @@ async function eo() {
|
|
|
452
467
|
!V || !K || await Qe(/* @__PURE__ */ new Date(`${V}T00:00:00`), /* @__PURE__ */ new Date(`${K}T00:00:00`));
|
|
453
468
|
}
|
|
454
469
|
async function ao(e) {
|
|
455
|
-
if (!
|
|
456
|
-
const a = await
|
|
470
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
471
|
+
const a = await D.createEmployeeProfile(y.value, e);
|
|
457
472
|
d.value && (d.value.employees.push(a), z.value += 1);
|
|
458
473
|
}
|
|
459
474
|
async function to(e, a) {
|
|
460
|
-
if (!
|
|
461
|
-
const t = await
|
|
475
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
476
|
+
const t = await D.updateEmployeeProfile(y.value, e, a);
|
|
462
477
|
if (d.value) {
|
|
463
478
|
const n = d.value.employees.findIndex((s) => s.employeeId === e);
|
|
464
479
|
n > -1 && (d.value = {
|
|
@@ -468,26 +483,26 @@ async function to(e, a) {
|
|
|
468
483
|
}
|
|
469
484
|
}
|
|
470
485
|
async function no(e) {
|
|
471
|
-
const a = await
|
|
486
|
+
const a = await D.createPosition(e);
|
|
472
487
|
d.value && (d.value = { ...d.value, positions: [...d.value.positions, a] });
|
|
473
488
|
}
|
|
474
489
|
async function oo(e, a) {
|
|
475
|
-
const t = await
|
|
490
|
+
const t = await D.updatePosition(e, a);
|
|
476
491
|
d.value && (d.value = {
|
|
477
492
|
...d.value,
|
|
478
493
|
positions: d.value.positions.map((n) => n.id === e ? t : n)
|
|
479
494
|
});
|
|
480
495
|
}
|
|
481
496
|
async function io(e) {
|
|
482
|
-
await
|
|
497
|
+
await D.deletePosition(e), d.value && (d.value = {
|
|
483
498
|
...d.value,
|
|
484
499
|
positions: d.value.positions.filter((a) => a.id !== e)
|
|
485
500
|
});
|
|
486
501
|
}
|
|
487
502
|
async function so(e, a) {
|
|
488
503
|
var s;
|
|
489
|
-
if (!
|
|
490
|
-
const t = (s = d.value) == null ? void 0 : s.days.find((o) => o.date === e), n = await
|
|
504
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
505
|
+
const t = (s = d.value) == null ? void 0 : s.days.find((o) => o.date === e), n = await D.saveScheduleDay(y.value, e, {
|
|
491
506
|
...a,
|
|
492
507
|
expectedUpdatedAt: a.expectedUpdatedAt ?? (t == null ? void 0 : t.updatedAt)
|
|
493
508
|
});
|
|
@@ -498,24 +513,24 @@ async function so(e, a) {
|
|
|
498
513
|
}
|
|
499
514
|
async function ro(e) {
|
|
500
515
|
var s;
|
|
501
|
-
if (!
|
|
516
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
502
517
|
const a = (((s = d.value) == null ? void 0 : s.demands) ?? []).filter(
|
|
503
518
|
(o) => e.date ? o.date === e.date : o.dayOfWeek === e.dayOfWeek
|
|
504
519
|
), t = e.periods.flatMap((o) => {
|
|
505
|
-
const r = (o.roles ?? []).filter((f) => f.positionName && f.headcount > 0), i = r.reduce((f,
|
|
520
|
+
const r = (o.roles ?? []).filter((f) => f.positionName && f.headcount > 0), i = r.reduce((f, w) => f + w.headcount, 0), m = {
|
|
506
521
|
...e.date ? { date: e.date } : { dayOfWeek: e.dayOfWeek },
|
|
507
522
|
startTime: o.startTime,
|
|
508
523
|
endTime: o.endTime
|
|
509
524
|
};
|
|
510
525
|
return [
|
|
511
526
|
...r.map((f) => ({
|
|
512
|
-
...
|
|
527
|
+
...m,
|
|
513
528
|
headcount: f.headcount,
|
|
514
529
|
position: { positionId: f.positionId, positionName: f.positionName }
|
|
515
530
|
})),
|
|
516
|
-
...o.headcount > i ? [{ ...
|
|
531
|
+
...o.headcount > i ? [{ ...m, headcount: o.headcount - i }] : []
|
|
517
532
|
];
|
|
518
|
-
}), n = await
|
|
533
|
+
}), n = await D.replaceDemands(y.value, {
|
|
519
534
|
...e.date ? { date: e.date } : { dayOfWeek: e.dayOfWeek },
|
|
520
535
|
demands: t
|
|
521
536
|
});
|
|
@@ -525,14 +540,14 @@ async function ro(e) {
|
|
|
525
540
|
}
|
|
526
541
|
}
|
|
527
542
|
async function lo(e, a) {
|
|
528
|
-
if (!
|
|
543
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
529
544
|
const t = d.value;
|
|
530
545
|
if (!t || t.demands.some((o) => o.date === a)) return 0;
|
|
531
546
|
const n = t.demands.filter((o) => o.date === e);
|
|
532
547
|
if (!n.length) return 0;
|
|
533
548
|
const s = await Promise.all(
|
|
534
549
|
n.map(
|
|
535
|
-
(o) =>
|
|
550
|
+
(o) => D.createDemand(y.value, {
|
|
536
551
|
date: a,
|
|
537
552
|
startTime: o.startTime,
|
|
538
553
|
endTime: o.endTime,
|
|
@@ -549,39 +564,51 @@ async function lo(e, a) {
|
|
|
549
564
|
return d.value && (d.value = { ...d.value, demands: [...d.value.demands, ...s] }), s.length;
|
|
550
565
|
}
|
|
551
566
|
async function uo(e) {
|
|
552
|
-
if (!
|
|
553
|
-
return
|
|
567
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
568
|
+
return D.generateAutoSchedule(y.value, e);
|
|
554
569
|
}
|
|
555
|
-
async function co(
|
|
556
|
-
if (!
|
|
557
|
-
|
|
570
|
+
async function co() {
|
|
571
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
572
|
+
return D.getAutoScheduleCapabilities(y.value);
|
|
558
573
|
}
|
|
559
574
|
async function yo(e) {
|
|
560
|
-
if (!
|
|
561
|
-
|
|
575
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
576
|
+
return D.applyAutoSchedule(y.value, e);
|
|
577
|
+
}
|
|
578
|
+
async function mo(e) {
|
|
579
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
580
|
+
return D.bulkSaveAssignments(y.value, e);
|
|
581
|
+
}
|
|
582
|
+
async function fo(e) {
|
|
583
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
584
|
+
e.length && await D.deleteAssignments(y.value, e);
|
|
585
|
+
}
|
|
586
|
+
async function po(e) {
|
|
587
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
588
|
+
const a = await D.createTimeOff(y.value, e);
|
|
562
589
|
return d.value && (d.value = { ...d.value, timeOff: [...d.value.timeOff, a] }), a;
|
|
563
590
|
}
|
|
564
|
-
async function
|
|
565
|
-
if (!
|
|
566
|
-
const t = await
|
|
591
|
+
async function ho(e, a) {
|
|
592
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
593
|
+
const t = await D.updateTimeOffStatus(y.value, e, a);
|
|
567
594
|
return t && d.value && (d.value = {
|
|
568
595
|
...d.value,
|
|
569
596
|
timeOff: d.value.timeOff.map((n) => n.id === e ? t : n)
|
|
570
597
|
}), t;
|
|
571
598
|
}
|
|
572
|
-
async function
|
|
573
|
-
if (!
|
|
574
|
-
await
|
|
599
|
+
async function vo(e) {
|
|
600
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
601
|
+
await D.deleteTimeOff(y.value, e), d.value && (d.value = {
|
|
575
602
|
...d.value,
|
|
576
603
|
timeOff: d.value.timeOff.filter((a) => a.id !== e)
|
|
577
604
|
});
|
|
578
605
|
}
|
|
579
|
-
async function
|
|
580
|
-
if (!
|
|
581
|
-
return
|
|
606
|
+
async function Do(e) {
|
|
607
|
+
if (!y.value) throw new Error("No outlet selected");
|
|
608
|
+
return D.bulkUpdateAssignmentStatus(y.value, e);
|
|
582
609
|
}
|
|
583
610
|
async function Qe(e, a) {
|
|
584
|
-
const t =
|
|
611
|
+
const t = y.value;
|
|
585
612
|
if (!t) {
|
|
586
613
|
ie.value = "No outlet selected";
|
|
587
614
|
return;
|
|
@@ -590,14 +617,14 @@ async function Qe(e, a) {
|
|
|
590
617
|
Se.value = !0, ie.value = null;
|
|
591
618
|
const r = (async () => {
|
|
592
619
|
try {
|
|
593
|
-
const i = await
|
|
594
|
-
if (
|
|
620
|
+
const i = await D.readBoard(t, n, s);
|
|
621
|
+
if (y.value !== t || o !== q) return;
|
|
595
622
|
d.value = i, We.value = i.settings.setupCompleted, V = n, K = s, z.value += 1;
|
|
596
623
|
} catch (i) {
|
|
597
|
-
if (
|
|
624
|
+
if (y.value !== t || o !== q) return;
|
|
598
625
|
ie.value = i instanceof Error ? i.message : "Could not load the schedule";
|
|
599
626
|
} finally {
|
|
600
|
-
|
|
627
|
+
y.value === t && o === q && (Se.value = !1);
|
|
601
628
|
}
|
|
602
629
|
})();
|
|
603
630
|
W = r;
|
|
@@ -1047,7 +1074,7 @@ const Ta = "AE", $a = "Asia/Dubai", Pa = {
|
|
|
1047
1074
|
workingHours: ht,
|
|
1048
1075
|
recurringPublicHolidays: vt,
|
|
1049
1076
|
publicHolidays: Dt
|
|
1050
|
-
},
|
|
1077
|
+
}, wt = "MY", Ht = "Asia/Kuala_Lumpur", Et = {
|
|
1051
1078
|
NORMAL: {
|
|
1052
1079
|
overtime: 1.5
|
|
1053
1080
|
},
|
|
@@ -1130,8 +1157,8 @@ const Ta = "AE", $a = "Asia/Dubai", Pa = {
|
|
|
1130
1157
|
"2027-12-25": "Christmas Day"
|
|
1131
1158
|
}
|
|
1132
1159
|
}, Mt = {
|
|
1133
|
-
countryCode:
|
|
1134
|
-
timezone:
|
|
1160
|
+
countryCode: wt,
|
|
1161
|
+
timezone: Ht,
|
|
1135
1162
|
payRate: Et,
|
|
1136
1163
|
overtime: At,
|
|
1137
1164
|
workingHours: bt,
|
|
@@ -1496,14 +1523,14 @@ function rn(e) {
|
|
|
1496
1523
|
function ln(e) {
|
|
1497
1524
|
return Te[rn(e)] ?? Te.MY;
|
|
1498
1525
|
}
|
|
1499
|
-
function
|
|
1526
|
+
function go(e, a) {
|
|
1500
1527
|
var o, r;
|
|
1501
1528
|
const t = (o = e.publicHolidays[a.slice(0, 4)]) == null ? void 0 : o[a];
|
|
1502
1529
|
if (t) return t;
|
|
1503
1530
|
const n = Number(a.slice(5, 7)), s = Number(a.slice(8, 10));
|
|
1504
1531
|
return ((r = e.recurringPublicHolidays.find((i) => i.month === n && i.day === s)) == null ? void 0 : r.name) ?? null;
|
|
1505
1532
|
}
|
|
1506
|
-
const un = Be(), qe = "unassigned",
|
|
1533
|
+
const un = Be(), qe = "unassigned", wo = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Ho = "All Stations", Eo = [
|
|
1507
1534
|
{ id: qe, label: "Assigned", roles: [], system: !0 }
|
|
1508
1535
|
], $e = [
|
|
1509
1536
|
"#903E1F",
|
|
@@ -1519,15 +1546,15 @@ function dn(e) {
|
|
|
1519
1546
|
var a;
|
|
1520
1547
|
return (a = Ve.find((t) => t.name === e)) == null ? void 0 : a.id;
|
|
1521
1548
|
}
|
|
1522
|
-
function
|
|
1549
|
+
function Ao(e) {
|
|
1523
1550
|
if (e)
|
|
1524
1551
|
return { positionId: dn(e), positionName: e };
|
|
1525
1552
|
}
|
|
1526
|
-
const
|
|
1553
|
+
const bo = [1, 1, 1, 1, 1, 1, 1];
|
|
1527
1554
|
function ee(e) {
|
|
1528
1555
|
return (e + 6) % 7;
|
|
1529
1556
|
}
|
|
1530
|
-
function
|
|
1557
|
+
function No(e) {
|
|
1531
1558
|
return (e + 1) % 7;
|
|
1532
1559
|
}
|
|
1533
1560
|
function ne(e, a) {
|
|
@@ -1542,7 +1569,7 @@ function yn(e) {
|
|
|
1542
1569
|
return a.length ? (a[0][0] + (((t = a[1]) == null ? void 0 : t[0]) ?? "")).toUpperCase() : "??";
|
|
1543
1570
|
}
|
|
1544
1571
|
const Xe = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map();
|
|
1545
|
-
function
|
|
1572
|
+
function Co(e) {
|
|
1546
1573
|
return Xe.get(e);
|
|
1547
1574
|
}
|
|
1548
1575
|
function mn(e) {
|
|
@@ -1551,7 +1578,7 @@ function mn(e) {
|
|
|
1551
1578
|
const t = Fe + me.size + 1;
|
|
1552
1579
|
return me.set(e, t), Xe.set(t, e), t;
|
|
1553
1580
|
}
|
|
1554
|
-
function
|
|
1581
|
+
function Mo(e) {
|
|
1555
1582
|
return e.sourceId || String(e.id);
|
|
1556
1583
|
}
|
|
1557
1584
|
function fn(e) {
|
|
@@ -1606,7 +1633,7 @@ function Dn(e) {
|
|
|
1606
1633
|
function gn(e) {
|
|
1607
1634
|
return e.type === "OFF_DAY" ? "Off day" : e.leaveType === "MEDICAL" ? "Medical Leave" : e.leaveType === "EMERGENCY" ? "Emergency Leave" : e.leaveType === "UNPAID" ? "Unpaid Leave" : "Annual Leave";
|
|
1608
1635
|
}
|
|
1609
|
-
function
|
|
1636
|
+
function wn(e, a) {
|
|
1610
1637
|
if (a < e.startDate || a > e.endDate) return null;
|
|
1611
1638
|
const n = e.startDate === e.endDate || a === e.startDate ? e.startPart : a === e.endDate ? e.endPart : "FULL_DAY";
|
|
1612
1639
|
return {
|
|
@@ -1619,7 +1646,7 @@ function Hn(e, a) {
|
|
|
1619
1646
|
halfPart: n === "FULL_DAY" ? void 0 : n
|
|
1620
1647
|
};
|
|
1621
1648
|
}
|
|
1622
|
-
function
|
|
1649
|
+
function Hn(e) {
|
|
1623
1650
|
return {
|
|
1624
1651
|
employeeId: e._id,
|
|
1625
1652
|
name: e.name,
|
|
@@ -1632,7 +1659,7 @@ function wn(e) {
|
|
|
1632
1659
|
};
|
|
1633
1660
|
}
|
|
1634
1661
|
function En(e) {
|
|
1635
|
-
const a = X[
|
|
1662
|
+
const a = X[y.value];
|
|
1636
1663
|
return !a || !e.includes(a) ? e : [a, ...e.filter((t) => t !== a)];
|
|
1637
1664
|
}
|
|
1638
1665
|
function An(e) {
|
|
@@ -1640,42 +1667,42 @@ function An(e) {
|
|
|
1640
1667
|
const t = (ze.value[e] ?? ((n = se.value.find((s) => s._id === e)) == null ? void 0 : n.restaurantRole.map((s) => s.restaurantId)) ?? []).map((s) => X[s]).filter((s) => !!s);
|
|
1641
1668
|
return t.length ? En([...new Set(t)]) : void 0;
|
|
1642
1669
|
}
|
|
1643
|
-
function
|
|
1670
|
+
function ko(e = []) {
|
|
1644
1671
|
const a = d.value;
|
|
1645
1672
|
if (!a) return [];
|
|
1646
1673
|
const t = new Map(a.employees.map((i) => [i.employeeId, i])), n = new Map(x.value.map((i) => [i.employeeId, i])), s = se.value.filter((i) => {
|
|
1647
|
-
var
|
|
1648
|
-
return ((
|
|
1649
|
-
}).map((i) => t.get(i._id) ??
|
|
1674
|
+
var m;
|
|
1675
|
+
return ((m = n.get(i._id)) == null ? void 0 : m.enabled) !== !1;
|
|
1676
|
+
}).map((i) => t.get(i._id) ?? Hn(i)), o = pn(s), r = /* @__PURE__ */ new Map();
|
|
1650
1677
|
for (const i of a.assignments) {
|
|
1651
|
-
const
|
|
1652
|
-
f ? f.push(i) : r.set(
|
|
1678
|
+
const m = `${i.employeeId}|${i.date}`, f = r.get(m);
|
|
1679
|
+
f ? f.push(i) : r.set(m, [i]);
|
|
1653
1680
|
}
|
|
1654
1681
|
return s.map((i) => {
|
|
1655
1682
|
var S, P;
|
|
1656
|
-
const
|
|
1683
|
+
const m = mn(i.employeeId), f = ((S = i.primaryPosition) == null ? void 0 : S.positionName) ?? "", w = [
|
|
1657
1684
|
(P = i.primaryPosition) == null ? void 0 : P.positionName,
|
|
1658
1685
|
...i.secondaryPositions.map((L) => L.positionName)
|
|
1659
1686
|
].filter((L) => !!L), $ = e.map((L) => {
|
|
1660
|
-
const A = Z(L),
|
|
1661
|
-
if (
|
|
1687
|
+
const A = Z(L), H = (a.timeOff ?? []).filter((E) => E.employeeId === i.employeeId).map((E) => wn(E, A)).find((E) => E !== null);
|
|
1688
|
+
if (H) return H;
|
|
1662
1689
|
const b = (r.get(`${i.employeeId}|${A}`) ?? []).filter((E) => E.startTime && E.endTime).map((E) => Dn(E)).sort((E, ae) => E.start.localeCompare(ae.start));
|
|
1663
1690
|
return b.length ? b.length === 1 ? b[0] : b : null;
|
|
1664
1691
|
}), p = Array.from(
|
|
1665
1692
|
{ length: 7 },
|
|
1666
|
-
(L, A) => i.availability.some((
|
|
1693
|
+
(L, A) => i.availability.some((H) => ee(H.dayOfWeek) === A)
|
|
1667
1694
|
), M = Array.from({ length: 7 }, (L, A) => {
|
|
1668
|
-
const
|
|
1669
|
-
return { from: (
|
|
1695
|
+
const H = i.availability.find((R) => ee(R.dayOfWeek) === A);
|
|
1696
|
+
return { from: (H == null ? void 0 : H.start) ?? "", to: (H == null ? void 0 : H.end) ?? "" };
|
|
1670
1697
|
});
|
|
1671
1698
|
return {
|
|
1672
|
-
id:
|
|
1699
|
+
id: m,
|
|
1673
1700
|
sourceId: i.employeeId,
|
|
1674
1701
|
name: i.name,
|
|
1675
1702
|
employmentType: i.employmentType,
|
|
1676
1703
|
role: f,
|
|
1677
1704
|
initials: yn(i.name),
|
|
1678
|
-
color: $e[(
|
|
1705
|
+
color: $e[(m - Fe - 1) % $e.length],
|
|
1679
1706
|
// Gross hours actually rostered this week — the figure the cost rail multiplies by
|
|
1680
1707
|
// the rate. Contracted hours are a separate question, answered by RULES.contract.
|
|
1681
1708
|
// Rounded to one decimal — `hoursBetween` divides by 60, so an unrounded sum reads
|
|
@@ -1684,7 +1711,7 @@ function No(e = []) {
|
|
|
1684
1711
|
weekHours: Math.round(
|
|
1685
1712
|
$.reduce(
|
|
1686
1713
|
(L, A) => L + (Array.isArray(A) ? A : A && "start" in A ? [A] : []).reduce(
|
|
1687
|
-
(
|
|
1714
|
+
(H, R) => H + cn(R.start, R.end),
|
|
1688
1715
|
0
|
|
1689
1716
|
),
|
|
1690
1717
|
0
|
|
@@ -1696,7 +1723,7 @@ function No(e = []) {
|
|
|
1696
1723
|
// shows them, and saving keeps them.
|
|
1697
1724
|
locations: An(i.employeeId),
|
|
1698
1725
|
rate: hn(i, o),
|
|
1699
|
-
positions:
|
|
1726
|
+
positions: w,
|
|
1700
1727
|
shifts: $,
|
|
1701
1728
|
// Remarks live in their own collection in the older scheduling design and are not
|
|
1702
1729
|
// part of this board's payload yet.
|
|
@@ -1709,44 +1736,44 @@ function No(e = []) {
|
|
|
1709
1736
|
};
|
|
1710
1737
|
});
|
|
1711
1738
|
}
|
|
1712
|
-
function
|
|
1739
|
+
function So() {
|
|
1713
1740
|
return [];
|
|
1714
1741
|
}
|
|
1715
|
-
function
|
|
1742
|
+
function Lo() {
|
|
1716
1743
|
var n, s;
|
|
1717
1744
|
const e = d.value, a = {}, t = {};
|
|
1718
1745
|
for (const o of (e == null ? void 0 : e.demands) ?? []) {
|
|
1719
1746
|
const r = o.date ? a[n = o.date] ?? (a[n] = []) : o.dayOfWeek !== null ? t[s = ee(o.dayOfWeek)] ?? (t[s] = []) : null;
|
|
1720
1747
|
if (!r) continue;
|
|
1721
|
-
let i = r.find((
|
|
1748
|
+
let i = r.find((m) => m.from === o.startTime && m.to === o.endTime);
|
|
1722
1749
|
i || (i = { from: o.startTime, to: o.endTime, n: 0, roles: [] }, r.push(i)), i.n += o.headcount, o.position && i.roles.push({ position: o.position.positionName, n: o.headcount });
|
|
1723
1750
|
}
|
|
1724
1751
|
return { byDate: a, byWeekday: t };
|
|
1725
1752
|
}
|
|
1726
|
-
function
|
|
1727
|
-
const e = Be(), { restaurants: a, readRestaurants: t } = Da(), n = ha(), s = va(), o =
|
|
1753
|
+
function Oo() {
|
|
1754
|
+
const e = Be(), { restaurants: a, readRestaurants: t } = Da(), n = ha(), s = va(), o = g(!1), r = Y(
|
|
1728
1755
|
() => [...a.value].map((p) => ({ value: p._id, label: p.profile.name })).sort((p, M) => p.label.localeCompare(M.label))
|
|
1729
1756
|
), i = Y(() => {
|
|
1730
1757
|
var p;
|
|
1731
1758
|
return ((p = e.currentRestaurant.value) == null ? void 0 : p._id) ?? "";
|
|
1732
1759
|
});
|
|
1733
|
-
async function
|
|
1760
|
+
async function m(p, M) {
|
|
1734
1761
|
return Re(p) ? (n.query.restaurantId !== p && s.replace({ query: { ...n.query, restaurantId: p } }), await Promise.all([ge(p), Ia(M)]), !0) : !1;
|
|
1735
1762
|
}
|
|
1736
1763
|
const f = (p) => !!p && r.value.some((M) => M.value === p);
|
|
1737
|
-
async function
|
|
1764
|
+
async function w() {
|
|
1738
1765
|
var M;
|
|
1739
1766
|
await t(), Oe.splice(0, Oe.length, ...r.value.map((S) => S.label)), Object.keys(X).forEach((S) => delete X[S]), r.value.forEach((S) => X[S.value] = S.label);
|
|
1740
|
-
const p = f(
|
|
1767
|
+
const p = f(y.value) ? y.value : f(i.value) ? i.value : ((M = r.value[0]) == null ? void 0 : M.value) ?? "";
|
|
1741
1768
|
return p && Re(p), o.value = !0, p;
|
|
1742
1769
|
}
|
|
1743
1770
|
async function $() {
|
|
1744
|
-
const p = await
|
|
1771
|
+
const p = await w();
|
|
1745
1772
|
return p && await ge(p), p;
|
|
1746
1773
|
}
|
|
1747
|
-
return { options: r, ready: o, outletId:
|
|
1774
|
+
return { options: r, ready: o, outletId: y, resolve: $, resolveOutlet: w, switchTo: m };
|
|
1748
1775
|
}
|
|
1749
|
-
const bn = ["data-hierarchy", "data-size", "data-icon"],
|
|
1776
|
+
const bn = ["data-hierarchy", "data-size", "data-icon"], Ro = /* @__PURE__ */ Ae({
|
|
1750
1777
|
__name: "ScheduleButton",
|
|
1751
1778
|
props: {
|
|
1752
1779
|
hierarchy: { default: "primary" },
|
|
@@ -1779,7 +1806,7 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
1779
1806
|
}, Rn = ["aria-selected", "onClick"], In = {
|
|
1780
1807
|
key: 0,
|
|
1781
1808
|
class: "fx-opt-text"
|
|
1782
|
-
}, Tn = { key: 0 },
|
|
1809
|
+
}, Tn = { key: 0 }, Io = /* @__PURE__ */ Ae({
|
|
1783
1810
|
inheritAttrs: !1,
|
|
1784
1811
|
__name: "ScheduleSelect",
|
|
1785
1812
|
props: {
|
|
@@ -1795,8 +1822,8 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
1795
1822
|
},
|
|
1796
1823
|
emits: ["update:modelValue", "toggle"],
|
|
1797
1824
|
setup(e, { emit: a }) {
|
|
1798
|
-
const t = e, n = a, s = sa(), o = Y(() => s.class ?? ""), r =
|
|
1799
|
-
|
|
1825
|
+
const t = e, n = a, s = sa(), o = Y(() => s.class ?? ""), r = g(!1), i = g(!1), m = g(null), f = g(null), w = g(null), $ = Y(() => t.teleport !== !1 && i.value);
|
|
1826
|
+
we(() => {
|
|
1800
1827
|
i.value = typeof document < "u" && !!document.body;
|
|
1801
1828
|
});
|
|
1802
1829
|
const p = Y(() => {
|
|
@@ -1811,10 +1838,10 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
1811
1838
|
var c;
|
|
1812
1839
|
return t.multiple ? !!((c = t.selected) != null && c.includes(l.value)) : l.value === t.modelValue;
|
|
1813
1840
|
}
|
|
1814
|
-
const S = Y(() => !!t.menuTitle || t.options.some((l) => l.hint)), P =
|
|
1841
|
+
const S = Y(() => !!t.menuTitle || t.options.some((l) => l.hint)), P = g(""), L = g(null), A = Y(() => {
|
|
1815
1842
|
const l = P.value.trim().toLowerCase();
|
|
1816
1843
|
return !t.searchable || !l ? t.options : t.options.filter((c) => `${c.label} ${c.hint ?? ""}`.toLowerCase().includes(l));
|
|
1817
|
-
}),
|
|
1844
|
+
}), H = Y(() => {
|
|
1818
1845
|
const l = [];
|
|
1819
1846
|
let c;
|
|
1820
1847
|
for (const u of A.value)
|
|
@@ -1822,7 +1849,7 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
1822
1849
|
return l;
|
|
1823
1850
|
}), R = 5, b = 8;
|
|
1824
1851
|
function E() {
|
|
1825
|
-
const l =
|
|
1852
|
+
const l = w.value, c = f.value;
|
|
1826
1853
|
if (!l || !c) return;
|
|
1827
1854
|
const u = c.getBoundingClientRect(), k = window.innerWidth || document.documentElement.clientWidth, I = window.innerHeight || document.documentElement.clientHeight;
|
|
1828
1855
|
l.style.minWidth = `${Math.round(u.width)}px`, l.style.maxWidth = `${Math.max(180, Math.round(k - b * 2))}px`;
|
|
@@ -1837,10 +1864,10 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
1837
1864
|
function ae(l) {
|
|
1838
1865
|
var u, k;
|
|
1839
1866
|
const c = l.target;
|
|
1840
|
-
c && ((u =
|
|
1867
|
+
c && ((u = m.value) != null && u.contains(c) || (k = w.value) != null && k.contains(c)) || B();
|
|
1841
1868
|
}
|
|
1842
1869
|
function be(l) {
|
|
1843
|
-
const c =
|
|
1870
|
+
const c = w.value, u = l.target;
|
|
1844
1871
|
if (c && u && u !== document && c.contains(u)) return;
|
|
1845
1872
|
const k = f.value;
|
|
1846
1873
|
if (!k) return;
|
|
@@ -1859,7 +1886,7 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
1859
1886
|
}
|
|
1860
1887
|
async function le() {
|
|
1861
1888
|
var l, c, u;
|
|
1862
|
-
t.disabled || r.value || (P.value = "", r.value = !0, await fe(), E(), (l = L.value) == null || l.focus(), (u = (c =
|
|
1889
|
+
t.disabled || r.value || (P.value = "", r.value = !0, await fe(), E(), (l = L.value) == null || l.focus(), (u = (c = w.value) == null ? void 0 : c.querySelector(".fx-opt.is-on")) == null || u.scrollIntoView({ block: "nearest" }), Je());
|
|
1863
1890
|
}
|
|
1864
1891
|
function B() {
|
|
1865
1892
|
r.value && (r.value = !1, P.value = "", Ne());
|
|
@@ -1916,9 +1943,9 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
1916
1943
|
}
|
|
1917
1944
|
l.key !== "ArrowDown" && l.key !== "ArrowUp" && l.key !== "Home" && l.key !== "End" || (l.preventDefault(), aa(l.key));
|
|
1918
1945
|
}
|
|
1919
|
-
return
|
|
1946
|
+
return He(Ne), (l, c) => (N(), C("div", {
|
|
1920
1947
|
ref_key: "rootEl",
|
|
1921
|
-
ref:
|
|
1948
|
+
ref: m,
|
|
1922
1949
|
class: oe(["fx-sel", o.value])
|
|
1923
1950
|
}, [
|
|
1924
1951
|
_("button", la({
|
|
@@ -1941,7 +1968,7 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
1941
1968
|
r.value ? (N(), C("div", {
|
|
1942
1969
|
key: 0,
|
|
1943
1970
|
ref_key: "popEl",
|
|
1944
|
-
ref:
|
|
1971
|
+
ref: w,
|
|
1945
1972
|
class: oe(["fx-pop", { "fx-pop-rich": S.value }]),
|
|
1946
1973
|
role: "listbox",
|
|
1947
1974
|
"aria-multiselectable": e.multiple || void 0,
|
|
@@ -1964,8 +1991,8 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
1964
1991
|
[ca, P.value]
|
|
1965
1992
|
])
|
|
1966
1993
|
])) : U("", !0),
|
|
1967
|
-
e.searchable && !
|
|
1968
|
-
(N(!0), C(ce, null, ya(
|
|
1994
|
+
e.searchable && !H.value.length ? (N(), C("div", Ln, "No matches")) : U("", !0),
|
|
1995
|
+
(N(!0), C(ce, null, ya(H.value, (u) => (N(), C(ce, {
|
|
1969
1996
|
key: "heading" in u ? `heading:${u.heading}` : `option:${u.option.value}`
|
|
1970
1997
|
}, [
|
|
1971
1998
|
"heading" in u ? (N(), C("div", On, F(u.heading), 1)) : (N(), C("div", {
|
|
@@ -2011,7 +2038,7 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
2011
2038
|
], 8, ["disabled"]))
|
|
2012
2039
|
], 2));
|
|
2013
2040
|
}
|
|
2014
|
-
}), $n = ["id", "aria-labelledby", "aria-label"], Pe = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',
|
|
2041
|
+
}), $n = ["id", "aria-labelledby", "aria-label"], Pe = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', To = /* @__PURE__ */ Ae({
|
|
2015
2042
|
__name: "ScheduleModal",
|
|
2016
2043
|
props: {
|
|
2017
2044
|
open: { type: Boolean },
|
|
@@ -2023,38 +2050,38 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
2023
2050
|
},
|
|
2024
2051
|
emits: ["close"],
|
|
2025
2052
|
setup(e, { emit: a }) {
|
|
2026
|
-
const t = e, n = a, s =
|
|
2053
|
+
const t = e, n = a, s = g(null);
|
|
2027
2054
|
let o = null;
|
|
2028
2055
|
function r() {
|
|
2029
2056
|
fe(() => {
|
|
2030
|
-
const
|
|
2031
|
-
|
|
2057
|
+
const m = s.value;
|
|
2058
|
+
m && (m.querySelector(Pe) ?? m).focus();
|
|
2032
2059
|
});
|
|
2033
2060
|
}
|
|
2034
|
-
function i(
|
|
2061
|
+
function i(m) {
|
|
2035
2062
|
if (!t.open) return;
|
|
2036
|
-
if (
|
|
2037
|
-
|
|
2063
|
+
if (m.key === "Escape") {
|
|
2064
|
+
m.preventDefault(), n("close");
|
|
2038
2065
|
return;
|
|
2039
2066
|
}
|
|
2040
|
-
if (
|
|
2067
|
+
if (m.key !== "Tab" || !s.value) return;
|
|
2041
2068
|
const f = Array.from(s.value.querySelectorAll(Pe));
|
|
2042
2069
|
if (!f.length) return;
|
|
2043
|
-
const
|
|
2044
|
-
|
|
2070
|
+
const w = f[0], $ = f[f.length - 1];
|
|
2071
|
+
m.shiftKey && document.activeElement === w ? (m.preventDefault(), $.focus()) : !m.shiftKey && document.activeElement === $ && (m.preventDefault(), w.focus());
|
|
2045
2072
|
}
|
|
2046
2073
|
return Ee(
|
|
2047
2074
|
() => t.open,
|
|
2048
|
-
(
|
|
2049
|
-
|
|
2075
|
+
(m) => {
|
|
2076
|
+
m ? (o = document.activeElement instanceof HTMLElement ? document.activeElement : null, r()) : (o == null || o.focus(), o = null);
|
|
2050
2077
|
},
|
|
2051
2078
|
{ immediate: !0 }
|
|
2052
|
-
),
|
|
2079
|
+
), we(() => document.addEventListener("keydown", i)), He(() => {
|
|
2053
2080
|
document.removeEventListener("keydown", i), o = null;
|
|
2054
|
-
}), (
|
|
2081
|
+
}), (m, f) => e.open ? (N(), C("div", {
|
|
2055
2082
|
key: 0,
|
|
2056
2083
|
class: "modal-overlay open",
|
|
2057
|
-
onClick: f[0] || (f[0] = fa((
|
|
2084
|
+
onClick: f[0] || (f[0] = fa((w) => n("close"), ["self"]))
|
|
2058
2085
|
}, [
|
|
2059
2086
|
_("div", {
|
|
2060
2087
|
id: e.id,
|
|
@@ -2068,88 +2095,92 @@ const bn = ["data-hierarchy", "data-size", "data-icon"], So = /* @__PURE__ */ Ae
|
|
|
2068
2095
|
"aria-label": e.label,
|
|
2069
2096
|
tabindex: "-1"
|
|
2070
2097
|
}, [
|
|
2071
|
-
Ye(
|
|
2098
|
+
Ye(m.$slots, "default")
|
|
2072
2099
|
], 14, $n)
|
|
2073
2100
|
])) : U("", !0);
|
|
2074
2101
|
}
|
|
2075
2102
|
});
|
|
2076
2103
|
export {
|
|
2077
2104
|
ao as $,
|
|
2078
|
-
|
|
2105
|
+
Ho as A,
|
|
2079
2106
|
Ea as B,
|
|
2080
2107
|
Gn as C,
|
|
2081
2108
|
Qn as D,
|
|
2082
2109
|
to as E,
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2110
|
+
wa as F,
|
|
2111
|
+
vo as G,
|
|
2112
|
+
ho as H,
|
|
2113
|
+
po as I,
|
|
2087
2114
|
We as J,
|
|
2088
|
-
|
|
2115
|
+
D as K,
|
|
2089
2116
|
x as L,
|
|
2090
2117
|
Sa as M,
|
|
2091
2118
|
Oe as N,
|
|
2092
|
-
|
|
2119
|
+
No as O,
|
|
2093
2120
|
ba as P,
|
|
2094
2121
|
jn as Q,
|
|
2095
2122
|
Kn as R,
|
|
2096
|
-
|
|
2123
|
+
Eo as S,
|
|
2097
2124
|
ee as T,
|
|
2098
2125
|
qe as U,
|
|
2099
2126
|
En as V,
|
|
2100
|
-
|
|
2127
|
+
wo as W,
|
|
2101
2128
|
je as X,
|
|
2102
2129
|
X as Y,
|
|
2103
2130
|
Jn as Z,
|
|
2104
2131
|
Zn as _,
|
|
2105
|
-
|
|
2132
|
+
ko as a,
|
|
2106
2133
|
Ke as a0,
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2134
|
+
mn as a1,
|
|
2135
|
+
Z as a2,
|
|
2136
|
+
yo as a3,
|
|
2137
|
+
uo as a4,
|
|
2138
|
+
co as a5,
|
|
2139
|
+
bo as a6,
|
|
2140
|
+
Ia as a7,
|
|
2141
|
+
lo as a8,
|
|
2142
|
+
Na as a9,
|
|
2143
|
+
Ha as aa,
|
|
2144
|
+
Un as ab,
|
|
2145
|
+
ro as ac,
|
|
2146
|
+
dn as ad,
|
|
2147
|
+
Se as ae,
|
|
2148
|
+
Le as af,
|
|
2149
|
+
ie as ag,
|
|
2150
|
+
ge as ah,
|
|
2151
|
+
Lo as ai,
|
|
2152
|
+
La as aj,
|
|
2153
|
+
Ro as ak,
|
|
2154
|
+
Io as al,
|
|
2155
|
+
To as am,
|
|
2156
|
+
Fn as an,
|
|
2157
|
+
Oo as ao,
|
|
2158
|
+
Ve as ap,
|
|
2159
|
+
io as aq,
|
|
2160
|
+
no as ar,
|
|
2161
|
+
se as as,
|
|
2162
|
+
oo as at,
|
|
2132
2163
|
T as b,
|
|
2133
|
-
|
|
2164
|
+
So as c,
|
|
2134
2165
|
z as d,
|
|
2135
2166
|
zn as e,
|
|
2136
2167
|
d as f,
|
|
2137
2168
|
ln as g,
|
|
2138
|
-
|
|
2169
|
+
go as h,
|
|
2139
2170
|
Ma as i,
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2171
|
+
Co as j,
|
|
2172
|
+
mo as k,
|
|
2173
|
+
fo as l,
|
|
2174
|
+
Do as m,
|
|
2144
2175
|
De as n,
|
|
2145
|
-
|
|
2146
|
-
|
|
2176
|
+
y as o,
|
|
2177
|
+
Ao as p,
|
|
2147
2178
|
Xn as q,
|
|
2148
2179
|
eo as r,
|
|
2149
2180
|
so as s,
|
|
2150
2181
|
ve as t,
|
|
2151
2182
|
Vn as u,
|
|
2152
|
-
|
|
2183
|
+
Mo as v,
|
|
2153
2184
|
qn as w,
|
|
2154
2185
|
Wn as x,
|
|
2155
2186
|
_e as y,
|