@feedmepos/mf-hrm-portal 2.0.17-dev.3 → 2.0.17-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 (51) hide show
  1. package/dist/{AuditLogList-C6qAeY5g.js → AuditLogList-CV82_8fj.js} +350 -324
  2. package/dist/EmployeeList-dE0So94R.js +736 -0
  3. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js +71 -0
  4. package/dist/HorizontalSplitter-o860F4xM.js +12 -0
  5. package/dist/{Main-Dkr5lzbv.js → Main-BAx-c_oZ.js} +9 -9
  6. package/dist/{Main-BNXKItvX.js → Main-CfAQYaaW.js} +14 -16
  7. package/dist/{Main--tejoyEP.js → Main-CyReTP3K.js} +8 -8
  8. package/dist/PermissionSetList-DmsJnW2i.js +341 -0
  9. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BbcY9q1x.js +3480 -0
  10. package/dist/RoleList-CKB8L-BW.js +530 -0
  11. package/dist/TeamMemberList-CszlbmAX.js +1108 -0
  12. package/dist/{TimesheetList-D-3k0Uad.js → TimesheetList-NRUfSiYL.js} +6 -6
  13. package/dist/{app-BjXuSCis.js → app-B0bANDrM.js} +1891 -1404
  14. package/dist/app.js +1 -1
  15. package/dist/{dayjs.min-z-vrgFCL.js → dayjs.min-DdUO0d-2.js} +1 -1
  16. package/dist/{employee-DAqAMupR.js → employee-DJDUT0Wj.js} +3 -3
  17. package/dist/{iteration-Cp1eSTJA.js → iteration-DqYIXL4P.js} +1 -1
  18. package/dist/{lodash-CXLZQQp8.js → lodash-BBQT31li.js} +1 -1
  19. package/dist/rule-T7VKkRdN.js +996 -0
  20. package/dist/src/api/report-query/index.d.ts +2 -2
  21. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  22. package/dist/src/components/CollapsibleWrapper.vue.d.ts +0 -2
  23. package/dist/src/composables/useBasePermission.d.ts +1 -1
  24. package/dist/src/views/hr/locales/index.d.ts +172 -16
  25. package/dist/src/views/team/components/BasePermission.vue.d.ts +6 -2
  26. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +2 -2
  27. package/dist/src/views/team/locales/index.d.ts +312 -32
  28. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -5
  29. package/dist/style.css +1 -1
  30. package/dist/{timesheet-BlPhOifI.js → timesheet-DjtuB4we.js} +2 -2
  31. package/dist/tsconfig.app.tsbuildinfo +1 -1
  32. package/dist/{useAppStore-BVnrWyPF.js → useAppStore-CBb-dugK.js} +1 -1
  33. package/dist/useDebounce-B8ZPVS5C.js +15 -0
  34. package/dist/useDiscardConfirm-BHni0LNu.js +28 -0
  35. package/dist/{useLoading-7ia-Bps7.js → useLoading-BCOj8y-t.js} +1 -1
  36. package/dist/useReportPermissions-DyzhBpi8.js +70 -0
  37. package/dist/useSearch-B6WK1LBB.js +15 -0
  38. package/package.json +2 -2
  39. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +0 -58
  40. package/dist/EmployeeList-COtXtTqG.js +0 -827
  41. package/dist/FormItem.vue_vue_type_script_setup_true_lang-CoorkndT.js +0 -34
  42. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  43. package/dist/PermissionSetList-B_Sdvbu7.js +0 -340
  44. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BBsaxaXu.js +0 -3439
  45. package/dist/RoleList-SZCgvYvC.js +0 -543
  46. package/dist/TeamMemberList-Dk5HeFfQ.js +0 -1008
  47. package/dist/rule-vBxopbM_.js +0 -990
  48. package/dist/team-CnQ_rIx2.js +0 -33
  49. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
  50. package/dist/useReportPermissions-C8HMek35.js +0 -60
  51. package/dist/useSearch-BAPEUu1R.js +0 -15
@@ -1,7 +1,7 @@
1
1
  import { defineStore as I, storeToRefs as Q } from "pinia";
2
2
  import { ref as w } from "vue";
3
3
  import { useCoreStore as x, baseClientInstance as S } from "@feedmepos/mf-common";
