@feedmepos/mf-hrm-portal 2.0.7-dev → 2.0.7
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/{AuditLogList-COq6WH3T.js → AuditLogList-BWzKxoBK.js} +24 -23
- package/dist/{EmployeeList-CtosIPFL.js → EmployeeList-CPvHmCle.js} +164 -169
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js +71 -0
- package/dist/HorizontalSplitter-o860F4xM.js +12 -0
- package/dist/{Main-B4YdcrGe.js → Main-BEj_iUkZ.js} +8 -7
- package/dist/{Main-CdsqeB2G.js → Main-BNywXKr0.js} +11 -10
- package/dist/Main-BkIzKoHQ.js +560 -0
- package/dist/PermissionSetList-B8jSoL19.js +338 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Ddnj8eg_.js +3356 -0
- package/dist/{RoleList-D1NGE2IC.js → RoleList-BEx1B8PE.js} +26 -24
- package/dist/TeamMemberList-BEDwcjeT.js +989 -0
- package/dist/{TimesheetList-B8yCkaxb.js → TimesheetList-CqZG4xmE.js} +11 -10
- package/dist/{app-CB3ye-CT.js → app-DHtKeCwy.js} +1333 -1060
- package/dist/app.js +2 -2
- package/dist/{dayjs.min-DOxEzdpe.js → dayjs.min-BWWy9u8p.js} +1 -1
- package/dist/{employee-G0pQg8_6.js → employee-C2ys9jf0.js} +21 -20
- package/dist/index-BwYlZrxP.js +968 -0
- package/dist/{index-DQArLkVB.js → index-O9ipnK-U.js} +1 -1
- package/dist/{index-Beu6IuhT.js → iteration-BdhU8jGb.js} +3444 -4352
- package/dist/{lodash-COjtwv4w.js → lodash-CDSEYvRz.js} +1 -1
- package/dist/src/api/grant-user/index.d.ts +8 -0
- package/dist/src/api/index.d.ts +3 -1
- package/dist/src/api/permission-assignment/index.d.ts +1 -1
- package/dist/src/helpers/permission-set.d.ts +26 -4
- package/dist/src/helpers/permission-set.test.d.ts +1 -0
- package/dist/src/router/shared.d.ts +2 -1
- package/dist/src/stores/grant-user.d.ts +86 -0
- package/dist/src/types/grant-user.d.ts +27 -0
- package/dist/src/views/grant/GrantUserList.vue.d.ts +17 -0
- package/dist/src/views/grant/Main.vue.d.ts +2 -0
- package/dist/src/views/grant/components/GrantUserForm.vue.d.ts +17 -0
- package/dist/src/views/grant/locales/index.d.ts +232 -0
- package/dist/{team-CEtKQK6n.js → team-9CwJsJGX.js} +1 -1
- package/dist/{timesheet-DZF9D3QQ.js → timesheet-ChKYJtjK.js} +10 -9
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-9lbKMy_9.js → useAppStore-DGzBzMIR.js} +1 -1
- package/dist/{useLoading-BIIvuJcM.js → useLoading-CzteZR_c.js} +1 -1
- package/dist/{useReportPermissions-BXQ0-WwK.js → useReportPermissions-CaY_wr2l.js} +12 -11
- package/dist/useRestaurantMap-e9fQJiLC.js +39 -0
- package/package.json +2 -2
- package/dist/PermissionSetList-BUORArci.js +0 -327
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ChqCTn1L.js +0 -3333
- package/dist/TeamMemberList-auSjZRNz.js +0 -979
- package/dist/useRestaurantMap-D5BNPLKh.js +0 -107
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { defineComponent as he, ref as T, computed as _, onMounted as _e, watch as ue, resolveComponent as y, createBlock as k, openBlock as v, unref as t, withCtx as b, createElementVNode as h, createVNode as p, createCommentVNode as me, createElementBlock as P, Fragment as W, renderList as ae, toDisplayString as M, h as V, createTextVNode as de, resolveDynamicComponent as ce, withModifiers as we, nextTick as pe } from "vue";
|
|
2
|
-
import { e as
|
|
2
|
+
import { e as w } from "./iteration-BdhU8jGb.js";
|
|
3
3
|
import { useI18n as ge, useCoreStore as be } from "@feedmepos/mf-common";
|
|
4
|
-
import { useSnackbar as ye, components as se, useDialog as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import {
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
4
|
+
import { useSnackbar as ye, components as se, useDialog as ke, useBreakpoints as Ue, FmButtonColorThemeVariant as ve, FmButtonVariant as Le } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as Ie } from "./app-DHtKeCwy.js";
|
|
6
|
+
import { _ as Ee } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
7
|
+
import { e as Se, r as K, h as re, f as Pe, g as fe, a as Z } from "./index-BwYlZrxP.js";
|
|
8
|
+
import { u as Fe } from "./useAppStore-DGzBzMIR.js";
|
|
9
|
+
import { u as xe } from "./useReportPermissions-CaY_wr2l.js";
|
|
10
|
+
import { u as $e, a as Te } from "./useRestaurantMap-e9fQJiLC.js";
|
|
11
|
+
import { l as ee } from "./lodash-CDSEYvRz.js";
|
|
12
|
+
import { _ as oe, a as Be } from "./FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js";
|
|
13
|
+
import { u as De } from "./useLoading-CzteZR_c.js";
|
|
12
14
|
const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, Ne = { class: "space-y-8" }, Oe = { class: "space-y-8" }, Je = {
|
|
13
15
|
key: 0,
|
|
14
16
|
class: "w-50 ml-5 flex flex-row items-start"
|
|
@@ -27,7 +29,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
27
29
|
})), O = Fe(), J = ye(), G = De(J), { fetchReportPermissions: te, allReportPermissions: j, availableReportKeys: F } = xe(), q = ne, g = T(!1), z = () => {
|
|
28
30
|
g.value = !g.value, g.value && Y();
|
|
29
31
|
}, H = _(() => q.id ? l("hr.role.form.update") : l("hr.role.form.add")), Q = _(() => q.id ? l("common.update") : l("common.add")), X = _(() => {
|
|
30
|
-
const e =
|
|
32
|
+
const e = Se.filter(
|
|
31
33
|
(u) => u.subject !== w.F_RULE_SUBJECT.enum.report
|
|
32
34
|
).map((u) => K(u)), a = j.value.map((u) => K(u));
|
|
33
35
|
return [...e, ...a];
|
|
@@ -61,7 +63,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
61
63
|
});
|
|
62
64
|
function Y() {
|
|
63
65
|
var e;
|
|
64
|
-
s.value = C(), s.value.name = ((e = d.value) == null ? void 0 : e.name) ?? "", x.value ? (s.value.restaurantIds = U.value.map((a) => a._id), s.value.permissions = X.value.map((a) => a.value)) : d.value && (s.value.restaurantIds = d.value.restaurants.map((a) => a.id), s.value.permissions = d.value.permissions.map((a) => K(a).value).filter((a) => a.startsWith("report:") ? F.value.has(a.split(":")[1]) : !0), s.value.maxDiscountPercentage =
|
|
66
|
+
s.value = C(), s.value.name = ((e = d.value) == null ? void 0 : e.name) ?? "", x.value ? (s.value.restaurantIds = U.value.map((a) => a._id), s.value.permissions = X.value.map((a) => a.value)) : d.value && (s.value.restaurantIds = d.value.restaurants.map((a) => a.id), s.value.permissions = d.value.permissions.map((a) => K(a).value).filter((a) => a.startsWith("report:") ? F.value.has(a.split(":")[1]) : !0), s.value.maxDiscountPercentage = fe(
|
|
65
67
|
d.value.permissions
|
|
66
68
|
));
|
|
67
69
|
}
|
|
@@ -74,7 +76,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
74
76
|
restaurantIds: s.value.restaurantIds,
|
|
75
77
|
role: {
|
|
76
78
|
name: s.value.name,
|
|
77
|
-
permissions:
|
|
79
|
+
permissions: Pe(s.value.permissions, s.value.maxDiscountPercentage)
|
|
78
80
|
}
|
|
79
81
|
})), c = async () => {
|
|
80
82
|
const e = r.value;
|
|
@@ -114,7 +116,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
114
116
|
((u = d.value) == null ? void 0 : u.permissions.map((E) => K(E).value)) || C().permissions
|
|
115
117
|
) || !ee.isEqual(
|
|
116
118
|
s.value.maxDiscountPercentage,
|
|
117
|
-
d.value ?
|
|
119
|
+
d.value ? fe((A = d.value) == null ? void 0 : A.permissions) : C().maxDiscountPercentage
|
|
118
120
|
);
|
|
119
121
|
},
|
|
120
122
|
() => {
|
|
@@ -225,7 +227,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
225
227
|
class: "p-16"
|
|
226
228
|
}, {
|
|
227
229
|
default: b(() => [
|
|
228
|
-
p(
|
|
230
|
+
p(Be, {
|
|
229
231
|
label: n.title
|
|
230
232
|
}, {
|
|
231
233
|
default: b(() => [
|
|
@@ -295,7 +297,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
295
297
|
class: "flex"
|
|
296
298
|
}, Ze = {
|
|
297
299
|
class: "flex"
|
|
298
|
-
},
|
|
300
|
+
}, pa = /* @__PURE__ */ he({
|
|
299
301
|
__name: "RoleList",
|
|
300
302
|
setup(ne, {
|
|
301
303
|
expose: le
|
|
@@ -315,7 +317,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
315
317
|
content: () => V("div", [l("hr.role.tooltip.labels.permission"), ...o.filter((f) => f.subject === r).map((f) => V("div", ["- ", K(f).label]))]),
|
|
316
318
|
default: () => V(se.FmIcon, {
|
|
317
319
|
name: "info",
|
|
318
|
-
color:
|
|
320
|
+
color: ve.NeutralGray400
|
|
319
321
|
})
|
|
320
322
|
});
|
|
321
323
|
}
|
|
@@ -359,8 +361,8 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
359
361
|
class: "w-full flex justify-end items-center"
|
|
360
362
|
}, [V(se.FmButton, {
|
|
361
363
|
prependIcon: "delete",
|
|
362
|
-
variant:
|
|
363
|
-
textColor:
|
|
364
|
+
variant: Le.Tertiary,
|
|
365
|
+
textColor: ve.NeutralGray400,
|
|
364
366
|
disabled: re(o.row.original.permissions),
|
|
365
367
|
onClick: (r) => {
|
|
366
368
|
r.stopPropagation(), d(o.row.original);
|
|
@@ -369,7 +371,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
369
371
|
}], j = async (o) => {
|
|
370
372
|
var r;
|
|
371
373
|
B.value = o._id, await pe(), (r = s.value) == null || r.trigger();
|
|
372
|
-
}, F = Fe(), q =
|
|
374
|
+
}, F = Fe(), q = Te(), g = _(() => (F.roles.value || []).filter((c) => c.restaurants.some((i) => O.value.includes(i.id))).map((c) => {
|
|
373
375
|
const i = c.restaurants.map((f) => {
|
|
374
376
|
const L = q.value[f.id];
|
|
375
377
|
return {
|
|
@@ -390,9 +392,9 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
390
392
|
});
|
|
391
393
|
return f || D;
|
|
392
394
|
});
|
|
393
|
-
}), H =
|
|
395
|
+
}), H = ke(), Q = ye(), {
|
|
394
396
|
breakpoints: X
|
|
395
|
-
} =
|
|
397
|
+
} = Ue(), d = (o) => {
|
|
396
398
|
H.open({
|
|
397
399
|
title: l("hr.role.remove.title"),
|
|
398
400
|
message: l("hr.role.remove.message", {
|
|
@@ -444,7 +446,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
444
446
|
class: "w-[320px] xs:w-full",
|
|
445
447
|
autofocus: "",
|
|
446
448
|
placeholder: t(l)("hr.role.search.placeholder") + " / " + t(l)("hr.restaurant.search.placeholder")
|
|
447
|
-
}, null, 8, ["modelValue", "placeholder"])]), t(F).roles.value.length > 0 || t(F).isLoading.value ? (v(), k(
|
|
449
|
+
}, null, 8, ["modelValue", "placeholder"])]), t(F).roles.value.length > 0 || t(F).isLoading.value ? (v(), k(Ie, {
|
|
448
450
|
key: 0,
|
|
449
451
|
class: "overflow-auto"
|
|
450
452
|
}, {
|
|
@@ -484,7 +486,7 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
484
486
|
_: 1
|
|
485
487
|
})])]),
|
|
486
488
|
_: 1
|
|
487
|
-
})) : (v(), k(t(
|
|
489
|
+
})) : (v(), k(t(Ee), {
|
|
488
490
|
key: 1,
|
|
489
491
|
title: t(l)("hr.role.noData.title"),
|
|
490
492
|
subtitle: t(l)("hr.role.noData.subtitle")
|
|
@@ -493,5 +495,5 @@ const Ae = { class: "fm-typo-en-title-md-600" }, Me = { class: "space-y-40" }, N
|
|
|
493
495
|
}
|
|
494
496
|
});
|
|
495
497
|
export {
|
|
496
|
-
|
|
498
|
+
pa as default
|
|
497
499
|
};
|