@feedmepos/mf-hrm-portal 1.1.2-dev → 1.1.4-dev.1

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 (88) hide show
  1. package/dist/{EmployeeList-CKHgrdAO.js → EmployeeList-D3a7ngdE.js} +16 -18
  2. package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js → PageLayout.vue_vue_type_script_setup_true_lang-DuwNwJDM.js} +2 -2
  3. package/dist/{RoleList-Bef-7IhW.js → RoleList-CsxyMZW0.js} +53 -57
  4. package/dist/TeamMemberList-ZkrdrTlL.js +1508 -0
  5. package/dist/{TimesheetList-DVIk0Tis.js → TimesheetList-BwiUzcJ-.js} +41 -42
  6. package/dist/api/team/index.d.ts +1 -5
  7. package/dist/app-CrML_LtM.js +1202 -0
  8. package/dist/app.js +4 -4
  9. package/dist/components/AppForm.vue.d.ts +2 -3
  10. package/dist/components/CheckboxInput.vue.d.ts +4 -10
  11. package/dist/components/CollapsibleWrapper.vue.d.ts +2 -3
  12. package/dist/components/form/SelectFilter.vue.d.ts +2 -3
  13. package/dist/components/layout/FormColumn.vue.d.ts +3 -6
  14. package/dist/components/layout/FormItem.vue.d.ts +1 -2
  15. package/dist/components/layout/FormSection.vue.d.ts +1 -2
  16. package/dist/components/layout/FullWrapper.vue.d.ts +3 -6
  17. package/dist/components/layout/PageLayout.vue.d.ts +1 -2
  18. package/dist/components/menu/BottomSheetMenu.vue.d.ts +1 -2
  19. package/dist/components/menu/BottomSheetMenuItem.vue.d.ts +3 -6
  20. package/dist/components/table/EmptyDataTemplate/index.vue.d.ts +3 -6
  21. package/dist/composables/useAppStore.d.ts +6 -6
  22. package/dist/composables/useDateRange.d.ts +1 -1
  23. package/dist/composables/useRestaurantMap.d.ts +8 -4
  24. package/dist/composables/useSheet.d.ts +1 -1
  25. package/dist/employee-DSGaYrd4.js +449 -0
  26. package/dist/{index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js → empty-placeholder-ey8LJtN1.js} +2 -43
  27. package/dist/helpers/rule.d.ts +3 -4
  28. package/dist/index-CIaav54n.js +57 -0
  29. package/dist/{lodash-DpoPPi_j.js → lodash-dGfuW9fw.js} +343 -326
  30. package/dist/{Main-YQ5f-v03.js → main-CUI7RdvY.js} +1531 -1501
  31. package/dist/router/shared.d.ts +1 -4
  32. package/dist/{index-CicR1-Jp.js → rule-BLgeh_ly.js} +2672 -2721
  33. package/dist/stores/employee.d.ts +4 -4
  34. package/dist/stores/role.d.ts +4 -4
  35. package/dist/stores/timesheet.d.ts +19 -19
  36. package/dist/{timesheet-BRQvljNj.js → timesheet-BFrZzS2q.js} +14 -14
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/types/permission.d.ts +4 -1
  39. package/dist/types/team.d.ts +3 -13
  40. package/dist/useAppStore-DViQe2C8.js +93 -0
  41. package/dist/useLoading-DAoKseT-.js +141 -0
  42. package/dist/{useRestaurantMap-D5BNPLKh.js → useRestaurantMap-CpS9-OSq.js} +7 -7
  43. package/dist/{SelectFilter-NbXrJ4iH.js → useSearch-C25VELOk.js} +101 -90
  44. package/dist/views/hr/employee/{EmployeeForm.vue.d.ts → components/EmployeeForm.vue.d.ts} +7 -10
  45. package/dist/views/team/{member → components}/AddMemberForm.vue.d.ts +0 -1
  46. package/dist/views/team/components/PortalPermissionEditor.vue.d.ts +28 -68
  47. package/dist/views/team/components/TeamMemberBasePermission.vue.d.ts +36 -0
  48. package/dist/views/team/components/{ConditionPermission.vue.d.ts → TeamMemberConditionPermission.vue.d.ts} +1 -14
  49. package/dist/views/team/components/TeamMemberMasterUser.vue.d.ts +718 -0
  50. package/dist/views/team/components/{PosRolePermission.vue.d.ts → TeamMemberRolePermission.vue.d.ts} +1 -14
  51. package/dist/views/team/locales/index.d.ts +4 -176
  52. package/package.json +8 -13
  53. package/dist/AuditLogList-CjrocQS2.js +0 -316
  54. package/dist/Main-HzplGv-e.js +0 -85
  55. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-xQ4fjIxa.js +0 -3050
  56. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +0 -38
  57. package/dist/RolePermissionList-BzwpQFeO.js +0 -285
  58. package/dist/TeamMemberList-D2Xey_w9.js +0 -949
  59. package/dist/api/audit-log/index.d.ts +0 -10
  60. package/dist/api/permission-assignment/index.d.ts +0 -10
  61. package/dist/api/permission-set/index.d.ts +0 -8
  62. package/dist/app-DUs516v0.js +0 -2592
  63. package/dist/dayjs.min-DVb8OkTL.js +0 -282
  64. package/dist/employee-jH7EJnhi.js +0 -172
  65. package/dist/helpers/permission-set.d.ts +0 -32
  66. package/dist/helpers/portal-user.d.ts +0 -8
  67. package/dist/stores/permission-assignment.d.ts +0 -277
  68. package/dist/stores/permission-set.d.ts +0 -250
  69. package/dist/stores/team.d.ts +0 -288
  70. package/dist/team-CiZSNUQW.js +0 -26
  71. package/dist/types/audit-log.d.ts +0 -19
  72. package/dist/types/permission-assignment.d.ts +0 -20
  73. package/dist/types/permission-set.d.ts +0 -20
  74. package/dist/useAppStore-RzLLN5d9.js +0 -180
  75. package/dist/useLoading-1OqFn86y.js +0 -99
  76. package/dist/useSearch-B6WK1LBB.js +0 -15
  77. package/dist/views/audit-log/locales/index.d.ts +0 -211
  78. package/dist/views/team/Main.vue.d.ts +0 -2
  79. package/dist/views/team/components/BasePermission.vue.d.ts +0 -64
  80. package/dist/views/team/components/InheritPermissionTooltip.vue.d.ts +0 -14
  81. package/dist/views/team/components/PermissionWithTooltip.vue.d.ts +0 -14
  82. package/dist/views/team/member/TeamMemberList.vue.d.ts +0 -4
  83. package/dist/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -55
  84. package/dist/views/team/role/RolePermissionForm.vue.d.ts +0 -19
  85. package/dist/views/team/role/RolePermissionList.vue.d.ts +0 -5
  86. /package/dist/views/{audit-log/AuditLogList.vue.d.ts → hr/main.vue.d.ts} +0 -0
  87. /package/dist/views/{hr/Main.vue.d.ts → team/TeamMemberList.vue.d.ts} +0 -0
  88. /package/dist/views/team/{member → components}/MemberInfo.vue.d.ts +0 -0
