@feedmepos/mf-hrm-portal 2.3.2-dev.2 → 2.3.2-dev.20
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-sHnINTik.js → ApprovalCodeList-eCTF8Rwt.js} +7 -7
- package/dist/AuditLogList-YzR5ysmN.js +2021 -0
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BbsPesWY.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang--660w-zJ.js} +2 -2
- package/dist/{EmployeeList-D4oy5hXz.js → EmployeeList-C2ctTGCo.js} +8 -8
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-Cl053Tg1.js → FormSection.vue_vue_type_script_setup_true_lang-DWvJM14K.js} +1 -1
- package/dist/{GrantUserList-LWpqhl-5.js → GrantUserList-BoN1MUkB.js} +8 -8
- package/dist/{Main-PBJjfzBg.js → Main-BLmTdeYO.js} +5 -5
- package/dist/{Main-BWKb-QIE.js → Main-CIldvI5X.js} +2274 -2280
- package/dist/{Main-CVGiOYpC.js → Main-Di-083Pw.js} +29 -29
- package/dist/MyPosProfile-CctvT3RF.js +360 -0
- package/dist/{PermissionSetList-D2qZVlF4.js → PermissionSetList-BzvVAzwG.js} +126 -126
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-JgrJvMly.js +4212 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DRGTxOMW.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-BdjAh48A.js} +414 -448
- package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-DFDTw0lj.js → RoleForm.vue_vue_type_script_setup_true_lang-WCNUeA3G.js} +74 -74
- package/dist/{RoleList-DG0crFzW.js → RoleList-wPupuMBG.js} +7 -7
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Cs0rhCa3.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DcBIt4DL.js} +1 -1
- package/dist/{ScheduleGeneralPage-C4J6jYtG.js → ScheduleGeneralPage-NCKqPyt5.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-3UqO6uPu.js → ScheduleModal.vue_vue_type_script_setup_true_lang-CG5Xxj3Q.js} +4 -4
- package/dist/{SchedulePage-ICzggri0.js → SchedulePage-BZ5bKLly.js} +197 -209
- package/dist/{SchedulePositionPage-BshUCd_C.js → SchedulePositionPage-CwHd3rf2.js} +3 -3
- package/dist/{SelectFilter-D9T0nFvG.js → SelectFilter-DLZNvKwI.js} +2 -3
- package/dist/TeamMemberList-D8uWsS0J.js +2082 -0
- package/dist/TimesheetList-K6doo0BX.js +408 -0
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BLqgALLe.js → TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-DFoIix3D.js} +7 -7
- package/dist/{app-n6d4AmtP.js → app-BGzac7xv.js} +5618 -4632
- package/dist/app.js +1 -1
- package/dist/{approval-code-1j1OoXt1.js → approval-code-BBNbWSqR.js} +4 -4
- package/dist/{dayjs.min-DdNivv4b.js → dayjs.min-ey-9Jb-9.js} +20 -20
- package/dist/employee-D_COMGXq.js +237 -0
- package/dist/{grant-user-BmTyexk3.js → grant-user-CTTTpewT.js} +2 -2
- package/dist/{iteration-y_jodvfN.js → index-CTqdA7gA.js} +573 -558
- package/dist/{lodash-B2eWEGH4.js → lodash-DNSDZgnL.js} +1 -1
- package/dist/member-grant-5DnD17dB.js +54 -0
- package/dist/restaurant-qoOY3iMJ.js +49 -0
- package/dist/role-BEbd5Qsi.js +91 -0
- package/dist/rule-BLG5i_xT.js +845 -0
- package/dist/src/api/audit-log/index.d.ts +2 -0
- package/dist/src/api/my-pos-profile/index.d.ts +1 -3
- package/dist/src/composables/useTenant.d.ts +11 -0
- package/dist/src/helpers/employee-merge.d.ts +33 -0
- package/dist/src/helpers/iteration.d.ts +9 -2
- package/dist/src/helpers/permission-set.d.ts +1 -102
- package/dist/src/helpers/restaurant-lookup.d.ts +19 -0
- package/dist/src/helpers/role-merge.d.ts +11 -0
- package/dist/src/helpers/rule.d.ts +2 -2
- package/dist/src/router/courtGuard.d.ts +4 -0
- package/dist/src/stores/approval-code.d.ts +1 -1
- package/dist/src/stores/employee.d.ts +2 -2
- package/dist/src/stores/grant-user.d.ts +1 -1
- package/dist/src/stores/permission-assignment.d.ts +2 -2
- package/dist/src/stores/permission-set.d.ts +2 -2
- package/dist/src/stores/restaurant.d.ts +2 -2
- package/dist/src/stores/role.d.ts +2 -2
- package/dist/src/stores/team.d.ts +2 -2
- package/dist/src/stores/timesheet.d.ts +2 -2
- package/dist/src/types/my-pos-profile.d.ts +2 -3
- package/dist/src/views/audit-log/constants.d.ts +1 -1
- package/dist/src/views/audit-log/locales/index.d.ts +56 -0
- package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
- package/dist/src/views/hr/locales/index.d.ts +4 -4
- package/dist/src/views/hr/timesheet/timesheet-view.d.ts +29 -0
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
- package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -4
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BPARQyvJ.js → useAppStore-BwUs5XGY.js} +1 -1
- package/dist/{useLoading-iPESFb6R.js → useLoading-DmAqc_Gx.js} +1 -1
- package/dist/useMessage-_ywT_N9X.js +17 -0
- package/dist/useReportPermissions-PEzIBX1U.js +80 -0
- package/dist/useSsoProviders-CwLbvOdH.js +41 -0
- package/package.json +5 -5
- package/dist/AuditLogList-C9C2emU9.js +0 -1950
- package/dist/MyPosProfile-BQCBFMFw.js +0 -301
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ZSREAS1r.js +0 -4243
- package/dist/TeamMemberList-C970Iqlj.js +0 -2086
- package/dist/TimesheetList-nxhr0EWj.js +0 -402
- package/dist/employee-BlfleiCU.js +0 -210
- package/dist/member-grant-CzZUdO_s.js +0 -55
- package/dist/restaurant-Dl6yx37M.js +0 -51
- package/dist/role-DfZi7Ssk.js +0 -93
- package/dist/rule-ChmhcGgA.js +0 -788
- package/dist/useReportPermissions-By-BoJZb.js +0 -82
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { k as n } from "./app-BGzac7xv.js";
|
|
2
|
+
import { z as u } from "./rule-BLG5i_xT.js";
|
|
3
|
+
const a = [
|
|
4
|
+
n.Subject.Business.restaurant,
|
|
5
|
+
n.Subject.Business.role,
|
|
6
|
+
n.Subject.Restaurant.restaurant,
|
|
7
|
+
n.Subject.Business.inventory_stock
|
|
8
|
+
], c = (s) => a.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
|
+
a as W,
|
|
50
|
+
S as b,
|
|
51
|
+
l as h,
|
|
52
|
+
f as t,
|
|
53
|
+
d as w
|
|
54
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineStore as d, storeToRefs as v } from "pinia";
|
|
2
|
+
import { ref as i } from "vue";
|
|
3
|
+
import { b as c, g as p, u as m } from "./app-BGzac7xv.js";
|
|
4
|
+
const R = {
|
|
5
|
+
async readRestaurants() {
|
|
6
|
+
return p(await c().get("/hr-restaurants"));
|
|
7
|
+
},
|
|
8
|
+
async saveOperationalHours(n, s) {
|
|
9
|
+
await c(`restaurants/${n}/schedules`).patch(
|
|
10
|
+
"operational-hours",
|
|
11
|
+
{ operatingHours: s }
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
}, g = d("hrm-restaurant", () => {
|
|
15
|
+
const n = m(), s = i([]), r = i(!1), u = i(null);
|
|
16
|
+
let a = null, e = null;
|
|
17
|
+
async function f(o = !1) {
|
|
18
|
+
const t = n.id.value ?? null;
|
|
19
|
+
if (!t) {
|
|
20
|
+
s.value = [], u.value = null, a = null, e = null;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (u.value && u.value !== t && (s.value = [], u.value = null), e && e !== t && (a = null, e = null), !o && u.value === t) return;
|
|
24
|
+
if (!o && a && e === t)
|
|
25
|
+
return await a;
|
|
26
|
+
let l = null;
|
|
27
|
+
try {
|
|
28
|
+
r.value = !0, l = (async () => {
|
|
29
|
+
s.value = await R.readRestaurants(), u.value = t;
|
|
30
|
+
})(), a = l, e = t, await l;
|
|
31
|
+
} finally {
|
|
32
|
+
a === l && (a = null, e = null), r.value = !1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
restaurants: s,
|
|
37
|
+
isLoading: r,
|
|
38
|
+
readRestaurants: f
|
|
39
|
+
};
|
|
40
|
+
}), I = () => {
|
|
41
|
+
const n = g();
|
|
42
|
+
return {
|
|
43
|
+
...n,
|
|
44
|
+
...v(n)
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
I as u
|
|
49
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { defineStore as S, storeToRefs as h } from "pinia";
|
|
2
|
+
import { ref as R } from "vue";
|
|
3
|
+
import { g as d, b as f, u as _ } from "./app-BGzac7xv.js";
|
|
4
|
+
import { a as b, s as m } from "./index-CTqdA7gA.js";
|
|
5
|
+
import { u as B } from "./restaurant-qoOY3iMJ.js";
|
|
6
|
+
const p = {
|
|
7
|
+
async readRoles() {
|
|
8
|
+
return d(await f().get("/pos-roles"));
|
|
9
|
+
},
|
|
10
|
+
async createRole(t) {
|
|
11
|
+
return d(await f().post("/pos-roles", t));
|
|
12
|
+
},
|
|
13
|
+
async updateRole(t, n) {
|
|
14
|
+
return d(await f().put(`/pos-roles/${t}`, n));
|
|
15
|
+
},
|
|
16
|
+
async deleteRole(t) {
|
|
17
|
+
return d(
|
|
18
|
+
await f().put(`/pos-roles/${t._id}`, {
|
|
19
|
+
restaurantIds: [],
|
|
20
|
+
role: t
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function v(t, n) {
|
|
26
|
+
const { nameById: r } = b(n), o = /* @__PURE__ */ new Map();
|
|
27
|
+
for (const e of t) {
|
|
28
|
+
const s = { id: e.restaurantId, name: r.get(e.restaurantId) ?? "" }, i = o.get(e._id);
|
|
29
|
+
i ? i.outletIds.has(e.restaurantId) || (i.outletIds.add(e.restaurantId), i.role.restaurants.push(s)) : o.set(e._id, {
|
|
30
|
+
role: { ...e, restaurants: [s] },
|
|
31
|
+
outletIds: /* @__PURE__ */ new Set([e.restaurantId])
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const l = [];
|
|
35
|
+
for (const { role: e } of o.values())
|
|
36
|
+
e.restaurants = m(e.restaurants, { selector: "name" }), l.push(e);
|
|
37
|
+
return m(l, { selector: "name" });
|
|
38
|
+
}
|
|
39
|
+
const x = S("hrm-role", () => {
|
|
40
|
+
const t = _(), n = B(), r = R([]), o = R(!1), l = R(null);
|
|
41
|
+
let e = null, s = null;
|
|
42
|
+
async function i(u = !1) {
|
|
43
|
+
const a = t.id.value ?? null;
|
|
44
|
+
if (!a) {
|
|
45
|
+
r.value = [], l.value = null, e = null, s = null;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (l.value && l.value !== a && (r.value = [], l.value = null), s && s !== a && (e = null, s = null), !u && l.value === a) return;
|
|
49
|
+
if (!u && e && s === a)
|
|
50
|
+
return await e;
|
|
51
|
+
let c = null;
|
|
52
|
+
try {
|
|
53
|
+
o.value = !0, c = (async () => {
|
|
54
|
+
await n.readRestaurants();
|
|
55
|
+
const g = await p.readRoles();
|
|
56
|
+
r.value = v(g, n.restaurants.value), l.value = a;
|
|
57
|
+
})(), e = c, s = a, await c;
|
|
58
|
+
} finally {
|
|
59
|
+
e === c && (e = null, s = null), o.value = !1;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async function w(u) {
|
|
63
|
+
const a = await p.createRole(u);
|
|
64
|
+
r.value = v(a, n.restaurants.value);
|
|
65
|
+
}
|
|
66
|
+
async function I(u, a) {
|
|
67
|
+
const c = await p.updateRole(u, a);
|
|
68
|
+
r.value = v(c, n.restaurants.value);
|
|
69
|
+
}
|
|
70
|
+
async function y(u) {
|
|
71
|
+
const a = await p.deleteRole(u);
|
|
72
|
+
r.value = v(a, n.restaurants.value);
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
roles: r,
|
|
76
|
+
isLoading: o,
|
|
77
|
+
readRoles: i,
|
|
78
|
+
createRole: w,
|
|
79
|
+
updateRole: I,
|
|
80
|
+
deleteRole: y
|
|
81
|
+
};
|
|
82
|
+
}), q = () => {
|
|
83
|
+
const t = x();
|
|
84
|
+
return {
|
|
85
|
+
...t,
|
|
86
|
+
...h(t)
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
q as u
|
|
91
|
+
};
|