@feedmepos/mf-hrm-portal 2.0.6-dev → 2.0.7-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 (34) hide show
  1. package/dist/{AuditLogList-BxigxQv3.js → AuditLogList-COq6WH3T.js} +12 -12
  2. package/dist/{EmployeeList-DyvqwZtw.js → EmployeeList-CtosIPFL.js} +5 -5
  3. package/dist/{Main-CtH5MCty.js → Main-B4YdcrGe.js} +5 -5
  4. package/dist/{Main-B8tSMq-U.js → Main-CdsqeB2G.js} +8 -8
  5. package/dist/PermissionSetList-BUORArci.js +327 -0
  6. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ChqCTn1L.js +3333 -0
  7. package/dist/{RoleList-jykDD_zm.js → RoleList-D1NGE2IC.js} +6 -6
  8. package/dist/TeamMemberList-auSjZRNz.js +979 -0
  9. package/dist/{TimesheetList-Bk1XF9xy.js → TimesheetList-B8yCkaxb.js} +6 -6
  10. package/dist/{app-BPlaahxK.js → app-CB3ye-CT.js} +785 -688
  11. package/dist/app.js +1 -1
  12. package/dist/{dayjs.min-LweNOSZ_.js → dayjs.min-DOxEzdpe.js} +1 -1
  13. package/dist/{employee-DPfiL6rd.js → employee-G0pQg8_6.js} +3 -3
  14. package/dist/{index-CBxn7cxI.js → index-Beu6IuhT.js} +1803 -1735
  15. package/dist/{index-BAhsHYNv.js → index-DQArLkVB.js} +1 -1
  16. package/dist/{lodash-D1uG3PY3.js → lodash-COjtwv4w.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 +9 -0
  21. package/dist/src/helpers/rule.d.ts +4 -1
  22. package/dist/src/types/report-query.d.ts +1 -0
  23. package/dist/src/views/team/components/BasePermission.vue.d.ts +17 -0
  24. package/dist/{team-B1osnB4U.js → team-CEtKQK6n.js} +1 -1
  25. package/dist/{timesheet-rte2utJf.js → timesheet-DZF9D3QQ.js} +2 -2
  26. package/dist/tsconfig.app.tsbuildinfo +1 -1
  27. package/dist/{useAppStore-CqrjwnF_.js → useAppStore-9lbKMy_9.js} +1 -1
  28. package/dist/{useLoading-B5IjfVEP.js → useLoading-BIIvuJcM.js} +1 -1
  29. package/dist/useReportPermissions-BXQ0-WwK.js +59 -0
  30. package/package.json +1 -1
  31. package/dist/PermissionSetList-DCONmOgn.js +0 -323
  32. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-07Dsea27.js +0 -3092
  33. package/dist/TeamMemberList-DMrPgF1l.js +0 -973
  34. 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
- };