@feedmepos/mf-hrm-portal 2.3.2-dev.7 → 2.3.2-dev.8

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 (61) hide show
  1. package/dist/{ApprovalCodeList-Bw0E-hZl.js → ApprovalCodeList-DIYhVMGW.js} +7 -7
  2. package/dist/{AuditLogList-CA-_t77n.js → AuditLogList-DIc3Jgpr.js} +795 -719
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-LtjNCAFN.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-4YsF7lXu.js} +2 -2
  4. package/dist/{EmployeeList-D_bX0EhQ.js → EmployeeList-iVg4pI9Y.js} +8 -8
  5. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-CyZxQa-b.js → FormSection.vue_vue_type_script_setup_true_lang-C9AE0EHw.js} +1 -1
  6. package/dist/{GrantUserList-Cg7ITk_M.js → GrantUserList-8zmzFk9z.js} +8 -8
  7. package/dist/{Main-D5wi42fp.js → Main-ClJox3pV.js} +10 -10
  8. package/dist/{Main-Bl-Ocx1G.js → Main-DYzFd_qa.js} +5 -5
  9. package/dist/{Main-BaB4vgI5.js → Main-gRu17-N6.js} +1005 -999
  10. package/dist/{MyPosProfile-CUG_201f.js → MyPosProfile-ARRrolbz.js} +1 -1
  11. package/dist/{PermissionSetList-kgG9H3DX.js → PermissionSetList-CL42jQY4.js} +13 -12
  12. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-y1YcZpGA.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DkA0XbZw.js} +648 -647
  13. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-fQyCtDXM.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CA87qQ4b.js} +1 -1
  14. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-3Q8udk43.js → RoleForm.vue_vue_type_script_setup_true_lang-B3N3hTcU.js} +9 -9
  15. package/dist/{RoleList-Cmz97HHP.js → RoleList-F9ZORhgE.js} +7 -7
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CggEy3OI.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B9NMhw9Z.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-B39k3SQH.js → ScheduleGeneralPage-751cEUwS.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-C5j3D4eF.js → ScheduleModal.vue_vue_type_script_setup_true_lang-CBDNfiIM.js} +4 -4
  19. package/dist/{SchedulePage-AVmRkFi1.js → SchedulePage-C-NcbGIl.js} +189 -201
  20. package/dist/{SchedulePositionPage-3rE-O8CG.js → SchedulePositionPage-Ba0iiSRg.js} +3 -3
  21. package/dist/{SelectFilter-R7ry_GEg.js → SelectFilter-Dpsq165k.js} +1 -1
  22. package/dist/{TeamMemberList-CvDnIILn.js → TeamMemberList-DZ0aRbxg.js} +28 -27
  23. package/dist/TimesheetList-DO5T__dL.js +437 -0
  24. package/dist/{app-DKUCzcrc.js → app-DXkKrcRn.js} +38 -10
  25. package/dist/app.js +1 -1
  26. package/dist/{approval-code-nsETgIry.js → approval-code-D2pGW-sI.js} +4 -4
  27. package/dist/{dayjs.min-CtULWW1N.js → dayjs.min-BAz84JAQ.js} +1 -1
  28. package/dist/employee-yYhuhc9L.js +172 -0
  29. package/dist/{grant-user-Dpa_Rl6j.js → grant-user-B95RDjkR.js} +2 -2
  30. package/dist/{iteration-DpHBtiyr.js → index-TrBkLxJe.js} +698 -726
  31. package/dist/iteration-CcXrOMQe.js +30 -0
  32. package/dist/{lodash-YaHCUo_F.js → lodash-DXRsZpTB.js} +1 -1
  33. package/dist/{member-grant-CEokFI3_.js → member-grant-ByAQ1Qja.js} +2 -2
  34. package/dist/{restaurant-CDFKqEFm.js → restaurant-COSpCpTQ.js} +2 -2
  35. package/dist/{role-DyBVVlEA.js → role-ZmCd2yG4.js} +8 -7
  36. package/dist/{rule-xErZqYmH.js → rule-Bty9eoI3.js} +38 -37
  37. package/dist/src/api/audit-log/index.d.ts +2 -0
  38. package/dist/src/api/employee/index.d.ts +1 -2
  39. package/dist/src/stores/approval-code.d.ts +1 -1
  40. package/dist/src/stores/employee.d.ts +3 -9
  41. package/dist/src/stores/grant-user.d.ts +1 -1
  42. package/dist/src/stores/permission-assignment.d.ts +2 -2
  43. package/dist/src/stores/permission-set.d.ts +2 -2
  44. package/dist/src/stores/restaurant.d.ts +2 -2
  45. package/dist/src/stores/role.d.ts +2 -2
  46. package/dist/src/stores/team.d.ts +1 -1
  47. package/dist/src/stores/timesheet.d.ts +62 -47
  48. package/dist/src/types/timesheet.d.ts +3 -0
  49. package/dist/src/views/audit-log/locales/index.d.ts +28 -0
  50. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
  51. package/dist/style.css +1 -1
  52. package/dist/timesheet-CFD6XPiG.js +76 -0
  53. package/dist/tsconfig.app.tsbuildinfo +1 -1
  54. package/dist/{useAppStore-BqsvPsPB.js → useAppStore-7O0GMkXY.js} +1 -1
  55. package/dist/{useLoading-BS1bnZg1.js → useLoading-BZXydjer.js} +1 -1
  56. package/dist/useMessage-_ywT_N9X.js +17 -0
  57. package/dist/{useReportPermissions-DJEhkyGc.js → useReportPermissions-Cn3ntCJ9.js} +3 -3
  58. package/package.json +3 -3
  59. package/dist/TimesheetList-DYoglTi8.js +0 -401
  60. package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_d0c6fd51_lang-DBpzyQ17.js +0 -63
  61. package/dist/employee-DlsSqR3i.js +0 -210