@@ -1,13 +1,11 @@
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";
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 C, 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-DSGaYrd4.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-CrML_LtM.js";
6
+ import { u as ke, _ as Ce } from "./useLoading-DAoKseT-.js";
7
+ import { n as Ve, o as Fe, s as Ye } from "./rule-BLgeh_ly.js";
8
+ import { u as Le } from "./timesheet-BFrZzS2q.js";
11
9
  function Me(x, a) {
12
10
  return ["years", "months"].find((S) => {
13
11
  const k = x.startOf(S), f = x.endOf(S);
@@ -18,7 +16,7 @@ function Te() {
18
16
  const x = {
19
17
  startDate: v().format("YYYY-MM-DD"),
20
18
  endDate: v().format("YYYY-MM-DD")
21
- }, a = d(x), C = b(() => {
19
+ }, a = d(x), V = b(() => {
22
20
  if (!a.value) return "No dates selected.";
23
21
  const f = a.value.startDate ?? "Start", _ = a.value.endDate ?? "End";
24
22
  return `${f} - ${_}`;
@@ -33,7 +31,7 @@ function Te() {
33
31
  endDate: F(c).endOf(h).format("YYYY-MM-DD")
34
32
  };
35
33
  }
36
- return { dateRange: a, parsedDateRange: S, dateRangeLabel: C, setRange: k };
34
+ return { dateRange: a, parsedDateRange: S, dateRangeLabel: V, setRange: k };
37
35
  }
38
36
  const Re = {
39
37
  class: "my-16 flex w-[350px] flex-col gap-40"
@@ -60,20 +58,20 @@ const Re = {
60
58
  }, Pe = {
61
59
  key: 0,
62
60
  class: "fm-typo-body-sm-400 text-fm-color-typo-error mt-1 flex items-center gap-4"
63
- }, je = {
64
- class: "flex items-center justify-start gap-8"
65
61
  }, He = {
62
+ class: "flex items-center justify-start gap-8"
63
+ }, je = {
66
64
  class: "space-y-8"
67
65
  }, Ge = {
68
66
  class: "flex items-start gap-8 flex-wrap xs:px-16"
69
67
  }, qe = {
70
68
  class: "flex items-center gap-8"
71
- }, nt = /* @__PURE__ */ ce({
69
+ }, st = /* @__PURE__ */ ce({
72
70
  __name: "TimesheetList",
73
71
  setup(x) {
74
72
  const {
75
73
  t: a
76
- } = we(), C = _e(), S = ke(C), k = [{
74
+ } = ye(), V = De(), S = ke(V), k = [{
77
75
  label: a("hr.timesheet.listView"),
78
76
  value: "listView"
79
77
  }, {
@@ -82,7 +80,7 @@ const Re = {
82
80
  }], f = d("listView"), _ = b(() => {
83
81
  var t;
84
82
  return (t = k.find((e) => e.value === f.value)) == null ? void 0 : t.label;
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) => {
83
+ }), 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) => {
86
84
  var y;
87
85
  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);
88
86
  return {
@@ -96,7 +94,7 @@ const Re = {
96
94
  })), P = b(() => g.value.filter((t) => {
97
95
  var e, s;
98
96
  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()));
99
- })), j = b(() => {
97
+ })), H = b(() => {
100
98
  const t = Ve(g.value, (s) => s.user.name), e = Object.entries(t).map(([s, r]) => {
101
99
  const w = F.value.find((y) => y._id === r[0].user.id);
102
100
  return {
@@ -104,13 +102,13 @@ const Re = {
104
102
  user: r[0].user.name,
105
103
  code: w ? w.code : "",
106
104
  timesheets: r,
107
- total: Ce(r.reduce((y, p) => y + p.totalMin, 0))
105
+ total: Fe(r.reduce((y, p) => y + p.totalMin, 0))
108
106
  };
109
107
  });
110
- return Fe(e, {
108
+ return Ye(e, {
111
109
  selector: "user"
112
110
  });
113
- }), H = b(() => j.value.filter((t) => {
111
+ }), j = b(() => H.value.filter((t) => {
114
112
  var e;
115
113
  return t.user.toLowerCase().includes(c.value.toLowerCase()) || ((e = t.code) == null ? void 0 : e.toLowerCase().includes(c.value.toLowerCase()));
116
114
  })), Y = d(!1), N = async () => {
@@ -120,9 +118,9 @@ const Re = {
120
118
  } = L.value;
121
119
  Y.value = !0;
122
120
  try {
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)));
121
+ await h.readTimesheet(new Date(t), new Date(e)), await ge(), U.value = Object.fromEntries(Object.entries(new Array(H.value.length).fill(!0)));
124
122
  } catch (s) {
125
- C.open({
123
+ V.open({
126
124
  title: s instanceof Error ? s.message : `${s}`,
127
125
  type: "error"
128
126
  });
@@ -133,7 +131,7 @@ const Re = {
133
131
  me(() => {
134
132
  N();
135
133
  });
136
- const ee = ye(), E = d(), {
134
+ const ee = be(), E = d(), {
137
135
  dateRange: L,
138
136
  dateRangeLabel: te,
139
137
  setRange: G
@@ -191,13 +189,14 @@ const Re = {
191
189
  const s = t.row.getIsExpanded();
192
190
  return l("div", {
193
191
  class: "flex items-center gap-8"
194
- }, [l(De.FmButton, {
195
- variant: "tertiary",
196
- icon: s ? "keyboard_arrow_up" : "keyboard_arrow_down",
197
- "on-click": (r) => {
192
+ }, [l("div", {
193
+ onClick: (r) => {
198
194
  r.stopPropagation(), t.row.getToggleExpandedHandler()(r);
199
195
  }
200
- }, null), e.user]);
196
+ }, [l(xe.FmButton, {
197
+ variant: "tertiary",
198
+ icon: s ? "keyboard_arrow_up" : "keyboard_arrow_down"
199
+ }, null)]), e.user]);
201
200
  }
202
201
  },
203
202
  enableSorting: !1
@@ -254,7 +253,7 @@ const Re = {
254
253
  "dismiss-away": "",
255
254
  header: n(a)("hr.timesheet.update.title")
256
255
  }, {
257
- "side-sheet-footer": V(() => [u("div", je, [l(p, {
256
+ "side-sheet-footer": C(() => [u("div", He, [l(p, {
258
257
  label: n(a)("common.update"),
259
258
  size: "md",
260
259
  variant: "primary",
@@ -265,7 +264,7 @@ const Re = {
265
264
  variant: "secondary",
266
265
  onClick: e[4] || (e[4] = (o) => M.value = !1)
267
266
  }, null, 8, ["label"])])]),
268
- default: V(() => [u("div", Re, [u("div", Ie, [l(s, {
267
+ default: C(() => [u("div", Re, [u("div", Ie, [l(s, {
269
268
  initials: m.value.user.name,
270
269
  size: "lg"
271
270
  }, null, 8, ["initials"]), u("div", Oe, [u("div", $e, $(n(a)("hr.timesheet.employeeName")), 1), u("div", Ae, $(m.value.user.name), 1)])]), u("div", Ee, [u("div", Ke, $(n(a)("hr.timesheet.update.checkIn")), 1), u("div", ze, [l(r, {
@@ -290,9 +289,9 @@ const Re = {
290
289
  color: "#FF3B30",
291
290
  name: "error",
292
291
  size: "sm"
293
- }), ve(" " + $(K.value), 1)])) : pe("", !0)])]),
292
+ }), pe(" " + $(K.value), 1)])) : ve("", !0)])]),
294
293
  _: 1
295
- }, 8, ["modelValue", "header"]), u("div", He, [u("div", Ge, [l(n(be), {
294
+ }, 8, ["modelValue", "header"]), u("div", je, [u("div", Ge, [l(n(_e), {
296
295
  modelValue: E.value,
297
296
  "onUpdate:modelValue": e[6] || (e[6] = (o) => E.value = o),
298
297
  "managable-only": "",
@@ -304,7 +303,7 @@ const Re = {
304
303
  "onUpdate:modelValue": e[7] || (e[7] = (o) => fe(L) ? L.value = o : null),
305
304
  "show-predefined-range": ""
306
305
  }, {
307
- "trigger-button": V(() => [l(Q, {
306
+ "trigger-button": C(() => [l(Q, {
308
307
  label: n(te)
309
308
  }, null, 8, ["label"])]),
310
309
  _: 1
@@ -319,11 +318,11 @@ const Re = {
319
318
  })]), l(ue, {
320
319
  class: "pt-[3px]"
321
320
  }, {
322
- "menu-button": V(() => [l(Q, {
321
+ "menu-button": C(() => [l(Q, {
323
322
  label: _.value,
324
323
  "right-icon": "keyboard_arrow_down"
325
324
  }, null, 8, ["label"])]),
326
- default: V(() => [(D(), B(Z, null, he(k, (o) => l(re, {
325
+ default: C(() => [(D(), B(Z, null, he(k, (o) => l(re, {
327
326
  key: o.value,
328
327
  label: o.label,
329
328
  onClick: (Je) => f.value = o.value
@@ -334,15 +333,15 @@ const Re = {
334
333
  "onUpdate:modelValue": e[10] || (e[10] = (o) => c.value = o),
335
334
  class: "w-[320px]",
336
335
  placeholder: n(a)("hr.timesheet.search.placeholder")
337
- }, null, 8, ["modelValue", "placeholder"])]), g.value.length === 0 && !Y.value ? (D(), z(n(Se), {
336
+ }, null, 8, ["modelValue", "placeholder"])]), g.value.length === 0 && !Y.value ? (D(), z(n(Ce), {
338
337
  key: 0,
339
338
  title: n(a)("hr.timesheet.noData.title"),
340
339
  subtitle: ""
341
- }, null, 8, ["title"])) : (D(), z(xe, {
340
+ }, null, 8, ["title"])) : (D(), z(Se, {
342
341
  key: 1,
343
342
  class: "w-full xs:px-16 overflow-auto"
344
343
  }, {
345
- default: V(() => [f.value === "listView" ? (D(), z(W, {
344
+ default: C(() => [f.value === "listView" ? (D(), z(W, {
346
345
  key: 0,
347
346
  class: "min-w-[640px]",
348
347
  "column-defs": ae,
@@ -357,8 +356,8 @@ const Re = {
357
356
  key: 1,
358
357
  class: "min-w-[640px]",
359
358
  "column-defs": oe,
360
- "row-data": H.value,
361
- "page-size": g.value.length + H.value.length,
359
+ "row-data": j.value,
360
+ "page-size": g.value.length + j.value.length,
362
361
  loading: Y.value,
363
362
  "pin-header-row": "",
364
363
  "hide-footer": "",
@@ -374,5 +373,5 @@ const Re = {
374
373
  }
375
374
  });
376
375
  export {
377
- nt as default
376
+ st as default
378
377
  };
@@ -1,9 +1,5 @@
1
- import { type IFdtoPortalPermission } from '@/types/permission';
2
1
  import type { FTeamMember, IFdtoCreatePortalUserReq, IFdtoUpdatePortalUserReq } from '@/types/team';
3
- export type IFdtoPortalPermissionWithCategory = IFdtoPortalPermission & {
4
- category: string;
5
- };
6
- export declare const portalTeamPermissions: IFdtoPortalPermissionWithCategory[];
2
+ export declare const portalTeamPermissions: readonly import("@feedmepos/mf-common").IFdtoPortalPermission[];
7
3
  export declare const teamApi: {
8
4
  readTeamMembers(): Promise<FTeamMember[]>;
9
5
  createTeamMember(req: IFdtoCreatePortalUserReq): Promise<FTeamMember>;