@feedmepos/mf-hrm-portal 1.1.0-dev → 1.1.2-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 (101) hide show
  1. package/dist/AuditLogList-CjrocQS2.js +316 -0
  2. package/dist/{EmployeeList-tmUqs5a6.js → EmployeeList-CKHgrdAO.js} +157 -150
  3. package/dist/Main-HzplGv-e.js +85 -0
  4. package/dist/{main-DOtgCRZe.js → Main-YQ5f-v03.js} +1501 -1532
  5. package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-DuwNwJDM.js → PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js} +2 -2
  6. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-xQ4fjIxa.js +3050 -0
  7. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +38 -0
  8. package/dist/{RoleList-C5xG7LHg.js → RoleList-Bef-7IhW.js} +52 -50
  9. package/dist/RolePermissionList-BzwpQFeO.js +285 -0
  10. package/dist/{useSearch-C25VELOk.js → SelectFilter-NbXrJ4iH.js} +90 -101
  11. package/dist/TeamMemberList-D2Xey_w9.js +949 -0
  12. package/dist/{TimesheetList-CZfo4Dua.js → TimesheetList-DVIk0Tis.js} +30 -29
  13. package/dist/api/audit-log/index.d.ts +10 -0
  14. package/dist/api/index.d.ts +1 -3
  15. package/dist/api/permission-assignment/index.d.ts +10 -0
  16. package/dist/api/permission-set/index.d.ts +8 -0
  17. package/dist/api/team/index.d.ts +5 -1
  18. package/dist/app-DUs516v0.js +2592 -0
  19. package/dist/app.js +4 -4
  20. package/dist/components/AppForm.vue.d.ts +3 -2
  21. package/dist/components/CheckboxInput.vue.d.ts +10 -4
  22. package/dist/components/CollapsibleWrapper.vue.d.ts +3 -2
  23. package/dist/components/form/SelectFilter.vue.d.ts +3 -2
  24. package/dist/components/layout/FormColumn.vue.d.ts +6 -3
  25. package/dist/components/layout/FormItem.vue.d.ts +2 -1
  26. package/dist/components/layout/FormSection.vue.d.ts +2 -1
  27. package/dist/components/layout/FullWrapper.vue.d.ts +6 -3
  28. package/dist/components/layout/PageLayout.vue.d.ts +2 -1
  29. package/dist/components/menu/BottomSheetMenu.vue.d.ts +2 -1
  30. package/dist/components/menu/BottomSheetMenuItem.vue.d.ts +6 -3
  31. package/dist/components/table/EmptyDataTemplate/index.vue.d.ts +6 -3
  32. package/dist/composables/useAppStore.d.ts +6 -6
  33. package/dist/composables/useDateRange.d.ts +1 -1
  34. package/dist/composables/useRestaurantMap.d.ts +4 -8
  35. package/dist/composables/useSheet.d.ts +1 -1
  36. package/dist/dayjs.min-DVb8OkTL.js +282 -0
  37. package/dist/employee-jH7EJnhi.js +172 -0
  38. package/dist/helpers/permission-set.d.ts +32 -0
  39. package/dist/helpers/portal-user.d.ts +8 -0
  40. package/dist/helpers/rule.d.ts +4 -3
  41. package/dist/index-CicR1-Jp.js +8411 -0
  42. package/dist/{empty-placeholder-ey8LJtN1.js → index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js} +43 -2
  43. package/dist/{lodash-DNzKT_gG.js → lodash-DpoPPi_j.js} +326 -343
  44. package/dist/router/shared.d.ts +3 -1
  45. package/dist/stores/employee.d.ts +4 -4
  46. package/dist/stores/permission-assignment.d.ts +277 -0
  47. package/dist/stores/permission-set.d.ts +250 -0
  48. package/dist/stores/role.d.ts +4 -4
  49. package/dist/stores/team.d.ts +288 -0
  50. package/dist/stores/timesheet.d.ts +19 -19
  51. package/dist/team-CiZSNUQW.js +26 -0
  52. package/dist/timesheet-BRQvljNj.js +56 -0
  53. package/dist/tsconfig.app.tsbuildinfo +1 -1
  54. package/dist/types/audit-log.d.ts +19 -0
  55. package/dist/types/permission-assignment.d.ts +20 -0
  56. package/dist/types/permission-set.d.ts +20 -0
  57. package/dist/types/permission.d.ts +1 -4
  58. package/dist/types/team.d.ts +13 -3
  59. package/dist/useAppStore-RzLLN5d9.js +180 -0
  60. package/dist/useLoading-1OqFn86y.js +99 -0
  61. package/dist/useRestaurantMap-D5BNPLKh.js +107 -0
  62. package/dist/useSearch-B6WK1LBB.js +15 -0
  63. package/dist/views/audit-log/locales/index.d.ts +211 -0
  64. package/dist/views/hr/employee/{components/EmployeeForm.vue.d.ts → EmployeeForm.vue.d.ts} +10 -7
  65. package/dist/views/hr/locales/index.d.ts +0 -214
  66. package/dist/views/team/components/BasePermission.vue.d.ts +64 -0
  67. package/dist/views/team/components/{TeamMemberConditionPermission.vue.d.ts → ConditionPermission.vue.d.ts} +14 -1
  68. package/dist/views/team/components/InheritPermissionTooltip.vue.d.ts +14 -0
  69. package/dist/views/team/components/PermissionWithTooltip.vue.d.ts +14 -0
  70. package/dist/views/team/components/PortalPermissionEditor.vue.d.ts +68 -28
  71. package/dist/views/team/components/{TeamMemberRolePermission.vue.d.ts → PosRolePermission.vue.d.ts} +14 -1
  72. package/dist/views/team/locales/index.d.ts +176 -4
  73. package/dist/views/team/{components → member}/AddMemberForm.vue.d.ts +1 -0
  74. package/dist/views/team/member/TeamMemberList.vue.d.ts +4 -0
  75. package/dist/views/team/member/TeamMemberMasterUser.vue.d.ts +55 -0
  76. package/dist/views/team/role/RolePermissionForm.vue.d.ts +19 -0
  77. package/dist/views/{hr/grant-user/GrantUserList.vue.d.ts → team/role/RolePermissionList.vue.d.ts} +0 -12
  78. package/package.json +14 -9
  79. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BY9VGOoM.js +0 -71
  80. package/dist/HorizontalSplitter-B9DVYJIM.js +0 -12
  81. package/dist/Main-ebQsujY3.js +0 -600
  82. package/dist/TeamMemberList-09_3YTHe.js +0 -1509
  83. package/dist/api/grant-user/index.d.ts +0 -8
  84. package/dist/app-B4KDGOw1.js +0 -1432
  85. package/dist/employee-BQc7Wgpu.js +0 -450
  86. package/dist/index-CSG8t9Dl.js +0 -58
  87. package/dist/role-DGAu9X1X.js +0 -9728
  88. package/dist/rule-CSj0p2P3.js +0 -450
  89. package/dist/stores/grant-user.d.ts +0 -86
  90. package/dist/timesheet-B4M1nCIm.js +0 -57
  91. package/dist/types/grant-user.d.ts +0 -17
  92. package/dist/useAppStore-CKmMR-gI.js +0 -93
  93. package/dist/useLoading-v4m-6mEy.js +0 -141
  94. package/dist/useRestaurantMap-e9fQJiLC.js +0 -39
  95. package/dist/views/hr/grant-user/components/GrantUserForm.vue.d.ts +0 -14
  96. package/dist/views/team/components/TeamMemberBasePermission.vue.d.ts +0 -36
  97. package/dist/views/team/components/TeamMemberMasterUser.vue.d.ts +0 -718
  98. /package/dist/views/{hr/grant-user/Main.vue.d.ts → audit-log/AuditLogList.vue.d.ts} +0 -0
  99. /package/dist/views/hr/{main.vue.d.ts → Main.vue.d.ts} +0 -0
  100. /package/dist/views/team/{TeamMemberList.vue.d.ts → Main.vue.d.ts} +0 -0
  101. /package/dist/views/team/{components → member}/MemberInfo.vue.d.ts +0 -0
