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