@feedmepos/mf-hrm-portal 2.0.6-dev → 2.0.6-dev.2

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 (35) hide show
  1. package/dist/{AuditLogList-BxigxQv3.js → AuditLogList-vHCIpof0.js} +28 -28
  2. package/dist/{EmployeeList-DyvqwZtw.js → EmployeeList-CBhHexQI.js} +5 -5
  3. package/dist/{Main-B8tSMq-U.js → Main-C5Bpd6bc.js} +8 -8
  4. package/dist/{Main-CtH5MCty.js → Main-CEwaF3N8.js} +5 -5
  5. package/dist/PermissionSetList-Df-Ymw2O.js +337 -0
  6. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-zJrXXaE5.js +3355 -0
  7. package/dist/{RoleList-jykDD_zm.js → RoleList-CNdSo3ML.js} +6 -6
  8. package/dist/TeamMemberList-D_RxHSyg.js +988 -0
  9. package/dist/{TimesheetList-Bk1XF9xy.js → TimesheetList-Bq6sBnDH.js} +6 -6
  10. package/dist/{app-BPlaahxK.js → app-CoFcOv4s.js} +915 -807
  11. package/dist/app.js +2 -2
  12. package/dist/{dayjs.min-LweNOSZ_.js → dayjs.min-DYhmwGAk.js} +1 -1
  13. package/dist/{employee-DPfiL6rd.js → employee-BuQUeatq.js} +3 -3
  14. package/dist/{index-BAhsHYNv.js → index-CJbevkE_.js} +1 -1
  15. package/dist/{index-CBxn7cxI.js → index-CmgH764t.js} +2416 -2294
  16. package/dist/{lodash-D1uG3PY3.js → lodash-goefl10e.js} +1 -1
  17. package/dist/src/api/permission-assignment/index.d.ts +3 -0
  18. package/dist/src/api/report-query/index.d.ts +1 -0
  19. package/dist/src/composables/useCustomReportPermissions.d.ts +7 -0
  20. package/dist/src/helpers/permission-set.d.ts +32 -1
  21. package/dist/src/helpers/permission-set.test.d.ts +1 -0
  22. package/dist/src/helpers/rule.d.ts +4 -1
  23. package/dist/src/types/report-query.d.ts +1 -0
  24. package/dist/src/views/team/components/BasePermission.vue.d.ts +17 -0
  25. package/dist/{team-B1osnB4U.js → team-Dy2uK8pr.js} +1 -1
  26. package/dist/{timesheet-rte2utJf.js → timesheet-knvCGlOx.js} +2 -2
  27. package/dist/tsconfig.app.tsbuildinfo +1 -1
  28. package/dist/{useAppStore-CqrjwnF_.js → useAppStore-C3SLn6_I.js} +1 -1
  29. package/dist/{useLoading-B5IjfVEP.js → useLoading-BZMc7JLo.js} +1 -1
  30. package/dist/useReportPermissions-l-Ltg4HG.js +59 -0
  31. package/package.json +2 -2
  32. package/dist/PermissionSetList-DCONmOgn.js +0 -323
  33. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-07Dsea27.js +0 -3092
  34. package/dist/TeamMemberList-DMrPgF1l.js +0 -973
  35. package/dist/useReportPermissions-C4Q29AQJ.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-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
- };