@feedmepos/mf-hrm-portal 2.3.2-dev.8 → 2.3.2
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-DIYhVMGW.js → ApprovalCodeList-C9r8CGNH.js} +15 -14
- package/dist/{AuditLogList-DIc3Jgpr.js → AuditLogList-Cu-KcQKa.js} +152 -147
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BQ-uIsTN.js +438 -0
- package/dist/EmployeeList-BaFqZnFM.js +776 -0
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-Be1OU1_r.js +45 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +49 -0
- package/dist/{GrantUserList-8zmzFk9z.js → GrantUserList-Bjhx60M7.js} +16 -15
- package/dist/Main-CJQpjOgY.js +96 -0
- package/dist/{Main-DYzFd_qa.js → Main-DHiTgiDR.js} +5 -5
- package/dist/{Main-gRu17-N6.js → Main-LpfQqR_u.js} +999 -1005
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
- package/dist/{PermissionSetList-CL42jQY4.js → PermissionSetList-C0OZ_dvE.js} +76 -76
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-T7dkd5Uv.js +4167 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-EwU7gHP7.js +35 -0
- package/dist/RoleList-DpyW5XLs.js +740 -0
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B9NMhw9Z.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CqP-Dn1X.js} +1 -1
- package/dist/{ScheduleGeneralPage-751cEUwS.js → ScheduleGeneralPage-BNHi5jGf.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-CBDNfiIM.js → ScheduleModal.vue_vue_type_script_setup_true_lang-B609MZoP.js} +186 -187
- package/dist/{SchedulePage-C-NcbGIl.js → SchedulePage-CrP5_m3p.js} +13 -13
- package/dist/{SchedulePositionPage-Ba0iiSRg.js → SchedulePositionPage-ei_NKAUw.js} +3 -3
- package/dist/{SelectFilter-Dpsq165k.js → SelectFilter-CEYQ-ViE.js} +1 -1
- package/dist/TeamMemberList-rPiKKu2b.js +1154 -0
- package/dist/TimesheetList-B1L4WkNh.js +402 -0
- package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-By6YR-k2.js +58 -0
- package/dist/{app-DXkKrcRn.js → app-BzlH-2cN.js} +4015 -7756
- package/dist/app.js +3 -3
- package/dist/{approval-code-D2pGW-sI.js → approval-code-CWq2ce3u.js} +1 -1
- package/dist/{dayjs.min-BAz84JAQ.js → dayjs.min-D6T4JzVv.js} +21 -21
- package/dist/employee-Bw7kRokg.js +209 -0
- package/dist/{grant-user-B95RDjkR.js → grant-user-q_mkj3Vh.js} +1 -1
- package/dist/{index-TrBkLxJe.js → iteration-Dz0e08VH.js} +726 -698
- package/dist/{lodash-DXRsZpTB.js → lodash-DGG_-VgI.js} +1 -1
- package/dist/restaurant-DJBQY9N5.js +2688 -0
- package/dist/role-CiRbkZSm.js +92 -0
- package/dist/rule-DMgkHpva.js +783 -0
- package/dist/src/api/employee/index.d.ts +2 -1
- package/dist/src/api/timesheet/index.d.ts +1 -1
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +3 -11
- package/dist/src/helpers/permission-set.d.ts +102 -1
- package/dist/src/helpers/rule.d.ts +2 -2
- package/dist/src/helpers/string.d.ts +1 -10
- package/dist/src/router/shared.d.ts +1 -3
- package/dist/src/stores/employee.d.ts +7 -1
- package/dist/src/stores/restaurant.d.ts +8 -68
- package/dist/src/stores/team.d.ts +0 -30
- package/dist/src/stores/timesheet.d.ts +51 -66
- package/dist/src/types/team.d.ts +1 -17
- package/dist/src/types/timesheet.d.ts +0 -3
- package/dist/src/views/audit-log/constants.d.ts +1 -1
- package/dist/src/views/audit-log/locales/index.d.ts +16 -12
- package/dist/src/views/hr/locales/index.d.ts +0 -20
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +2 -29
- 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 +0 -11
- package/dist/src/views/team/components/ConditionPermission.vue.d.ts +0 -11
- package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +0 -21
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +0 -11
- package/dist/src/views/team/locales/index.d.ts +0 -716
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -48
- package/dist/src/views/team/{components/MemberStatusBadge.vue.d.ts → member/MemberInfo.vue.d.ts} +2 -2
- package/dist/src/views/team/member/TeamMemberList.vue.d.ts +0 -1
- package/dist/string-VNuQNweN.js +15 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-7O0GMkXY.js → useAppStore-TRX-PQD4.js} +1 -1
- package/dist/{useLoading-BZXydjer.js → useLoading-W3YSF8OB.js} +1 -1
- package/dist/{useReportPermissions-Cn3ntCJ9.js → useReportPermissions-CCkCAaGO.js} +3 -3
- package/package.json +3 -3
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-4YsF7lXu.js +0 -459
- package/dist/EmployeeList-iVg4pI9Y.js +0 -896
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-C9AE0EHw.js +0 -90
- package/dist/Main-ClJox3pV.js +0 -101
- package/dist/MyPosProfile-ARRrolbz.js +0 -290
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +0 -126
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DkA0XbZw.js +0 -4208
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CA87qQ4b.js +0 -1831
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-B3N3hTcU.js +0 -547
- package/dist/RoleList-F9ZORhgE.js +0 -265
- package/dist/TeamMemberList-DZ0aRbxg.js +0 -2087
- package/dist/TimesheetList-DO5T__dL.js +0 -437
- package/dist/employee-yYhuhc9L.js +0 -172
- package/dist/iteration-CcXrOMQe.js +0 -30
- package/dist/member-grant-ByAQ1Qja.js +0 -54
- package/dist/restaurant-COSpCpTQ.js +0 -52
- package/dist/role-ZmCd2yG4.js +0 -98
- package/dist/rule-Bty9eoI3.js +0 -843
- package/dist/src/api/my-pos-profile/index.d.ts +0 -3
- package/dist/src/api/sso-provider/index.d.ts +0 -5
- package/dist/src/api/staff-invite/index.d.ts +0 -16
- package/dist/src/components/form/SegmentedTabs.vue.d.ts +0 -23
- package/dist/src/composables/useMenuAccess.d.ts +0 -56
- package/dist/src/composables/useSsoProviders.d.ts +0 -19
- package/dist/src/composables/useStaffInviteProviders.d.ts +0 -8
- package/dist/src/helpers/member-grant.d.ts +0 -36
- package/dist/src/helpers/my-pos-profile.d.ts +0 -37
- package/dist/src/helpers/pos-assignment-rows.d.ts +0 -28
- package/dist/src/helpers/staff-invite.d.ts +0 -54
- package/dist/src/router/menu-access-guard.d.ts +0 -17
- package/dist/src/types/my-pos-profile.d.ts +0 -24
- package/dist/src/types/sso-provider.d.ts +0 -10
- package/dist/src/types/staff-invite.d.ts +0 -100
- package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +0 -2
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +0 -4
- package/dist/src/views/my-pos-profile/locales/index.d.ts +0 -196
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +0 -51
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -44
- package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +0 -11
- package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +0 -35
- package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +0 -19
- package/dist/string-DZQ1uNjn.js +0 -22
- package/dist/timesheet-CFD6XPiG.js +0 -76
|
@@ -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-Dz0e08VH.js";
|
|
5
|
+
import { g as f, b as p, u as I } from "./restaurant-DJBQY9N5.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 h = x("hrm-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 = h();
|
|
85
|
+
return {
|
|
86
|
+
...e,
|
|
87
|
+
...b(e)
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export {
|
|
91
|
+
L as u
|
|
92
|
+
};
|