@feedmepos/mf-hrm-portal 2.3.2-dev.10 → 2.3.2-dev.12

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 (62) hide show
  1. package/dist/{ApprovalCodeList-RKU5B8SO.js → ApprovalCodeList-CCh9mNJh.js} +7 -7
  2. package/dist/AuditLogList-DCADUZ5s.js +2019 -0
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-pL2zRc67.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BZQNDOg7.js} +10 -10
  4. package/dist/{EmployeeList-nrYsS5uz.js → EmployeeList-CRI7XjzX.js} +8 -8
  5. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-7S2w36aY.js → FormSection.vue_vue_type_script_setup_true_lang-y9_hxba6.js} +1 -1
  6. package/dist/{GrantUserList-BSjeC4MC.js → GrantUserList-DbMngkpK.js} +8 -8
  7. package/dist/{Main-DbdoVLCE.js → Main-BsFUfsmP.js} +29 -29
  8. package/dist/{Main-DtmCBbTR.js → Main-CrnM6wr8.js} +2168 -2169
  9. package/dist/{Main-CpuHaXU6.js → Main-D4Zq5AXi.js} +5 -5
  10. package/dist/{MyPosProfile-CsTCfGNT.js → MyPosProfile-B4cE47im.js} +1 -1
  11. package/dist/{PermissionSetList-B1c-uGZO.js → PermissionSetList-D_2x-mDD.js} +112 -113
  12. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BM9Von-l.js +4212 -0
  13. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-D6Z9z_Yt.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-COX-N0k6.js} +414 -448
  14. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-TWTVo_9Y.js → RoleForm.vue_vue_type_script_setup_true_lang-D8V8KWiL.js} +41 -41
  15. package/dist/{RoleList-CwaGNsFy.js → RoleList-BC-c7fqn.js} +105 -96
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-C2ekVXdR.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DBbuSrXV.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-BVtXmxtp.js → ScheduleGeneralPage-eytzOZQr.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DdsQ8v-5.js → ScheduleModal.vue_vue_type_script_setup_true_lang-CP-kToVO.js} +4 -4
  19. package/dist/{SchedulePage-3qksmT2I.js → SchedulePage-B0QirzAk.js} +17 -17
  20. package/dist/{SchedulePositionPage-DAU20KPZ.js → SchedulePositionPage-BAE-NQvL.js} +3 -3
  21. package/dist/{SelectFilter-BpzBwBmQ.js → SelectFilter-DrLJhxt6.js} +1 -1
  22. package/dist/TeamMemberList-CHkiL_q9.js +2083 -0
  23. package/dist/TimesheetList-BZuddmzy.js +402 -0
  24. package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-LCUO-ogb.js +58 -0
  25. package/dist/{app-DEZT4wdV.js → app-B9qAxMj1.js} +3516 -3470
  26. package/dist/app.js +1 -1
  27. package/dist/{approval-code-BZTz5OXK.js → approval-code-CTgj9q6m.js} +1 -1
  28. package/dist/{dayjs.min-B55I-uhI.js → dayjs.min-giCSI3N8.js} +22 -22
  29. package/dist/employee-BD3NXG8h.js +210 -0
  30. package/dist/{grant-user-B2rYztyf.js → grant-user-jeTFzGU1.js} +1 -1
  31. package/dist/{index-Bfdseotz.js → iteration-Tyg43nH0.js} +726 -698
  32. package/dist/{lodash-B8bqa6a9.js → lodash-CZsDR_DU.js} +1 -1
  33. package/dist/{member-grant-BIpKkuu8.js → member-grant-DsEMLN1N.js} +2 -2
  34. package/dist/restaurant-CDJ3VjdH.js +49 -0
  35. package/dist/role-BDRWt87n.js +91 -0
  36. package/dist/{rule-Ccopk8R_.js → rule-EiO87cJJ.js} +309 -313
  37. package/dist/src/api/employee/index.d.ts +2 -1
  38. package/dist/src/api/timesheet/index.d.ts +1 -1
  39. package/dist/src/composables/useTenant.d.ts +11 -0
  40. package/dist/src/router/courtGuard.d.ts +4 -0
  41. package/dist/src/stores/employee.d.ts +7 -1
  42. package/dist/src/stores/restaurant.d.ts +1 -61
  43. package/dist/src/stores/team.d.ts +1 -1
  44. package/dist/src/stores/timesheet.d.ts +51 -66
  45. package/dist/src/types/timesheet.d.ts +0 -3
  46. package/dist/style.css +1 -1
  47. package/dist/tsconfig.app.tsbuildinfo +1 -1
  48. package/dist/{useAppStore-DfqsbhT2.js → useAppStore-CkUZ2H5h.js} +1 -1
  49. package/dist/{useLoading-CQnX5WjI.js → useLoading-DJHJM5E0.js} +1 -1
  50. package/dist/useReportPermissions-2dfIX21b.js +80 -0
  51. package/dist/useSsoProviders-BarGHndw.js +41 -0
  52. package/package.json +2 -2
  53. package/dist/AuditLogList-DuDCMjGR.js +0 -2026
  54. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Toq6qrLx.js +0 -4208
  55. package/dist/TeamMemberList-Bdpm40i3.js +0 -2087
  56. package/dist/TimesheetList-CL_eJp2h.js +0 -437
  57. package/dist/employee-C6z5i6O4.js +0 -172
  58. package/dist/iteration-CcXrOMQe.js +0 -30
  59. package/dist/restaurant-ejyX2jEG.js +0 -52
  60. package/dist/role-C_t3DDlG.js +0 -98
  61. package/dist/timesheet-CZHcebqS.js +0 -76
  62. package/dist/useReportPermissions-kTjftFk7.js +0 -82
