@feedmepos/mf-hrm-portal 2.3.2-dev.10 → 2.3.2-dev.12
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-RKU5B8SO.js → ApprovalCodeList-CCh9mNJh.js} +7 -7
- package/dist/AuditLogList-DCADUZ5s.js +2019 -0
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-pL2zRc67.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BZQNDOg7.js} +10 -10
- package/dist/{EmployeeList-nrYsS5uz.js → EmployeeList-CRI7XjzX.js} +8 -8
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-7S2w36aY.js → FormSection.vue_vue_type_script_setup_true_lang-y9_hxba6.js} +1 -1
- package/dist/{GrantUserList-BSjeC4MC.js → GrantUserList-DbMngkpK.js} +8 -8
- package/dist/{Main-DbdoVLCE.js → Main-BsFUfsmP.js} +29 -29
- package/dist/{Main-DtmCBbTR.js → Main-CrnM6wr8.js} +2168 -2169
- package/dist/{Main-CpuHaXU6.js → Main-D4Zq5AXi.js} +5 -5
- package/dist/{MyPosProfile-CsTCfGNT.js → MyPosProfile-B4cE47im.js} +1 -1
- package/dist/{PermissionSetList-B1c-uGZO.js → PermissionSetList-D_2x-mDD.js} +112 -113
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BM9Von-l.js +4212 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-D6Z9z_Yt.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-COX-N0k6.js} +414 -448
- package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-TWTVo_9Y.js → RoleForm.vue_vue_type_script_setup_true_lang-D8V8KWiL.js} +41 -41
- package/dist/{RoleList-CwaGNsFy.js → RoleList-BC-c7fqn.js} +105 -96
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-C2ekVXdR.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DBbuSrXV.js} +1 -1
- package/dist/{ScheduleGeneralPage-BVtXmxtp.js → ScheduleGeneralPage-eytzOZQr.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DdsQ8v-5.js → ScheduleModal.vue_vue_type_script_setup_true_lang-CP-kToVO.js} +4 -4
- package/dist/{SchedulePage-3qksmT2I.js → SchedulePage-B0QirzAk.js} +17 -17
- package/dist/{SchedulePositionPage-DAU20KPZ.js → SchedulePositionPage-BAE-NQvL.js} +3 -3
- package/dist/{SelectFilter-BpzBwBmQ.js → SelectFilter-DrLJhxt6.js} +1 -1
- package/dist/TeamMemberList-CHkiL_q9.js +2083 -0
- package/dist/TimesheetList-BZuddmzy.js +402 -0
- package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-LCUO-ogb.js +58 -0
- package/dist/{app-DEZT4wdV.js → app-B9qAxMj1.js} +3516 -3470
- package/dist/app.js +1 -1
- package/dist/{approval-code-BZTz5OXK.js → approval-code-CTgj9q6m.js} +1 -1
- package/dist/{dayjs.min-B55I-uhI.js → dayjs.min-giCSI3N8.js} +22 -22
- package/dist/employee-BD3NXG8h.js +210 -0
- package/dist/{grant-user-B2rYztyf.js → grant-user-jeTFzGU1.js} +1 -1
- package/dist/{index-Bfdseotz.js → iteration-Tyg43nH0.js} +726 -698
- package/dist/{lodash-B8bqa6a9.js → lodash-CZsDR_DU.js} +1 -1
- package/dist/{member-grant-BIpKkuu8.js → member-grant-DsEMLN1N.js} +2 -2
- package/dist/restaurant-CDJ3VjdH.js +49 -0
- package/dist/role-BDRWt87n.js +91 -0
- package/dist/{rule-Ccopk8R_.js → rule-EiO87cJJ.js} +309 -313
- package/dist/src/api/employee/index.d.ts +2 -1
- package/dist/src/api/timesheet/index.d.ts +1 -1
- package/dist/src/composables/useTenant.d.ts +11 -0
- package/dist/src/router/courtGuard.d.ts +4 -0
- package/dist/src/stores/employee.d.ts +7 -1
- package/dist/src/stores/restaurant.d.ts +1 -61
- package/dist/src/stores/team.d.ts +1 -1
- package/dist/src/stores/timesheet.d.ts +51 -66
- package/dist/src/types/timesheet.d.ts +0 -3
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-DfqsbhT2.js → useAppStore-CkUZ2H5h.js} +1 -1
- package/dist/{useLoading-CQnX5WjI.js → useLoading-DJHJM5E0.js} +1 -1
- package/dist/useReportPermissions-2dfIX21b.js +80 -0
- package/dist/useSsoProviders-BarGHndw.js +41 -0
- package/package.json +2 -2
- package/dist/AuditLogList-DuDCMjGR.js +0 -2026
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Toq6qrLx.js +0 -4208
- package/dist/TeamMemberList-Bdpm40i3.js +0 -2087
- package/dist/TimesheetList-CL_eJp2h.js +0 -437
- package/dist/employee-C6z5i6O4.js +0 -172
- package/dist/iteration-CcXrOMQe.js +0 -30
- package/dist/restaurant-ejyX2jEG.js +0 -52
- package/dist/role-C_t3DDlG.js +0 -98
- package/dist/timesheet-CZHcebqS.js +0 -76
- package/dist/useReportPermissions-kTjftFk7.js +0 -82
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as ze, computed as y, ref as D, watch as q, onMounted as Le, resolveComponent as w, createBlock as
|
|
2
|
-
import { l as W } from "./lodash-
|
|
3
|
-
import { e as be } from "./
|
|
1
|
+
import { defineComponent as ze, computed as y, ref as D, watch as q, onMounted as Le, resolveComponent as w, createBlock as M, openBlock as h, unref as o, withCtx as V, createElementVNode as c, createVNode as _, toDisplayString as O, createElementBlock as S, Fragment as z, renderList as ee, createCommentVNode as te, normalizeClass as he } from "vue";
|
|
2
|
+
import { l as W } from "./lodash-CZsDR_DU.js";
|
|
3
|
+
import { e as be } from "./iteration-Tyg43nH0.js";
|
|
4
4
|
import { useI18n as Ne } from "@feedmepos/mf-common";
|
|
5
5
|
import { useBreakpoints as Ke, useSnackbar as Te, components as qe } from "@feedmepos/ui-library";
|
|
6
|
-
import { u as We, _ as Ge, a as _e } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { u as We, _ as Ge, a as _e } from "./ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BZQNDOg7.js";
|
|
7
7
|
import { u as Je } from "./useDiscardConfirm-CzZSPyvh.js";
|
|
8
|
-
import { u as He } from "./useLoading-
|
|
9
|
-
import { u as Qe } from "./useReportPermissions-
|
|
10
|
-
import {
|
|
11
|
-
import { r as ae, h as tt, d as at, s as st, g as ge, e as lt } from "./rule-
|
|
12
|
-
import { u as rt } from "./restaurant-
|
|
13
|
-
import { u as ot } from "./role-
|
|
8
|
+
import { u as He } from "./useLoading-DJHJM5E0.js";
|
|
9
|
+
import { u as Qe } from "./useReportPermissions-2dfIX21b.js";
|
|
10
|
+
import { l as Xe, n as Ye, A as Ze, S as et } from "./app-B9qAxMj1.js";
|
|
11
|
+
import { r as ae, h as tt, d as at, s as st, g as ge, e as lt } from "./rule-EiO87cJJ.js";
|
|
12
|
+
import { u as rt } from "./restaurant-CDJ3VjdH.js";
|
|
13
|
+
import { u as ot } from "./role-BDRWt87n.js";
|
|
14
14
|
function Tt(d) {
|
|
15
15
|
const n = [];
|
|
16
16
|
for (const { restaurantId: m, roleId: a } of d) {
|
|
@@ -135,16 +135,16 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
135
135
|
}
|
|
136
136
|
const p = [];
|
|
137
137
|
for (const C of H) {
|
|
138
|
-
const
|
|
139
|
-
|
|
138
|
+
const j = U.getDraft({ subject: e, builderKey: C.builderKey });
|
|
139
|
+
j && p.push({ builder: C, form: j.formValue });
|
|
140
140
|
}
|
|
141
141
|
if (p.length === 0) {
|
|
142
142
|
t == null || t();
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
p.map(({ builder: C, form:
|
|
145
|
+
const E = I.value.get(e), F = et(
|
|
146
|
+
E,
|
|
147
|
+
p.map(({ builder: C, form: j }) => ({ builder: C, formValue: j }))
|
|
148
148
|
), k = new Map(I.value);
|
|
149
149
|
Object.keys(F).length === 0 ? k.delete(e) : k.set(e, F), I.value = k, U.clearDraftsForSubject(e), t == null || t();
|
|
150
150
|
}
|
|
@@ -191,11 +191,11 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
191
191
|
s.value.restaurantIds = P.value.map((t) => t._id), s.value.permissions = G.value.map((t) => t.value);
|
|
192
192
|
else if (b.value) {
|
|
193
193
|
s.value.restaurantIds = b.value.restaurants.map((F) => F.id);
|
|
194
|
-
const t = new Set(G.value.map((F) => F.value)), { values: l, passthrough: p, dropped:
|
|
194
|
+
const t = new Set(G.value.map((F) => F.value)), { values: l, passthrough: p, dropped: E } = st(
|
|
195
195
|
b.value.permissions,
|
|
196
196
|
t
|
|
197
197
|
);
|
|
198
|
-
J.value = p,
|
|
198
|
+
J.value = p, E.length > 0 && console.warn("Dropping corrupted role permissions (repaired on save):", E), s.value.permissions = X(l), s.value.maxDiscountPercentage = ge(
|
|
199
199
|
b.value.permissions
|
|
200
200
|
);
|
|
201
201
|
for (const F of b.value.permissions) {
|
|
@@ -251,15 +251,15 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
251
251
|
), R.value = !1;
|
|
252
252
|
}, Y = y(
|
|
253
253
|
() => s.value.restaurantIds.filter((e) => P.value.some((t) => t._id === e))
|
|
254
|
-
), Z = y(() => P.value.length > 0 && P.value.length === Y.value.length),
|
|
254
|
+
), Z = y(() => P.value.length > 0 && P.value.length === Y.value.length), Ee = y(() => Y.value.length > 0 && !Z.value), Me = () => {
|
|
255
255
|
const e = s.value.restaurantIds.filter((t) => !Y.value.includes(t));
|
|
256
256
|
Z.value === !0 ? s.value.restaurantIds = e : s.value.restaurantIds = P.value.map((t) => t._id);
|
|
257
|
-
}, pe = (e) => e.map((l) => l.value).every((l) => s.value.permissions.includes(l)),
|
|
257
|
+
}, pe = (e) => e.map((l) => l.value).every((l) => s.value.permissions.includes(l)), Oe = (e) => {
|
|
258
258
|
const t = e.filter(
|
|
259
259
|
(l) => s.value.permissions.includes(l.value)
|
|
260
260
|
).length;
|
|
261
261
|
return t === 1 ? a("hr.role.form.permissionAllowed") : a("hr.role.form.permissionsAllowed", { count: t });
|
|
262
|
-
},
|
|
262
|
+
}, je = (e) => {
|
|
263
263
|
const t = s.value.permissions.filter(
|
|
264
264
|
(l) => !e.map((p) => p.value).includes(l)
|
|
265
265
|
);
|
|
@@ -287,8 +287,8 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
287
287
|
show: R,
|
|
288
288
|
trigger: we
|
|
289
289
|
}), (e, t) => {
|
|
290
|
-
const l = w("FmButton"), p = w("FmIcon"),
|
|
291
|
-
return h(),
|
|
290
|
+
const l = w("FmButton"), p = w("FmIcon"), E = w("FmTextField"), F = w("FmCircularProgress"), k = w("FmCheckbox"), C = w("FmFormGroup"), j = w("FmBottomSheet"), Ae = w("FmPopover"), ve = w("fm-button"), Be = w("fm-side-sheet");
|
|
291
|
+
return h(), M(Be, {
|
|
292
292
|
id: "unit-form",
|
|
293
293
|
modelValue: R.value,
|
|
294
294
|
"onUpdate:modelValue": t[5] || (t[5] = (f) => R.value = f),
|
|
@@ -303,7 +303,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
303
303
|
}, {
|
|
304
304
|
"side-sheet-header": V(() => [
|
|
305
305
|
c("div", ut, [
|
|
306
|
-
d.showBack ? (h(),
|
|
306
|
+
d.showBack ? (h(), M(l, {
|
|
307
307
|
key: 0,
|
|
308
308
|
icon: "arrow_back",
|
|
309
309
|
variant: "tertiary",
|
|
@@ -312,7 +312,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
312
312
|
"data-testid": "role-form-back",
|
|
313
313
|
onClick: o(T)
|
|
314
314
|
}, null, 8, ["onClick"])) : te("", !0),
|
|
315
|
-
c("p", it,
|
|
315
|
+
c("p", it, O(Ve.value), 1),
|
|
316
316
|
_(p, {
|
|
317
317
|
name: "close",
|
|
318
318
|
size: "md",
|
|
@@ -341,8 +341,8 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
341
341
|
default: V(() => [
|
|
342
342
|
c("div", dt, [
|
|
343
343
|
c("section", mt, [
|
|
344
|
-
c("p", ct,
|
|
345
|
-
_(
|
|
344
|
+
c("p", ct, O(o(a)("hr.role.form.roleDetail")), 1),
|
|
345
|
+
_(E, {
|
|
346
346
|
modelValue: s.value.name,
|
|
347
347
|
"onUpdate:modelValue": t[0] || (t[0] = (f) => s.value.name = f),
|
|
348
348
|
autofocus: "",
|
|
@@ -353,10 +353,10 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
353
353
|
}, null, 8, ["modelValue", "rules", "label", "placeholder", "disabled"])
|
|
354
354
|
]),
|
|
355
355
|
c("section", ft, [
|
|
356
|
-
c("p", pt,
|
|
356
|
+
c("p", pt, O(o(a)("hr.role.form.restaurant")), 1),
|
|
357
357
|
le.value ? (h(), S("div", vt, [
|
|
358
358
|
_(F)
|
|
359
|
-
])) : (h(),
|
|
359
|
+
])) : (h(), M(C, {
|
|
360
360
|
key: 1,
|
|
361
361
|
modelValue: s.value.restaurantIds,
|
|
362
362
|
"onUpdate:modelValue": t[2] || (t[2] = (f) => s.value.restaurantIds = f),
|
|
@@ -366,13 +366,13 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
366
366
|
c("div", ht, [
|
|
367
367
|
_(k, {
|
|
368
368
|
"model-value": Z.value,
|
|
369
|
-
indeterminate:
|
|
369
|
+
indeterminate: Ee.value,
|
|
370
370
|
label: o(a)("hr.role.form.all"),
|
|
371
371
|
value: "1",
|
|
372
372
|
disabled: g.value,
|
|
373
|
-
"onUpdate:modelValue":
|
|
373
|
+
"onUpdate:modelValue": Me
|
|
374
374
|
}, null, 8, ["model-value", "indeterminate", "label", "disabled"]),
|
|
375
|
-
(h(!0), S(z, null, ee(P.value, (f) => (h(),
|
|
375
|
+
(h(!0), S(z, null, ee(P.value, (f) => (h(), M(k, {
|
|
376
376
|
key: f._id,
|
|
377
377
|
modelValue: s.value.restaurantIds,
|
|
378
378
|
"onUpdate:modelValue": t[1] || (t[1] = (r) => s.value.restaurantIds = r),
|
|
@@ -387,8 +387,8 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
387
387
|
]),
|
|
388
388
|
c("section", bt, [
|
|
389
389
|
c("div", _t, [
|
|
390
|
-
c("p", gt,
|
|
391
|
-
c("p", yt,
|
|
390
|
+
c("p", gt, O(o(a)("hr.role.form.permissions")), 1),
|
|
391
|
+
c("p", yt, O(o(a)("hr.role.form.permissionsSubtitle")), 1)
|
|
392
392
|
]),
|
|
393
393
|
c("div", xt, [
|
|
394
394
|
(h(!0), S(z, null, ee(De.value, (f) => (h(), S("div", {
|
|
@@ -397,10 +397,10 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
397
397
|
_(Ge, {
|
|
398
398
|
layout: "leading",
|
|
399
399
|
"initially-collapsed": "",
|
|
400
|
-
subtitle:
|
|
400
|
+
subtitle: Oe(f.options)
|
|
401
401
|
}, {
|
|
402
402
|
title: V(() => [
|
|
403
|
-
c("p", Rt,
|
|
403
|
+
c("p", Rt, O(f.title), 1)
|
|
404
404
|
]),
|
|
405
405
|
default: V(() => [
|
|
406
406
|
c("div", It, [
|
|
@@ -409,7 +409,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
409
409
|
label: o(a)("hr.role.form.all"),
|
|
410
410
|
value: "1",
|
|
411
411
|
disabled: g.value,
|
|
412
|
-
"onUpdate:modelValue": (r) =>
|
|
412
|
+
"onUpdate:modelValue": (r) => je(f.options)
|
|
413
413
|
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"]),
|
|
414
414
|
t[6] || (t[6] = c("div", { class: "h-px w-full bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
415
415
|
(h(!0), S(z, null, ee(f.options, (r) => (h(), S("div", {
|
|
@@ -426,7 +426,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
426
426
|
}, null, 8, ["modelValue", "label", "value", "disabled"]),
|
|
427
427
|
r.value.startsWith("report:") ? (h(), S(z, { key: 0 }, [
|
|
428
428
|
s.value.permissions.includes(r.value) ? (h(), S(z, { key: 0 }, [
|
|
429
|
-
x.value ? (h(),
|
|
429
|
+
x.value ? (h(), M(j, {
|
|
430
430
|
key: 0,
|
|
431
431
|
"model-value": Q.value === r.value,
|
|
432
432
|
header: r.label,
|
|
@@ -461,7 +461,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
461
461
|
}, null, 8, ["builders", "form-value-for", "has-changes", "disable", "onUpdateForm", "onApply"])
|
|
462
462
|
]),
|
|
463
463
|
_: 2
|
|
464
|
-
}, 1032, ["model-value", "header", "onUpdate:modelValue"])) : (h(),
|
|
464
|
+
}, 1032, ["model-value", "header", "onUpdate:modelValue"])) : (h(), M(Ae, {
|
|
465
465
|
key: 1,
|
|
466
466
|
disabled: g.value,
|
|
467
467
|
"z-index": 100,
|
|
@@ -496,7 +496,7 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
496
496
|
]),
|
|
497
497
|
_: 2
|
|
498
498
|
}, 1032, ["disabled", "exclude-el-from-click-outside", "onPopoverChanged"]))
|
|
499
|
-
], 64)) : (h(),
|
|
499
|
+
], 64)) : (h(), M(p, {
|
|
500
500
|
key: 1,
|
|
501
501
|
name: "settings",
|
|
502
502
|
size: "sm",
|
|
@@ -505,8 +505,8 @@ const ut = { class: "flex w-full items-center gap-4" }, it = { class: "min-w-0 f
|
|
|
505
505
|
], 64)) : te("", !0)
|
|
506
506
|
]),
|
|
507
507
|
r.value === "order:discount" && s.value.permissions.includes(r.value) ? (h(), S("div", Vt, [
|
|
508
|
-
c("div", Ct,
|
|
509
|
-
_(
|
|
508
|
+
c("div", Ct, O(o(a)("hr.role.form.maxDiscountPercentage")), 1),
|
|
509
|
+
_(E, {
|
|
510
510
|
modelValue: s.value.maxDiscountPercentage,
|
|
511
511
|
"onUpdate:modelValue": t[4] || (t[4] = (i) => s.value.maxDiscountPercentage = i),
|
|
512
512
|
rules: [
|
|
@@ -1,71 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { e as d } from "./
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { useDialog as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { f as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { _ as
|
|
13
|
-
|
|
1
|
+
import { computed as g, defineComponent as se, ref as U, onMounted as te, resolveComponent as x, createElementBlock as $, openBlock as h, Fragment as A, createBlock as R, createElementVNode as r, createVNode as m, unref as a, withCtx as b, h as u, renderList as ne, toDisplayString as p, createTextVNode as T, resolveDynamicComponent as z, withModifiers as re, nextTick as K } from "vue";
|
|
2
|
+
import { e as d } from "./iteration-Tyg43nH0.js";
|
|
3
|
+
import { useI18n as ae } from "@feedmepos/mf-common";
|
|
4
|
+
import { useDialog as le, useSnackbar as ie, useBreakpoints as ce, components as D, FmButtonColorThemeVariant as me } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as ue } from "./app-B9qAxMj1.js";
|
|
6
|
+
import { _ as W } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
|
|
7
|
+
import { _ as de } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
8
|
+
import { f as w, r as pe, h as fe } from "./rule-EiO87cJJ.js";
|
|
9
|
+
import { u as j } from "./restaurant-CDJ3VjdH.js";
|
|
10
|
+
import { u as _e } from "./role-BDRWt87n.js";
|
|
11
|
+
import { u as he } from "./useReportPermissions-2dfIX21b.js";
|
|
12
|
+
import { _ as ve } from "./RoleForm.vue_vue_type_script_setup_true_lang-D8V8KWiL.js";
|
|
13
|
+
function ge() {
|
|
14
|
+
const B = j();
|
|
15
|
+
return g(() => {
|
|
16
|
+
const s = {};
|
|
17
|
+
return B.restaurants.value.forEach((f) => {
|
|
18
|
+
s[f._id] = f;
|
|
19
|
+
}), s;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
const ye = {
|
|
14
23
|
class: "space-y-8"
|
|
15
|
-
},
|
|
24
|
+
}, Ce = {
|
|
16
25
|
class: "flex justify-end xs:px-16"
|
|
17
|
-
},
|
|
26
|
+
}, xe = {
|
|
18
27
|
class: "flex flex-col h-full overflow-auto"
|
|
19
|
-
},
|
|
28
|
+
}, Re = {
|
|
20
29
|
class: "pb-64 sm:hidden md:hidden lg:hidden"
|
|
21
|
-
},
|
|
30
|
+
}, be = {
|
|
22
31
|
class: "space-y-4"
|
|
23
|
-
},
|
|
32
|
+
}, we = {
|
|
24
33
|
class: "fm-typo-en-body-lg-600"
|
|
25
|
-
},
|
|
34
|
+
}, Fe = {
|
|
26
35
|
class: "text-fm-color-typo-secondary"
|
|
27
|
-
},
|
|
36
|
+
}, Ee = {
|
|
28
37
|
class: "line-clamp-2"
|
|
29
|
-
}, we = {
|
|
30
|
-
class: "font-bold"
|
|
31
|
-
}, Fe = {
|
|
32
|
-
class: "flex items-start gap-4"
|
|
33
38
|
}, Le = {
|
|
34
|
-
class: "line-clamp-2"
|
|
35
|
-
}, Ee = {
|
|
36
39
|
class: "font-bold"
|
|
37
40
|
}, ke = {
|
|
38
41
|
class: "flex items-start gap-4"
|
|
42
|
+
}, Se = {
|
|
43
|
+
class: "line-clamp-2"
|
|
39
44
|
}, Ue = {
|
|
45
|
+
class: "font-bold"
|
|
46
|
+
}, Te = {
|
|
47
|
+
class: "flex items-start gap-4"
|
|
48
|
+
}, Be = {
|
|
40
49
|
class: "line-clamp-2"
|
|
41
|
-
},
|
|
50
|
+
}, Me = {
|
|
42
51
|
class: "font-bold"
|
|
43
|
-
},
|
|
52
|
+
}, Ge = /* @__PURE__ */ se({
|
|
44
53
|
__name: "RoleList",
|
|
45
|
-
setup(
|
|
46
|
-
expose:
|
|
54
|
+
setup(B, {
|
|
55
|
+
expose: M
|
|
47
56
|
}) {
|
|
48
57
|
const {
|
|
49
58
|
t: s
|
|
50
|
-
} =
|
|
51
|
-
allReportPermissions:
|
|
52
|
-
} =
|
|
59
|
+
} = ae(), {
|
|
60
|
+
allReportPermissions: f
|
|
61
|
+
} = he(), G = j(), q = g(() => G.restaurants.value), I = g(() => q.value.map((e) => e._id));
|
|
53
62
|
function F(e, o) {
|
|
54
|
-
const n = o === d.F_RULE_SUBJECT.enum.report ?
|
|
55
|
-
return ["-", "All"].includes(t) ? () => null : () => u(
|
|
63
|
+
const n = o === d.F_RULE_SUBJECT.enum.report ? f.value : void 0, t = w(e, o, n);
|
|
64
|
+
return ["-", "All"].includes(t) ? () => null : () => u(D.FmTooltip, {
|
|
56
65
|
"z-index": "999",
|
|
57
66
|
placement: "top",
|
|
58
67
|
class: "ml-2"
|
|
59
68
|
}, {
|
|
60
|
-
content: () => u("div", [s("hr.role.tooltip.labels.permission"), ...e.filter((i) => i.subject === o).map((i) => u("div", ["- ",
|
|
61
|
-
default: () => u(
|
|
69
|
+
content: () => u("div", [s("hr.role.tooltip.labels.permission"), ...e.filter((i) => i.subject === o).map((i) => u("div", ["- ", pe(i).label]))]),
|
|
70
|
+
default: () => u(D.FmIcon, {
|
|
62
71
|
name: "info",
|
|
63
|
-
color:
|
|
72
|
+
color: me.NeutralGray400
|
|
64
73
|
})
|
|
65
74
|
});
|
|
66
75
|
}
|
|
67
76
|
function J(e, o) {
|
|
68
|
-
const n = o === d.F_RULE_SUBJECT.enum.report ?
|
|
77
|
+
const n = o === d.F_RULE_SUBJECT.enum.report ? f.value : void 0, t = w(e, o, n);
|
|
69
78
|
return () => t === "All" ? t : u("div", {
|
|
70
79
|
class: "flex items-center"
|
|
71
80
|
}, [t, F(e, o)()]);
|
|
@@ -73,15 +82,15 @@ const he = {
|
|
|
73
82
|
function N(e) {
|
|
74
83
|
return [{
|
|
75
84
|
label: s("hr.role.form.update"),
|
|
76
|
-
onClick: () =>
|
|
85
|
+
onClick: () => E(e)
|
|
77
86
|
}, {
|
|
78
87
|
label: s("hr.role.remove.title"),
|
|
79
|
-
onClick: () =>
|
|
88
|
+
onClick: () => Z(e),
|
|
80
89
|
itemClass: "text-fm-color-typo-error",
|
|
81
|
-
disabled:
|
|
90
|
+
disabled: fe(e.permissions)
|
|
82
91
|
}];
|
|
83
92
|
}
|
|
84
|
-
const
|
|
93
|
+
const H = ({
|
|
85
94
|
role: e,
|
|
86
95
|
className: o = ""
|
|
87
96
|
}) => m("div", {
|
|
@@ -89,9 +98,9 @@ const he = {
|
|
|
89
98
|
onClick: (n) => {
|
|
90
99
|
n.stopPropagation();
|
|
91
100
|
}
|
|
92
|
-
}, [m(
|
|
101
|
+
}, [m(W, {
|
|
93
102
|
items: N(e)
|
|
94
|
-
}, null)]),
|
|
103
|
+
}, null)]), O = [{
|
|
95
104
|
accessorKey: "name",
|
|
96
105
|
header: () => s("hr.role.columns.name"),
|
|
97
106
|
enableSorting: !1
|
|
@@ -121,21 +130,21 @@ const he = {
|
|
|
121
130
|
cellClass: "pl-16",
|
|
122
131
|
headerContentClass: "-mx-16"
|
|
123
132
|
},
|
|
124
|
-
cell: (e) =>
|
|
133
|
+
cell: (e) => H({
|
|
125
134
|
role: e.row.original,
|
|
126
135
|
className: "flex w-full items-center justify-end"
|
|
127
136
|
})
|
|
128
|
-
}],
|
|
137
|
+
}], E = async (e) => {
|
|
129
138
|
var o;
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
const e =
|
|
139
|
+
C.value = e._id, await K(), (o = S.value) == null || o.trigger();
|
|
140
|
+
}, _ = _e(), Q = ge(), X = g(() => {
|
|
141
|
+
const e = _.roles.value || [];
|
|
133
142
|
return (I.value.length === 0 ? e : e.filter((n) => n.restaurants.some((t) => I.value.includes(t.id)))).map((n) => {
|
|
134
143
|
const t = n.restaurants.map((i) => {
|
|
135
|
-
const c =
|
|
144
|
+
const c = Q.value[i.id];
|
|
136
145
|
return {
|
|
137
146
|
...i,
|
|
138
|
-
// Prefer live data from
|
|
147
|
+
// Prefer live data from restaurantMap so names populate reactively
|
|
139
148
|
// even when restaurants loaded after roles.
|
|
140
149
|
name: (c == null ? void 0 : c.profile.name) || i.name,
|
|
141
150
|
code: c == null ? void 0 : c.profile.code
|
|
@@ -146,24 +155,24 @@ const he = {
|
|
|
146
155
|
restaurants: t
|
|
147
156
|
};
|
|
148
157
|
});
|
|
149
|
-
}),
|
|
158
|
+
}), y = g(() => {
|
|
150
159
|
var o;
|
|
151
|
-
return (o =
|
|
152
|
-
const t = k.value.toLowerCase(), i = n.name.toLowerCase().includes(t), l = (n.restaurants || []).some((
|
|
160
|
+
return (o = X.value) == null ? void 0 : o.filter((n) => {
|
|
161
|
+
const t = k.value.toLowerCase(), i = n.name.toLowerCase().includes(t), l = (n.restaurants || []).some((v) => {
|
|
153
162
|
var V;
|
|
154
|
-
return
|
|
163
|
+
return v.name.toLowerCase().includes(t) || ((V = v.code) == null ? void 0 : V.toLowerCase().includes(t));
|
|
155
164
|
});
|
|
156
165
|
return i || l;
|
|
157
166
|
});
|
|
158
|
-
}), P =
|
|
159
|
-
breakpoints:
|
|
160
|
-
} =
|
|
167
|
+
}), P = le(), L = ie(), {
|
|
168
|
+
breakpoints: Y
|
|
169
|
+
} = ce(), Z = (e) => {
|
|
161
170
|
P.open({
|
|
162
171
|
title: s("hr.role.remove.title"),
|
|
163
172
|
message: s("hr.role.remove.message", {
|
|
164
173
|
name: e.name
|
|
165
174
|
}),
|
|
166
|
-
minWidth:
|
|
175
|
+
minWidth: Y.value.lg ? 588 : 0,
|
|
167
176
|
primaryActions: {
|
|
168
177
|
text: s("common.remove"),
|
|
169
178
|
close: !1,
|
|
@@ -174,81 +183,81 @@ const he = {
|
|
|
174
183
|
close: !0
|
|
175
184
|
}
|
|
176
185
|
}).onPrimary(async () => {
|
|
177
|
-
await
|
|
186
|
+
await _.deleteRole(e).then(() => L.open({
|
|
178
187
|
message: s("hr.role.remove.successMessage", {
|
|
179
188
|
name: e.name
|
|
180
189
|
}),
|
|
181
190
|
type: "success"
|
|
182
|
-
})).catch((o) =>
|
|
191
|
+
})).catch((o) => L.open({
|
|
183
192
|
message: o,
|
|
184
193
|
type: "error"
|
|
185
194
|
})), P.close();
|
|
186
195
|
});
|
|
187
|
-
}, k =
|
|
188
|
-
async function
|
|
196
|
+
}, k = U(""), S = U(), C = U(void 0);
|
|
197
|
+
async function ee() {
|
|
189
198
|
var e;
|
|
190
|
-
|
|
199
|
+
C.value = void 0, await K(), (e = S.value) == null || e.trigger();
|
|
191
200
|
}
|
|
192
|
-
async function
|
|
193
|
-
if (
|
|
201
|
+
async function oe() {
|
|
202
|
+
if (_.roles.value.length === 0)
|
|
194
203
|
try {
|
|
195
|
-
await
|
|
204
|
+
await _.readRoles();
|
|
196
205
|
} catch (e) {
|
|
197
|
-
console.error("Failed to load roles:", e),
|
|
206
|
+
console.error("Failed to load roles:", e), L.open({
|
|
198
207
|
message: e instanceof Error ? e.message : String(e),
|
|
199
208
|
type: "error"
|
|
200
209
|
});
|
|
201
210
|
}
|
|
202
211
|
}
|
|
203
|
-
return
|
|
204
|
-
|
|
205
|
-
}),
|
|
206
|
-
create:
|
|
212
|
+
return te(() => {
|
|
213
|
+
oe();
|
|
214
|
+
}), M({
|
|
215
|
+
create: ee
|
|
207
216
|
}), (e, o) => {
|
|
208
|
-
const n =
|
|
209
|
-
return
|
|
210
|
-
id:
|
|
211
|
-
key:
|
|
217
|
+
const n = x("FmSearch"), t = x("FmTable"), i = x("FmListItem"), c = x("FmList");
|
|
218
|
+
return h(), $(A, null, [(h(), R(ve, {
|
|
219
|
+
id: C.value,
|
|
220
|
+
key: C.value,
|
|
212
221
|
ref_key: "roleFormRef",
|
|
213
|
-
ref:
|
|
214
|
-
}, null, 8, ["id"])), r("div",
|
|
222
|
+
ref: S
|
|
223
|
+
}, null, 8, ["id"])), r("div", ye, [r("div", Ce, [m(n, {
|
|
215
224
|
modelValue: k.value,
|
|
216
225
|
"onUpdate:modelValue": o[0] || (o[0] = (l) => k.value = l),
|
|
217
226
|
class: "w-[320px] xs:w-full",
|
|
218
227
|
autofocus: "",
|
|
219
228
|
placeholder: a(s)("hr.role.search.placeholder") + " / " + a(s)("hr.restaurant.search.placeholder")
|
|
220
|
-
}, null, 8, ["modelValue", "placeholder"])]), m(
|
|
221
|
-
default:
|
|
222
|
-
"is-loading": a(
|
|
223
|
-
"is-empty":
|
|
229
|
+
}, null, 8, ["modelValue", "placeholder"])]), m(ue, null, {
|
|
230
|
+
default: b(() => [r("div", xe, [m(de, {
|
|
231
|
+
"is-loading": a(_).isLoading.value,
|
|
232
|
+
"is-empty": y.value.length === 0,
|
|
224
233
|
"collapse-at": "xs",
|
|
225
234
|
title: a(s)("hr.role.noData.title"),
|
|
226
235
|
subtitle: a(s)("hr.role.noData.subtitle")
|
|
227
236
|
}, {
|
|
228
|
-
default:
|
|
237
|
+
default: b(() => [m(t, {
|
|
229
238
|
class: "xs:hidden",
|
|
230
|
-
"column-defs":
|
|
231
|
-
"row-data":
|
|
232
|
-
"page-size":
|
|
233
|
-
loading: a(
|
|
239
|
+
"column-defs": O,
|
|
240
|
+
"row-data": y.value,
|
|
241
|
+
"page-size": y.value.length,
|
|
242
|
+
loading: a(_).isLoading.value,
|
|
234
243
|
"pin-header-row": "",
|
|
235
244
|
"hide-footer": "",
|
|
236
245
|
"shrink-at": !1,
|
|
237
|
-
onRowClick: o[1] || (o[1] = (l) =>
|
|
246
|
+
onRowClick: o[1] || (o[1] = (l) => E(l.original))
|
|
238
247
|
}, null, 8, ["row-data", "page-size", "loading"])]),
|
|
239
248
|
_: 1
|
|
240
|
-
}, 8, ["is-loading", "is-empty", "title", "subtitle"]), r("div",
|
|
249
|
+
}, 8, ["is-loading", "is-empty", "title", "subtitle"]), r("div", Re, [m(c, {
|
|
241
250
|
separator: ""
|
|
242
251
|
}, {
|
|
243
|
-
default:
|
|
252
|
+
default: b(() => [(h(!0), $(A, null, ne(y.value, (l) => (h(), R(i, {
|
|
244
253
|
key: l._id,
|
|
245
254
|
class: "py-12 px-16 items-center justify-between",
|
|
246
|
-
onClick: (
|
|
255
|
+
onClick: (v) => E(l)
|
|
247
256
|
}, {
|
|
248
|
-
default:
|
|
249
|
-
onClick: o[2] || (o[2] =
|
|
257
|
+
default: b(() => [r("div", be, [r("p", we, p(l.name), 1), r("div", Fe, [r("p", Ee, [r("span", Le, p(a(s)("hr.role.labels.restaurant")) + ":", 1), T(" " + p(l.restaurants.map((v) => v.name).join(", ")), 1)]), r("p", ke, [r("span", Se, [r("span", Ue, p(a(s)("hr.role.labels.operation")) + ":", 1), T(" " + p(a(w)(l.permissions, a(d.F_RULE_SUBJECT).enum.order)), 1)]), (h(), R(z(F(l.permissions, a(d.F_RULE_SUBJECT).enum.order))))]), r("p", Te, [r("span", Be, [r("span", Me, p(a(s)("hr.role.labels.report")) + ":", 1), T(" " + p(a(w)(l.permissions, a(d.F_RULE_SUBJECT).enum.report, a(f))), 1)]), (h(), R(z(F(l.permissions, a(d.F_RULE_SUBJECT).enum.report))))])])]), r("div", {
|
|
258
|
+
onClick: o[2] || (o[2] = re(() => {
|
|
250
259
|
}, ["stop"]))
|
|
251
|
-
}, [m(
|
|
260
|
+
}, [m(W, {
|
|
252
261
|
items: N(l)
|
|
253
262
|
}, null, 8, ["items"])])]),
|
|
254
263
|
_: 2
|
|
@@ -261,5 +270,5 @@ const he = {
|
|
|
261
270
|
}
|
|
262
271
|
});
|
|
263
272
|
export {
|
|
264
|
-
|
|
273
|
+
Ge as default
|
|
265
274
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as k, watch as he, computed as z, reactive as Pe, nextTick as we, defineComponent as Ne, createBlock as ne, openBlock as b, withCtx as T, createElementVNode as i, createVNode as H, toDisplayString as v, unref as o, createElementBlock as E, withDirectives as fe, withKeys as Ce, vModelText as ye, normalizeClass as ge, createTextVNode as V, createCommentVNode as Z, Fragment as Ie, renderList as Se } from "vue";
|
|
2
2
|
import { useI18n as ie } from "@feedmepos/mf-common";
|
|
3
|
-
import { az as oe, p as D, aD as ke, aE as se, aF as pe, y as Ee, aG as $e, K as te, e as _, ay as xe, av as W } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { az as oe, p as D, aD as ke, aE as se, aF as pe, y as Ee, aG as $e, K as te, e as _, ay as xe, av as W } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-CP-kToVO.js";
|
|
4
4
|
function be() {
|
|
5
5
|
return oe.map((e) => ({ id: e.id, name: e.name }));
|
|
6
6
|
}
|
|
@@ -2,8 +2,8 @@ import { ref as b, reactive as Y, computed as L, defineComponent as N, createBlo
|
|
|
2
2
|
import { useRouter as K } from "vue-router";
|
|
3
3
|
import { useSnackbar as j } from "@feedmepos/ui-library";
|
|
4
4
|
import { useCoreStore as F, useI18n as E } from "@feedmepos/mf-common";
|
|
5
|
-
import { R as G } from "./app-
|
|
6
|
-
import { b as g, o as A, g as V, V as J, a1 as z, p as U, ay as Q, av as C, aA as X, aB as Z, ai as ee, ax as se } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { R as G } from "./app-B9qAxMj1.js";
|
|
6
|
+
import { b as g, o as A, g as V, V as J, a1 as z, p as U, ay as Q, av as C, aA as X, aB as Z, ai as ee, ax as se } from "./ScheduleModal.vue_vue_type_script_setup_true_lang-CP-kToVO.js";
|
|
7
7
|
const te = [
|
|
8
8
|
{ key: "payrates", labelKey: "scheduling.general.payRates" },
|
|
9
9
|
{ key: "overtime", labelKey: "scheduling.general.overtime" },
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { onMounted as Re, onBeforeUnmount as $e, ref as S, reactive as T, shallowRef as Ae, watch as Be, computed as Y, defineComponent as xe, createElementBlock as M, openBlock as C, renderSlot as Xe, useAttrs as pa, nextTick as ke, normalizeClass as he, createElementVNode as x, createBlock as ha, mergeProps as va, toDisplayString as z, Teleport as ga, createCommentVNode as G, withDirectives as Da, unref as Ee, vModelText as wa, Fragment as be, renderList as Ha, createTextVNode as Aa, withModifiers as Ea, normalizeStyle as ba } from "vue";
|
|
2
2
|
import { useRoute as Pa, useRouter as Sa } from "vue-router";
|
|
3
3
|
import { useCoreStore as Je, useI18n as ka } from "@feedmepos/mf-common";
|
|
4
|
-
import { u as Ca } from "./restaurant-
|
|
5
|
-
import { g, b as p } from "./app-
|
|
6
|
-
import { E as Ce, u as Ze } from "./employee-
|
|
7
|
-
import { t as Fe, c as Ma } from "./rule-
|
|
4
|
+
import { u as Ca } from "./restaurant-CDJ3VjdH.js";
|
|
5
|
+
import { g, b as p } from "./app-B9qAxMj1.js";
|
|
6
|
+
import { E as Ce, u as Ze } from "./employee-BD3NXG8h.js";
|
|
7
|
+
import { t as Fe, c as Ma } from "./rule-EiO87cJJ.js";
|
|
8
8
|
function io(e) {
|
|
9
9
|
let a = null;
|
|
10
10
|
function t() {
|