4
- import { g as l, b as g, s as h } from "./iteration-Cp1eSTJA.js";
4
+ import { g as l, b as g, s as h } from "./iteration-DqYIXL4P.js";
5
5
  const y = {
6
6
  async readRoles() {
7
7
  return l(await g().get("/pos-roles"));
@@ -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
+ };
@@ -0,0 +1,28 @@
1
+ import { useI18n as e } from "@feedmepos/mf-common";
2
+ import { useDialog as m } from "@feedmepos/ui-library";
3
+ function c(i, t) {
4
+ const r = m(), { t: o } = e();
5
+ function s() {
6
+ i() ? r.open({
7
+ title: o("portalCommon.dismiss.title"),
8
+ message: o("portalCommon.dismiss.message"),
9
+ zIndex: 200,
10
+ primaryActions: {
11
+ text: o("portalCommon.dismiss.primaryActions"),
12
+ variant: "primary",
13
+ close: !0
14
+ },
15
+ secondaryActions: {
16
+ text: o("common.cancel"),
17
+ variant: "tertiary",
18
+ close: !0
19
+ }
20
+ }).onPrimary(() => {
21
+ t();
22
+ }) : t();
23
+ }
24
+ return s;
25
+ }
26
+ export {
27
+ c as u
28
+ };
@@ -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 { a as w, v } from "./useAppStore-BVnrWyPF.js";
3
+ import { a as w, v } from "./useAppStore-CBb-dugK.js";
4
4
  const E = (r) => {
5
5
  async function d(u, e) {
6
6
  var l, a;
@@ -0,0 +1,70 @@
1
+ import { computed as u, ref as t } from "vue";
2
+ import { e as d } from "./iteration-DqYIXL4P.js";
3
+ import { useCoreStore as h } from "@feedmepos/mf-common";
4
+ import { e as S, R as g } from "./rule-T7VKkRdN.js";
5
+ import "./app-B0bANDrM.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
+ };
@@ -0,0 +1,15 @@
1
+ import { ref as c, computed as s } from "vue";
2
+ const i = (u) => {
3
+ const r = c(u || "");
4
+ function t(e) {
5
+ return `${e}`.trim().toLowerCase();
6
+ }
7
+ const o = s(() => t(r.value));
8
+ function n(e) {
9
+ return o.value ? e.some((a) => t(a).includes(o.value)) : !0;
10
+ }
11
+ return { searchKey: r, filter: n };
12
+ };
13
+ export {
14
+ i as u
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-hrm-portal",
3
- "version": "2.0.17-dev.3",
3
+ "version": "2.0.17-dev.4",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -29,7 +29,7 @@
29
29
  "vue-router": "^4.3.2",
30
30
  "vue3-lottie": "^3.3.0",
31
31
  "xlsx": "^0.18.5",
32
- "@feedmepos/hrm-permission": "1.0.7"
32
+ "@feedmepos/hrm-permission": "1.0.9"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@casl/ability": "^3.4.0",
@@ -1,58 +0,0 @@
1
- import { defineComponent as f, ref as a, onMounted as v, nextTick as y, onUnmounted as _, resolveComponent as g, createElementBlock as r, openBlock as c, Fragment as h, createElementVNode as n, renderSlot as u, createCommentVNode as b, toDisplayString as k, createVNode as C, normalizeStyle as w } from "vue";
2
- const x = { class: "flex items-center" }, B = {
3
- key: 0,
4
- class: "ml-8 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
5
- }, H = { class: "ml-auto" }, S = /* @__PURE__ */ f({
6
- __name: "CollapsibleWrapper",
7
- props: {
8
- title: { default: "" },
9
- subtitle: { default: "" },
10
- initiallyCollapsed: { type: Boolean, default: !1 }
11
- },
12
- setup(l) {
13
- const e = a(l.initiallyCollapsed), t = a(), s = a(0);
14
- let o;
15
- function d() {
16
- e.value = !e.value;
17
- }
18
- function m() {
19
- t.value && (s.value = t.value.scrollHeight);
20
- }
21
- return v(async () => {
22
- await y(), t.value && (o = new ResizeObserver(() => {
23
- m();
24
- }), o.observe(t.value));
25
- }), _(() => {
26
- o == null || o.disconnect();
27
- }), (i, N) => {
28
- const p = g("FmButton");
29
- return c(), r(h, null, [
30
- n("div", { onClick: d }, [
31
- n("div", x, [
32
- u(i.$slots, "title"),
33
- e.value && l.subtitle ? (c(), r("span", B, k(l.subtitle), 1)) : b("", !0),
34
- n("div", H, [
35
- C(p, {
36
- icon: e.value ? "keyboard_arrow_down" : "keyboard_arrow_up",
37
- "text-color": "neutral-gray-400",
38
- variant: "tertiary",
39
- size: "md"
40
- }, null, 8, ["icon"])
41
- ])
42
- ])
43
- ]),
44
- n("div", {
45
- ref_key: "contentRef",
46
- ref: t,
47
- class: "transition-all duration-300 ease-in-out overflow-hidden",
48
- style: w({ maxHeight: e.value ? "0" : s.value + "px" })
49
- }, [
50
- u(i.$slots, "default")
51
- ], 4)
52
- ], 64);
53
- };
54
- }
55
- });
56
- export {
57
- S as _
58
- };