@feedmepos/mf-hrm-portal 2.3.0-dev.11 → 2.3.0-dev.13
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-Ce9BWzt9.js → ApprovalCodeList-D3egZFML.js} +2 -2
- package/dist/{AuditLogList-Cw7WN8K4.js → AuditLogList-BzbaEsSj.js} +3 -3
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BuofBFPC.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Do52KbKm.js} +2 -2
- package/dist/{EmployeeList-B8qWPNvj.js → EmployeeList-BiM8dRwZ.js} +4 -4
- package/dist/{GrantUserList-CgigJIPF.js → GrantUserList-Dj2ms20E.js} +3 -3
- package/dist/{Main-BfoVdxlY.js → Main-C2z7Jf9A.js} +5 -5
- package/dist/{Main-Cg2vC_cj.js → Main-DklZWoKj.js} +2 -2
- package/dist/{Main-D26pgKy1.js → Main-DmpwTPaI.js} +9 -9
- package/dist/{PermissionSetList-CbtDiF4k.js → PermissionSetList-C-qgCcRO.js} +5 -5
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DW1oBTbb.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ggZB5zWW.js} +936 -936
- package/dist/{RoleList-D0I8mbyI.js → RoleList-ohfin77B.js} +7 -7
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Ctwukt6o.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-diuWysro.js} +1 -1
- package/dist/{ScheduleGeneralPage-Kv4pnxCL.js → ScheduleGeneralPage-aCljFf21.js} +4 -4
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-CSA0aaqJ.js → ScheduleModal.vue_vue_type_script_setup_true_lang-x_-BYkcc.js} +178 -175
- package/dist/{SchedulePage-BMWd0bod.js → SchedulePage-DdMHF6kX.js} +2969 -2918
- package/dist/{SchedulePositionPage-5Xvx6Dk5.js → SchedulePositionPage-CID91orD.js} +3 -3
- package/dist/{TeamMemberList-Bh7i5l16.js → TeamMemberList-DJIKL4dE.js} +6 -6
- package/dist/{TimesheetList-BJKU-hnk.js → TimesheetList-BPXWPNfT.js} +5 -5
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-MMWnb9bj.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DVcV0knM.js} +2 -2
- package/dist/{app-BDJ5qxhF.js → app-Bz8568j8.js} +127 -97
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-BWM0vY4w.js → dayjs.min-DhSRKSu4.js} +1 -1
- package/dist/{employee-bBSuAJUr.js → employee-BM44u8b-.js} +3 -3
- package/dist/{iteration-Dg7VAkAn.js → iteration-BHDxs89d.js} +1 -1
- package/dist/{lodash-BknY3p4o.js → lodash-DgSYLwYD.js} +1 -1
- package/dist/{role-BJnJnNd_.js → role-BMJ7LEHN.js} +1 -1
- package/dist/{rule-BEuOY7Wf.js → rule-CCo7_ckA.js} +2 -2
- package/dist/src/views/scheduling/composables/remyPrompt.d.ts +4 -2
- package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +10 -8
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useReportPermissions-D8hJ5W0t.js → useReportPermissions-C_Cd__n1.js} +3 -3
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { onMounted as Se, onBeforeUnmount as Le, ref as A, reactive as
|
|
2
|
-
import { useRoute as
|
|
1
|
+
import { onMounted as Se, onBeforeUnmount as Le, ref as A, reactive as R, shallowRef as we, watch as Ie, computed as $, defineComponent as Re, createElementBlock as k, openBlock as N, renderSlot as ze, useAttrs as la, nextTick as be, normalizeClass as pe, createElementVNode as Y, createBlock as ua, mergeProps as da, toDisplayString as U, Teleport as ca, createCommentVNode as W, withDirectives as ya, vModelText as ma, Fragment as He, renderList as pa, createTextVNode as fa, withModifiers as ha, normalizeStyle as va } from "vue";
|
|
2
|
+
import { useRoute as ga, useRouter as Da } from "vue-router";
|
|
3
3
|
import { useCoreStore as Ve } from "@feedmepos/mf-common";
|
|
4
|
-
import { g as v, b as
|
|
5
|
-
import { E as Pe, u as Ke } from "./employee-
|
|
4
|
+
import { g as v, b as f, u as wa } from "./restaurant-BbYRA_IT.js";
|
|
5
|
+
import { E as Pe, u as Ke } from "./employee-BM44u8b-.js";
|
|
6
6
|
function zn(e) {
|
|
7
7
|
let a = null;
|
|
8
8
|
function t() {
|
|
@@ -63,19 +63,19 @@ function Gn(e) {
|
|
|
63
63
|
const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
64
64
|
async listEmployeeProfiles(e) {
|
|
65
65
|
return v(
|
|
66
|
-
await
|
|
66
|
+
await f("schedules").get("employees", {
|
|
67
67
|
params: e != null && e.length ? { ids: e.join(",") } : void 0
|
|
68
68
|
})
|
|
69
69
|
);
|
|
70
70
|
},
|
|
71
71
|
async listEmployeeConfigs(e) {
|
|
72
72
|
return v(
|
|
73
|
-
await
|
|
73
|
+
await f(`restaurants/${e}/schedules`).get("employee-configs")
|
|
74
74
|
);
|
|
75
75
|
},
|
|
76
76
|
async saveEmployeeConfigs(e, a) {
|
|
77
77
|
return v(
|
|
78
|
-
await
|
|
78
|
+
await f(`restaurants/${e}/schedules`).post(
|
|
79
79
|
"employee-configs/reorder",
|
|
80
80
|
a
|
|
81
81
|
)
|
|
@@ -83,17 +83,17 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
83
83
|
},
|
|
84
84
|
async getSettings(e) {
|
|
85
85
|
return v(
|
|
86
|
-
await
|
|
86
|
+
await f(`restaurants/${e}/schedules`).get("settings")
|
|
87
87
|
);
|
|
88
88
|
},
|
|
89
89
|
async saveSettings(e, a) {
|
|
90
90
|
return v(
|
|
91
|
-
await
|
|
91
|
+
await f(`restaurants/${e}/schedules`).post("settings", a)
|
|
92
92
|
);
|
|
93
93
|
},
|
|
94
94
|
async generateAutoSchedule(e, a) {
|
|
95
95
|
return v(
|
|
96
|
-
await
|
|
96
|
+
await f(`restaurants/${e}/schedules`).post(
|
|
97
97
|
"auto-schedule/generate",
|
|
98
98
|
a
|
|
99
99
|
)
|
|
@@ -101,14 +101,14 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
101
101
|
},
|
|
102
102
|
async getAutoScheduleCapabilities(e) {
|
|
103
103
|
return v(
|
|
104
|
-
await
|
|
104
|
+
await f(`restaurants/${e}/schedules`).get(
|
|
105
105
|
"auto-schedule/capabilities"
|
|
106
106
|
)
|
|
107
107
|
);
|
|
108
108
|
},
|
|
109
109
|
async applyAutoSchedule(e, a) {
|
|
110
110
|
return v(
|
|
111
|
-
await
|
|
111
|
+
await f(`restaurants/${e}/schedules`).post(
|
|
112
112
|
"auto-schedule/apply",
|
|
113
113
|
a
|
|
114
114
|
)
|
|
@@ -117,58 +117,58 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
117
117
|
/** One outlet's whole board over `[from, to]` (inclusive, 'YYYY-MM-DD'). */
|
|
118
118
|
async readBoard(e, a, t) {
|
|
119
119
|
return v(
|
|
120
|
-
await
|
|
120
|
+
await f(`restaurants/${e}/schedules`).get("board", {
|
|
121
121
|
params: { from: a, to: t }
|
|
122
122
|
})
|
|
123
123
|
);
|
|
124
124
|
},
|
|
125
125
|
async createTimeOff(e, a) {
|
|
126
126
|
return v(
|
|
127
|
-
await
|
|
127
|
+
await f(`restaurants/${e}/schedules`).post("time-off", a)
|
|
128
128
|
);
|
|
129
129
|
},
|
|
130
130
|
async updateTimeOffStatus(e, a, t) {
|
|
131
131
|
return v(
|
|
132
|
-
await
|
|
132
|
+
await f(`restaurants/${e}/schedules`).post(
|
|
133
133
|
`time-off/${a}/status`,
|
|
134
134
|
t
|
|
135
135
|
)
|
|
136
136
|
);
|
|
137
137
|
},
|
|
138
138
|
async deleteTimeOff(e, a) {
|
|
139
|
-
await
|
|
139
|
+
await f(`restaurants/${e}/schedules`).delete(`time-off/${a}`);
|
|
140
140
|
},
|
|
141
141
|
/** Creates or updates the employee's shared business-level scheduling profile. */
|
|
142
142
|
async createEmployeeProfile(e, a) {
|
|
143
|
-
return v(await
|
|
143
|
+
return v(await f("schedules").post("employees", a));
|
|
144
144
|
},
|
|
145
145
|
/** Edits the employee's shared business-level scheduling profile. */
|
|
146
146
|
async updateEmployeeProfile(e, a, t) {
|
|
147
147
|
return v(
|
|
148
|
-
await
|
|
148
|
+
await f("schedules").post("employees", { employeeId: a, ...t })
|
|
149
149
|
);
|
|
150
150
|
},
|
|
151
151
|
async validatePosAccess(e) {
|
|
152
|
-
await
|
|
152
|
+
await f("schedules").post("employees/validate-pos-access", e);
|
|
153
153
|
},
|
|
154
154
|
/** Positions are shared across the business. */
|
|
155
155
|
async createPosition(e) {
|
|
156
|
-
return v(await
|
|
156
|
+
return v(await f("schedules").post("positions", e));
|
|
157
157
|
},
|
|
158
158
|
async updatePosition(e, a) {
|
|
159
|
-
return v(await
|
|
159
|
+
return v(await f("schedules").post(`positions/${e}`, a));
|
|
160
160
|
},
|
|
161
161
|
/** Deleting one position is `deletePositions` with a single-id array — the backend's
|
|
162
162
|
* `DELETE positions/:id` route is gone; this is now `DELETE positions?ids=`. */
|
|
163
163
|
async deletePosition(e) {
|
|
164
|
-
await
|
|
164
|
+
await f("schedules").delete("positions", {
|
|
165
165
|
params: { ids: e }
|
|
166
166
|
});
|
|
167
167
|
},
|
|
168
168
|
/** Creates one flat demand interval. */
|
|
169
169
|
async createDemand(e, a) {
|
|
170
170
|
return v(
|
|
171
|
-
await
|
|
171
|
+
await f(`restaurants/${e}/schedules`).post("demands", a)
|
|
172
172
|
);
|
|
173
173
|
},
|
|
174
174
|
/** Deletes a batch of demands in one request — e.g. `saveDemand` replacing a whole
|
|
@@ -176,7 +176,7 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
176
176
|
* array. */
|
|
177
177
|
async deleteDemands(e, a) {
|
|
178
178
|
return v(
|
|
179
|
-
await
|
|
179
|
+
await f(`restaurants/${e}/schedules`).delete("demands", {
|
|
180
180
|
params: { ids: a.join(",") }
|
|
181
181
|
})
|
|
182
182
|
);
|
|
@@ -184,7 +184,7 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
184
184
|
/** Atomically replaces one date/weekday's flattened demand rows. */
|
|
185
185
|
async replaceDemands(e, a) {
|
|
186
186
|
return v(
|
|
187
|
-
await
|
|
187
|
+
await f(`restaurants/${e}/schedules`).post(
|
|
188
188
|
"demands/replace",
|
|
189
189
|
a
|
|
190
190
|
)
|
|
@@ -193,7 +193,7 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
193
193
|
/** Atomically replaces several date/weekday demand generations. */
|
|
194
194
|
async bulkReplaceDemands(e, a) {
|
|
195
195
|
return v(
|
|
196
|
-
await
|
|
196
|
+
await f(`restaurants/${e}/schedules`).post(
|
|
197
197
|
"demands/bulk-replace",
|
|
198
198
|
a
|
|
199
199
|
)
|
|
@@ -202,7 +202,7 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
202
202
|
/** Replaces one date's note/holiday-mark. All three fields back to empty/false clears it. */
|
|
203
203
|
async saveScheduleDay(e, a, t) {
|
|
204
204
|
return v(
|
|
205
|
-
await
|
|
205
|
+
await f(`restaurants/${e}/schedules`).post(
|
|
206
206
|
`days/${a}`,
|
|
207
207
|
t
|
|
208
208
|
)
|
|
@@ -211,12 +211,12 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
211
211
|
/** A one-off shift assignment. */
|
|
212
212
|
async createAssignment(e, a) {
|
|
213
213
|
return v(
|
|
214
|
-
await
|
|
214
|
+
await f(`restaurants/${e}/schedules`).post("assignments", a)
|
|
215
215
|
);
|
|
216
216
|
},
|
|
217
217
|
async updateAssignment(e, a, t) {
|
|
218
218
|
return v(
|
|
219
|
-
await
|
|
219
|
+
await f(`restaurants/${e}/schedules`).patch(
|
|
220
220
|
`assignments/${a}`,
|
|
221
221
|
t
|
|
222
222
|
)
|
|
@@ -225,7 +225,7 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
225
225
|
/** Atomically applies assignment updates, creates, and deletes used by moves and swaps. */
|
|
226
226
|
async bulkSaveAssignments(e, a) {
|
|
227
227
|
return v(
|
|
228
|
-
await
|
|
228
|
+
await f(`restaurants/${e}/schedules`).post(
|
|
229
229
|
"assignments/bulk",
|
|
230
230
|
a
|
|
231
231
|
)
|
|
@@ -236,7 +236,7 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
236
236
|
* array. */
|
|
237
237
|
async deleteAssignments(e, a) {
|
|
238
238
|
return v(
|
|
239
|
-
await
|
|
239
|
+
await f(`restaurants/${e}/schedules`).delete("assignments", {
|
|
240
240
|
params: { ids: a.join(",") }
|
|
241
241
|
})
|
|
242
242
|
);
|
|
@@ -245,7 +245,7 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
245
245
|
* every DRAFT shift on the board to PUBLISHED at once. */
|
|
246
246
|
async bulkUpdateAssignmentStatus(e, a) {
|
|
247
247
|
return v(
|
|
248
|
-
await
|
|
248
|
+
await f(`restaurants/${e}/schedules`).patch(
|
|
249
249
|
"assignments/bulk-status",
|
|
250
250
|
a
|
|
251
251
|
)
|
|
@@ -263,18 +263,18 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
263
263
|
employeeConfigs: A([]),
|
|
264
264
|
employeeOutletIds: we({}),
|
|
265
265
|
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:
|
|
266
|
+
positions: R([]),
|
|
267
|
+
positionRecords: R([]),
|
|
268
|
+
rolePositions: R({}),
|
|
269
|
+
outlet: R({ name: "" }),
|
|
270
|
+
locationOptions: R([]),
|
|
271
|
+
locationLabelById: R({}),
|
|
272
|
+
departmentOptions: R([]),
|
|
273
|
+
compensationGroupOptions: R([]),
|
|
274
|
+
compensationGroupMeta: R({}),
|
|
275
|
+
existingStaff: R([]),
|
|
276
|
+
shiftTemplates: R([]),
|
|
277
|
+
rules: R({
|
|
278
278
|
coverage: {},
|
|
279
279
|
openFrom: "00:00",
|
|
280
280
|
openTo: "24:00",
|
|
@@ -320,7 +320,7 @@ const ae = 500, ba = 10, Te = 6, jn = 1500, Qe = 1e6, w = {
|
|
|
320
320
|
compensationGroupMeta: Xn,
|
|
321
321
|
existingStaff: Jn,
|
|
322
322
|
shiftTemplates: Zn,
|
|
323
|
-
rules:
|
|
323
|
+
rules: C
|
|
324
324
|
} = Xe;
|
|
325
325
|
function ka() {
|
|
326
326
|
const e = Xe.rules;
|
|
@@ -433,7 +433,7 @@ async function to(e, a) {
|
|
|
433
433
|
async function no(e, a) {
|
|
434
434
|
const t = Ke(), n = (await re(!0)).find((u) => u._id === e);
|
|
435
435
|
if (!n) throw new Error("Could not find this employee");
|
|
436
|
-
const i = (u) => u.slice().sort((
|
|
436
|
+
const i = (u) => u.slice().sort((h, E) => h.restaurantId.localeCompare(E.restaurantId)).map((h) => `${h.restaurantId}:${h.roleId}`).join("|"), s = i(n.restaurantRole) !== i(a.roles), l = n.passcode !== a.passcode || n.isMasterUser !== a.masterUser || a.masterUser && (n.code ?? "") !== a.masterCode;
|
|
437
437
|
if (!s && !l) return;
|
|
438
438
|
const o = n.restaurantRole.map((u) => ({
|
|
439
439
|
restaurantId: u.restaurantId,
|
|
@@ -625,11 +625,11 @@ async function vo(e) {
|
|
|
625
625
|
if (!m.value) throw new Error("No outlet selected");
|
|
626
626
|
return w.applyAutoSchedule(m.value, e);
|
|
627
627
|
}
|
|
628
|
-
async function
|
|
628
|
+
async function go(e) {
|
|
629
629
|
if (!m.value) throw new Error("No outlet selected");
|
|
630
630
|
return w.bulkSaveAssignments(m.value, e);
|
|
631
631
|
}
|
|
632
|
-
async function
|
|
632
|
+
async function Do(e) {
|
|
633
633
|
if (!m.value) throw new Error("No outlet selected");
|
|
634
634
|
e.length && await w.deleteAssignments(m.value, e);
|
|
635
635
|
}
|
|
@@ -1046,9 +1046,9 @@ const Ya = "AE", xa = "Asia/Dubai", Ba = {
|
|
|
1046
1046
|
regular: 2,
|
|
1047
1047
|
overtime: 3
|
|
1048
1048
|
}
|
|
1049
|
-
}, Dt = {
|
|
1050
|
-
maxHoursPerMonth: null
|
|
1051
1049
|
}, gt = {
|
|
1050
|
+
maxHoursPerMonth: null
|
|
1051
|
+
}, Dt = {
|
|
1052
1052
|
minHoursPerDay: null,
|
|
1053
1053
|
maxHoursPerDay: 8,
|
|
1054
1054
|
maxHoursPerWeek: 48
|
|
@@ -1120,8 +1120,8 @@ const Ya = "AE", xa = "Asia/Dubai", Ba = {
|
|
|
1120
1120
|
countryCode: ft,
|
|
1121
1121
|
timezone: ht,
|
|
1122
1122
|
payRate: vt,
|
|
1123
|
-
overtime:
|
|
1124
|
-
workingHours:
|
|
1123
|
+
overtime: gt,
|
|
1124
|
+
workingHours: Dt,
|
|
1125
1125
|
recurringPublicHolidays: wt,
|
|
1126
1126
|
publicHolidays: Ht
|
|
1127
1127
|
}, Et = "MY", bt = "Asia/Kuala_Lumpur", Pt = {
|
|
@@ -1637,29 +1637,29 @@ function vn(e) {
|
|
|
1637
1637
|
Na.name = (e == null ? void 0 : e.outlet.name) ?? "", me(Pa, (e == null ? void 0 : e.positions.map((o) => o.name)) ?? []), me(K, (e == null ? void 0 : e.positions) ?? []);
|
|
1638
1638
|
const a = (e == null ? void 0 : e.restaurantProfile.operatingHours) ?? [], t = Array.from({ length: 7 }, () => []);
|
|
1639
1639
|
for (const o of a) t[le(o.dayOfWeek)] = o.closed ? [] : o.hours;
|
|
1640
|
-
me(
|
|
1640
|
+
me(C.dayHours, t);
|
|
1641
1641
|
const n = a.filter((o) => !o.closed).flatMap((o) => o.hours);
|
|
1642
|
-
|
|
1643
|
-
|
|
1642
|
+
C.openFrom = n.length ? n.map((o) => o.start).reduce((o, u) => u < o ? u : o) : "00:00", C.openTo = n.length ? n.map((o) => o.end).reduce((o, u) => u > o ? u : o) : "24:00", me(
|
|
1643
|
+
C.closedWeekdays,
|
|
1644
1644
|
a.filter((o) => o.closed).map((o) => le(o.dayOfWeek)).sort((o, u) => o - u)
|
|
1645
1645
|
);
|
|
1646
1646
|
const i = cn(yn.currentCountry.value), s = (e == null ? void 0 : e.settings.settingsConfigured) === !0, l = s ? e.settings.payRate : i.payRate;
|
|
1647
|
-
|
|
1647
|
+
C.otCapHours = s ? e.settings.overtime.maxHoursPerMonth : i.overtime.maxHoursPerMonth, C.workingHours = s ? e.settings.workingHours : {
|
|
1648
1648
|
minHoursPerDay: null,
|
|
1649
1649
|
maxHoursPerDay: i.workingHours.maxHoursPerDay,
|
|
1650
1650
|
maxHoursPerWeek: i.workingHours.maxHoursPerWeek
|
|
1651
|
-
},
|
|
1651
|
+
}, C.payRate.NORMAL.overtime = l.NORMAL.overtime, C.payRate.REST_DAY.regular = l.REST_DAY.regular, C.payRate.REST_DAY.overtime = l.REST_DAY.overtime, C.payRate.PUBLIC_HOLIDAY.regular = l.PUBLIC_HOLIDAY.regular, C.payRate.PUBLIC_HOLIDAY.overtime = l.PUBLIC_HOLIDAY.overtime;
|
|
1652
1652
|
}
|
|
1653
1653
|
Ie(c, vn, { immediate: !0 });
|
|
1654
1654
|
function ve(e) {
|
|
1655
1655
|
var a, t, n;
|
|
1656
1656
|
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) ??
|
|
1657
|
+
minHoursPerDay: ((a = e.workingHours) == null ? void 0 : a.minHoursPerDay) ?? C.workingHours.minHoursPerDay,
|
|
1658
|
+
maxHoursPerDay: ((t = e.workingHours) == null ? void 0 : t.maxHoursPerDay) ?? C.workingHours.maxHoursPerDay,
|
|
1659
|
+
maxHoursPerWeek: ((n = e.workingHours) == null ? void 0 : n.maxHoursPerWeek) ?? C.workingHours.maxHoursPerWeek
|
|
1660
1660
|
};
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function gn(e) {
|
|
1663
1663
|
return e.reduce(
|
|
1664
1664
|
(a, t) => {
|
|
1665
1665
|
const n = ve(t).maxHoursPerWeek;
|
|
@@ -1668,7 +1668,7 @@ function Dn(e) {
|
|
|
1668
1668
|
0
|
|
1669
1669
|
);
|
|
1670
1670
|
}
|
|
1671
|
-
function
|
|
1671
|
+
function Dn(e, a) {
|
|
1672
1672
|
if (e.wage.type === "HOURLY") return e.wage.amount;
|
|
1673
1673
|
const t = ve(e).maxHoursPerWeek ?? a;
|
|
1674
1674
|
return t ? e.wage.amount / (t * (52 / 12)) : 0;
|
|
@@ -1744,34 +1744,34 @@ function Oo(e = []) {
|
|
|
1744
1744
|
), i = se.value.filter((o) => {
|
|
1745
1745
|
var u;
|
|
1746
1746
|
return ((u = n.get(o._id)) == null ? void 0 : u.enabled) !== !1;
|
|
1747
|
-
}).map((o) => t.get(o._id) ?? bn(o)), s =
|
|
1747
|
+
}).map((o) => t.get(o._id) ?? bn(o)), s = gn(i), l = /* @__PURE__ */ new Map();
|
|
1748
1748
|
for (const o of a.assignments) {
|
|
1749
|
-
const u = `${o.employeeId}|${o.date}`,
|
|
1750
|
-
|
|
1749
|
+
const u = `${o.employeeId}|${o.date}`, h = l.get(u);
|
|
1750
|
+
h ? h.push(o) : l.set(u, [o]);
|
|
1751
1751
|
}
|
|
1752
1752
|
return i.map((o) => {
|
|
1753
1753
|
var ce;
|
|
1754
|
-
const u = se.value.find((
|
|
1754
|
+
const u = se.value.find((g) => g._id === o.employeeId) ?? {
|
|
1755
1755
|
code: void 0,
|
|
1756
1756
|
passcode: "",
|
|
1757
1757
|
isMasterUser: !1
|
|
1758
|
-
},
|
|
1759
|
-
...
|
|
1760
|
-
...o.secondaryPositions.filter((
|
|
1761
|
-
], x = X[0] ?? "",
|
|
1762
|
-
const
|
|
1763
|
-
if (
|
|
1764
|
-
const _ = (l.get(`${o.employeeId}|${
|
|
1758
|
+
}, h = ve(o), E = hn(o.employeeId), T = new Set(K.map((g) => g.id)), Q = new Set(K.map((g) => g.name.toLocaleLowerCase())), p = (g) => g.positionId ? T.has(g.positionId) : Q.has(g.positionName.toLocaleLowerCase()), H = (ce = o.primaryPosition) == null ? void 0 : ce.positionName, L = !!o.primaryPosition && p(o.primaryPosition), I = o.secondaryPositions.filter(p).map((g) => g.positionName), X = H ? L ? [H, ...I] : [] : I, J = [
|
|
1759
|
+
...H && !L ? [H] : [],
|
|
1760
|
+
...o.secondaryPositions.filter((g) => !p(g)).map((g) => g.positionName)
|
|
1761
|
+
], x = X[0] ?? "", M = e.map((g) => {
|
|
1762
|
+
const b = ie(g), D = (a.timeOff ?? []).filter((P) => P.employeeId === o.employeeId).map((P) => En(P, b)).find((P) => P !== null);
|
|
1763
|
+
if (D) return D;
|
|
1764
|
+
const _ = (l.get(`${o.employeeId}|${b}`) ?? []).filter((P) => P.startTime && P.endTime).map((P) => Hn(P)).sort((P, ge) => P.start.localeCompare(ge.start));
|
|
1765
1765
|
return _.length ? _.length === 1 ? _[0] : _ : null;
|
|
1766
1766
|
}), Z = o.availability.length > 0, ue = Array.from(
|
|
1767
1767
|
{ length: 7 },
|
|
1768
|
-
(
|
|
1769
|
-
), de = Array.from({ length: 7 }, (
|
|
1770
|
-
const
|
|
1771
|
-
return { from: (
|
|
1768
|
+
(g, b) => Z ? o.availability.some((D) => le(D.dayOfWeek) === b) : !0
|
|
1769
|
+
), de = Array.from({ length: 7 }, (g, b) => {
|
|
1770
|
+
const D = o.availability.find((B) => le(B.dayOfWeek) === b);
|
|
1771
|
+
return { from: (D == null ? void 0 : D.start) ?? "", to: (D == null ? void 0 : D.end) ?? "" };
|
|
1772
1772
|
});
|
|
1773
1773
|
return {
|
|
1774
|
-
id:
|
|
1774
|
+
id: E,
|
|
1775
1775
|
sourceId: o.employeeId,
|
|
1776
1776
|
name: o.name,
|
|
1777
1777
|
// POS access belongs to the POS roster, not the scheduling profile. Keep these
|
|
@@ -1783,34 +1783,34 @@ function Oo(e = []) {
|
|
|
1783
1783
|
employmentType: o.employmentType,
|
|
1784
1784
|
role: x,
|
|
1785
1785
|
initials: fn(o.name),
|
|
1786
|
-
color: Ue[(
|
|
1786
|
+
color: Ue[(E - Qe - 1) % Ue.length],
|
|
1787
1787
|
// Gross hours actually rostered this week — the figure the cost rail multiplies by
|
|
1788
1788
|
// the rate. Contracted hours are a separate question, answered by RULES.contract.
|
|
1789
1789
|
// Rounded to one decimal — `hoursBetween` divides by 60, so an unrounded sum reads
|
|
1790
1790
|
// as a long, meaningless float (e.g. 31.983333333333334) everywhere this is shown
|
|
1791
1791
|
// verbatim, matching the rounding `employeeLoadOf`'s own hours figure already uses.
|
|
1792
1792
|
weekHours: Math.round(
|
|
1793
|
-
|
|
1794
|
-
(
|
|
1795
|
-
(
|
|
1793
|
+
M.reduce(
|
|
1794
|
+
(g, b) => g + (Array.isArray(b) ? b : b && "start" in b ? [b] : []).reduce(
|
|
1795
|
+
(D, B) => D + pn(B.start, B.end),
|
|
1796
1796
|
0
|
|
1797
1797
|
),
|
|
1798
1798
|
0
|
|
1799
1799
|
) * 10
|
|
1800
1800
|
) / 10,
|
|
1801
1801
|
pct: wn(o, s),
|
|
1802
|
-
contractHours:
|
|
1803
|
-
minHoursPerDay:
|
|
1802
|
+
contractHours: h.maxHoursPerWeek ?? void 0,
|
|
1803
|
+
minHoursPerDay: h.minHoursPerDay ?? void 0,
|
|
1804
1804
|
// Keep the persisted override shape here. Consumers that need the effective value use
|
|
1805
1805
|
// effectiveWorkingHours(), so an inherited null remains distinguishable from an override.
|
|
1806
1806
|
workingHours: o.workingHours,
|
|
1807
1807
|
// Every outlet the POS says this person works at, not just this one — the Add / Edit form
|
|
1808
1808
|
// shows them, and saving keeps them.
|
|
1809
1809
|
locations: Nn(o.employeeId),
|
|
1810
|
-
rate:
|
|
1810
|
+
rate: Dn(o, s),
|
|
1811
1811
|
positions: X,
|
|
1812
1812
|
archivedPositions: J.length ? J : void 0,
|
|
1813
|
-
shifts:
|
|
1813
|
+
shifts: M,
|
|
1814
1814
|
// Remarks live in their own collection in the older scheduling design and are not
|
|
1815
1815
|
// part of this board's payload yet.
|
|
1816
1816
|
remarks: [],
|
|
@@ -1841,27 +1841,30 @@ function $o() {
|
|
|
1841
1841
|
return { byDate: a, byWeekday: t };
|
|
1842
1842
|
}
|
|
1843
1843
|
function Yo() {
|
|
1844
|
-
const e = Ve(), { restaurants: a, readRestaurants: t } = wa(), n =
|
|
1845
|
-
() =>
|
|
1846
|
-
), o =
|
|
1847
|
-
var
|
|
1848
|
-
return ((
|
|
1844
|
+
const e = Ve(), { restaurants: a, readRestaurants: t } = wa(), n = ga(), i = Da(), s = A(!1), l = $(
|
|
1845
|
+
() => a.value.filter((p) => p.managable).map((p) => ({ value: p._id, label: p.profile.name })).sort((p, H) => p.label.localeCompare(H.label))
|
|
1846
|
+
), o = () => {
|
|
1847
|
+
var p;
|
|
1848
|
+
return `hrm-schedule-outlet:${((p = e.currentBusiness.value) == null ? void 0 : p._id) ?? ""}`;
|
|
1849
|
+
}, u = $(() => {
|
|
1850
|
+
var p;
|
|
1851
|
+
return ((p = e.currentRestaurant.value) == null ? void 0 : p._id) ?? "";
|
|
1849
1852
|
});
|
|
1850
|
-
async function
|
|
1851
|
-
return Be(
|
|
1853
|
+
async function h(p, H) {
|
|
1854
|
+
return Be(p) ? (localStorage.setItem(o(), p), n.query.restaurantId !== p && i.replace({ query: { ...n.query, restaurantId: p } }), await Promise.all([Me(p), Oa(H)]), !0) : !1;
|
|
1852
1855
|
}
|
|
1853
|
-
const
|
|
1854
|
-
async function
|
|
1855
|
-
var
|
|
1856
|
-
await t(), xe.splice(0, xe.length, ...l.value.map((
|
|
1857
|
-
const
|
|
1858
|
-
return
|
|
1856
|
+
const E = (p) => !!p && l.value.some((H) => H.value === p);
|
|
1857
|
+
async function T() {
|
|
1858
|
+
var L;
|
|
1859
|
+
await t(), xe.splice(0, xe.length, ...l.value.map((I) => I.label)), Object.keys(ne).forEach((I) => delete ne[I]), a.value.forEach((I) => ne[I._id] = I.profile.name);
|
|
1860
|
+
const p = localStorage.getItem(o()) ?? "", H = [m.value, p, u.value].find(E) ?? ((L = l.value[0]) == null ? void 0 : L.value) ?? "";
|
|
1861
|
+
return H && Be(H), s.value = !0, H;
|
|
1859
1862
|
}
|
|
1860
|
-
async function
|
|
1861
|
-
const
|
|
1862
|
-
return
|
|
1863
|
+
async function Q() {
|
|
1864
|
+
const p = await T();
|
|
1865
|
+
return p && await Me(p), p;
|
|
1863
1866
|
}
|
|
1864
|
-
return { options: l, ready: s, outletId: m, resolve:
|
|
1867
|
+
return { options: l, ready: s, outletId: m, resolve: Q, resolveOutlet: T, switchTo: h };
|
|
1865
1868
|
}
|
|
1866
1869
|
const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re({
|
|
1867
1870
|
__name: "ScheduleButton",
|
|
@@ -1871,7 +1874,7 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re
|
|
|
1871
1874
|
iconOnly: { type: Boolean, default: !1 }
|
|
1872
1875
|
},
|
|
1873
1876
|
setup(e) {
|
|
1874
|
-
return (a, t) => (N(),
|
|
1877
|
+
return (a, t) => (N(), k("button", {
|
|
1875
1878
|
type: "button",
|
|
1876
1879
|
class: "sch-button",
|
|
1877
1880
|
"data-hierarchy": e.hierarchy,
|
|
@@ -1914,11 +1917,11 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re
|
|
|
1914
1917
|
},
|
|
1915
1918
|
emits: ["update:modelValue", "toggle"],
|
|
1916
1919
|
setup(e, { emit: a }) {
|
|
1917
|
-
const t = e, n = a, i = la(), s =
|
|
1920
|
+
const t = e, n = a, i = la(), s = $(() => i.class ?? ""), l = A(!1), o = A(!1), u = A(null), h = A(null), E = A(null), T = $(() => t.teleport !== !1 && o.value);
|
|
1918
1921
|
Se(() => {
|
|
1919
1922
|
o.value = typeof document < "u" && !!document.body;
|
|
1920
1923
|
});
|
|
1921
|
-
const
|
|
1924
|
+
const Q = $(() => {
|
|
1922
1925
|
var r, y;
|
|
1923
1926
|
if (!t.multiple && t.selectedLabel != null) return t.selectedLabel;
|
|
1924
1927
|
if (t.multiple) {
|
|
@@ -1927,78 +1930,78 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re
|
|
|
1927
1930
|
}
|
|
1928
1931
|
return ((y = t.options.find((d) => d.value === t.modelValue)) == null ? void 0 : y.label) ?? "";
|
|
1929
1932
|
});
|
|
1930
|
-
function
|
|
1933
|
+
function p(r) {
|
|
1931
1934
|
var y;
|
|
1932
1935
|
return t.multiple ? !!((y = t.selected) != null && y.includes(r.value)) : t.selectedId != null ? r.id === t.selectedId : r.value === t.modelValue;
|
|
1933
1936
|
}
|
|
1934
|
-
const
|
|
1935
|
-
const r =
|
|
1937
|
+
const H = $(() => !!t.menuTitle || t.options.some((r) => r.hint)), L = A(""), I = A(null), X = $(() => {
|
|
1938
|
+
const r = L.value.trim().toLowerCase();
|
|
1936
1939
|
return !t.searchable || !r ? t.options : t.options.filter((y) => `${y.label} ${y.hint ?? ""}`.toLowerCase().includes(r));
|
|
1937
|
-
}), J =
|
|
1940
|
+
}), J = $(() => {
|
|
1938
1941
|
const r = [];
|
|
1939
1942
|
let y;
|
|
1940
1943
|
for (const d of X.value)
|
|
1941
1944
|
d.group !== y && (y = d.group, y && r.push({ heading: y })), r.push({ option: d });
|
|
1942
1945
|
return r;
|
|
1943
|
-
}), x = 5,
|
|
1946
|
+
}), x = 5, M = 8;
|
|
1944
1947
|
function Z() {
|
|
1945
|
-
const r =
|
|
1948
|
+
const r = E.value, y = h.value;
|
|
1946
1949
|
if (!r || !y) return;
|
|
1947
|
-
const d = y.getBoundingClientRect(),
|
|
1948
|
-
r.style.minWidth = `${Math.round(d.width)}px`, r.style.maxWidth = `${Math.max(180, Math.round(
|
|
1949
|
-
const q =
|
|
1950
|
+
const d = y.getBoundingClientRect(), S = window.innerWidth || document.documentElement.clientWidth, O = window.innerHeight || document.documentElement.clientHeight;
|
|
1951
|
+
r.style.minWidth = `${Math.round(d.width)}px`, r.style.maxWidth = `${Math.max(180, Math.round(S - M * 2))}px`;
|
|
1952
|
+
const q = O - d.bottom - x - M, sa = d.top - x - M;
|
|
1950
1953
|
r.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(q, sa)))}px`;
|
|
1951
1954
|
const ye = r.offsetHeight, ia = r.offsetWidth;
|
|
1952
|
-
let
|
|
1953
|
-
|
|
1954
|
-
const ra = Math.min(Math.max(
|
|
1955
|
-
r.style.top = `${Math.round(
|
|
1955
|
+
let De = d.bottom + x;
|
|
1956
|
+
De + ye > O - M && (De = d.top - x - ye >= M ? d.top - x - ye : Math.max(M, O - ye - M));
|
|
1957
|
+
const ra = Math.min(Math.max(M, d.left), Math.max(M, S - ia - M));
|
|
1958
|
+
r.style.top = `${Math.round(De)}px`, r.style.left = `${Math.round(ra)}px`, r.style.visibility = "visible";
|
|
1956
1959
|
}
|
|
1957
1960
|
function ue(r) {
|
|
1958
|
-
var d,
|
|
1961
|
+
var d, S;
|
|
1959
1962
|
const y = r.target;
|
|
1960
|
-
y && ((d = u.value) != null && d.contains(y) || (
|
|
1963
|
+
y && ((d = u.value) != null && d.contains(y) || (S = E.value) != null && S.contains(y)) || D();
|
|
1961
1964
|
}
|
|
1962
1965
|
function de(r) {
|
|
1963
|
-
const y =
|
|
1966
|
+
const y = E.value, d = r.target;
|
|
1964
1967
|
if (y && d && d !== document && y.contains(d)) return;
|
|
1965
|
-
const
|
|
1966
|
-
if (!
|
|
1967
|
-
const
|
|
1968
|
-
if (
|
|
1969
|
-
|
|
1968
|
+
const S = h.value;
|
|
1969
|
+
if (!S) return;
|
|
1970
|
+
const O = S.getBoundingClientRect(), q = window.innerHeight || document.documentElement.clientHeight;
|
|
1971
|
+
if (O.bottom < 0 || O.top > q) {
|
|
1972
|
+
D();
|
|
1970
1973
|
return;
|
|
1971
1974
|
}
|
|
1972
1975
|
Z();
|
|
1973
1976
|
}
|
|
1974
1977
|
function ce() {
|
|
1975
|
-
document.addEventListener("click", ue), document.addEventListener("scroll", de, !0), window.addEventListener("resize",
|
|
1978
|
+
document.addEventListener("click", ue), document.addEventListener("scroll", de, !0), window.addEventListener("resize", D);
|
|
1976
1979
|
}
|
|
1977
|
-
function
|
|
1978
|
-
document.removeEventListener("click", ue), document.removeEventListener("scroll", de, !0), window.removeEventListener("resize",
|
|
1980
|
+
function g() {
|
|
1981
|
+
document.removeEventListener("click", ue), document.removeEventListener("scroll", de, !0), window.removeEventListener("resize", D);
|
|
1979
1982
|
}
|
|
1980
|
-
async function
|
|
1983
|
+
async function b() {
|
|
1981
1984
|
var r, y, d;
|
|
1982
|
-
t.disabled || l.value || (
|
|
1985
|
+
t.disabled || l.value || (L.value = "", l.value = !0, await be(), Z(), (r = I.value) == null || r.focus(), (d = (y = E.value) == null ? void 0 : y.querySelector(".fx-opt.is-on")) == null || d.scrollIntoView({ block: "nearest" }), ce());
|
|
1983
1986
|
}
|
|
1984
|
-
function
|
|
1985
|
-
l.value && (l.value = !1,
|
|
1987
|
+
function D() {
|
|
1988
|
+
l.value && (l.value = !1, L.value = "", g());
|
|
1986
1989
|
}
|
|
1987
|
-
Ie(
|
|
1990
|
+
Ie(L, async () => {
|
|
1988
1991
|
l.value && (await be(), Z());
|
|
1989
1992
|
});
|
|
1990
1993
|
function B(r) {
|
|
1991
1994
|
var y;
|
|
1992
1995
|
if (r.key === "Escape")
|
|
1993
|
-
r.preventDefault(),
|
|
1996
|
+
r.preventDefault(), D(), (y = h.value) == null || y.focus();
|
|
1994
1997
|
else if (r.key === "Enter") {
|
|
1995
1998
|
r.preventDefault();
|
|
1996
|
-
const d = X.value.find((
|
|
1999
|
+
const d = X.value.find((S) => !S.disabled);
|
|
1997
2000
|
d && P(d);
|
|
1998
2001
|
}
|
|
1999
2002
|
}
|
|
2000
2003
|
function _() {
|
|
2001
|
-
l.value ?
|
|
2004
|
+
l.value ? D() : b();
|
|
2002
2005
|
}
|
|
2003
2006
|
function P(r) {
|
|
2004
2007
|
if (!r.disabled) {
|
|
@@ -2006,28 +2009,28 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re
|
|
|
2006
2009
|
n("toggle", r.value);
|
|
2007
2010
|
return;
|
|
2008
2011
|
}
|
|
2009
|
-
if (
|
|
2012
|
+
if (D(), t.multiple) {
|
|
2010
2013
|
n("update:modelValue", r.value);
|
|
2011
2014
|
return;
|
|
2012
2015
|
}
|
|
2013
2016
|
r.value !== t.modelValue && n("update:modelValue", r.value);
|
|
2014
2017
|
}
|
|
2015
2018
|
}
|
|
2016
|
-
const
|
|
2019
|
+
const ge = $(() => t.options.filter((r) => !r.disabled));
|
|
2017
2020
|
function na(r) {
|
|
2018
|
-
const y =
|
|
2021
|
+
const y = ge.value;
|
|
2019
2022
|
if (t.multiple || !y.length) {
|
|
2020
|
-
|
|
2023
|
+
b();
|
|
2021
2024
|
return;
|
|
2022
2025
|
}
|
|
2023
|
-
const d = y.findIndex((q) => q.value === t.modelValue),
|
|
2024
|
-
|
|
2026
|
+
const d = y.findIndex((q) => q.value === t.modelValue), S = r === "Home" ? 0 : r === "End" ? y.length - 1 : r === "ArrowDown" ? Math.min(y.length - 1, (d < 0 ? -1 : d) + 1) : Math.max(0, (d < 0 ? 1 : d) - 1), O = y[S];
|
|
2027
|
+
O && O.value !== t.modelValue ? n("update:modelValue", O.value) : b();
|
|
2025
2028
|
}
|
|
2026
2029
|
function oa(r) {
|
|
2027
2030
|
var y;
|
|
2028
2031
|
if (r.key === "Escape") {
|
|
2029
2032
|
if (!l.value) return;
|
|
2030
|
-
r.preventDefault(),
|
|
2033
|
+
r.preventDefault(), D(), (y = h.value) == null || y.focus();
|
|
2031
2034
|
return;
|
|
2032
2035
|
}
|
|
2033
2036
|
if (r.key === "Enter" || r.key === " ") {
|
|
@@ -2036,14 +2039,14 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re
|
|
|
2036
2039
|
}
|
|
2037
2040
|
r.key !== "ArrowDown" && r.key !== "ArrowUp" && r.key !== "Home" && r.key !== "End" || (r.preventDefault(), na(r.key));
|
|
2038
2041
|
}
|
|
2039
|
-
return Le(
|
|
2042
|
+
return Le(g), (r, y) => (N(), k("div", {
|
|
2040
2043
|
ref_key: "rootEl",
|
|
2041
2044
|
ref: u,
|
|
2042
2045
|
class: pe(["fx-sel", s.value])
|
|
2043
2046
|
}, [
|
|
2044
2047
|
Y("button", da({
|
|
2045
2048
|
ref_key: "btnEl",
|
|
2046
|
-
ref:
|
|
2049
|
+
ref: h
|
|
2047
2050
|
}, r.$attrs, {
|
|
2048
2051
|
type: "button",
|
|
2049
2052
|
class: ["sch-input fx-btn", { "is-open": l.value }],
|
|
@@ -2052,27 +2055,27 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re
|
|
|
2052
2055
|
"aria-expanded": l.value,
|
|
2053
2056
|
onClick: y[0] || (y[0] = (d) => _()),
|
|
2054
2057
|
onKeydown: oa
|
|
2055
|
-
}), U(
|
|
2058
|
+
}), U(Q.value), 17, Cn),
|
|
2056
2059
|
(N(), ua(ca, {
|
|
2057
2060
|
to: "body",
|
|
2058
|
-
disabled:
|
|
2061
|
+
disabled: !T.value
|
|
2059
2062
|
}, [
|
|
2060
2063
|
Y("div", Mn, [
|
|
2061
|
-
l.value ? (N(),
|
|
2064
|
+
l.value ? (N(), k("div", {
|
|
2062
2065
|
key: 0,
|
|
2063
2066
|
ref_key: "popEl",
|
|
2064
|
-
ref:
|
|
2065
|
-
class: pe(["fx-pop", { "fx-pop-rich":
|
|
2067
|
+
ref: E,
|
|
2068
|
+
class: pe(["fx-pop", { "fx-pop-rich": H.value }]),
|
|
2066
2069
|
role: "listbox",
|
|
2067
2070
|
"aria-multiselectable": e.multiple || void 0,
|
|
2068
2071
|
style: { visibility: "hidden" }
|
|
2069
2072
|
}, [
|
|
2070
|
-
e.menuTitle ? (N(),
|
|
2071
|
-
e.searchable ? (N(),
|
|
2073
|
+
e.menuTitle ? (N(), k("div", Ln, U(e.menuTitle), 1)) : W("", !0),
|
|
2074
|
+
e.searchable ? (N(), k("div", In, [
|
|
2072
2075
|
ya(Y("input", {
|
|
2073
2076
|
ref_key: "searchEl",
|
|
2074
|
-
ref:
|
|
2075
|
-
"onUpdate:modelValue": y[1] || (y[1] = (d) =>
|
|
2077
|
+
ref: I,
|
|
2078
|
+
"onUpdate:modelValue": y[1] || (y[1] = (d) => L.value = d),
|
|
2076
2079
|
class: "sch-input fx-pop-q",
|
|
2077
2080
|
type: "search",
|
|
2078
2081
|
placeholder: "Search",
|
|
@@ -2081,23 +2084,23 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re
|
|
|
2081
2084
|
"aria-label": "Search",
|
|
2082
2085
|
onKeydown: B
|
|
2083
2086
|
}, null, 544), [
|
|
2084
|
-
[ma,
|
|
2087
|
+
[ma, L.value]
|
|
2085
2088
|
])
|
|
2086
2089
|
])) : W("", !0),
|
|
2087
|
-
e.searchable && !J.value.length ? (N(),
|
|
2088
|
-
(N(!0),
|
|
2090
|
+
e.searchable && !J.value.length ? (N(), k("div", Rn, "No matches")) : W("", !0),
|
|
2091
|
+
(N(!0), k(He, null, pa(J.value, (d) => (N(), k(He, {
|
|
2089
2092
|
key: "heading" in d ? `heading:${d.heading}` : `option:${d.option.value}`
|
|
2090
2093
|
}, [
|
|
2091
|
-
"heading" in d ? (N(),
|
|
2094
|
+
"heading" in d ? (N(), k("div", On, U(d.heading), 1)) : (N(), k("div", {
|
|
2092
2095
|
key: 1,
|
|
2093
2096
|
class: pe(["fx-opt", {
|
|
2094
|
-
"is-on":
|
|
2097
|
+
"is-on": p(d.option),
|
|
2095
2098
|
"is-off": d.option.disabled,
|
|
2096
2099
|
"is-new": d.option.command
|
|
2097
2100
|
}]),
|
|
2098
2101
|
role: "option",
|
|
2099
|
-
"aria-selected":
|
|
2100
|
-
onClick: (
|
|
2102
|
+
"aria-selected": p(d.option),
|
|
2103
|
+
onClick: (S) => P(d.option)
|
|
2101
2104
|
}, [
|
|
2102
2105
|
y[2] || (y[2] = Y("span", {
|
|
2103
2106
|
class: "fx-tick",
|
|
@@ -2118,10 +2121,10 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re
|
|
|
2118
2121
|
})
|
|
2119
2122
|
])
|
|
2120
2123
|
], -1)),
|
|
2121
|
-
|
|
2124
|
+
H.value ? (N(), k("span", $n, [
|
|
2122
2125
|
Y("b", null, U(d.option.label), 1),
|
|
2123
|
-
d.option.hint ? (N(),
|
|
2124
|
-
])) : (N(),
|
|
2126
|
+
d.option.hint ? (N(), k("small", Yn, U(d.option.hint), 1)) : W("", !0)
|
|
2127
|
+
])) : (N(), k(He, { key: 1 }, [
|
|
2125
2128
|
fa(U(d.option.label), 1)
|
|
2126
2129
|
], 64))
|
|
2127
2130
|
], 10, Tn))
|
|
@@ -2158,10 +2161,10 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re
|
|
|
2158
2161
|
return;
|
|
2159
2162
|
}
|
|
2160
2163
|
if (u.key !== "Tab" || !i.value) return;
|
|
2161
|
-
const
|
|
2162
|
-
if (!
|
|
2163
|
-
const
|
|
2164
|
-
u.shiftKey && document.activeElement ===
|
|
2164
|
+
const h = Array.from(i.value.querySelectorAll(We));
|
|
2165
|
+
if (!h.length) return;
|
|
2166
|
+
const E = h[0], T = h[h.length - 1];
|
|
2167
|
+
u.shiftKey && document.activeElement === E ? (u.preventDefault(), T.focus()) : !u.shiftKey && document.activeElement === T && (u.preventDefault(), E.focus());
|
|
2165
2168
|
}
|
|
2166
2169
|
return Ie(
|
|
2167
2170
|
() => t.open,
|
|
@@ -2171,10 +2174,10 @@ const kn = ["data-hierarchy", "data-size", "data-icon"], xo = /* @__PURE__ */ Re
|
|
|
2171
2174
|
{ immediate: !0 }
|
|
2172
2175
|
), Se(() => document.addEventListener("keydown", o)), Le(() => {
|
|
2173
2176
|
document.removeEventListener("keydown", o), s = null;
|
|
2174
|
-
}), (u,
|
|
2177
|
+
}), (u, h) => e.open ? (N(), k("div", {
|
|
2175
2178
|
key: 0,
|
|
2176
2179
|
class: "modal-overlay open",
|
|
2177
|
-
onClick:
|
|
2180
|
+
onClick: h[0] || (h[0] = ha((E) => n("close"), ["self"]))
|
|
2178
2181
|
}, [
|
|
2179
2182
|
Y("div", {
|
|
2180
2183
|
id: e.id,
|
|
@@ -2257,7 +2260,7 @@ export {
|
|
|
2257
2260
|
lo as av,
|
|
2258
2261
|
se as aw,
|
|
2259
2262
|
uo as ax,
|
|
2260
|
-
|
|
2263
|
+
C as b,
|
|
2261
2264
|
To as c,
|
|
2262
2265
|
V as d,
|
|
2263
2266
|
Gn as e,
|
|
@@ -2267,8 +2270,8 @@ export {
|
|
|
2267
2270
|
Ca as i,
|
|
2268
2271
|
yo as j,
|
|
2269
2272
|
Io as k,
|
|
2270
|
-
|
|
2271
|
-
|
|
2273
|
+
go as l,
|
|
2274
|
+
Do as m,
|
|
2272
2275
|
Eo as n,
|
|
2273
2276
|
m as o,
|
|
2274
2277
|
Co as p,
|