@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
package/dist/app.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineStore as C } from "pinia";
|
|
2
2
|
import { ref as l } from "vue";
|
|
3
|
-
import { g as p, b as s } from "./restaurant-
|
|
3
|
+
import { g as p, b as s } from "./restaurant-BTpBmfBV.js";
|
|
4
4
|
const n = {
|
|
5
5
|
async getApprovalCodes() {
|
|
6
6
|
return p(await s("approval-codes").get(""));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as g } from "./dayjs.min-
|
|
1
|
+
import { d as g } from "./dayjs.min-DZEHW2QB.js";
|
|
2
2
|
import { defineStore as $, storeToRefs as T } from "pinia";
|
|
3
3
|
import { ref as m } from "vue";
|
|
4
|
-
import { s as E } from "./iteration-
|
|
5
|
-
import { b as i, g as f, u as w } from "./restaurant-
|
|
4
|
+
import { s as E } from "./iteration-yBS4dpFh.js";
|
|
5
|
+
import { b as i, g as f, u as w } from "./restaurant-BTpBmfBV.js";
|
|
6
6
|
import { i as v } from "./utils-BZkjJbju.js";
|
|
7
|
-
import { u as _ } from "./role-
|
|
7
|
+
import { u as _ } from "./role-BXBuBxs5.js";
|
|
8
8
|
const o = {
|
|
9
9
|
async readEmployees() {
|
|
10
10
|
return f(await i().get("/pos-users"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineStore as f } from "pinia";
|
|
2
2
|
import { ref as u } from "vue";
|
|
3
|
-
import { g as s, a as v, b as o } from "./restaurant-
|
|
3
|
+
import { g as s, a as v, b as o } from "./restaurant-BTpBmfBV.js";
|
|
4
4
|
const c = {
|
|
5
5
|
async getGrantUsers() {
|
|
6
6
|
return s(await o("grant").get(""));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as B } from "./app-
|
|
1
|
+
import { c as B } from "./app-B8eo04d6.js";
|
|
2
2
|
var ma = {}, Zt = {}, l = {}, ji = {}, Ei = {}, Ii = {}, Dn = {};
|
|
3
3
|
(function(e) {
|
|
4
4
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getParsedType = e.ZodParsedType = e.util = void 0;
|
|
@@ -1833,24 +1833,22 @@ const nr = {
|
|
|
1833
1833
|
const { currentBusiness: e } = re(), t = fe([]), n = fe(!1), r = fe(null);
|
|
1834
1834
|
let s = null, o = null;
|
|
1835
1835
|
async function i(c = !1) {
|
|
1836
|
-
var
|
|
1837
|
-
const f = ((
|
|
1836
|
+
var u, h;
|
|
1837
|
+
const f = ((u = e.value) == null ? void 0 : u._id) ?? ((h = e.value) == null ? void 0 : h.id) ?? null;
|
|
1838
1838
|
if (!f) {
|
|
1839
1839
|
t.value = [], r.value = null, s = null, o = null;
|
|
1840
1840
|
return;
|
|
1841
1841
|
}
|
|
1842
|
-
if (r.value !== f && (t.value = [], r.value = null, s = null, o = null), !
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
s = null, o = null, n.value = !1;
|
|
1853
|
-
}
|
|
1842
|
+
if (r.value && r.value !== f && (t.value = [], r.value = null), o && o !== f && (s = null, o = null), !c && r.value === f) return;
|
|
1843
|
+
if (!c && s && o === f)
|
|
1844
|
+
return await s;
|
|
1845
|
+
let l = null;
|
|
1846
|
+
try {
|
|
1847
|
+
n.value = !0, l = (async () => {
|
|
1848
|
+
t.value = await nr.readRestaurants(), r.value = f;
|
|
1849
|
+
})(), s = l, o = f, await l;
|
|
1850
|
+
} finally {
|
|
1851
|
+
s === l && (s = null, o = null), n.value = !1;
|
|
1854
1852
|
}
|
|
1855
1853
|
}
|
|
1856
1854
|
return {
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineStore as x, storeToRefs as b } from "pinia";
|
|
2
|
+
import { ref as w } from "vue";
|
|
3
|
+
import { useCoreStore as B } from "@feedmepos/mf-common";
|
|
4
|
+
import { s as v } from "./iteration-yBS4dpFh.js";
|
|
5
|
+
import { g as f, b as p, u as I } from "./restaurant-BTpBmfBV.js";
|
|
6
|
+
const R = {
|
|
7
|
+
async readRoles() {
|
|
8
|
+
return f(await p().get("/pos-roles"));
|
|
9
|
+
},
|
|
10
|
+
async createRole(e) {
|
|
11
|
+
return f(await p().post("/pos-roles", e));
|
|
12
|
+
},
|
|
13
|
+
async updateRole(e, c) {
|
|
14
|
+
return f(await p().put(`/pos-roles/${e}`, c));
|
|
15
|
+
},
|
|
16
|
+
async deleteRole(e) {
|
|
17
|
+
return f(
|
|
18
|
+
await p().put(`/pos-roles/${e._id}`, {
|
|
19
|
+
restaurantIds: [],
|
|
20
|
+
role: e
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
async function m(e) {
|
|
26
|
+
const { restaurants: c } = I(), u = e.reduce((n, a) => {
|
|
27
|
+
var d;
|
|
28
|
+
const s = n.findIndex((o) => o._id === a._id), r = {
|
|
29
|
+
id: a.restaurantId,
|
|
30
|
+
name: ((d = c.value.find((o) => o._id === a.restaurantId)) == null ? void 0 : d.profile.name) || ""
|
|
31
|
+
};
|
|
32
|
+
return s < 0 ? n.push({
|
|
33
|
+
...a,
|
|
34
|
+
restaurants: [r]
|
|
35
|
+
}) : n[s].restaurants.some((o) => o.id === a.restaurantId) || (n[s].restaurants = v([...n[s].restaurants, r], { selector: "name" })), n;
|
|
36
|
+
}, []);
|
|
37
|
+
return v(u, { selector: "name" });
|
|
38
|
+
}
|
|
39
|
+
const A = x("role", () => {
|
|
40
|
+
const { currentBusiness: e } = B(), c = I(), u = w([]), n = w(!1), a = w(null);
|
|
41
|
+
let s = null, r = null;
|
|
42
|
+
async function d(l = !1) {
|
|
43
|
+
var y;
|
|
44
|
+
const t = ((y = e.value) == null ? void 0 : y._id) ?? null;
|
|
45
|
+
if (!t) {
|
|
46
|
+
u.value = [], a.value = null, s = null, r = null;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (a.value && a.value !== t && (u.value = [], a.value = null), r && r !== t && (s = null, r = null), !l && a.value === t) return;
|
|
50
|
+
if (!l && s && r === t)
|
|
51
|
+
return await s;
|
|
52
|
+
let i = null;
|
|
53
|
+
try {
|
|
54
|
+
n.value = !0, i = (async () => {
|
|
55
|
+
await c.readRestaurants();
|
|
56
|
+
const _ = await R.readRoles();
|
|
57
|
+
u.value = await m(_), a.value = t;
|
|
58
|
+
})(), s = i, r = t, await i;
|
|
59
|
+
} finally {
|
|
60
|
+
s === i && (s = null, r = null), n.value = !1;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async function o(l) {
|
|
64
|
+
const t = await R.createRole(l);
|
|
65
|
+
u.value = await m(t);
|
|
66
|
+
}
|
|
67
|
+
async function g(l, t) {
|
|
68
|
+
const i = await R.updateRole(l, t);
|
|
69
|
+
u.value = await m(i);
|
|
70
|
+
}
|
|
71
|
+
async function S(l) {
|
|
72
|
+
const t = await R.deleteRole(l);
|
|
73
|
+
u.value = await m(t);
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
roles: u,
|
|
77
|
+
isLoading: n,
|
|
78
|
+
readRoles: d,
|
|
79
|
+
createRole: o,
|
|
80
|
+
updateRole: g,
|
|
81
|
+
deleteRole: S
|
|
82
|
+
};
|
|
83
|
+
}), L = () => {
|
|
84
|
+
const e = A();
|
|
85
|
+
return {
|
|
86
|
+
...e,
|
|
87
|
+
...b(e)
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export {
|
|
91
|
+
L as u
|
|
92
|
+
};
|