@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
@@ -2721,7 +2721,14 @@ const gn = {
2721
2721
  requestPath: "Request Path",
2722
2722
  traceId: "Trace ID"
2723
2723
  },
2724
+ deepLink: {
2725
+ notFound: "Audit log not found for this link.",
2726
+ loadFailed: "Could not load the audit log for this link. Reload to try again."
2727
+ },
2724
2728
  detail: {
2729
+ copyLink: "Copy link",
2730
+ linkCopied: "Link copied",
2731
+ linkCopyFailed: "Failed to copy link",
2725
2732
  header: "Audit Log Detail",
2726
2733
  date: "Date",
2727
2734
  timestamp: "Timestamp",
@@ -3075,7 +3082,14 @@ const gn = {
3075
3082
  requestPath: "URL ที่เข้าถึง",
3076
3083
  traceId: "รหัสติดตาม"
3077
3084
  },
3085
+ deepLink: {
3086
+ notFound: "ไม่พบบันทึกการตรวจสอบสำหรับลิงก์นี้",
3087
+ loadFailed: "ไม่สามารถโหลดบันทึกการตรวจสอบสำหรับลิงก์นี้ได้ โปรดโหลดหน้าใหม่เพื่อลองอีกครั้ง"
3088
+ },
3078
3089
  detail: {
3090
+ copyLink: "คัดลอกลิงก์",
3091
+ linkCopied: "คัดลอกลิงก์แล้ว",
3092
+ linkCopyFailed: "คัดลอกลิงก์ไม่สำเร็จ",
3079
3093
  header: "รายละเอียดประวัติการใช้งาน",
3080
3094
  date: "วันที่",
3081
3095
  timestamp: "เวลา",
@@ -3430,7 +3444,14 @@ const gn = {
3430
3444
  requestPath: "请求路径",
3431
3445
  traceId: "追踪 ID"
3432
3446
  },
3447
+ deepLink: {
3448
+ notFound: "找不到此链接对应的审计日志。",
3449
+ loadFailed: "无法加载此链接对应的审计日志,请刷新页面重试。"
3450
+ },
3433
3451
  detail: {
3452
+ copyLink: "复制链接",
3453
+ linkCopied: "链接已复制",
3454
+ linkCopyFailed: "复制链接失败",
3434
3455
  header: "审计日志详情",
3435
3456
  date: "日期",
3436
3457
  timestamp: "时间戳",
@@ -3785,7 +3806,14 @@ const gn = {
3785
3806
  requestPath: "請求路徑",
3786
3807
  traceId: "追蹤 ID"
3787
3808
  },
3809
+ deepLink: {
3810
+ notFound: "找不到此連結對應的稽核日誌。",
3811
+ loadFailed: "無法載入此連結對應的稽核日誌,請重新整理頁面後再試。"
3812
+ },
3788
3813
  detail: {
3814
+ copyLink: "複製連結",
3815
+ linkCopied: "連結已複製",
3816
+ linkCopyFailed: "複製連結失敗",
3789
3817
  header: "審計日誌詳情",
3790
3818
  date: "日期",
3791
3819
  timestamp: "時間戳",
@@ -20430,20 +20458,20 @@ const wt = (e) => ({
20430
20458
  }
20431
20459
  ]
20432
20460
  }
20433
- }), Sh = zt(Nt(je(() => import("./Main-BaB4vgI5.js")))), Ph = zt(Nt(je(() => import("./Main-D5wi42fp.js")))), Dh = zt(
20434
- Nt(je(() => import("./AuditLogList-CA-_t77n.js")))
20461
+ }), Sh = zt(Nt(je(() => import("./Main-gRu17-N6.js")))), Ph = zt(Nt(je(() => import("./Main-ClJox3pV.js")))), Dh = zt(
20462
+ Nt(je(() => import("./AuditLogList-DIc3Jgpr.js")))
20435
20463
  ), Oh = zt(
20436
- Nt(je(() => import("./Main-Bl-Ocx1G.js")))
20464
+ Nt(je(() => import("./Main-DYzFd_qa.js")))
20437
20465
  ), Mh = zt(
20438
- je(() => import("./MyPosProfile-CUG_201f.js"))
20439
- ), kh = je(() => import("./ApprovalCodeList-Bw0E-hZl.js")), Bh = je(() => import("./GrantUserList-Cg7ITk_M.js")), Th = je(() => import("./EmployeeList-D_bX0EhQ.js")), Eh = je(() => import("./RoleList-Cmz97HHP.js")), xh = je(() => import("./TimesheetList-DYoglTi8.js")), Rh = je(() => import("./TeamMemberList-CvDnIILn.js")), Nh = je(
20440
- () => import("./PermissionSetList-kgG9H3DX.js")
20466
+ je(() => import("./MyPosProfile-ARRrolbz.js"))
20467
+ ), kh = je(() => import("./ApprovalCodeList-DIYhVMGW.js")), Bh = je(() => import("./GrantUserList-8zmzFk9z.js")), Th = je(() => import("./EmployeeList-iVg4pI9Y.js")), Eh = je(() => import("./RoleList-F9ZORhgE.js")), xh = je(() => import("./TimesheetList-DO5T__dL.js")), Rh = je(() => import("./TeamMemberList-DZ0aRbxg.js")), Nh = je(
20468
+ () => import("./PermissionSetList-CL42jQY4.js")
20441
20469
  ), Fh = so(
20442
- Nt(je(() => import("./SchedulePage-AVmRkFi1.js")))
20470
+ Nt(je(() => import("./SchedulePage-C-NcbGIl.js")))
20443
20471
  ), jh = so(
20444
- Nt(je(() => import("./SchedulePositionPage-3rE-O8CG.js")))
20472
+ Nt(je(() => import("./SchedulePositionPage-Ba0iiSRg.js")))
20445
20473
  ), Hh = so(
20446
- Nt(je(() => import("./ScheduleGeneralPage-B39k3SQH.js")))
20474
+ Nt(je(() => import("./ScheduleGeneralPage-751cEUwS.js")))
20447
20475
  ), Gy = [
20448
20476
  // Landing: waits for menu access, then opens the first page the user can open.
20449
20477
  // Declared before the Employee parent (same path) so it wins the exact '/' match.
@@ -21554,7 +21582,7 @@ const Vy = /* @__PURE__ */ dt({
21554
21582
  };
21555
21583
  }
21556
21584
  });