@@ -1,12 +1,13 @@
1
- import { ref as d, computed as b, defineComponent as ce, onMounted as me, watch as X, resolveComponent as i, openBlock as D, createElementBlock as B, Fragment as Z, createVNode as l, unref as n, withCtx as V, createElementVNode as u, toDisplayString as $, createTextVNode as pe, createCommentVNode as ve, isRef as fe, renderList as he, createBlock as z, nextTick as ge } from "vue";
2
- import { D as v, u as we } from "./employee-BQc7Wgpu.js";
3
- import { useI18n as ye, useCoreStore as be, RestaurantSelector as _e } from "@feedmepos/mf-common";
4
- import { useSnackbar as De, components as xe } from "@feedmepos/ui-library";
5
- import { _ as Se } from "./app-B4KDGOw1.js";
6
- import { u as ke, _ as Ve } from "./useLoading-v4m-6mEy.js";
7
- import { f as Ce, s as Fe } from "./role-DGAu9X1X.js";
8
- import { d as Ye } from "./rule-CSj0p2P3.js";
9
- import { u as Le } from "./timesheet-B4M1nCIm.js";
1
+ import { ref as d, computed as b, defineComponent as ce, onMounted as me, watch as X, resolveComponent as i, createElementBlock as B, openBlock as D, Fragment as Z, createVNode as l, createElementVNode as u, unref as n, withCtx as V, createCommentVNode as pe, toDisplayString as $, createTextVNode as ve, createBlock as z, isRef as fe, renderList as he, nextTick as ge } from "vue";
2
+ import { d as v } from "./dayjs.min-DVb8OkTL.js";
3
+ import { useI18n as we, useCoreStore as ye, RestaurantSelector as be } from "@feedmepos/mf-common";
4
+ import { useSnackbar as _e, components as De } from "@feedmepos/ui-library";
5
+ import { _ as xe } from "./app-DUs516v0.js";
6
+ import { _ as Se } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
+ import { u as ke } from "./useLoading-1OqFn86y.js";
8
+ import { i as Ve, j as Ce, s as Fe } from "./index-CicR1-Jp.js";
9
+ import { u as Ye } from "./employee-jH7EJnhi.js";
10
+ import { u as Le } from "./timesheet-BRQvljNj.js";
10
11
  function Me(x, a) {
11
12
  return ["years", "months"].find((S) => {
12
13
  const k = x.startOf(S), f = x.endOf(S);
@@ -59,20 +60,20 @@ const Re = {
59
60
  }, Pe = {
60
61
  key: 0,
61
62
  class: "fm-typo-body-sm-400 text-fm-color-typo-error mt-1 flex items-center gap-4"
62
- }, He = {
63
- class: "flex items-center justify-start gap-8"
64
63
  }, je = {
64
+ class: "flex items-center justify-start gap-8"
65
+ }, He = {
65
66
  class: "space-y-8"
66
67
  }, Ge = {
67
68
  class: "flex items-start gap-8 flex-wrap xs:px-16"
68
69
  }, qe = {
69
70
  class: "flex items-center gap-8"
70
- }, lt = /* @__PURE__ */ ce({
71
+ }, nt = /* @__PURE__ */ ce({
71
72
  __name: "TimesheetList",
72
73
  setup(x) {
73
74
  const {
74
75
  t: a
75
- } = ye(), C = De(), S = ke(C), k = [{
76
+ } = we(), C = _e(), S = ke(C), k = [{
76
77
  label: a("hr.timesheet.listView"),
77
78
  value: "listView"
78
79
  }, {
@@ -81,7 +82,7 @@ const Re = {
81
82
  }], f = d("listView"), _ = b(() => {
82
83
  var t;
83
84
  return (t = k.find((e) => e.value === f.value)) == null ? void 0 : t.label;
84
- }), c = d(""), h = Le(), A = we(), F = b(() => A.employees.value), g = b(() => h.timesheets.value.filter((s) => !E.value || E.value.includes(s.restaurantId)).map((s) => {
85
+ }), c = d(""), h = Le(), A = Ye(), F = b(() => A.employees.value), g = b(() => h.timesheets.value.filter((s) => !E.value || E.value.includes(s.restaurantId)).map((s) => {
85
86
  var y;
86
87
  const r = (y = ee.restaurants.value.find((p) => p._id === s.restaurantId)) == null ? void 0 : y.profile.code, w = F.value.find((p) => p._id === s.user.id);
87
88
  return {
@@ -95,21 +96,21 @@ const Re = {
95
96
  })), P = b(() => g.value.filter((t) => {
96
97
  var e, s;
97
98
  return t.user.name.toLowerCase().includes(c.value.toLowerCase()) || t.restaurantName.toLowerCase().includes(c.value.toLowerCase()) || ((e = t.restaurantCode) == null ? void 0 : e.toLowerCase().includes(c.value.toLowerCase())) || ((s = t.user.code) == null ? void 0 : s.toLowerCase().includes(c.value.toLowerCase()));
98
- })), H = b(() => {
99
- const t = Ce(g.value, (s) => s.user.name), e = Object.entries(t).map(([s, r]) => {
99
+ })), j = b(() => {
100
+ const t = Ve(g.value, (s) => s.user.name), e = Object.entries(t).map(([s, r]) => {
100
101
  const w = F.value.find((y) => y._id === r[0].user.id);
101
102
  return {
102
103
  key: s,
103
104
  user: r[0].user.name,
104
105
  code: w ? w.code : "",
105
106
  timesheets: r,
106
- total: Ye(r.reduce((y, p) => y + p.totalMin, 0))
107
+ total: Ce(r.reduce((y, p) => y + p.totalMin, 0))
107
108
  };
108
109
  });
109
110
  return Fe(e, {
110
111
  selector: "user"
111
112
  });
112
- }), j = b(() => H.value.filter((t) => {
113
+ }), H = b(() => j.value.filter((t) => {
113
114
  var e;
114
115
  return t.user.toLowerCase().includes(c.value.toLowerCase()) || ((e = t.code) == null ? void 0 : e.toLowerCase().includes(c.value.toLowerCase()));
115
116
  })), Y = d(!1), N = async () => {
@@ -119,7 +120,7 @@ const Re = {
119
120
  } = L.value;
120
121
  Y.value = !0;
121
122
  try {
122
- await h.readTimesheet(new Date(t), new Date(e)), await ge(), U.value = Object.fromEntries(Object.entries(new Array(H.value.length).fill(!0)));
123
+ await h.readTimesheet(new Date(t), new Date(e)), await ge(), U.value = Object.fromEntries(Object.entries(new Array(j.value.length).fill(!0)));
123
124
  } catch (s) {
124
125
  C.open({
125
126
  title: s instanceof Error ? s.message : `${s}`,
@@ -132,7 +133,7 @@ const Re = {
132
133
  me(() => {
133
134
  N();
134
135
  });
135
- const ee = be(), E = d(), {
136
+ const ee = ye(), E = d(), {
136
137
  dateRange: L,
137
138
  dateRangeLabel: te,
138
139
  setRange: G
@@ -190,7 +191,7 @@ const Re = {
190
191
  const s = t.row.getIsExpanded();
191
192
  return l("div", {
192
193
  class: "flex items-center gap-8"
193
- }, [l(xe.FmButton, {
194
+ }, [l(De.FmButton, {
194
195
  variant: "tertiary",
195
196
  icon: s ? "keyboard_arrow_up" : "keyboard_arrow_down",
196
197
  "on-click": (r) => {
@@ -253,7 +254,7 @@ const Re = {
253
254
  "dismiss-away": "",
254
255
  header: n(a)("hr.timesheet.update.title")
255
256
  }, {
256
- "side-sheet-footer": V(() => [u("div", He, [l(p, {
257
+ "side-sheet-footer": V(() => [u("div", je, [l(p, {
257
258
  label: n(a)("common.update"),
258
259
  size: "md",
259
260
  variant: "primary",
@@ -289,9 +290,9 @@ const Re = {
289
290
  color: "#FF3B30",
290
291
  name: "error",
291
292
  size: "sm"
292
- }), pe(" " + $(K.value), 1)])) : ve("", !0)])]),
293
+ }), ve(" " + $(K.value), 1)])) : pe("", !0)])]),
293
294
  _: 1
294
- }, 8, ["modelValue", "header"]), u("div", je, [u("div", Ge, [l(n(_e), {
295
+ }, 8, ["modelValue", "header"]), u("div", He, [u("div", Ge, [l(n(be), {
295
296
  modelValue: E.value,
296
297
  "onUpdate:modelValue": e[6] || (e[6] = (o) => E.value = o),
297
298
  "managable-only": "",
@@ -333,11 +334,11 @@ const Re = {
333
334
  "onUpdate:modelValue": e[10] || (e[10] = (o) => c.value = o),
334
335
  class: "w-[320px]",
335
336
  placeholder: n(a)("hr.timesheet.search.placeholder")
336
- }, null, 8, ["modelValue", "placeholder"])]), g.value.length === 0 && !Y.value ? (D(), z(n(Ve), {
337
+ }, null, 8, ["modelValue", "placeholder"])]), g.value.length === 0 && !Y.value ? (D(), z(n(Se), {
337
338
  key: 0,
338
339
  title: n(a)("hr.timesheet.noData.title"),
339
340
  subtitle: ""
340
- }, null, 8, ["title"])) : (D(), z(Se, {
341
+ }, null, 8, ["title"])) : (D(), z(xe, {
341
342
  key: 1,
342
343
  class: "w-full xs:px-16 overflow-auto"
343
344
  }, {
@@ -356,8 +357,8 @@ const Re = {
356
357
  key: 1,
357
358
  class: "min-w-[640px]",
358
359
  "column-defs": oe,
359
- "row-data": j.value,
360
- "page-size": g.value.length + j.value.length,
360
+ "row-data": H.value,
361
+ "page-size": g.value.length + H.value.length,
361
362
  loading: Y.value,
362
363
  "pin-header-row": "",
363
364
  "hide-footer": "",
@@ -373,5 +374,5 @@ const Re = {
373
374
  }
374
375
  });
375
376
  export {
376
- lt as default
377
+ nt as default
377
378
  };
@@ -0,0 +1,10 @@
1
+ import type { AuditLogEntry } from '@/types/audit-log';
2
+ declare const AuditLogAPI: {
3
+ read(params?: {
4
+ limit?: number;
5
+ offset?: number;
6
+ from?: string;
7
+ to?: string;
8
+ }): Promise<AuditLogEntry[]>;
9
+ };
10
+ export default AuditLogAPI;
@@ -1,5 +1,3 @@
1
1
  import { type AxiosInstance, type AxiosResponse } from 'axios';
2
- export declare const businessClientInstance: (subPath?: string) => AxiosInstance;
3
- export declare const grantClientInstance: () => AxiosInstance;
4
- export declare const grantValidateClientInstance: () => AxiosInstance;
2
+ export declare const businessClientInstance: () => AxiosInstance;
5
3
  export declare function getAxiosData<T>(response: AxiosResponse<T>): T;
@@ -0,0 +1,10 @@
1
+ import type { IFdtoCreatePermissionAssignmentReq, IFdtoPermissionAssignment, IFdtoUpdatePermissionAssignmentReq } from '@/types/permission-assignment';
2
+ declare const PermissionAssignmentAPI: {
3
+ readAll(): Promise<IFdtoPermissionAssignment[]>;
4
+ readByUserId(userId: string): Promise<IFdtoPermissionAssignment | null>;
5
+ readById(id: string): Promise<IFdtoPermissionAssignment>;
6
+ create(dto: IFdtoCreatePermissionAssignmentReq): Promise<IFdtoPermissionAssignment>;
7
+ update(id: string, dto: IFdtoUpdatePermissionAssignmentReq): Promise<IFdtoPermissionAssignment>;
8
+ delete(id: string): Promise<boolean>;
9
+ };
10
+ export default PermissionAssignmentAPI;
@@ -0,0 +1,8 @@
1
+ import type { IFdtoCreatePermissionSetReq, IFdtoPermissionSet, IFdtoUpdatePermissionSetReq } from '@/types/permission-set';
2
+ declare const PermissionSetAPI: {
3
+ read(): Promise<IFdtoPermissionSet[]>;
4
+ create(dto: IFdtoCreatePermissionSetReq): Promise<IFdtoPermissionSet>;
5
+ update(id: string, dto: IFdtoUpdatePermissionSetReq): Promise<IFdtoPermissionSet>;
6
+ delete(id: string): Promise<boolean>;
7
+ };
8
+ export default PermissionSetAPI;
@@ -1,5 +1,9 @@
1
+ import { type IFdtoPortalPermission } from '@/types/permission';
1
2
  import type { FTeamMember, IFdtoCreatePortalUserReq, IFdtoUpdatePortalUserReq } from '@/types/team';
2
- export declare const portalTeamPermissions: readonly import("@feedmepos/mf-common").IFdtoPortalPermission[];
3
+ export type IFdtoPortalPermissionWithCategory = IFdtoPortalPermission & {
4
+ category: string;
5
+ };
6
+ export declare const portalTeamPermissions: IFdtoPortalPermissionWithCategory[];
3
7
  export declare const teamApi: {
4
8
  readTeamMembers(): Promise<FTeamMember[]>;
5
9
  createTeamMember(req: IFdtoCreatePortalUserReq): Promise<FTeamMember>;