@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.
- package/dist/{ApprovalCodeList-RKU5B8SO.js → ApprovalCodeList-CCh9mNJh.js} +7 -7
- package/dist/AuditLogList-DCADUZ5s.js +2019 -0
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-pL2zRc67.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BZQNDOg7.js} +10 -10
- package/dist/{EmployeeList-nrYsS5uz.js → EmployeeList-CRI7XjzX.js} +8 -8
- 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
- package/dist/{GrantUserList-BSjeC4MC.js → GrantUserList-DbMngkpK.js} +8 -8
- package/dist/{Main-DbdoVLCE.js → Main-BsFUfsmP.js} +29 -29
- package/dist/{Main-DtmCBbTR.js → Main-CrnM6wr8.js} +2168 -2169
- package/dist/{Main-CpuHaXU6.js → Main-D4Zq5AXi.js} +5 -5
- package/dist/{MyPosProfile-CsTCfGNT.js → MyPosProfile-B4cE47im.js} +1 -1
- package/dist/{PermissionSetList-B1c-uGZO.js → PermissionSetList-D_2x-mDD.js} +112 -113
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BM9Von-l.js +4212 -0
- 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
- 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
- package/dist/{RoleList-CwaGNsFy.js → RoleList-BC-c7fqn.js} +105 -96
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-C2ekVXdR.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DBbuSrXV.js} +1 -1
- package/dist/{ScheduleGeneralPage-BVtXmxtp.js → ScheduleGeneralPage-eytzOZQr.js} +2 -2
- 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
- package/dist/{SchedulePage-3qksmT2I.js → SchedulePage-B0QirzAk.js} +17 -17
- package/dist/{SchedulePositionPage-DAU20KPZ.js → SchedulePositionPage-BAE-NQvL.js} +3 -3
- package/dist/{SelectFilter-BpzBwBmQ.js → SelectFilter-DrLJhxt6.js} +1 -1
- package/dist/TeamMemberList-CHkiL_q9.js +2083 -0
- package/dist/TimesheetList-BZuddmzy.js +402 -0
- package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-LCUO-ogb.js +58 -0
- package/dist/{app-DEZT4wdV.js → app-B9qAxMj1.js} +3516 -3470
- package/dist/app.js +1 -1
- package/dist/{approval-code-BZTz5OXK.js → approval-code-CTgj9q6m.js} +1 -1
- package/dist/{dayjs.min-B55I-uhI.js → dayjs.min-giCSI3N8.js} +22 -22
- package/dist/employee-BD3NXG8h.js +210 -0
- package/dist/{grant-user-B2rYztyf.js → grant-user-jeTFzGU1.js} +1 -1
- package/dist/{index-Bfdseotz.js → iteration-Tyg43nH0.js} +726 -698
- package/dist/{lodash-B8bqa6a9.js → lodash-CZsDR_DU.js} +1 -1
- package/dist/{member-grant-BIpKkuu8.js → member-grant-DsEMLN1N.js} +2 -2
- package/dist/restaurant-CDJ3VjdH.js +49 -0
- package/dist/role-BDRWt87n.js +91 -0
- package/dist/{rule-Ccopk8R_.js → rule-EiO87cJJ.js} +309 -313
- package/dist/src/api/employee/index.d.ts +2 -1
- package/dist/src/api/timesheet/index.d.ts +1 -1
- package/dist/src/composables/useTenant.d.ts +11 -0
- package/dist/src/router/courtGuard.d.ts +4 -0
- package/dist/src/stores/employee.d.ts +7 -1
- package/dist/src/stores/restaurant.d.ts +1 -61
- package/dist/src/stores/team.d.ts +1 -1
- package/dist/src/stores/timesheet.d.ts +51 -66
- package/dist/src/types/timesheet.d.ts +0 -3
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-DfqsbhT2.js → useAppStore-CkUZ2H5h.js} +1 -1
- package/dist/{useLoading-CQnX5WjI.js → useLoading-DJHJM5E0.js} +1 -1
- package/dist/useReportPermissions-2dfIX21b.js +80 -0
- package/dist/useSsoProviders-BarGHndw.js +41 -0
- package/package.json +2 -2
- package/dist/AuditLogList-DuDCMjGR.js +0 -2026
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Toq6qrLx.js +0 -4208
- package/dist/TeamMemberList-Bdpm40i3.js +0 -2087
- package/dist/TimesheetList-CL_eJp2h.js +0 -437
- package/dist/employee-C6z5i6O4.js +0 -172
- package/dist/iteration-CcXrOMQe.js +0 -30
- package/dist/restaurant-ejyX2jEG.js +0 -52
- package/dist/role-C_t3DDlG.js +0 -98
- package/dist/timesheet-CZHcebqS.js +0 -76
- package/dist/useReportPermissions-kTjftFk7.js +0 -82
package/dist/role-C_t3DDlG.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
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 "./index-Bfdseotz.js";
|
|
5
|
-
import { g as d, b as f } from "./app-DEZT4wdV.js";
|
|
6
|
-
import { s as y } from "./iteration-CcXrOMQe.js";
|
|
7
|
-
import { u as g } from "./restaurant-ejyX2jEG.js";
|
|
8
|
-
const p = {
|
|
9
|
-
async readRoles() {
|
|
10
|
-
return d(await f().get("/pos-roles"));
|
|
11
|
-
},
|
|
12
|
-
async createRole(t) {
|
|
13
|
-
return d(await f().post("/pos-roles", t));
|
|
14
|
-
},
|
|
15
|
-
async updateRole(t, i) {
|
|
16
|
-
return d(await f().put(`/pos-roles/${t}`, i));
|
|
17
|
-
},
|
|
18
|
-
async deleteRole(t) {
|
|
19
|
-
return d(
|
|
20
|
-
await f().put(`/pos-roles/${t._id}`, {
|
|
21
|
-
restaurantIds: [],
|
|
22
|
-
role: t
|
|
23
|
-
})
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
async function m(t) {
|
|
28
|
-
var n;
|
|
29
|
-
const { restaurantsById: i } = g(), s = /* @__PURE__ */ new Map();
|
|
30
|
-
for (const e of t) {
|
|
31
|
-
const r = {
|
|
32
|
-
id: e.restaurantId,
|
|
33
|
-
name: ((n = i.value.get(e.restaurantId)) == null ? void 0 : n.profile.name) || ""
|
|
34
|
-
}, c = s.get(e._id);
|
|
35
|
-
c ? c.restaurants.some((R) => R.id === e.restaurantId) || c.restaurants.push(r) : s.set(e._id, {
|
|
36
|
-
...e,
|
|
37
|
-
restaurants: [r]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
const l = [...s.values()];
|
|
41
|
-
for (const e of l)
|
|
42
|
-
e.restaurants = y(e.restaurants, { selector: "name" });
|
|
43
|
-
return y(l, { selector: "name" });
|
|
44
|
-
}
|
|
45
|
-
const h = B("hrm-role", () => {
|
|
46
|
-
const { currentBusiness: t } = x(), i = g(), s = v([]), l = v(!1), n = v(null);
|
|
47
|
-
let e = null, r = null;
|
|
48
|
-
async function c(o = !1) {
|
|
49
|
-
var w;
|
|
50
|
-
const a = ((w = t.value) == null ? void 0 : w._id) ?? null;
|
|
51
|
-
if (!a) {
|
|
52
|
-
s.value = [], n.value = null, e = null, r = null;
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
if (n.value && n.value !== a && (s.value = [], n.value = null), r && r !== a && (e = null, r = null), !o && n.value === a) return;
|
|
56
|
-
if (!o && e && r === a)
|
|
57
|
-
return await e;
|
|
58
|
-
let u = null;
|
|
59
|
-
try {
|
|
60
|
-
l.value = !0, u = (async () => {
|
|
61
|
-
await i.readRestaurants();
|
|
62
|
-
const _ = await p.readRoles();
|
|
63
|
-
s.value = await m(_), n.value = a;
|
|
64
|
-
})(), e = u, r = a, await u;
|
|
65
|
-
} finally {
|
|
66
|
-
e === u && (e = null, r = null), l.value = !1;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
async function R(o) {
|
|
70
|
-
const a = await p.createRole(o);
|
|
71
|
-
s.value = await m(a);
|
|
72
|
-
}
|
|
73
|
-
async function I(o, a) {
|
|
74
|
-
const u = await p.updateRole(o, a);
|
|
75
|
-
s.value = await m(u);
|
|
76
|
-
}
|
|
77
|
-
async function S(o) {
|
|
78
|
-
const a = await p.deleteRole(o);
|
|
79
|
-
s.value = await m(a);
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
roles: s,
|
|
83
|
-
isLoading: l,
|
|
84
|
-
readRoles: c,
|
|
85
|
-
createRole: R,
|
|
86
|
-
updateRole: I,
|
|
87
|
-
deleteRole: S
|
|
88
|
-
};
|
|
89
|
-
}), P = () => {
|
|
90
|
-
const t = h();
|
|
91
|
-
return {
|
|
92
|
-
...t,
|
|
93
|
-
...b(t)
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
export {
|
|
97
|
-
P as u
|
|
98
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { d as f } from "./dayjs.min-B55I-uhI.js";
|
|
2
|
-
import { defineStore as I, storeToRefs as v } from "pinia";
|
|
3
|
-
import { ref as w } from "vue";
|
|
4
|
-
import { b as T, g as D } from "./app-DEZT4wdV.js";
|
|
5
|
-
import { s as y } from "./iteration-CcXrOMQe.js";
|
|
6
|
-
import { i as S, f as O } from "./utils-BZkjJbju.js";
|
|
7
|
-
import { u as Y } from "./restaurant-ejyX2jEG.js";
|
|
8
|
-
const d = {
|
|
9
|
-
async readTimesheets(t, r, a) {
|
|
10
|
-
return D(
|
|
11
|
-
await T().get("timesheet", {
|
|
12
|
-
params: { start: t, end: r, restaurantIds: a }
|
|
13
|
-
})
|
|
14
|
-
);
|
|
15
|
-
},
|
|
16
|
-
async updateTimesheet(t, r) {
|
|
17
|
-
await T().put(`timesheet/${t}`, r);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
function g(t) {
|
|
21
|
-
const r = t.map((a) => {
|
|
22
|
-
const { startedAt: o, endedAt: n } = a, i = f(S(o)), e = n ? f(S(n)) : null, m = (e == null ? void 0 : e.diff(i, "minute", !1)) || 0, u = e ? O(m) : "", c = "YYYY-MM-DD hh:mm a";
|
|
23
|
-
return {
|
|
24
|
-
...a,
|
|
25
|
-
start: i.format(c),
|
|
26
|
-
end: e ? e.format(c) : "",
|
|
27
|
-
totalMin: m,
|
|
28
|
-
duration: u
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
return y(r, { selector: "start" });
|
|
32
|
-
}
|
|
33
|
-
let h = 0;
|
|
34
|
-
const q = I("hrm-timesheet", () => {
|
|
35
|
-
const t = w([]);
|
|
36
|
-
async function r(o, n, i) {
|
|
37
|
-
const e = f(o).startOf("day").toISOString(), m = f(n).endOf("day").toISOString(), u = i ?? Y().restaurants.value.map((s) => s._id), c = ++h;
|
|
38
|
-
if (u.length === 0) {
|
|
39
|
-
const s = await d.readTimesheets(e, m);
|
|
40
|
-
c === h && (t.value = g(s));
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
t.value = [];
|
|
44
|
-
const l = 10, p = [];
|
|
45
|
-
for (let s = 0; s < u.length; s += l)
|
|
46
|
-
p.push(
|
|
47
|
-
d.readTimesheets(e, m, u.slice(s, s + l)).then((A) => {
|
|
48
|
-
c === h && (t.value = y([...t.value, ...g(A)], {
|
|
49
|
-
selector: "start"
|
|
50
|
-
}));
|
|
51
|
-
})
|
|
52
|
-
);
|
|
53
|
-
await Promise.all(p);
|
|
54
|
-
}
|
|
55
|
-
async function a(o, n, i) {
|
|
56
|
-
await d.updateTimesheet(o.restaurantId, {
|
|
57
|
-
id: o._id,
|
|
58
|
-
startAt: n,
|
|
59
|
-
endAt: i
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
timesheets: t,
|
|
64
|
-
readTimesheet: r,
|
|
65
|
-
updateTimesheet: a
|
|
66
|
-
};
|
|
67
|
-
}), j = () => {
|
|
68
|
-
const t = q();
|
|
69
|
-
return {
|
|
70
|
-
...t,
|
|
71
|
-
...v(t)
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
export {
|
|
75
|
-
j as u
|
|
76
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { computed as r, ref as n } from "vue";
|
|
2
|
-
import { e as d } from "./index-Bfdseotz.js";
|
|
3
|
-
import { useCoreStore as h } from "@feedmepos/mf-common";
|
|
4
|
-
import { i as K } from "./rule-Ccopk8R_.js";
|
|
5
|
-
import { s as g } from "./app-DEZT4wdV.js";
|
|
6
|
-
const i = n([]), a = n(!1), l = n(!1), f = n(null), p = n(null), u = n(!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 && (i.value = [], a.value = !1, l.value = !1, f.value = s, u.value = !1);
|
|
14
|
-
const o = localStorage.getItem("locale");
|
|
15
|
-
if (!(a.value && p.value === o)) {
|
|
16
|
-
if (l.value) {
|
|
17
|
-
u.value = !0;
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
l.value = !0;
|
|
21
|
-
try {
|
|
22
|
-
i.value = await K.fetchReportPermissions(
|
|
23
|
-
s,
|
|
24
|
-
o
|
|
25
|
-
), a.value = !0, p.value = o;
|
|
26
|
-
} catch (t) {
|
|
27
|
-
console.warn("Failed to fetch dynamic report permissions, keeping last known list:", t), a.value = !1;
|
|
28
|
-
} finally {
|
|
29
|
-
l.value = !1, u.value && (u.value = !1, await m());
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
const c = g.filter(
|
|
34
|
-
(s) => s.subject === d.F_RULE_SUBJECT.enum.report && s.conditions
|
|
35
|
-
), y = r(() => {
|
|
36
|
-
const s = new Set(
|
|
37
|
-
c.map((e) => {
|
|
38
|
-
const t = typeof e.conditions == "string" ? JSON.parse(e.conditions) : e.conditions;
|
|
39
|
-
return t == null ? void 0 : t.name;
|
|
40
|
-
})
|
|
41
|
-
), o = i.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 [...c, ...o];
|
|
50
|
-
}), R = r(() => {
|
|
51
|
-
const s = new Set(
|
|
52
|
-
c.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 i.value)
|
|
58
|
-
s.add(o.permissionKey);
|
|
59
|
-
return s;
|
|
60
|
-
}), S = r(() => {
|
|
61
|
-
const s = new Set(
|
|
62
|
-
c.map((e) => {
|
|
63
|
-
const t = typeof e.conditions == "string" ? JSON.parse(e.conditions) : e.conditions;
|
|
64
|
-
return t == null ? void 0 : t.name;
|
|
65
|
-
})
|
|
66
|
-
), o = /* @__PURE__ */ new Set();
|
|
67
|
-
for (const e of i.value)
|
|
68
|
-
s.has(e.permissionKey) || o.add(e.permissionKey);
|
|
69
|
-
return o;
|
|
70
|
-
});
|
|
71
|
-
return {
|
|
72
|
-
fetchReportPermissions: m,
|
|
73
|
-
allReportPermissions: y,
|
|
74
|
-
availableReportKeys: R,
|
|
75
|
-
customReportKeys: S,
|
|
76
|
-
isLoading: r(() => l.value),
|
|
77
|
-
isLoaded: r(() => a.value)
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
export {
|
|
81
|
-
B as u
|
|
82
|
-
};
|