@@ -1,5 +1,5 @@
1
1
  import { defineStore as p } from "pinia";
2
- import { g as s } from "./app-DEZT4wdV.js";
2
+ import { g as s } from "./app-B9qAxMj1.js";
3
3
  import { baseClientInstance as d } from "@feedmepos/mf-common";
4
4
  var n = [];
5
5
  for (var r = 0; r < 256; ++r)
@@ -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-DfqsbhT2.js";
3
+ import { u as w, v } from "./useAppStore-CkUZ2H5h.js";
4
4
  const E = (r) => {
5
5
  async function d(u, e) {
6
6
  var l, a;
@@ -0,0 +1,80 @@
1
+ import { computed as a, ref as o } from "vue";
2
+ import { e as d } from "./iteration-Tyg43nH0.js";
3
+ import { u as K, l as S } from "./app-B9qAxMj1.js";
4
+ import { i as g } from "./rule-EiO87cJJ.js";
5
+ const i = o([]), r = o(!1), l = o(!1), f = o(null), p = o(null), u = o(!1);
6
+ function J() {
7
+ const v = K();
8
+ async function m() {
9
+ const s = v.id.value;
10
+ if (!s) return;
11
+ f.value !== s && (i.value = [], r.value = !1, l.value = !1, f.value = s, u.value = !1);
12
+ const t = localStorage.getItem("locale");
13
+ if (!(r.value && p.value === t)) {
14
+ if (l.value) {
15
+ u.value = !0;
16
+ return;
17
+ }
18
+ l.value = !0;
19
+ try {
20
+ i.value = await g.fetchReportPermissions(
21
+ s,
22
+ t
23
+ ), r.value = !0, p.value = t;
24
+ } catch (e) {
25
+ console.warn("Failed to fetch dynamic report permissions, keeping last known list:", e), r.value = !1;
26
+ } finally {
27
+ l.value = !1, u.value && (u.value = !1, await m());
28
+ }
29
+ }
30
+ }
31
+ const c = S.filter(
32
+ (s) => s.subject === d.F_RULE_SUBJECT.enum.report && s.conditions
33
+ ), y = a(() => {
34
+ const s = new Set(
35
+ c.map((e) => {
36
+ const n = typeof e.conditions == "string" ? JSON.parse(e.conditions) : e.conditions;
37
+ return n == null ? void 0 : n.name;
38
+ })
39
+ ), t = i.value.filter((e) => !s.has(e.permissionKey)).map((e) => ({
40
+ label: e.name,
41
+ subject: d.F_RULE_SUBJECT.enum.report,
42
+ actions: ["read"],
43
+ conditions: { name: e.permissionKey },
44
+ inverted: !1,
45
+ reason: ""
46
+ }));
47
+ return [...c, ...t];
48
+ }), R = a(() => {
49
+ const s = new Set(
50
+ c.map((t) => {
51
+ const e = typeof t.conditions == "string" ? JSON.parse(t.conditions) : t.conditions;
52
+ return e == null ? void 0 : e.name;
53
+ })
54
+ );
55
+ for (const t of i.value)
56
+ s.add(t.permissionKey);
57
+ return s;
58
+ }), h = a(() => {
59
+ const s = new Set(
60
+ c.map((e) => {
61
+ const n = typeof e.conditions == "string" ? JSON.parse(e.conditions) : e.conditions;
62
+ return n == null ? void 0 : n.name;
63
+ })
64
+ ), t = /* @__PURE__ */ new Set();
65
+ for (const e of i.value)
66
+ s.has(e.permissionKey) || t.add(e.permissionKey);
67
+ return t;
68
+ });
69
+ return {
70
+ fetchReportPermissions: m,
71
+ allReportPermissions: y,
72
+ availableReportKeys: R,
73
+ customReportKeys: h,
74
+ isLoading: a(() => l.value),
75
+ isLoaded: a(() => r.value)
76
+ };
77
+ }
78
+ export {
79
+ J as u
80
+ };
@@ -0,0 +1,41 @@
1
+ import { computed as v, ref as u } from "vue";
2
+ import { useCoreStore as f } from "@feedmepos/mf-common";
3
+ import { g as p, b as m } from "./app-B9qAxMj1.js";
4
+ const P = {
5
+ async readProviders() {
6
+ return p(await m("sso-providers").get(""));
7
+ }
8
+ }, n = u([]), t = u(null);
9
+ let s = null;
10
+ function g() {
11
+ const i = f();
12
+ async function a() {
13
+ var r, o;
14
+ const e = (r = i.currentBusiness.value) == null ? void 0 : r.id;
15
+ if (!(!e || s === e)) {
16
+ s = e, n.value = [], t.value = null;
17
+ try {
18
+ const c = await P.readProviders();
19
+ s === e && (n.value = c);
20
+ } catch {
21
+ s === e && (s = null);
22
+ } finally {
23
+ ((o = i.currentBusiness.value) == null ? void 0 : o.id) === e && (t.value = e);
24
+ }
25
+ }
26
+ }
27
+ const l = v(
28
+ () => {
29
+ var e;
30
+ return !!t.value && t.value === ((e = i.currentBusiness.value) == null ? void 0 : e.id);
31
+ }
32
+ );
33
+ function d(e) {
34
+ var r;
35
+ return ((r = n.value.find((o) => o.slug === e)) == null ? void 0 : r.label) ?? e;
36
+ }
37
+ return { providers: n, isLoaded: l, loadProviders: a, providerLabel: d };
38
+ }
39
+ export {
40
+ g as u
41
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-hrm-portal",
3
- "version": "2.3.2-dev.10",
3
+ "version": "2.3.2-dev.12",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@feedmepos/auth": "^1.6.4",
18
18
  "@feedmepos/core": "^2.14.36",
19
- "@feedmepos/mf-common": "^1.29.10",
19
+ "@feedmepos/mf-common": "1.29.36",
20
20
  "@feedmepos/mf-remy-panel": "0.15.0",
21
21
  "@feedmepos/ui-library": "^1.10.13",
22
22
  "@feedmepos/feature-flag": "^0.0.15",