@feedmepos/mf-hrm-portal 2.0.6-dev → 2.0.6-dev.1
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-BxigxQv3.js → AuditLogList-C23_MiyK.js} +31 -30
- package/dist/{EmployeeList-DyvqwZtw.js → EmployeeList-vXPEVqoh.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-CQWe1-SW.js +599 -0
- package/dist/{Main-B8tSMq-U.js → Main-DC9H9bAs.js} +11 -10
- package/dist/{Main-CtH5MCty.js → Main-k56Iy_zg.js} +8 -7
- package/dist/PermissionSetList-B8tJCNpR.js +338 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BPJpVG8_.js +3356 -0
- package/dist/{RoleList-jykDD_zm.js → RoleList-C5WA3Kxu.js} +26 -24
- package/dist/TeamMemberList-Ic-iWBHd.js +989 -0
- package/dist/{TimesheetList-Bk1XF9xy.js → TimesheetList-DlGpcOUp.js} +11 -10
- package/dist/{app-BPlaahxK.js → app-D0xH_99A.js} +1310 -937
- package/dist/app.js +2 -2
- package/dist/{dayjs.min-LweNOSZ_.js → dayjs.min-C1rTVn8X.js} +1 -1
- package/dist/{employee-DPfiL6rd.js → employee-BK4sYiRy.js} +21 -20
- package/dist/index-C2ubYSVV.js +968 -0
- package/dist/{index-BAhsHYNv.js → index-DSAB4vz3.js} +1 -1
- package/dist/{index-CBxn7cxI.js → iteration-BSGKcAZm.js} +3416 -4256
- package/dist/{lodash-D1uG3PY3.js → lodash-CeTePH4O.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 +3 -0
- package/dist/src/api/report-query/index.d.ts +1 -0
- package/dist/src/composables/useCustomReportPermissions.d.ts +7 -0
- package/dist/src/helpers/permission-set.d.ts +32 -1
- package/dist/src/helpers/permission-set.test.d.ts +1 -0
- package/dist/src/helpers/rule.d.ts +4 -1
- 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/types/report-query.d.ts +1 -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/src/views/team/components/BasePermission.vue.d.ts +17 -0
- package/dist/{team-B1osnB4U.js → team-B25hRkju.js} +1 -1
- package/dist/{timesheet-rte2utJf.js → timesheet-C8oy-bxz.js} +10 -9
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-CqrjwnF_.js → useAppStore-WGnUS7Wm.js} +1 -1
- package/dist/{useLoading-B5IjfVEP.js → useLoading-BCi2g_rf.js} +1 -1
- package/dist/useReportPermissions--LOfl1e-.js +60 -0
- package/dist/useRestaurantMap-e9fQJiLC.js +39 -0
- package/package.json +2 -2
- package/dist/PermissionSetList-DCONmOgn.js +0 -323
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-07Dsea27.js +0 -3092
- package/dist/TeamMemberList-DMrPgF1l.js +0 -973
- package/dist/useReportPermissions-C4Q29AQJ.js +0 -65
- package/dist/useRestaurantMap-D5BNPLKh.js +0 -107
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { computed as u, ref as r } from "vue";
|
|
2
|
-
import { g as v, q as R, e as h, a as m } from "./index-CBxn7cxI.js";
|
|
3
|
-
import { useCoreStore as g } from "@feedmepos/mf-common";
|
|
4
|
-
import "./app-BPlaahxK.js";
|
|
5
|
-
const P = {
|
|
6
|
-
async fetchReportPermissions(i) {
|
|
7
|
-
return v(
|
|
8
|
-
await R().get(`/report-query/hrm/${i}/reports`)
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
}, t = r([]), l = r(!1), o = r(!1), d = r(null);
|
|
12
|
-
function K() {
|
|
13
|
-
const i = g();
|
|
14
|
-
async function f() {
|
|
15
|
-
var n;
|
|
16
|
-
const s = (n = i.currentBusiness.value) == null ? void 0 : n.id;
|
|
17
|
-
if (s && (d.value !== s && (t.value = [], l.value = !1, o.value = !1, d.value = s), !(l.value || o.value))) {
|
|
18
|
-
o.value = !0;
|
|
19
|
-
try {
|
|
20
|
-
t.value = await P.fetchReportPermissions(s), l.value = !0;
|
|
21
|
-
} catch (e) {
|
|
22
|
-
console.warn("Failed to fetch dynamic report permissions, using hardcoded only:", e), t.value = [];
|
|
23
|
-
} finally {
|
|
24
|
-
o.value = !1;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const a = h.filter(
|
|
29
|
-
(s) => s.subject === m.F_RULE_SUBJECT.enum.report && s.conditions
|
|
30
|
-
), p = u(() => {
|
|
31
|
-
const s = new Set(
|
|
32
|
-
a.map((e) => {
|
|
33
|
-
const c = typeof e.conditions == "string" ? JSON.parse(e.conditions) : e.conditions;
|
|
34
|
-
return c == null ? void 0 : c.name;
|
|
35
|
-
})
|
|
36
|
-
), n = t.value.filter((e) => !s.has(e.permissionKey)).map((e) => ({
|
|
37
|
-
label: e.name,
|
|
38
|
-
subject: m.F_RULE_SUBJECT.enum.report,
|
|
39
|
-
actions: ["read"],
|
|
40
|
-
conditions: { name: e.permissionKey },
|
|
41
|
-
inverted: !1,
|
|
42
|
-
reason: ""
|
|
43
|
-
}));
|
|
44
|
-
return [...a, ...n];
|
|
45
|
-
}), y = u(() => {
|
|
46
|
-
const s = new Set(
|
|
47
|
-
a.map((n) => {
|
|
48
|
-
const e = typeof n.conditions == "string" ? JSON.parse(n.conditions) : n.conditions;
|
|
49
|
-
return e == null ? void 0 : e.name;
|
|
50
|
-
})
|
|
51
|
-
);
|
|
52
|
-
for (const n of t.value)
|
|
53
|
-
s.add(n.permissionKey);
|
|
54
|
-
return s;
|
|
55
|
-
});
|
|
56
|
-
return {
|
|
57
|
-
fetchReportPermissions: f,
|
|
58
|
-
allReportPermissions: p,
|
|
59
|
-
availableReportKeys: y,
|
|
60
|
-
isLoading: u(() => o.value)
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
export {
|
|
64
|
-
K as u
|
|
65
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { defineComponent as m, createElementBlock as n, openBlock as a, createElementVNode as i, renderSlot as r, createCommentVNode as l, toDisplayString as c, normalizeClass as d, createVNode as p, withCtx as f, computed as y } from "vue";
|
|
2
|
-
import { useI18n as h, useCoreStore as _ } from "@feedmepos/mf-common";
|
|
3
|
-
import { useDialog as b } from "@feedmepos/ui-library";
|
|
4
|
-
const x = { class: "space-y-8" }, k = { class: "flex items-center justify-between" }, $ = { class: "space-y-8" }, v = { class: "fm-typo-en-body-lg-600" }, C = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
7
|
-
}, I = /* @__PURE__ */ m({
|
|
8
|
-
__name: "FormItem",
|
|
9
|
-
props: {
|
|
10
|
-
label: {},
|
|
11
|
-
description: {}
|
|
12
|
-
},
|
|
13
|
-
setup(e) {
|
|
14
|
-
return (t, s) => (a(), n("div", x, [
|
|
15
|
-
i("div", k, [
|
|
16
|
-
i("div", $, [
|
|
17
|
-
i("p", v, c(e.label), 1),
|
|
18
|
-
e.description ? (a(), n("p", C, c(e.description), 1)) : l("", !0)
|
|
19
|
-
]),
|
|
20
|
-
r(t.$slots, "append")
|
|
21
|
-
]),
|
|
22
|
-
r(t.$slots, "default")
|
|
23
|
-
]));
|
|
24
|
-
}
|
|
25
|
-
}), g = /* @__PURE__ */ m({
|
|
26
|
-
__name: "FormColumn",
|
|
27
|
-
props: {
|
|
28
|
-
shrinkable: { type: Boolean }
|
|
29
|
-
},
|
|
30
|
-
setup(e) {
|
|
31
|
-
return (t, s) => (a(), n("div", {
|
|
32
|
-
class: d(["flex-1 flex flex-col space-y-24", { "min-h-0": e.shrinkable }])
|
|
33
|
-
}, [
|
|
34
|
-
r(t.$slots, "default")
|
|
35
|
-
], 2));
|
|
36
|
-
}
|
|
37
|
-
}), S = {
|
|
38
|
-
key: 0,
|
|
39
|
-
class: "flex flex-row justify-between items-center"
|
|
40
|
-
}, w = { class: "space-y-4" }, B = { class: "fm-typo-en-title-sm-600" }, D = {
|
|
41
|
-
key: 0,
|
|
42
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
43
|
-
}, M = /* @__PURE__ */ m({
|
|
44
|
-
__name: "FormSection",
|
|
45
|
-
props: {
|
|
46
|
-
title: {},
|
|
47
|
-
subTitle: {},
|
|
48
|
-
shrinkable: { type: Boolean }
|
|
49
|
-
},
|
|
50
|
-
setup(e) {
|
|
51
|
-
return (t, s) => (a(), n("div", {
|
|
52
|
-
class: d(["flex flex-col space-y-16", { "min-h-0": e.shrinkable }])
|
|
53
|
-
}, [
|
|
54
|
-
e.title ? (a(), n("div", S, [
|
|
55
|
-
i("div", w, [
|
|
56
|
-
i("p", B, c(e.title), 1),
|
|
57
|
-
e.subTitle ? (a(), n("p", D, c(e.subTitle), 1)) : l("", !0)
|
|
58
|
-
]),
|
|
59
|
-
r(t.$slots, "append-title")
|
|
60
|
-
])) : l("", !0),
|
|
61
|
-
p(g, { shrinkable: e.shrinkable }, {
|
|
62
|
-
default: f(() => [
|
|
63
|
-
r(t.$slots, "default")
|
|
64
|
-
]),
|
|
65
|
-
_: 3
|
|
66
|
-
}, 8, ["shrinkable"])
|
|
67
|
-
], 2));
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
function N(e, t) {
|
|
71
|
-
const s = b(), { t: o } = h();
|
|
72
|
-
function u() {
|
|
73
|
-
e() ? s.open({
|
|
74
|
-
title: o("portalCommon.dismiss.title"),
|
|
75
|
-
message: o("portalCommon.dismiss.message"),
|
|
76
|
-
zIndex: 200,
|
|
77
|
-
primaryActions: {
|
|
78
|
-
text: o("portalCommon.dismiss.primaryActions"),
|
|
79
|
-
variant: "primary",
|
|
80
|
-
close: !0
|
|
81
|
-
},
|
|
82
|
-
secondaryActions: {
|
|
83
|
-
text: o("common.cancel"),
|
|
84
|
-
variant: "tertiary",
|
|
85
|
-
close: !0
|
|
86
|
-
}
|
|
87
|
-
}).onPrimary(() => {
|
|
88
|
-
t();
|
|
89
|
-
}) : t();
|
|
90
|
-
}
|
|
91
|
-
return u;
|
|
92
|
-
}
|
|
93
|
-
function T() {
|
|
94
|
-
const e = _();
|
|
95
|
-
return y(() => {
|
|
96
|
-
const s = {};
|
|
97
|
-
return e.restaurants.value.forEach((o) => {
|
|
98
|
-
s[o._id] = o;
|
|
99
|
-
}), s;
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
export {
|
|
103
|
-
M as _,
|
|
104
|
-
I as a,
|
|
105
|
-
T as b,
|
|
106
|
-
N as u
|
|
107
|
-
};
|