21557
- var ks = { name: "@feedmepos/mf-hrm-portal", version: "2.3.2-dev.7", mode: "fmmf" };
21585
+ var ks = { name: "@feedmepos/mf-hrm-portal", version: "2.3.2-dev.8", mode: "fmmf" };
21558
21586
  console.log(
21559
21587
  `%c${ks.name}%c v${ks.version} %c${ks.mode}`,
21560
21588
  "background:#1f1f1f;color:#fff;padding:2px 6px;border-radius:3px 0 0 3px",
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as e, D as o, F as p } from "./app-DKUCzcrc.js";
1
+ import { E as e, D as o, F as p } from "./app-DXkKrcRn.js";
2
2
  export {
3
3
  e as FmApp,
4
4
  o as i18nMessages,
@@ -1,6 +1,6 @@
1
- import { defineStore as C } from "pinia";
1
+ import { defineStore as A } from "pinia";
2
2
  import { ref as l } from "vue";
3
- import { g as p, b as s } from "./app-DKUCzcrc.js";
3
+ import { g as p, b as s } from "./app-DXkKrcRn.js";
4
4
  const n = {
5
5
  async getApprovalCodes() {
6
6
  return p(await s("approval-codes").get(""));
@@ -15,7 +15,7 @@ const n = {
15
15
  })
16
16
  );
17
17
  }
18
- }, A = C("approvalCode", () => {
18
+ }, C = A("hrm-approval-code", () => {
19
19
  const r = l([]), a = l(!1);
20
20
  async function d() {
21
21
  a.value = !0;
@@ -52,7 +52,7 @@ const n = {
52
52
  createApprovalCodes: v,
53
53
  revokeApprovalCode: i
54
54
  };
55
- }), g = A;
55
+ }), g = C;
56
56
  export {
57
57
  g as u
58
58
  };
