@feedmepos/mf-hrm-portal 2.2.1-dev.2 → 2.2.1-dev.4

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 (47) hide show
  1. package/dist/{ApprovalCodeList-DZajn7xx.js → ApprovalCodeList-CJpbX8H_.js} +5 -5
  2. package/dist/AuditLogList-A1217xlw.js +1722 -0
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BWNAtv1G.js +438 -0
  4. package/dist/{EmployeeList-DDuxDdlJ.js → EmployeeList-Gh8aU7BY.js} +6 -6
  5. package/dist/{GrantUserList-735upmIE.js → GrantUserList-vpaCAv1u.js} +6 -6
  6. package/dist/{Main-tQ6MrkkP.js → Main-38YNSkW6.js} +11 -11
  7. package/dist/{Main-DyZ6dJ2d.js → Main-CXjbH7aE.js} +8 -8
  8. package/dist/{Main-CHHR0r5b.js → Main-GwRBJ3al.js} +5 -5
  9. package/dist/{PermissionSetList-ZxLNYPEB.js → PermissionSetList-CuzFQm7J.js} +7 -7
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C9bkMb41.js +4169 -0
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js} +1 -1
  12. package/dist/RoleList-C5VZbU3f.js +725 -0
  13. package/dist/{TeamMemberList-B58boeR9.js → TeamMemberList-ChrUNLsA.js} +9 -9
  14. package/dist/{TimesheetList-DMnNVVlB.js → TimesheetList-Dqx3RZ4c.js} +7 -7
  15. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Ch8Ng6wi.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-rtbLyLSE.js} +3 -3
  16. package/dist/{app-CtuaUGnw.js → app-CPByRtdD.js} +10 -6
  17. package/dist/app.js +1 -1
  18. package/dist/{approval-code-Q4666xp5.js → approval-code-jIjkeVEb.js} +1 -1
  19. package/dist/{dayjs.min-9pRWRTS9.js → dayjs.min-DeAdykwc.js} +1 -1
  20. package/dist/{employee-JmfN-rQF.js → employee-dFHap_s3.js} +4 -4
  21. package/dist/{grant-user-CQZaTzVt.js → grant-user-SNiDV22U.js} +1 -1
  22. package/dist/{iteration-CkzTvtOv.js → iteration-B_EcCwqv.js} +1 -1
  23. package/dist/{lodash-BNBzabCH.js → lodash-C5UxxqU2.js} +1 -1
  24. package/dist/{restaurant-YOVMuuFY.js → restaurant-BTpBmfBV.js} +12 -14
  25. package/dist/role-8ZQb8Cap.js +92 -0
  26. package/dist/rule-DJZO_Kev.js +1094 -0
  27. package/dist/src/composables/useReportPermissions.d.ts +1 -0
  28. package/dist/src/helpers/rule.d.ts +10 -1
  29. package/dist/src/stores/role.d.ts +6 -6
  30. package/dist/src/views/audit-log/change-nodes.d.ts +14 -0
  31. package/dist/src/views/audit-log/locales/index.d.ts +4 -0
  32. package/dist/src/views/audit-log/operation-status.d.ts +2 -0
  33. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +44 -0
  34. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +39 -0
  35. package/dist/style.css +1 -1
  36. package/dist/tsconfig.app.tsbuildinfo +1 -1
  37. package/dist/{useAppStore-DNTlIeMv.js → useAppStore-DCwd8GWN.js} +1 -1
  38. package/dist/{useLoading-BH02lYns.js → useLoading-CXzTpIVv.js} +1 -1
  39. package/dist/useReportPermissions-Phq7vqLK.js +71 -0
  40. package/package.json +1 -1
  41. package/dist/AuditLogList-CpKIq8I0.js +0 -1611
  42. package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-DCfvikJB.js +0 -387
  43. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-MoFevdmL.js +0 -4122
  44. package/dist/RoleList-BZbEGpCi.js +0 -685
  45. package/dist/role-R_9sO2QD.js +0 -82
  46. package/dist/rule-D1pKbnKR.js +0 -1066
  47. package/dist/useReportPermissions-ByxRc3kz.js +0 -70
@@ -1,70 +0,0 @@
1
- import { computed as u, ref as t } from "vue";
2
- import { e as d } from "./iteration-CkzTvtOv.js";
3
- import { useCoreStore as h } from "@feedmepos/mf-common";
4
- import { e as S, R as g } from "./rule-D1pKbnKR.js";
5
- import "./app-CtuaUGnw.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
- };