@feedmepos/mf-hrm-portal 2.3.2-dev.5 → 2.3.2-dev.7
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-NYJNwdDZ.js → ApprovalCodeList-Bw0E-hZl.js} +7 -7
- package/dist/{AuditLogList-Ghn4aBnn.js → AuditLogList-CA-_t77n.js} +5 -5
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BxZ9t3MZ.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-LtjNCAFN.js} +10 -10
- package/dist/{EmployeeList-jc8LTznV.js → EmployeeList-D_bX0EhQ.js} +8 -8
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-DLgm6oCz.js → FormSection.vue_vue_type_script_setup_true_lang-CyZxQa-b.js} +1 -1
- package/dist/{GrantUserList-BtPTpypR.js → GrantUserList-Cg7ITk_M.js} +8 -8
- package/dist/{Main-BizCV-_x.js → Main-BaB4vgI5.js} +11 -11
- package/dist/{Main-McMZU_cR.js → Main-Bl-Ocx1G.js} +5 -5
- package/dist/{Main-BF8hlYeV.js → Main-D5wi42fp.js} +10 -10
- package/dist/{MyPosProfile-BjeCnBvL.js → MyPosProfile-CUG_201f.js} +1 -1
- package/dist/{PermissionSetList-NWLoqFHC.js → PermissionSetList-kgG9H3DX.js} +66 -66
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-y1YcZpGA.js +4207 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-nwpdr7T7.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-fQyCtDXM.js} +19 -19
- package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-eT-dPsOX.js → RoleForm.vue_vue_type_script_setup_true_lang-3Q8udk43.js} +30 -30
- package/dist/{RoleList-CIfN10zu.js → RoleList-Cmz97HHP.js} +96 -105
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CMTXC_UR.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CggEy3OI.js} +1 -1
- package/dist/{ScheduleGeneralPage-8vS1DUrk.js → ScheduleGeneralPage-B39k3SQH.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-Br4AcF1g.js → ScheduleModal.vue_vue_type_script_setup_true_lang-C5j3D4eF.js} +4 -4
- package/dist/{SchedulePage-DqbE1PoV.js → SchedulePage-AVmRkFi1.js} +9 -9
- package/dist/{SchedulePositionPage-DUnkT0Tp.js → SchedulePositionPage-3rE-O8CG.js} +3 -3
- package/dist/{SelectFilter-voMj4_j1.js → SelectFilter-R7ry_GEg.js} +2 -3
- package/dist/{TeamMemberList-DoEOWNDC.js → TeamMemberList-CvDnIILn.js} +184 -184
- package/dist/TimesheetList-DYoglTi8.js +401 -0
- package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_d0c6fd51_lang-DBpzyQ17.js +63 -0
- package/dist/{app-CDCO87ji.js → app-DKUCzcrc.js} +5444 -4624
- package/dist/app.js +1 -1
- package/dist/{approval-code-CLE9s5dL.js → approval-code-nsETgIry.js} +1 -1
- package/dist/{dayjs.min-BW6-XAUB.js → dayjs.min-CtULWW1N.js} +1 -1
- package/dist/{employee-BaCU-FLC.js → employee-DlsSqR3i.js} +5 -5
- package/dist/{grant-user-DMtilLJx.js → grant-user-Dpa_Rl6j.js} +1 -1
- package/dist/{iteration-CPLGGFBb.js → iteration-DpHBtiyr.js} +1 -1
- package/dist/{lodash-snXoiw60.js → lodash-YaHCUo_F.js} +1 -1
- package/dist/member-grant-CEokFI3_.js +54 -0
- package/dist/restaurant-CDFKqEFm.js +52 -0
- package/dist/role-DyBVVlEA.js +97 -0
- package/dist/rule-xErZqYmH.js +842 -0
- package/dist/src/api/timesheet/index.d.ts +1 -1
- package/dist/src/helpers/permission-set.d.ts +1 -102
- package/dist/src/helpers/rule.d.ts +2 -2
- package/dist/src/stores/restaurant.d.ts +61 -1
- package/dist/src/stores/timesheet.d.ts +6 -6
- package/dist/src/views/audit-log/locales/index.d.ts +12 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-pKAGQL6q.js → useAppStore-BqsvPsPB.js} +1 -1
- package/dist/{useLoading-D67DIqfk.js → useLoading-BS1bnZg1.js} +1 -1
- package/dist/{useReportPermissions-CfgnE0NY.js → useReportPermissions-DJEhkyGc.js} +5 -5
- package/package.json +3 -3
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-UPcpeVD5.js +0 -4243
- package/dist/TimesheetList-BBv2SV96.js +0 -402
- package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-h-bWBmpI.js +0 -58
- package/dist/member-grant-CJyOr-q0.js +0 -55
- package/dist/restaurant-BMlLIUqe.js +0 -51
- package/dist/role-DqcBOWHL.js +0 -93
- package/dist/rule-B5YNhGJ4.js +0 -788
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 "./app-
|
|
3
|
+
import { g as p, b as s } from "./app-DKUCzcrc.js";
|
|
4
4
|
const n = {
|
|
5
5
|
async getApprovalCodes() {
|
|
6
6
|
return p(await s("approval-codes").get(""));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as g } from "./dayjs.min-
|
|
1
|
+
import { d as g } from "./dayjs.min-CtULWW1N.js";
|
|
2
2
|
import { defineStore as $, storeToRefs as x } from "pinia";
|
|
3
3
|
import { ref as y } from "vue";
|
|
4
|
-
import { s as E } from "./iteration-
|
|
5
|
-
import { b as l, g as m } from "./app-
|
|
4
|
+
import { s as E } from "./iteration-DpHBtiyr.js";
|
|
5
|
+
import { b as l, g as m } from "./app-DKUCzcrc.js";
|
|
6
6
|
import { i as v } from "./utils-BZkjJbju.js";
|
|
7
|
-
import { u as P } from "./role-
|
|
8
|
-
import { u as I } from "./restaurant-
|
|
7
|
+
import { u as P } from "./role-DyBVVlEA.js";
|
|
8
|
+
import { u as I } from "./restaurant-CDFKqEFm.js";
|
|
9
9
|
const o = {
|
|
10
10
|
async readEmployees() {
|
|
11
11
|
return m(await l().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, e as v, b as o } from "./app-
|
|
3
|
+
import { g as s, e as v, b as o } from "./app-DKUCzcrc.js";
|
|
4
4
|
const c = {
|
|
5
5
|
async getGrantUsers() {
|
|
6
6
|
return s(await o("grant").get(""));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as B } from "./app-
|
|
1
|
+
import { w as B } from "./app-DKUCzcrc.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;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { m as n } from "./app-DKUCzcrc.js";
|
|
2
|
+
import { U as u } from "./rule-xErZqYmH.js";
|
|
3
|
+
const m = [
|
|
4
|
+
n.Subject.Business.restaurant,
|
|
5
|
+
n.Subject.Business.role,
|
|
6
|
+
n.Subject.Restaurant.restaurant,
|
|
7
|
+
n.Subject.Business.inventory_stock
|
|
8
|
+
], c = (s) => m.includes(s.subject);
|
|
9
|
+
function l(s, t) {
|
|
10
|
+
return t.length > 0 || s.some((o) => !o.inverted && !c(o));
|
|
11
|
+
}
|
|
12
|
+
function d(s) {
|
|
13
|
+
return s.filter(c);
|
|
14
|
+
}
|
|
15
|
+
const b = {
|
|
16
|
+
customPermissions: [],
|
|
17
|
+
permissions: [],
|
|
18
|
+
permissionSetIds: [],
|
|
19
|
+
posUser: void 0
|
|
20
|
+
};
|
|
21
|
+
function S(s) {
|
|
22
|
+
const { customPermissions: t, permissions: o } = u({
|
|
23
|
+
userPermissions: s.userPermissions,
|
|
24
|
+
inheritedPermissions: s.inheritedPermissions,
|
|
25
|
+
reportSubjects: s.reportSubjects,
|
|
26
|
+
defaultReportSubjects: s.defaultReportSubjects
|
|
27
|
+
}), { posUser: e, savedPosUser: r } = s;
|
|
28
|
+
return {
|
|
29
|
+
customPermissions: t,
|
|
30
|
+
permissions: o,
|
|
31
|
+
permissionSetIds: s.permissionSetIds,
|
|
32
|
+
posUser: e ? {
|
|
33
|
+
...e,
|
|
34
|
+
name: e.name || (r == null ? void 0 : r.name) || s.fallbackName,
|
|
35
|
+
code: e.code || (r == null ? void 0 : r.code) || "",
|
|
36
|
+
passcode: e.passcode,
|
|
37
|
+
roles: e.roles.filter((i) => !!i.roleId)
|
|
38
|
+
} : e === null ? null : void 0
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function f(s, t) {
|
|
42
|
+
const { posUser: o, ...e } = s;
|
|
43
|
+
if (!o || !t || o.passcode !== t.passcode) return { ...e, posUser: o };
|
|
44
|
+
const { passcode: r, ...i } = o;
|
|
45
|
+
return { ...e, posUser: i };
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
b as E,
|
|
49
|
+
m as W,
|
|
50
|
+
S as b,
|
|
51
|
+
l as h,
|
|
52
|
+
f as t,
|
|
53
|
+
d as w
|
|
54
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineStore as m, storeToRefs as y } from "pinia";
|
|
2
|
+
import { ref as i, computed as R } from "vue";
|
|
3
|
+
import { useCoreStore as g } from "@feedmepos/mf-common";
|
|
4
|
+
import { b as f, g as w } from "./app-DKUCzcrc.js";
|
|
5
|
+
const I = {
|
|
6
|
+
async readRestaurants() {
|
|
7
|
+
return w(await f().get("/hr-restaurants"));
|
|
8
|
+
},
|
|
9
|
+
async saveOperationalHours(e, a) {
|
|
10
|
+
await f(`restaurants/${e}/schedules`).patch(
|
|
11
|
+
"operational-hours",
|
|
12
|
+
{ operatingHours: a }
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}, h = m("restaurant", () => {
|
|
16
|
+
const { currentBusiness: e } = g(), a = i([]), v = R(() => new Map(a.value.map((r) => [r._id, r]))), o = i(!1), u = i(null);
|
|
17
|
+
let t = null, s = null;
|
|
18
|
+
async function p(r = !1) {
|
|
19
|
+
var c, d;
|
|
20
|
+
const n = ((c = e.value) == null ? void 0 : c._id) ?? ((d = e.value) == null ? void 0 : d.id) ?? null;
|
|
21
|
+
if (!n) {
|
|
22
|
+
a.value = [], u.value = null, t = null, s = null;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (u.value && u.value !== n && (a.value = [], u.value = null), s && s !== n && (t = null, s = null), !r && u.value === n) return;
|
|
26
|
+
if (!r && t && s === n)
|
|
27
|
+
return await t;
|
|
28
|
+
let l = null;
|
|
29
|
+
try {
|
|
30
|
+
o.value = !0, l = (async () => {
|
|
31
|
+
a.value = await I.readRestaurants(), u.value = n;
|
|
32
|
+
})(), t = l, s = n, await l;
|
|
33
|
+
} finally {
|
|
34
|
+
t === l && (t = null, s = null), o.value = !1;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
restaurants: a,
|
|
39
|
+
restaurantsById: v,
|
|
40
|
+
isLoading: o,
|
|
41
|
+
readRestaurants: p
|
|
42
|
+
};
|
|
43
|
+
}), A = () => {
|
|
44
|
+
const e = h();
|
|
45
|
+
return {
|
|
46
|
+
...e,
|
|
47
|
+
...y(e)
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
A as u
|
|
52
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { defineStore as B, storeToRefs as b } from "pinia";
|
|
2
|
+
import { ref as v } from "vue";
|
|
3
|
+
import { useCoreStore as x } from "@feedmepos/mf-common";
|
|
4
|
+
import { s as y } from "./iteration-DpHBtiyr.js";
|
|
5
|
+
import { g as d, b as f } from "./app-DKUCzcrc.js";
|
|
6
|
+
import { u as g } from "./restaurant-CDFKqEFm.js";
|
|
7
|
+
const p = {
|
|
8
|
+
async readRoles() {
|
|
9
|
+
return d(await f().get("/pos-roles"));
|
|
10
|
+
},
|
|
11
|
+
async createRole(t) {
|
|
12
|
+
return d(await f().post("/pos-roles", t));
|
|
13
|
+
},
|
|
14
|
+
async updateRole(t, i) {
|
|
15
|
+
return d(await f().put(`/pos-roles/${t}`, i));
|
|
16
|
+
},
|
|
17
|
+
async deleteRole(t) {
|
|
18
|
+
return d(
|
|
19
|
+
await f().put(`/pos-roles/${t._id}`, {
|
|
20
|
+
restaurantIds: [],
|
|
21
|
+
role: t
|
|
22
|
+
})
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
async function m(t) {
|
|
27
|
+
var n;
|
|
28
|
+
const { restaurantsById: i } = g(), s = /* @__PURE__ */ new Map();
|
|
29
|
+
for (const e of t) {
|
|
30
|
+
const r = {
|
|
31
|
+
id: e.restaurantId,
|
|
32
|
+
name: ((n = i.value.get(e.restaurantId)) == null ? void 0 : n.profile.name) || ""
|
|
33
|
+
}, c = s.get(e._id);
|
|
34
|
+
c ? c.restaurants.some((R) => R.id === e.restaurantId) || c.restaurants.push(r) : s.set(e._id, {
|
|
35
|
+
...e,
|
|
36
|
+
restaurants: [r]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
const l = [...s.values()];
|
|
40
|
+
for (const e of l)
|
|
41
|
+
e.restaurants = y(e.restaurants, { selector: "name" });
|
|
42
|
+
return y(l, { selector: "name" });
|
|
43
|
+
}
|
|
44
|
+
const A = B("role", () => {
|
|
45
|
+
const { currentBusiness: t } = x(), i = g(), s = v([]), l = v(!1), n = v(null);
|
|
46
|
+
let e = null, r = null;
|
|
47
|
+
async function c(o = !1) {
|
|
48
|
+
var w;
|
|
49
|
+
const a = ((w = t.value) == null ? void 0 : w._id) ?? null;
|
|
50
|
+
if (!a) {
|
|
51
|
+
s.value = [], n.value = null, e = null, r = null;
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (n.value && n.value !== a && (s.value = [], n.value = null), r && r !== a && (e = null, r = null), !o && n.value === a) return;
|
|
55
|
+
if (!o && e && r === a)
|
|
56
|
+
return await e;
|
|
57
|
+
let u = null;
|
|
58
|
+
try {
|
|
59
|
+
l.value = !0, u = (async () => {
|
|
60
|
+
await i.readRestaurants();
|
|
61
|
+
const _ = await p.readRoles();
|
|
62
|
+
s.value = await m(_), n.value = a;
|
|
63
|
+
})(), e = u, r = a, await u;
|
|
64
|
+
} finally {
|
|
65
|
+
e === u && (e = null, r = null), l.value = !1;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async function R(o) {
|
|
69
|
+
const a = await p.createRole(o);
|
|
70
|
+
s.value = await m(a);
|
|
71
|
+
}
|
|
72
|
+
async function I(o, a) {
|
|
73
|
+
const u = await p.updateRole(o, a);
|
|
74
|
+
s.value = await m(u);
|
|
75
|
+
}
|
|
76
|
+
async function S(o) {
|
|
77
|
+
const a = await p.deleteRole(o);
|
|
78
|
+
s.value = await m(a);
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
roles: s,
|
|
82
|
+
isLoading: l,
|
|
83
|
+
readRoles: c,
|
|
84
|
+
createRole: R,
|
|
85
|
+
updateRole: I,
|
|
86
|
+
deleteRole: S
|
|
87
|
+
};
|
|
88
|
+
}), M = () => {
|
|
89
|
+
const t = A();
|
|
90
|
+
return {
|
|
91
|
+
...t,
|
|
92
|
+
...b(t)
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
M as u
|
|
97
|
+
};
|