@feedmepos/mf-hrm-portal 2.3.2-dev.17 → 2.3.2-dev.19

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.
Files changed (116) hide show
  1. package/dist/{ApprovalCodeList-Bo8IbNxV.js → ApprovalCodeList-CiZcp75s.js} +14 -15
  2. package/dist/{AuditLogList-C7CjPILA.js → AuditLogList-AVdhUk22.js} +823 -833
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CGsOJ4bA.js +459 -0
  4. package/dist/EmployeeList-DmB3wCwv.js +896 -0
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-Qsc3hk6l.js +90 -0
  6. package/dist/{GrantUserList-CXWGr3Wo.js → GrantUserList-CUWnDKaH.js} +15 -16
  7. package/dist/Main-CbJjQFFR.js +101 -0
  8. package/dist/{Main-bru10M5U.js → Main-D7CAtkiV.js} +2274 -2280
  9. package/dist/{Main-DeuWov9n.js → Main-DT4TJPRM.js} +5 -5
  10. package/dist/MyPosProfile-EWK8IPlZ.js +360 -0
  11. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
  12. package/dist/{PermissionSetList--xt0piQz.js → PermissionSetList-D2HDsSFi.js} +136 -137
  13. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BUSup81G.js +4212 -0
  14. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-B1sb_3ow.js +1797 -0
  15. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-D-Gve4l8.js +547 -0
  16. package/dist/RoleList-DRFTQcwP.js +274 -0
  17. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Cqo5kHcF.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-b96QQsiZ.js} +1 -1
  18. package/dist/{ScheduleGeneralPage-DxhgBLix.js → ScheduleGeneralPage-DO6ZO_7t.js} +2 -2
  19. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DGPwmNQb.js → ScheduleModal.vue_vue_type_script_setup_true_lang-BG0-qg1-.js} +187 -186
  20. package/dist/{SchedulePage-oBdEvGWN.js → SchedulePage-m9fYfgEO.js} +20 -20
  21. package/dist/{SchedulePositionPage-BZps-kKs.js → SchedulePositionPage-B9M8bgu1.js} +3 -3
  22. package/dist/{SelectFilter-Bs_LCk3L.js → SelectFilter-qanI8DEh.js} +1 -1
  23. package/dist/TeamMemberList-D7PIM3xv.js +2082 -0
  24. package/dist/TimesheetList-C_XQe3jl.js +408 -0
  25. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-Dv66Af5C.js → TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-D6qTouaS.js} +7 -7
  26. package/dist/{app-B8xnhtVI.js → app-BuJGxfu4.js} +7973 -4103
  27. package/dist/app.js +3 -3
  28. package/dist/{approval-code-B0jU1bvk.js → approval-code-HPeWQne5.js} +1 -1
  29. package/dist/{dayjs.min-CdpSCqn1.js → dayjs.min-CLUgksBW.js} +34 -34
  30. package/dist/employee-DrsTtOKq.js +237 -0
  31. package/dist/{grant-user-C3C6glCk.js → grant-user-J6TSUXHn.js} +1 -1
  32. package/dist/{iteration-BM0iyDBd.js → index-Dl7XhjSB.js} +573 -558
  33. package/dist/{lodash-KK9U7NAy.js → lodash-CMqarlaS.js} +1 -1
  34. package/dist/member-grant-BeNgG3hd.js +54 -0
  35. package/dist/restaurant-9Y8x8pCL.js +49 -0
  36. package/dist/role-COuuwMES.js +91 -0
  37. package/dist/rule-50_hBJQJ.js +845 -0
  38. package/dist/src/api/my-pos-profile/index.d.ts +3 -0
  39. package/dist/src/api/sso-provider/index.d.ts +5 -0
  40. package/dist/src/api/staff-invite/index.d.ts +16 -0
  41. package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
  42. package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
  43. package/dist/src/composables/useMenuAccess.d.ts +56 -0
  44. package/dist/src/composables/useSsoProviders.d.ts +19 -0
  45. package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
  46. package/dist/src/composables/useTenant.d.ts +11 -0
  47. package/dist/src/helpers/employee-merge.d.ts +33 -0
  48. package/dist/src/helpers/iteration.d.ts +9 -2
  49. package/dist/src/helpers/member-grant.d.ts +36 -0
  50. package/dist/src/helpers/my-pos-profile.d.ts +37 -0
  51. package/dist/src/helpers/permission-set.d.ts +1 -102
  52. package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
  53. package/dist/src/helpers/restaurant-lookup.d.ts +19 -0
  54. package/dist/src/helpers/role-merge.d.ts +11 -0
  55. package/dist/src/helpers/rule.d.ts +2 -2
  56. package/dist/src/helpers/staff-invite.d.ts +54 -0
  57. package/dist/src/helpers/string.d.ts +10 -1
  58. package/dist/src/router/courtGuard.d.ts +4 -0
  59. package/dist/src/router/menu-access-guard.d.ts +17 -0
  60. package/dist/src/router/shared.d.ts +3 -1
  61. package/dist/src/stores/restaurant.d.ts +7 -7
  62. package/dist/src/stores/team.d.ts +31 -1
  63. package/dist/src/types/my-pos-profile.d.ts +24 -0
  64. package/dist/src/types/sso-provider.d.ts +10 -0
  65. package/dist/src/types/staff-invite.d.ts +100 -0
  66. package/dist/src/types/team.d.ts +17 -1
  67. package/dist/src/views/audit-log/locales/index.d.ts +12 -0
  68. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +1 -1
  69. package/dist/src/views/hr/locales/index.d.ts +20 -0
  70. package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
  71. package/dist/src/views/hr/timesheet/timesheet-view.d.ts +29 -0
  72. package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
  73. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
  74. package/dist/src/views/my-pos-profile/locales/index.d.ts +236 -0
  75. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
  76. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
  77. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
  78. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
  79. package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
  80. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
  81. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
  82. package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
  83. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
  84. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
  85. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
  86. package/dist/src/views/team/locales/index.d.ts +716 -0
  87. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
  88. package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
  89. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
  90. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
  91. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
  92. package/dist/string-DZQ1uNjn.js +22 -0
  93. package/dist/style.css +1 -1
  94. package/dist/tsconfig.app.tsbuildinfo +1 -1
  95. package/dist/{useAppStore-C1lk2Q2j.js → useAppStore-BCvZUxKY.js} +1 -1
  96. package/dist/{useLoading-CXdGsnHm.js → useLoading-BOt2Is3p.js} +1 -1
  97. package/dist/useReportPermissions-BVTpovDL.js +80 -0
  98. package/dist/useSsoProviders-Bec-WHC7.js +41 -0
  99. package/package.json +2 -2
  100. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C-4BaMN-.js +0 -438
  101. package/dist/EmployeeList-BOP-gaTp.js +0 -776
  102. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BEOR-8QD.js +0 -45
  103. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  104. package/dist/Main-BrP1frfO.js +0 -96
  105. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
  106. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-D5nvRsW3.js +0 -4167
  107. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DiNDrCy0.js +0 -35
  108. package/dist/RoleList-BEE-8EQK.js +0 -740
  109. package/dist/TeamMemberList-DCgNcs4P.js +0 -1154
  110. package/dist/TimesheetList-BW6iCigo.js +0 -402
  111. package/dist/employee-DlFGiUgI.js +0 -209
  112. package/dist/restaurant-C7o2Yk6j.js +0 -2688
  113. package/dist/role-DYCorsOh.js +0 -92
  114. package/dist/rule-BhGHZqKO.js +0 -783
  115. package/dist/string-VNuQNweN.js +0 -15
  116. package/dist/useReportPermissions-D_I4rFVo.js +0 -82
@@ -1,4 +1,4 @@
1
- import { g as jt } from "./app-B8xnhtVI.js";
1
+ import { y as jt } from "./app-BuJGxfu4.js";
2
2
  var Jr = { exports: {} };
3
3
  /**
4
4
  * @license
@@ -0,0 +1,54 @@
1
+ import { k as n } from "./app-BuJGxfu4.js";
2
+ import { z as u } from "./rule-50_hBJQJ.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-BuJGxfu4.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-BuJGxfu4.js";
4
+ import { a as b, s as m } from "./index-Dl7XhjSB.js";
5
+ import { u as B } from "./restaurant-9Y8x8pCL.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
+ };