@feedmepos/mf-hrm-portal 2.2.3 → 2.2.5-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.
Files changed (48) hide show
  1. package/dist/{ApprovalCodeList-BnG3T_Lk.js → ApprovalCodeList-DgcWZ3SZ.js} +5 -5
  2. package/dist/{AuditLogList-CpK9-YkB.js → AuditLogList-vWKMMGvd.js} +235 -233
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CzKzq19d.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DuhXogXK.js} +2 -2
  4. package/dist/EmployeeList-Cu4RxVQX.js +889 -0
  5. package/dist/{GrantUserList-BJoj3ZcO.js → GrantUserList-BAW0C1bA.js} +6 -6
  6. package/dist/{Main-FPpK9B70.js → Main-B7Nn8CLQ.js} +11 -11
  7. package/dist/{Main-5QLhf80L.js → Main-NzpdRNB3.js} +8 -8
  8. package/dist/{Main-BEUu3Hba.js → Main-Wr6cTqfM.js} +5 -5
  9. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-BUI0Xsgc.js +85 -0
  10. package/dist/{PermissionSetList-DZGZ0Pm_.js → PermissionSetList-D6AFOleD.js} +7 -7
  11. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BHEW1_dv.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Bzq2_BMn.js} +1268 -1275
  12. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-Z-DH7ouY.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js} +1 -1
  13. package/dist/{RoleList-D5yToard.js → RoleList-BuqpmXn_.js} +9 -9
  14. package/dist/TeamMemberList-M6HA9BWu.js +1248 -0
  15. package/dist/{TimesheetList-DMo8KXoU.js → TimesheetList-B5FyVyCz.js} +92 -90
  16. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-2KHu-f8U.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-C99Jr6Ax.js} +3 -3
  17. package/dist/{app-DlSD8S9A.js → app-8samJY5z.js} +214 -190
  18. package/dist/app.js +1 -1
  19. package/dist/{approval-code-BRClD2HN.js → approval-code-jIjkeVEb.js} +1 -1
  20. package/dist/{dayjs.min-DcI2auGP.js → dayjs.min-Ba4X_9nY.js} +1 -1
  21. package/dist/employee-BcFgm8Rt.js +204 -0
  22. package/dist/{grant-user-Dhi3ilC_.js → grant-user-SNiDV22U.js} +1 -1
  23. package/dist/{iteration-DSzPQ0fZ.js → iteration-Dhdew1jW.js} +1 -1
  24. package/dist/{lodash-Ce0IJ8Y3.js → lodash-CJ3mHku0.js} +1 -1
  25. package/dist/{restaurant-DiYb0pCm.js → restaurant-BTpBmfBV.js} +2 -2
  26. package/dist/{role-DkTkfUgR.js → role-BViYS7RK.js} +2 -2
  27. package/dist/{rule-B-REsmVM.js → rule-Dxt1ZSQS.js} +48 -40
  28. package/dist/src/api/employee/index.d.ts +5 -1
  29. package/dist/src/api/team/index.d.ts +3 -0
  30. package/dist/src/components/form/PasscodeGenerateButton.vue.d.ts +15 -0
  31. package/dist/src/components/form/PasscodePinField.vue.d.ts +18 -0
  32. package/dist/src/helpers/string.d.ts +2 -1
  33. package/dist/src/views/audit-log/locales/index.d.ts +4 -0
  34. package/dist/src/views/hr/locales/index.d.ts +8 -0
  35. package/dist/src/views/team/locales/index.d.ts +12 -0
  36. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +1 -0
  37. package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +9 -0
  38. package/dist/string-VNuQNweN.js +15 -0
  39. package/dist/style.css +1 -1
  40. package/dist/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/{useAppStore-BGhlB1_1.js → useAppStore-DCwd8GWN.js} +1 -1
  42. package/dist/{useLoading-CvgqVDbF.js → useLoading-CXzTpIVv.js} +1 -1
  43. package/dist/{useReportPermissions-VCzAQXKz.js → useReportPermissions-BiyAfGvZ.js} +3 -3
  44. package/package.json +1 -1
  45. package/dist/EmployeeList-CUsRanu7.js +0 -887
  46. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
  47. package/dist/TeamMemberList-C4-AHxO4.js +0 -1216
  48. package/dist/employee-C_cvCoHM.js +0 -201
