@feedmepos/mf-hrm-portal 2.4.1 → 2.4.2-dev
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-BgnhS8P1.js → ApprovalCodeList-DpNF0wL7.js} +14 -15
- package/dist/{AuditLogList-BMEw3z3C.js → AuditLogList-D2bUFsuK.js} +12 -12
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BjEJErcL.js +459 -0
- package/dist/EmployeeList-CBYU0R2j.js +896 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DsPLbLwQ.js +90 -0
- package/dist/{GrantUserList-DePGsJq1.js → GrantUserList-ClliuQ8h.js} +15 -16
- package/dist/{Main-hUOeiddV.js → Main-CBuOW87D.js} +2274 -2280
- package/dist/Main-D9MQo2l1.js +101 -0
- package/dist/{Main-BX2dD-ti.js → Main-DlPdGefL.js} +5 -5
- package/dist/MyPosProfile-IAPSqlBP.js +360 -0
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
- package/dist/{PermissionSetList-BHOjAjHj.js → PermissionSetList-Dd0fkW0L.js} +107 -108
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CjQCbJRu.js +4212 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DJnIFlKq.js +1797 -0
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-hE2OZwfO.js +547 -0
- package/dist/RoleList-zZHpt079.js +274 -0
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B8dH021B.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-yJwTtFyF.js} +1 -1
- package/dist/{ScheduleGeneralPage-WJu4dwH_.js → ScheduleGeneralPage-_cqIJY8R.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DvcZjDJA.js → ScheduleModal.vue_vue_type_script_setup_true_lang-C6M76KUA.js} +187 -186
- package/dist/{SchedulePage-BOiSyw9s.js → SchedulePage-DHkWe1KO.js} +16 -16
- package/dist/{SchedulePositionPage-NR8GaPxx.js → SchedulePositionPage-5JUJwlJc.js} +3 -3
- package/dist/{SelectFilter-xIFxmOuf.js → SelectFilter-DWRvb1Yl.js} +1 -1
- package/dist/TeamMemberList-C_4f5Djs.js +2082 -0
- package/dist/TimesheetList-B3Yx8cwt.js +408 -0
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-fDOF4GYa.js → TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-Co2GtU1N.js} +7 -7
- package/dist/{app-DJOt_dse.js → app-BA3UHSk0.js} +7680 -3886
- package/dist/app.js +3 -3
- package/dist/{approval-code-D3J-F40I.js → approval-code-BR4FD3sx.js} +1 -1
- package/dist/{dayjs.min-YpmHqmB1.js → dayjs.min-JyaQ6PUU.js} +34 -34
- package/dist/employee-n31b7QEp.js +237 -0
- package/dist/{grant-user-kU9gjiVw.js → grant-user-DKUZdzrY.js} +1 -1
- package/dist/{iteration-RLqokZ_t.js → index-CkC2sfPK.js} +573 -558
- package/dist/{lodash-C6YpC6VN.js → lodash-BJMVlo9i.js} +1 -1
- package/dist/member-grant-B1V9g0Sb.js +54 -0
- package/dist/restaurant-BbSg6yOm.js +49 -0
- package/dist/role-iTqgtFqf.js +91 -0
- package/dist/rule-BJhti6BZ.js +845 -0
- package/dist/src/api/my-pos-profile/index.d.ts +3 -0
- package/dist/src/api/sso-provider/index.d.ts +5 -0
- package/dist/src/api/staff-invite/index.d.ts +16 -0
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
- package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
- package/dist/src/composables/useMenuAccess.d.ts +56 -0
- package/dist/src/composables/useSsoProviders.d.ts +19 -0
- package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
- package/dist/src/helpers/employee-merge.d.ts +33 -0
- package/dist/src/helpers/iteration.d.ts +9 -2
- package/dist/src/helpers/member-grant.d.ts +36 -0
- package/dist/src/helpers/my-pos-profile.d.ts +37 -0
- package/dist/src/helpers/permission-set.d.ts +1 -102
- package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
- 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/helpers/staff-invite.d.ts +54 -0
- package/dist/src/helpers/string.d.ts +10 -1
- package/dist/src/router/menu-access-guard.d.ts +17 -0
- package/dist/src/router/shared.d.ts +3 -1
- package/dist/src/stores/restaurant.d.ts +7 -7
- package/dist/src/stores/team.d.ts +30 -0
- package/dist/src/types/my-pos-profile.d.ts +24 -0
- package/dist/src/types/sso-provider.d.ts +10 -0
- package/dist/src/types/staff-invite.d.ts +100 -0
- package/dist/src/types/team.d.ts +17 -1
- package/dist/src/views/audit-log/locales/index.d.ts +12 -0
- package/dist/src/views/hr/locales/index.d.ts +20 -0
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
- package/dist/src/views/hr/timesheet/timesheet-view.d.ts +29 -0
- package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
- package/dist/src/views/my-pos-profile/locales/index.d.ts +236 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
- package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
- package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
- package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
- package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
- package/dist/src/views/team/locales/index.d.ts +716 -0
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
- package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
- package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
- package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
- package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
- package/dist/string-DZQ1uNjn.js +22 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-HpBmohxh.js → useAppStore-DiGaOhje.js} +1 -1
- package/dist/{useLoading-WAX5d520.js → useLoading-DOcoObCD.js} +1 -1
- package/dist/{useReportPermissions-C2eS3P4D.js → useReportPermissions-c9KGuXQq.js} +22 -22
- package/dist/useSsoProviders-CkhHtzRQ.js +41 -0
- package/package.json +1 -1
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DNA8eHc4.js +0 -438
- package/dist/EmployeeList-BXO4vI9g.js +0 -776
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-D69N78Sp.js +0 -45
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
- package/dist/Main-DNViVR_m.js +0 -96
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bu7YDHSf.js +0 -4181
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-e6wGaXo3.js +0 -35
- package/dist/RoleList-Dx7Bstb_.js +0 -740
- package/dist/TeamMemberList-Dro66DME.js +0 -1150
- package/dist/TimesheetList-DO3uT60w.js +0 -402
- package/dist/employee-DfoS6h1_.js +0 -209
- package/dist/restaurant-D30tjUi3.js +0 -2685
- package/dist/role-DzH4jGCM.js +0 -91
- package/dist/rule-8KZ8d8qL.js +0 -780
- package/dist/string-VNuQNweN.js +0 -15
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { k as n } from "./app-BA3UHSk0.js";
|
|
2
|
+
import { z as u } from "./rule-BJhti6BZ.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-BA3UHSk0.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-BA3UHSk0.js";
|
|
4
|
+
import { a as b, s as m } from "./index-CkC2sfPK.js";
|
|
5
|
+
import { u as B } from "./restaurant-BbSg6yOm.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
|
+
};
|