@feedmepos/mf-hrm-portal 2.2.2-dev → 2.2.2-dev.3
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-B9O8QzzI.js → ApprovalCodeList-BjRRA_sc.js} +2 -2
- package/dist/{AuditLogList-CtFEXKWZ.js → AuditLogList-B8kE39lt.js} +3 -3
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C9MYbxum.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Ba8w1BwT.js} +2 -2
- package/dist/{EmployeeList-BFxMwFJq.js → EmployeeList-7e069yPp.js} +66 -65
- package/dist/{GrantUserList-CZtmMRoS.js → GrantUserList-CTYamty5.js} +3 -3
- package/dist/{Main-on0TXkQt.js → Main-B-3s0bf_.js} +5 -5
- package/dist/{Main-DD6IthCS.js → Main-DcPLufZ5.js} +2 -2
- package/dist/{Main-B622Z4q4.js → Main-DfeNUiyv.js} +9 -9
- package/dist/{PermissionSetList-FCX3TBoi.js → PermissionSetList-CNujxzHF.js} +77 -76
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Cl_YNh0k.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Cq9xp1TW.js} +585 -580
- package/dist/RoleList-YaY7Np_9.js +739 -0
- package/dist/{TeamMemberList-BAU7Y3jh.js → TeamMemberList-B-I3KjnH.js} +305 -305
- package/dist/{TimesheetList-DtFBWhma.js → TimesheetList-BTsvEiD6.js} +5 -5
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Tatn3jUv.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CJYgeUxK.js} +2 -2
- package/dist/{app-Bbf6hEPt.js → app-C3u5orep.js} +16 -12
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-BAnGg8q2.js → dayjs.min-B-sLuqme.js} +1 -1
- package/dist/{employee-DVSD3L51.js → employee-DaduVi88.js} +3 -3
- package/dist/{iteration-BTZViJtd.js → iteration-Cii8ZeX3.js} +1 -1
- package/dist/{lodash-Cgdk4_YL.js → lodash-BifZ3B1q.js} +1 -1
- package/dist/{role-CXVpO6fB.js → role-tzqciGzt.js} +1 -1
- package/dist/{rule-TR3MVo-b.js → rule-GhzA0R9H.js} +287 -260
- package/dist/src/api/user/index.d.ts +2 -2
- package/dist/src/composables/useReportPermissions.d.ts +1 -0
- package/dist/src/helpers/rule.d.ts +2 -0
- package/dist/src/types/role.d.ts +1 -0
- package/dist/src/views/hr/locales/index.d.ts +12 -8
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useReportPermissions-BRLy3D7v.js +82 -0
- package/package.json +2 -2
- package/dist/RoleList-p_9KHzqF.js +0 -725
- package/dist/useReportPermissions-BpAFyO17.js +0 -71
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { computed as i, ref as t } from "vue";
|
|
2
|
-
import { e as m } from "./iteration-BTZViJtd.js";
|
|
3
|
-
import { useCoreStore as h } from "@feedmepos/mf-common";
|
|
4
|
-
import { e as S, R as L } from "./rule-TR3MVo-b.js";
|
|
5
|
-
import "./app-Bbf6hEPt.js";
|
|
6
|
-
const l = t([]), a = t(!1), r = t(!1), d = t(null), p = t(null), u = t(!1);
|
|
7
|
-
function B() {
|
|
8
|
-
const v = h();
|
|
9
|
-
async function f() {
|
|
10
|
-
var e;
|
|
11
|
-
const s = (e = v.currentBusiness.value) == null ? void 0 : e.id;
|
|
12
|
-
if (!s) return;
|
|
13
|
-
d.value !== s && (l.value = [], a.value = !1, r.value = !1, d.value = s, u.value = !1);
|
|
14
|
-
const o = localStorage.getItem("locale");
|
|
15
|
-
if (!(a.value && p.value === o)) {
|
|
16
|
-
if (r.value) {
|
|
17
|
-
u.value = !0;
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
r.value = !0;
|
|
21
|
-
try {
|
|
22
|
-
l.value = await L.fetchReportPermissions(
|
|
23
|
-
s,
|
|
24
|
-
o
|
|
25
|
-
), a.value = !0, p.value = o;
|
|
26
|
-
} catch (n) {
|
|
27
|
-
console.warn("Failed to fetch dynamic report permissions, keeping last known list:", n), a.value = !1;
|
|
28
|
-
} finally {
|
|
29
|
-
r.value = !1, u.value && (u.value = !1, await f());
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
const c = S.filter(
|
|
34
|
-
(s) => s.subject === m.F_RULE_SUBJECT.enum.report && s.conditions
|
|
35
|
-
), y = i(() => {
|
|
36
|
-
const s = new Set(
|
|
37
|
-
c.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 = l.value.filter((e) => !s.has(e.permissionKey)).map((e) => ({
|
|
42
|
-
label: e.name,
|
|
43
|
-
subject: m.F_RULE_SUBJECT.enum.report,
|
|
44
|
-
actions: ["read"],
|
|
45
|
-
conditions: { name: e.permissionKey },
|
|
46
|
-
inverted: !1,
|
|
47
|
-
reason: ""
|
|
48
|
-
}));
|
|
49
|
-
return [...c, ...o];
|
|
50
|
-
}), R = i(() => {
|
|
51
|
-
const s = new Set(
|
|
52
|
-
c.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 l.value)
|
|
58
|
-
s.add(o.permissionKey);
|
|
59
|
-
return s;
|
|
60
|
-
});
|
|
61
|
-
return {
|
|
62
|
-
fetchReportPermissions: f,
|
|
63
|
-
allReportPermissions: y,
|
|
64
|
-
availableReportKeys: R,
|
|
65
|
-
isLoading: i(() => r.value),
|
|
66
|
-
isLoaded: i(() => a.value)
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
export {
|
|
70
|
-
B as u
|
|
71
|
-
};
|