@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
@@ -0,0 +1,76 @@
1
+ import { d as f } from "./dayjs.min-BAz84JAQ.js";
2
+ import { defineStore as I, storeToRefs as v } from "pinia";
3
+ import { ref as w } from "vue";
4
+ import { b as T, g as D } from "./app-DXkKrcRn.js";
5
+ import { s as y } from "./iteration-CcXrOMQe.js";
6
+ import { i as S, f as O } from "./utils-BZkjJbju.js";
7
+ import { u as Y } from "./restaurant-COSpCpTQ.js";
8
+ const d = {
9
+ async readTimesheets(t, r, a) {
10
+ return D(
11
+ await T().get("timesheet", {
12
+ params: { start: t, end: r, restaurantIds: a }
13
+ })
14
+ );
15
+ },
16
+ async updateTimesheet(t, r) {
17
+ await T().put(`timesheet/${t}`, r);
18
+ }
19
+ };
20
+ function g(t) {
21
+ const r = t.map((a) => {
22
+ const { startedAt: o, endedAt: n } = a, i = f(S(o)), e = n ? f(S(n)) : null, m = (e == null ? void 0 : e.diff(i, "minute", !1)) || 0, u = e ? O(m) : "", c = "YYYY-MM-DD hh:mm a";
23
+ return {
24
+ ...a,
25
+ start: i.format(c),
26
+ end: e ? e.format(c) : "",
27
+ totalMin: m,
28
+ duration: u
29
+ };
30
+ });
31
+ return y(r, { selector: "start" });
32
+ }
33
+ let h = 0;
34
+ const q = I("hrm-timesheet", () => {
35
+ const t = w([]);
36
+ async function r(o, n, i) {
37
+ const e = f(o).startOf("day").toISOString(), m = f(n).endOf("day").toISOString(), u = i ?? Y().restaurants.value.map((s) => s._id), c = ++h;
38
+ if (u.length === 0) {
39
+ const s = await d.readTimesheets(e, m);
40
+ c === h && (t.value = g(s));
41
+ return;
42
+ }
43
+ t.value = [];
44
+ const l = 10, p = [];
45
+ for (let s = 0; s < u.length; s += l)
46
+ p.push(
47
+ d.readTimesheets(e, m, u.slice(s, s + l)).then((A) => {
48
+ c === h && (t.value = y([...t.value, ...g(A)], {
49
+ selector: "start"
50
+ }));
51
+ })
52
+ );
53
+ await Promise.all(p);
54
+ }
55
+ async function a(o, n, i) {
56
+ await d.updateTimesheet(o.restaurantId, {
57
+ id: o._id,
58
+ startAt: n,
59
+ endAt: i
60
+ });
61
+ }
62
+ return {
63
+ timesheets: t,
64
+ readTimesheet: r,
65
+ updateTimesheet: a
66
+ };
67
+ }), j = () => {
68
+ const t = q();
69
+ return {
70
+ ...t,
71
+ ...v(t)
72
+ };
73
+ };
74
+ export {
75
+ j as u
76
+ };