@feedmepos/mf-hrm-portal 2.0.2 → 2.0.4-dev

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.
Files changed (32) hide show
  1. package/dist/{AuditLogList-DmzjFNtu.js → AuditLogList-3LzPMYki.js} +12 -12
  2. package/dist/{EmployeeList-C0P01r8f.js → EmployeeList-Cwwv_Zlz.js} +5 -5
  3. package/dist/{Main-Ea3YRYRi.js → Main-91oL3FhD.js} +8 -8
  4. package/dist/{Main-C4bwcSak.js → Main-Djsmh0z3.js} +5 -5
  5. package/dist/PermissionSetList-Djw6Kq-P.js +327 -0
  6. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-FOlmgK60.js +3287 -0
  7. package/dist/{RoleList-DPFSIcJM.js → RoleList-Dx7S9lLy.js} +6 -6
  8. package/dist/TeamMemberList-CG-MGTve.js +979 -0
  9. package/dist/{TimesheetList-D_aRlhAF.js → TimesheetList-DMWMr6qz.js} +6 -6
  10. package/dist/api/report-query/index.d.ts +1 -0
  11. package/dist/{app-D3XzDpIl.js → app-hn4p1_a3.js} +786 -689
  12. package/dist/app.js +1 -1
  13. package/dist/composables/useCustomReportPermissions.d.ts +7 -0
  14. package/dist/{dayjs.min-CgKI64Kb.js → dayjs.min-DnPftI7E.js} +1 -1
  15. package/dist/{employee-DiMO7OBV.js → employee-iJ_7LE99.js} +3 -3
  16. package/dist/helpers/permission-set.d.ts +9 -0
  17. package/dist/helpers/rule.d.ts +4 -1
  18. package/dist/{index-BNwH5i7v.js → index-Cm7g-tL7.js} +1639 -1584
  19. package/dist/{index-D-9VSDyv.js → index-DRAOMLuj.js} +1 -1
  20. package/dist/{lodash-JVfJjN55.js → lodash-DL2QGSnr.js} +1 -1
  21. package/dist/{team-CpDDOMg5.js → team-C1LaI_Ne.js} +1 -1
  22. package/dist/{timesheet-B7pXd6CJ.js → timesheet-DU4OLZK4.js} +2 -2
  23. package/dist/tsconfig.app.tsbuildinfo +1 -1
  24. package/dist/{useAppStore-CRiXBv8h.js → useAppStore-CWLLJN_9.js} +1 -1
  25. package/dist/{useLoading-TD1OqZ-E.js → useLoading-BaqJwyj8.js} +1 -1
  26. package/dist/useReportPermissions-DC1NFQEs.js +59 -0
  27. package/dist/views/team/components/BasePermission.vue.d.ts +17 -0
  28. package/package.json +1 -1
  29. package/dist/PermissionSetList-BConvvPI.js +0 -323
  30. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bh8iS3gP.js +0 -3092
  31. package/dist/TeamMemberList-2X_3s91v.js +0 -973
  32. package/dist/useReportPermissions-VXbSUZR5.js +0 -65
@@ -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-BNwH5i7v.js";
3
- import { useCoreStore as g } from "@feedmepos/mf-common";
4
- import "./app-D3XzDpIl.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
- };