@feedmepos/mf-hrm-portal 2.2.1-dev → 2.2.1-dev.3
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.
- package/dist/{ApprovalCodeList-BgPrC2H1.js → ApprovalCodeList-rL8dh-6s.js} +5 -5
- package/dist/{AuditLogList-B9k56ux1.js → AuditLogList-NvISIfUq.js} +4 -4
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BJgpH-kw.js +438 -0
- package/dist/{EmployeeList-f05XEwMS.js → EmployeeList-C3VvVY6A.js} +6 -6
- package/dist/{GrantUserList-Db4_e87R.js → GrantUserList-DjZ4O0VB.js} +6 -6
- package/dist/{Main-DPmBwatV.js → Main-ByWrRV70.js} +8 -8
- package/dist/{Main-C83-6ZYQ.js → Main-DVTx58X9.js} +11 -11
- package/dist/{Main-CZoUt9IM.js → Main-LaAbAOfs.js} +5 -5
- package/dist/{PermissionSetList-CqcbzdXp.js → PermissionSetList-DD45SSY3.js} +19 -19
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-yDPvNHiW.js +4169 -0
- 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
- package/dist/RoleList-BDxgwmAV.js +725 -0
- package/dist/{TeamMemberList-DuP1QWAS.js → TeamMemberList-DrLbMN34.js} +9 -9
- package/dist/{TimesheetList-D_Xq4ESR.js → TimesheetList-CdaxlO97.js} +7 -7
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-O2_M0Ktw.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-ogjfztLs.js} +3 -3
- package/dist/{app-3bHRu-TD.js → app-B8eo04d6.js} +169 -158
- package/dist/app.js +1 -1
- package/dist/{approval-code-Q4666xp5.js → approval-code-jIjkeVEb.js} +1 -1
- package/dist/{dayjs.min-BjrK6J3b.js → dayjs.min-DZEHW2QB.js} +1 -1
- package/dist/{employee-Ck_DJyl9.js → employee-DX0CZF-B.js} +4 -4
- package/dist/{grant-user-CQZaTzVt.js → grant-user-SNiDV22U.js} +1 -1
- package/dist/{iteration-Bl07BT2c.js → iteration-yBS4dpFh.js} +1 -1
- package/dist/{lodash-CwAowwGK.js → lodash-344d5Ope.js} +1 -1
- package/dist/{restaurant-YOVMuuFY.js → restaurant-BTpBmfBV.js} +12 -14
- package/dist/role-BXBuBxs5.js +92 -0
- package/dist/rule-DWlFon04.js +1094 -0
- package/dist/src/composables/useReportPermissions.d.ts +1 -0
- package/dist/src/helpers/rule.d.ts +10 -1
- package/dist/src/stores/role.d.ts +6 -6
- package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +44 -0
- package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +39 -0
- package/dist/src/views/team/locales/index.d.ts +4 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-DNTlIeMv.js → useAppStore-DCwd8GWN.js} +1 -1
- package/dist/{useLoading-BH02lYns.js → useLoading-CXzTpIVv.js} +1 -1
- package/dist/useReportPermissions-C0exkIxU.js +71 -0
- package/package.json +2 -2
- package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-BKxQPhjZ.js +0 -387
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DMS04nsd.js +0 -4122
- package/dist/RoleList-DsINcxpz.js +0 -685
- package/dist/role-Z1BT4HFT.js +0 -82
- package/dist/rule-DYmHm3nE.js +0 -1066
- package/dist/useReportPermissions-DCF1U1Us.js +0 -70
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { computed as u, ref as t } from "vue";
|
|
2
|
-
import { e as d } from "./iteration-Bl07BT2c.js";
|
|
3
|
-
import { useCoreStore as h } from "@feedmepos/mf-common";
|
|
4
|
-
import { e as S, R as g } from "./rule-DYmHm3nE.js";
|
|
5
|
-
import "./app-3bHRu-TD.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
|
-
};
|