@@ -1,210 +0,0 @@
1
- import { d as g } from "./dayjs.min-CtULWW1N.js";
2
- import { defineStore as $, storeToRefs as x } from "pinia";
3
- import { ref as y } from "vue";
4
- import { s as E } from "./iteration-DpHBtiyr.js";
5
- import { b as l, g as m } from "./app-DKUCzcrc.js";
6
- import { i as v } from "./utils-BZkjJbju.js";
7
- import { u as P } from "./role-DyBVVlEA.js";
8
- import { u as I } from "./restaurant-CDFKqEFm.js";
9
- const o = {
10
- async readEmployees() {
11
- return m(await l().get("/pos-users"));
12
- },
13
- async readEmployeesPage(e) {
14
- var t, i;
15
- return m(
16
- await l().get("/pos-users/paged", {
17
- params: {
18
- limit: e.limit,
19
- offset: e.offset,
20
- search: e.search,
21
- restaurantIds: (t = e.restaurantIds) != null && t.length ? e.restaurantIds : void 0,
22
- roleIds: (i = e.roleIds) != null && i.length ? e.roleIds : void 0,
23
- includeEmptyPasscode: e.includeEmptyPasscode || void 0
24
- }
25
- })
26
- );
27
- },
28
- async createEmployee(e) {
29
- return m(
30
- await l().post("/pos-users", e)
31
- ).employeeId;
32
- },
33
- async createMasterEmployee(e) {
34
- return m(
35
- await l().post("/pos-users/master-user", e)
36
- ).employeeId;
37
- },
38
- async migrateToMasterEmployee(e, t) {
39
- await l().put(`/pos-users/migrate/${e}`, t);
40
- },
41
- async updateEmployee(e, t) {
42
- await l().put(`/pos-users/${e}`, t);
43
- },
44
- async updateMasterEmployee(e, t) {
45
- await l().put(`/pos-users/master-user/${e}`, t);
46
- },
47
- async deleteEmployee(e) {
48
- await l().put(`/pos-users/${e._id}`, {
49
- user: e,
50
- roles: [],
51
- previousRoles: e.restaurants.map((t) => ({
52
- restaurantId: t.restaurantId,
53
- roleId: t.roleId
54
- }))
55
- });
56
- },
57
- async deleteMasterEmployee(e) {
58
- await l().put(`/pos-users/master-user/${e._id}`, {
59
- user: e,
60
- roles: [],
61
- previousRoles: e.restaurants.map((t) => ({
62
- restaurantId: t.restaurantId,
63
- roleId: t.roleId
64
- }))
65
- });
66
- },
67
- async generateEmployeePasscode(e) {
68
- return `${m(
69
- await l().post("/pos-users/generate-passcode", {
70
- restaurantIds: e.restaurantIds,
71
- excludePosUserId: e.excludePosUserId
72
- })
73
- )}`;
74
- },
75
- async syncUsersMeta() {
76
- await l().post("/pos-users/create-users-meta");
77
- }
78
- };
79
- async function T(e) {
80
- const t = P().roles.value, { restaurants: i } = I(), c = new Map(
81
- i.value.map((a) => [a._id, a.profile.name])
82
- ), u = new Map(t.map((a) => [a._id, a.name])), r = /* @__PURE__ */ new Map();
83
- for (const a of e) {
84
- const n = {
85
- restaurantId: a.restaurantId,
86
- restaurantName: c.get(a.restaurantId) || "",
87
- roleId: a.role,
88
- roleName: u.get(a.role) || ""
89
- }, d = r.get(a._id);
90
- if (!d) {
91
- r.set(a._id, {
92
- ...a,
93
- isRestricted: !1,
94
- since: g(v(a._id)).format("DD/MM/YYYY"),
95
- restaurants: [n]
96
- });
97
- continue;
98
- }
99
- d.restaurants.some((f) => f.restaurantId === a.restaurantId) || (d.restaurants = E([...d.restaurants, n], {
100
- selector: "restaurantName"
101
- }));
102
- }
103
- return E([...r.values()], { selector: "name" });
104
- }
105
- function M(e) {
106
- const { restaurants: t } = I(), i = P().roles.value, c = new Map(
107
- t.value.map((a) => [a._id, a])
108
- ), u = new Map(i.map((a) => [a._id, a.name])), r = e.restaurantRole[0];
109
- return {
110
- _id: e._id,
111
- name: e.name,
112
- code: e.code,
113
- passcode: e.passcode,
114
- isMasterUser: e.isMasterUser,
115
- isRestricted: e.isRestricted,
116
- restaurantId: (r == null ? void 0 : r.restaurantId) || "",
117
- role: (r == null ? void 0 : r.roleId) || "",
118
- since: g(v(e._id)).format("DD/MM/YYYY"),
119
- restaurants: E(
120
- e.restaurantRole.map((a) => {
121
- const n = c.get(a.restaurantId);
122
- return {
123
- restaurantId: a.restaurantId,
124
- restaurantName: (n == null ? void 0 : n.profile.name) || "",
125
- restaurantCode: (n == null ? void 0 : n.profile.code) ?? void 0,
126
- roleId: a.roleId,
127
- roleName: u.get(a.roleId) || ""
128
- };
129
- }),
130
- { selector: "restaurantName" }
131
- )
132
- };
133
- }
134
- const h = $("employee", () => {
135
- const e = I(), t = y([]), i = y([]), c = y(0), u = y(!1);
136
- async function r() {
137
- try {
138
- u.value = !0, await e.readRestaurants();
139
- const s = await o.readEmployees();
140
- t.value = await T(s);
141
- } finally {
142
- u.value = !1;
143
- }
144
- }
145
- async function a(s) {
146
- try {
147
- u.value = !0, await e.readRestaurants();
148
- const p = await o.readEmployeesPage(s);
149
- i.value = p.items.map(M), c.value = p.total;
150
- } finally {
151
- u.value = !1;
152
- }
153
- }
154
- async function n(s, p) {
155
- await e.readRestaurants();
156
- const w = p ?? (await o.readEmployeesPage({ ...s, limit: 1, offset: 0 })).total;
157
- return w === 0 ? [] : (await o.readEmployeesPage({ ...s, limit: w, offset: 0 })).items.map(M);
158
- }
159
- async function d(s) {
160
- return o.createEmployee(s);
161
- }
162
- async function f(s, p) {
163
- await o.updateEmployee(s, p);
164
- }
165
- async function _(s) {
166
- await o.deleteEmployee(s);
167
- }
168
- async function U(s) {
169
- await o.deleteMasterEmployee(s);
170
- }
171
- async function Y(s) {
172
- return o.createMasterEmployee(s);
173
- }
174
- async function N(s, p) {
175
- await o.updateMasterEmployee(s, p);
176
- }
177
- async function S(s, p) {
178
- await o.migrateToMasterEmployee(s, p);
179
- }
180
- async function D() {
181
- await o.syncUsersMeta();
182
- }
183
- return {
184
- employees: t,
185
- listEmployees: i,
186
- totalEmployees: c,
187
- isLoading: u,
188
- readEmployees: r,
189
- readEmployeesPage: a,
190
- readAllEmployeesPage: n,
191
- createEmployee: d,
192
- updateEmployee: f,
193
- deleteEmployee: _,
194
- createMasterEmployee: Y,
195
- updateMasterEmployee: N,
196
- deleteMasterEmployee: U,
197
- migrateToMasterUser: S,
198
- syncUsersMeta: D
199
- };
200
- }), B = () => {
201
- const e = h();
202
- return {
203
- ...e,
204
- ...x(e)
205
- };
206
- };
207
- export {
208
- o as E,
209
- B as u
210
- };