@feedmepos/mf-hrm-portal 2.0.17-dev.3 → 2.0.17-dev.5
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-Dl3Nmf00.js +1011 -0
- package/dist/EmployeeList-DBd_rVW2.js +831 -0
- package/dist/{Main-Dkr5lzbv.js → Main-CQ3KwxDY.js} +1368 -1371
- package/dist/{Main--tejoyEP.js → Main-pTgqNncY.js} +125 -125
- package/dist/{Main-BNXKItvX.js → Main-w0XUUaBp.js} +6 -6
- package/dist/PermissionSetList-B8qNOWH6.js +347 -0
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BBsaxaXu.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C9VUjAu_.js} +1064 -1060
- package/dist/{RoleList-SZCgvYvC.js → RoleList-DMFJsUZv.js} +202 -200
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
- package/dist/TeamMemberList-BLRTfKLz.js +1031 -0
- package/dist/{TimesheetList-D-3k0Uad.js → TimesheetList-Bwp9_xHe.js} +6 -6
- package/dist/{app-BjXuSCis.js → app-COJbSNM4.js} +1975 -1440
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-z-vrgFCL.js → dayjs.min-CcBi6N-K.js} +1 -1
- package/dist/{employee-DAqAMupR.js → employee-xiV0LfnL.js} +3 -3
- package/dist/{iteration-Cp1eSTJA.js → iteration-JOKbtlLf.js} +1 -1
- package/dist/{lodash-CXLZQQp8.js → lodash-D5xlVzib.js} +1 -1
- package/dist/rule-3sXHiW0y.js +994 -0
- package/dist/src/api/audit-log/index.d.ts +9 -0
- package/dist/src/api/report-query/index.d.ts +2 -2
- package/dist/src/components/Skeleton.vue.d.ts +7 -0
- package/dist/src/composables/useBasePermission.d.ts +1 -0
- package/dist/src/stores/team.d.ts +6 -6
- package/dist/src/types/team.d.ts +1 -1
- package/dist/src/views/hr/locales/index.d.ts +172 -0
- package/dist/src/views/team/components/BasePermission.vue.d.ts +1 -1
- package/dist/src/views/team/locales/index.d.ts +312 -0
- package/dist/style.css +1 -1
- package/dist/{team-CnQ_rIx2.js → team-CyNektSD.js} +1 -1
- package/dist/{timesheet-BlPhOifI.js → timesheet-DkD3AysG.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BVnrWyPF.js → useAppStore-CvmsaYSG.js} +1 -1
- package/dist/{useLoading-7ia-Bps7.js → useLoading-4TNmhm5N.js} +1 -1
- package/dist/useReportPermissions-CWMFFb8E.js +70 -0
- package/package.json +2 -2
- package/dist/AuditLogList-C6qAeY5g.js +0 -954
- package/dist/EmployeeList-COtXtTqG.js +0 -827
- package/dist/PermissionSetList-B_Sdvbu7.js +0 -340
- package/dist/TeamMemberList-Dk5HeFfQ.js +0 -1008
- package/dist/rule-vBxopbM_.js +0 -990
- package/dist/useReportPermissions-C8HMek35.js +0 -60
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore as I, storeToRefs as Q } from "pinia";
|
|
2
2
|
import { ref as w } from "vue";
|
|
3
3
|
import { useCoreStore as x, baseClientInstance as S } from "@feedmepos/mf-common";
|
|
4
|
-
import { g as l, b as g, s as h } from "./iteration-
|
|
4
|
+
import { g as l, b as g, s as h } from "./iteration-JOKbtlLf.js";
|
|
5
5
|
const y = {
|
|
6
6
|
async readRoles() {
|
|
7
7
|
return l(await g().get("/pos-roles"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as I, isRef as L, watch as M } from "vue";
|
|
2
2
|
import { SnackbarPosition as y } from "@feedmepos/ui-library";
|
|
3
|
-
import { a as w, v } from "./useAppStore-
|
|
3
|
+
import { a as w, v } from "./useAppStore-CvmsaYSG.js";
|
|
4
4
|
const E = (r) => {
|
|
5
5
|
async function d(u, e) {
|
|
6
6
|
var l, a;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { computed as u, ref as t } from "vue";
|
|
2
|
+
import { e as d } from "./iteration-JOKbtlLf.js";
|
|
3
|
+
import { useCoreStore as h } from "@feedmepos/mf-common";
|
|
4
|
+
import { e as S, R as g } from "./rule-3sXHiW0y.js";
|
|
5
|
+
import "./app-COJbSNM4.js";
|
|
6
|
+
const r = t([]), c = t(!1), a = t(!1), f = t(null), p = t(null), i = t(!1);
|
|
7
|
+
function B() {
|
|
8
|
+
const v = h();
|
|
9
|
+
async function m() {
|
|
10
|
+
var e;
|
|
11
|
+
const s = (e = v.currentBusiness.value) == null ? void 0 : e.id;
|
|
12
|
+
if (!s) return;
|
|
13
|
+
f.value !== s && (r.value = [], c.value = !1, a.value = !1, f.value = s, i.value = !1);
|
|
14
|
+
const o = localStorage.getItem("locale");
|
|
15
|
+
if (!(c.value && p.value === o)) {
|
|
16
|
+
if (a.value) {
|
|
17
|
+
i.value = !0;
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
a.value = !0;
|
|
21
|
+
try {
|
|
22
|
+
r.value = await g.fetchReportPermissions(
|
|
23
|
+
s,
|
|
24
|
+
o
|
|
25
|
+
), c.value = !0, p.value = o;
|
|
26
|
+
} catch (n) {
|
|
27
|
+
console.warn("Failed to fetch dynamic report permissions, using hardcoded only:", n), r.value = [];
|
|
28
|
+
} finally {
|
|
29
|
+
a.value = !1, i.value && (i.value = !1, await m());
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const l = S.filter(
|
|
34
|
+
(s) => s.subject === d.F_RULE_SUBJECT.enum.report && s.conditions
|
|
35
|
+
), y = u(() => {
|
|
36
|
+
const s = new Set(
|
|
37
|
+
l.map((e) => {
|
|
38
|
+
const n = typeof e.conditions == "string" ? JSON.parse(e.conditions) : e.conditions;
|
|
39
|
+
return n == null ? void 0 : n.name;
|
|
40
|
+
})
|
|
41
|
+
), o = r.value.filter((e) => !s.has(e.permissionKey)).map((e) => ({
|
|
42
|
+
label: e.name,
|
|
43
|
+
subject: d.F_RULE_SUBJECT.enum.report,
|
|
44
|
+
actions: ["read"],
|
|
45
|
+
conditions: { name: e.permissionKey },
|
|
46
|
+
inverted: !1,
|
|
47
|
+
reason: ""
|
|
48
|
+
}));
|
|
49
|
+
return [...l, ...o];
|
|
50
|
+
}), R = u(() => {
|
|
51
|
+
const s = new Set(
|
|
52
|
+
l.map((o) => {
|
|
53
|
+
const e = typeof o.conditions == "string" ? JSON.parse(o.conditions) : o.conditions;
|
|
54
|
+
return e == null ? void 0 : e.name;
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
for (const o of r.value)
|
|
58
|
+
s.add(o.permissionKey);
|
|
59
|
+
return s;
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
fetchReportPermissions: m,
|
|
63
|
+
allReportPermissions: y,
|
|
64
|
+
availableReportKeys: R,
|
|
65
|
+
isLoading: u(() => a.value)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
B as u
|
|
70
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-hrm-portal",
|
|
3
|
-
"version": "2.0.17-dev.
|
|
3
|
+
"version": "2.0.17-dev.5",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"vue-router": "^4.3.2",
|
|
30
30
|
"vue3-lottie": "^3.3.0",
|
|
31
31
|
"xlsx": "^0.18.5",
|
|
32
|
-
"@feedmepos/hrm-permission": "1.0.
|
|
32
|
+
"@feedmepos/hrm-permission": "1.0.9"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@casl/ability": "^3.4.0",
|