@feedmepos/mf-hrm-portal 2.2.1 → 2.2.2-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 (50) hide show
  1. package/dist/{ApprovalCodeList-BWQBJGCZ.js → ApprovalCodeList-B9O8QzzI.js} +5 -5
  2. package/dist/AuditLogList-CtFEXKWZ.js +1722 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDOdtKwI.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C9MYbxum.js} +2 -2
  4. package/dist/{EmployeeList-BZ6fxRCN.js → EmployeeList-BFxMwFJq.js} +71 -71
  5. package/dist/{GrantUserList-CaVpRVzA.js → GrantUserList-CZtmMRoS.js} +6 -6
  6. package/dist/{Main-CEKiyT80.js → Main-B622Z4q4.js} +11 -11
  7. package/dist/{Main-CQpEciKH.js → Main-DD6IthCS.js} +5 -5
  8. package/dist/{Main-DrfRLxA5.js → Main-on0TXkQt.js} +8 -8
  9. package/dist/{PermissionSetList-BgOSJy4y.js → PermissionSetList-FCX3TBoi.js} +77 -78
  10. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-B2SX3ZoV.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Cl_YNh0k.js} +832 -837
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-Z-DH7ouY.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js} +1 -1
  12. package/dist/RoleList-p_9KHzqF.js +725 -0
  13. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +16 -0
  14. package/dist/{TeamMemberList-BXk_pXjc.js → TeamMemberList-BAU7Y3jh.js} +313 -312
  15. package/dist/{TimesheetList-DgaZmgug.js → TimesheetList-DtFBWhma.js} +7 -7
  16. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-B_Lc8Xmy.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Tatn3jUv.js} +3 -3
  17. package/dist/{app-DzagkC6l.js → app-Bbf6hEPt.js} +1086 -781
  18. package/dist/app.js +1 -1
  19. package/dist/{approval-code-BRClD2HN.js → approval-code-jIjkeVEb.js} +1 -1
  20. package/dist/{dayjs.min-CqJsImsm.js → dayjs.min-BAnGg8q2.js} +1 -1
  21. package/dist/{employee-CXBuv0Bx.js → employee-DVSD3L51.js} +4 -4
  22. package/dist/{grant-user-Dhi3ilC_.js → grant-user-SNiDV22U.js} +1 -1
  23. package/dist/{iteration-BCfwR_XH.js → iteration-BTZViJtd.js} +1 -1
  24. package/dist/{lodash-BJl3phr9.js → lodash-Cgdk4_YL.js} +1 -1
  25. package/dist/{restaurant-DiYb0pCm.js → restaurant-BTpBmfBV.js} +2 -2
  26. package/dist/{role-BfCNRnuy.js → role-CXVpO6fB.js} +2 -2
  27. package/dist/{rule-B3Eg-J8O.js → rule-TR3MVo-b.js} +259 -279
  28. package/dist/src/api/audit-log/index.d.ts +6 -0
  29. package/dist/src/api/user/index.d.ts +2 -2
  30. package/dist/src/composables/useReportPermissions.d.ts +0 -1
  31. package/dist/src/helpers/rule.d.ts +0 -2
  32. package/dist/src/types/audit-log.d.ts +1 -1
  33. package/dist/src/types/role.d.ts +0 -1
  34. package/dist/src/views/audit-log/change-nodes.d.ts +14 -0
  35. package/dist/src/views/audit-log/event-line.d.ts +13 -0
  36. package/dist/src/views/audit-log/locales/index.d.ts +300 -0
  37. package/dist/src/views/audit-log/operation-status.d.ts +2 -0
  38. package/dist/src/views/audit-log/snapshot-diff.d.ts +11 -0
  39. package/dist/src/views/hr/locales/index.d.ts +0 -4
  40. package/dist/style.css +1 -1
  41. package/dist/tsconfig.app.tsbuildinfo +1 -1
  42. package/dist/{useAppStore-BGhlB1_1.js → useAppStore-DCwd8GWN.js} +1 -1
  43. package/dist/useDebounce-B8ZPVS5C.js +15 -0
  44. package/dist/{useLoading-CvgqVDbF.js → useLoading-CXzTpIVv.js} +1 -1
  45. package/dist/useReportPermissions-BpAFyO17.js +71 -0
  46. package/package.json +1 -1
  47. package/dist/AuditLogList-CymSyHag.js +0 -1149
  48. package/dist/RoleList-C2PrTc1f.js +0 -739
  49. package/dist/useDebounce-CWb5QR9G.js +0 -28
  50. package/dist/useReportPermissions-CXXq725N.js +0 -82
@@ -1,5 +1,5 @@
1
1
  import { defineStore as p } from "pinia";
2
- import { g as s } from "./restaurant-DiYb0pCm.js";
2
+ import { g as s } from "./restaurant-BTpBmfBV.js";
3
3
  import { baseClientInstance as d } from "@feedmepos/mf-common";
4
4
  var n = [];
5
5
  for (var r = 0; r < 256; ++r)
@@ -0,0 +1,15 @@
1
+ import { watch as s } from "vue";
2
+ function m(o, e, c = 300) {
3
+ let t;
4
+ const i = s(o, (r) => {
5
+ t && clearTimeout(t), t = setTimeout(() => {
6
+ e(r);
7
+ }, c);
8
+ });
9
+ return () => {
10
+ i(), t && (clearTimeout(t), t = void 0);
11
+ };
12
+ }
13
+ export {
14
+ m as u
15
+ };
@@ -1,6 +1,6 @@
1
1
  import { computed as I, isRef as L, watch as M } from "vue";
2
2
  import { SnackbarPosition as y } from "@feedmepos/ui-library";
3
- import { u as w, v } from "./useAppStore-BGhlB1_1.js";
3
+ import { u as w, v } from "./useAppStore-DCwd8GWN.js";
4
4
  const E = (r) => {
5
5
  async function d(u, e) {
6
6
  var l, a;
@@ -0,0 +1,71 @@
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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-hrm-portal",
3
- "version": "2.2.1",
3
+ "version": "2.2.2-dev",
4
4
  "files": [
5
5
  "dist"
6
6
  ],