@@ -1,201 +0,0 @@
1
- import { d as g } from "./dayjs.min-DcI2auGP.js";
2
- import { defineStore as $, storeToRefs as T } from "pinia";
3
- import { ref as m } from "vue";
4
- import { s as E } from "./iteration-DSzPQ0fZ.js";
5
- import { b as i, g as f, u as w } from "./restaurant-DiYb0pCm.js";
6
- import { i as v } from "./utils-BZkjJbju.js";
7
- import { u as _ } from "./role-DkTkfUgR.js";
8
- const o = {
9
- async readEmployees() {
10
- return f(await i().get("/pos-users"));
11
- },
12
- async readEmployeesPage(e) {
13
- var t, p;
14
- return f(
15
- await i().get("/pos-users/paged", {
16
- params: {
17
- limit: e.limit,
18
- offset: e.offset,
19
- search: e.search,
20
- restaurantIds: (t = e.restaurantIds) != null && t.length ? e.restaurantIds : void 0,
21
- roleIds: (p = e.roleIds) != null && p.length ? e.roleIds : void 0
22
- }
23
- })
24
- );
25
- },
26
- async createEmployee(e) {
27
- await i().post("/pos-users", e);
28
- },
29
- async createMasterEmployee(e) {
30
- await i().post("/pos-users/master-user", e);
31
- },
32
- async migrateToMasterEmployee(e, t) {
33
- await i().put(`/pos-users/migrate/${e}`, t);
34
- },
35
- async updateEmployee(e, t) {
36
- await i().put(`/pos-users/${e}`, t);
37
- },
38
- async updateMasterEmployee(e, t) {
39
- await i().put(`/pos-users/master-user/${e}`, t);
40
- },
41
- async deleteEmployee(e) {
42
- await i().put(`/pos-users/${e._id}`, {
43
- user: e,
44
- roles: [],
45
- previousRoles: e.restaurants.map((t) => ({
46
- restaurantId: t.restaurantId,
47
- roleId: t.roleId
48
- }))
49
- });
50
- },
51
- async deleteMasterEmployee(e) {
52
- await i().put(`/pos-users/master-user/${e._id}`, {
53
- user: e,
54
- roles: [],
55
- previousRoles: e.restaurants.map((t) => ({
56
- restaurantId: t.restaurantId,
57
- roleId: t.roleId
58
- }))
59
- });
60
- },
61
- async generateEmployeePasscode() {
62
- return `${f(
63
- await i().get("/pos-users/generate-passcode")
64
- )}`;
65
- },
66
- async syncUsersMeta() {
67
- await i().post("/pos-users/create-users-meta");
68
- }
69
- };
70
- async function h(e) {
71
- const t = _().roles.value, { restaurants: p } = w(), u = new Map(
72
- p.value.map((a) => [a._id, a.profile.name])
73
- ), c = new Map(t.map((a) => [a._id, a.name])), r = /* @__PURE__ */ new Map();
74
- for (const a of e) {
75
- const n = {
76
- restaurantId: a.restaurantId,
77
- restaurantName: u.get(a.restaurantId) || "",
78
- roleId: a.role,
79
- roleName: c.get(a.role) || ""
80
- }, d = r.get(a._id);
81
- if (!d) {
82
- r.set(a._id, {
83
- ...a,
84
- isRestricted: !1,
85
- since: g(v(a._id)).format("DD/MM/YYYY"),
86
- restaurants: [n]
87
- });
88
- continue;
89
- }
90
- d.restaurants.some((y) => y.restaurantId === a.restaurantId) || (d.restaurants = E([...d.restaurants, n], {
91
- selector: "restaurantName"
92
- }));
93
- }
94
- return E([...r.values()], { selector: "name" });
95
- }
96
- function M(e) {
97
- const { restaurants: t } = w(), p = _().roles.value, u = new Map(
98
- t.value.map((a) => [a._id, a])
99
- ), c = new Map(p.map((a) => [a._id, a.name])), r = e.restaurantRole[0];
100
- return {
101
- _id: e._id,
102
- name: e.name,
103
- code: e.code,
104
- passcode: e.passcode,
105
- isMasterUser: e.isMasterUser,
106
- isRestricted: e.isRestricted,
107
- restaurantId: (r == null ? void 0 : r.restaurantId) || "",
108
- role: (r == null ? void 0 : r.roleId) || "",
109
- since: g(v(e._id)).format("DD/MM/YYYY"),
110
- restaurants: E(
111
- e.restaurantRole.map((a) => {
112
- const n = u.get(a.restaurantId);
113
- return {
114
- restaurantId: a.restaurantId,
115
- restaurantName: (n == null ? void 0 : n.profile.name) || "",
116
- restaurantCode: (n == null ? void 0 : n.profile.code) ?? void 0,
117
- roleId: a.roleId,
118
- roleName: c.get(a.roleId) || ""
119
- };
120
- }),
121
- { selector: "restaurantName" }
122
- )
123
- };
124
- }
125
- const R = $("employee", () => {
126
- const e = w(), t = m([]), p = m([]), u = m(0), c = m(!1);
127
- async function r() {
128
- try {
129
- c.value = !0, await e.readRestaurants();
130
- const s = await o.readEmployees();
131
- t.value = await h(s);
132
- } finally {
133
- c.value = !1;
134
- }
135
- }
136
- async function a(s) {
137
- try {
138
- c.value = !0, await e.readRestaurants();
139
- const l = await o.readEmployeesPage(s);
140
- p.value = l.items.map(M), u.value = l.total;
141
- } finally {
142
- c.value = !1;
143
- }
144
- }
145
- async function n(s, l) {
146
- await e.readRestaurants();
147
- const I = l ?? (await o.readEmployeesPage({ ...s, limit: 1, offset: 0 })).total;
148
- return I === 0 ? [] : (await o.readEmployeesPage({ ...s, limit: I, offset: 0 })).items.map(M);
149
- }
150
- async function d(s) {
151
- await o.createEmployee(s);
152
- }
153
- async function y(s, l) {
154
- await o.updateEmployee(s, l);
155
- }
156
- async function P(s) {
157
- await o.deleteEmployee(s);
158
- }
159
- async function Y(s) {
160
- await o.deleteMasterEmployee(s);
161
- }
162
- async function N(s) {
163
- await o.createMasterEmployee(s);
164
- }
165
- async function S(s, l) {
166
- await o.updateMasterEmployee(s, l);
167
- }
168
- async function D(s, l) {
169
- await o.migrateToMasterEmployee(s, l);
170
- }
171
- async function U() {
172
- await o.syncUsersMeta();
173
- }
174
- return {
175
- employees: t,
176
- listEmployees: p,
177
- totalEmployees: u,
178
- isLoading: c,
179
- readEmployees: r,
180
- readEmployeesPage: a,
181
- readAllEmployeesPage: n,
182
- createEmployee: d,
183
- updateEmployee: y,
184
- deleteEmployee: P,
185
- createMasterEmployee: N,
186
- updateMasterEmployee: S,
187
- deleteMasterEmployee: Y,
188
- migrateToMasterUser: D,
189
- syncUsersMeta: U
190
- };
191
- }), z = () => {
192
- const e = R();
193
- return {
194
- ...e,
195
- ...T(e)
196
- };
197
- };
198
- export {
199
- o as E,
200
- z as u
201
- };