@@ -1,4 +1,4 @@
1
- import { x as Q, w as K } from "./app-DKUCzcrc.js";
1
+ import { x as Q, w as K } from "./app-DXkKrcRn.js";
2
2
  var E = { exports: {} };
3
3
  (function(V, X) {
4
4
  (function(W, x) {
@@ -0,0 +1,172 @@
1
+ import { d as S } from "./dayjs.min-BAz84JAQ.js";
2
+ import { defineStore as _, storeToRefs as $ } from "pinia";
3
+ import { ref as u } from "vue";
4
+ import "./index-TrBkLxJe.js";
5
+ import { b as n, g as m } from "./app-DXkKrcRn.js";
6
+ import { s as h } from "./iteration-CcXrOMQe.js";
7
+ import { i as T } from "./utils-BZkjJbju.js";
8
+ import { u as x } from "./role-ZmCd2yG4.js";
9
+ import { u as f } from "./restaurant-COSpCpTQ.js";
10
+ const r = {
11
+ async readEmployeesPage(e) {
12
+ var s, l;
13
+ return m(
14
+ await n().get("/pos-users/paged", {
15
+ params: {
16
+ limit: e.limit,
17
+ offset: e.offset,
18
+ search: e.search,
19
+ restaurantIds: (s = e.restaurantIds) != null && s.length ? e.restaurantIds : void 0,
20
+ roleIds: (l = e.roleIds) != null && l.length ? e.roleIds : void 0,
21
+ includeEmptyPasscode: e.includeEmptyPasscode || void 0
22
+ }
23
+ })
24
+ );
25
+ },
26
+ async createEmployee(e) {
27
+ return m(
28
+ await n().post("/pos-users", e)
29
+ ).employeeId;
30
+ },
31
+ async createMasterEmployee(e) {
32
+ return m(
33
+ await n().post("/pos-users/master-user", e)
34
+ ).employeeId;
35
+ },
36
+ async migrateToMasterEmployee(e, s) {
37
+ await n().put(`/pos-users/migrate/${e}`, s);
38
+ },
39
+ async updateEmployee(e, s) {
40
+ await n().put(`/pos-users/${e}`, s);
41
+ },
42
+ async updateMasterEmployee(e, s) {
43
+ await n().put(`/pos-users/master-user/${e}`, s);
44
+ },
45
+ async deleteEmployee(e) {
46
+ await n().put(`/pos-users/${e._id}`, {
47
+ user: e,
48
+ roles: [],
49
+ previousRoles: e.restaurants.map((s) => ({
50
+ restaurantId: s.restaurantId,
51
+ roleId: s.roleId
52
+ }))
53
+ });
54
+ },
55
+ async deleteMasterEmployee(e) {
56
+ await n().put(`/pos-users/master-user/${e._id}`, {
57
+ user: e,
58
+ roles: [],
59
+ previousRoles: e.restaurants.map((s) => ({
60
+ restaurantId: s.restaurantId,
61
+ roleId: s.roleId
62
+ }))
63
+ });
64
+ },
65
+ async generateEmployeePasscode(e) {
66
+ return `${m(
67
+ await n().post("/pos-users/generate-passcode", {
68
+ restaurantIds: e.restaurantIds,
69
+ excludePosUserId: e.excludePosUserId
70
+ })
71
+ )}`;
72
+ },
73
+ async syncUsersMeta() {
74
+ await n().post("/pos-users/create-users-meta");
75
+ }
76
+ };
77
+ function E(e) {
78
+ const { restaurants: s } = f(), l = x().roles.value, c = new Map(
79
+ s.value.map((a) => [a._id, a])
80
+ ), d = new Map(l.map((a) => [a._id, a.name])), p = e.restaurantRole[0];
81
+ return {
82
+ _id: e._id,
83
+ name: e.name,
84
+ code: e.code,
85
+ passcode: e.passcode,
86
+ isMasterUser: e.isMasterUser,
87
+ isRestricted: e.isRestricted,
88
+ restaurantId: (p == null ? void 0 : p.restaurantId) || "",
89
+ role: (p == null ? void 0 : p.roleId) || "",
90
+ since: S(T(e._id)).format("DD/MM/YYYY"),
91
+ restaurants: h(
92
+ e.restaurantRole.map((a) => {
93
+ const i = c.get(a.restaurantId);
94
+ return {
95
+ restaurantId: a.restaurantId,
96
+ restaurantName: (i == null ? void 0 : i.profile.name) || "",
97
+ restaurantCode: (i == null ? void 0 : i.profile.code) ?? void 0,
98
+ roleId: a.roleId,
99
+ roleName: d.get(a.roleId) || ""
100
+ };
101
+ }),
102
+ { selector: "restaurantName" }
103
+ )
104
+ };
105
+ }
106
+ const D = _("hrm-employee", () => {
107
+ const e = f(), s = u([]), l = u([]), c = u(0), d = u(!1);
108
+ async function p(t) {
109
+ try {
110
+ d.value = !0, await e.readRestaurants();
111
+ const o = await r.readEmployeesPage(t);
112
+ l.value = o.items.map(E), c.value = o.total;
113
+ } finally {
114
+ d.value = !1;
115
+ }
116
+ }
117
+ async function a(t, o) {
118
+ await e.readRestaurants();
119
+ const y = o ?? (await r.readEmployeesPage({ ...t, limit: 1, offset: 0 })).total;
120
+ return y === 0 ? [] : (await r.readEmployeesPage({ ...t, limit: y, offset: 0 })).items.map(E);
121
+ }
122
+ async function i(t) {
123
+ return r.createEmployee(t);
124
+ }
125
+ async function I(t, o) {
126
+ await r.updateEmployee(t, o);
127
+ }
128
+ async function w(t) {
129
+ await r.deleteEmployee(t);
130
+ }
131
+ async function M(t) {
132
+ await r.deleteMasterEmployee(t);
133
+ }
134
+ async function g(t) {
135
+ return r.createMasterEmployee(t);
136
+ }
137
+ async function v(t, o) {
138
+ await r.updateMasterEmployee(t, o);
139
+ }
140
+ async function P(t, o) {
141
+ await r.migrateToMasterEmployee(t, o);
142
+ }
143
+ async function U() {
144
+ await r.syncUsersMeta();
145
+ }
146
+ return {
147
+ employees: s,
148
+ listEmployees: l,
149
+ totalEmployees: c,
150
+ isLoading: d,
151
+ readEmployeesPage: p,
152
+ readAllEmployeesPage: a,
153
+ createEmployee: i,
154
+ updateEmployee: I,
155
+ deleteEmployee: w,
156
+ createMasterEmployee: g,
157
+ updateMasterEmployee: v,
158
+ deleteMasterEmployee: M,
159
+ migrateToMasterUser: P,
160
+ syncUsersMeta: U
161
+ };
162
+ }), z = () => {
163
+ const e = D();
164
+ return {
165
+ ...e,
166
+ ...$(e)
167
+ };
168
+ };
169
+ export {
170
+ r as E,
171
+ z as u
172
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineStore as f } from "pinia";
2
2
  import { ref as u } from "vue";
3
- import { g as s, e as v, b as o } from "./app-DKUCzcrc.js";
3
+ import { g as s, e as v, b as o } from "./app-DXkKrcRn.js";
4
4
  const c = {
5
5
  async getGrantUsers() {
6
6
  return s(await o("grant").get(""));
@@ -24,7 +24,7 @@ const c = {
24
24
  })
25
25
  );
26
26
  }
27
- }, w = f("grantUser", () => {
27
+ }, w = f("hrm-grant-user", () => {
28
28
  const r = u([]), a = u(!1);
29
29
  async function l() {
30
30
  a.value = !0;