@feedmepos/mf-hrm-portal 2.1.1-dev.2 → 2.1.1-dev.4

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 (50) hide show
  1. package/dist/ApprovalCodeList-B0PLZwav.js +758 -0
  2. package/dist/{AuditLogList-DHiqs9G0.js → AuditLogList-CRXwPImZ.js} +5 -5
  3. package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-CWqNWNdD.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-zJwkM_Xb.js} +2 -2
  4. package/dist/{EmployeeList-CUd3VH5h.js → EmployeeList-DN2pnXcS.js} +7 -7
  5. package/dist/GrantUserList-DoyxknJZ.js +464 -0
  6. package/dist/{Main-DgemO-iy.js → Main-B5BKGpLg.js} +13 -11
  7. package/dist/Main-BGONIxo8.js +122 -0
  8. package/dist/{Main-B_L5flWT.js → Main-DQj4xtkB.js} +10 -8
  9. package/dist/{PermissionSetList-BaC4lKV5.js → PermissionSetList-4uIU9FvN.js} +13 -12
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-D0luaKDb.js +4122 -0
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_79737e32_lang-DbPzVpnG.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js} +1 -1
  12. package/dist/{RoleList-CThb6VEd.js → RoleList-Bj5Y5jd_.js} +12 -11
  13. package/dist/TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js +37 -0
  14. package/dist/TeamMemberList-Byjlca2Y.js +1216 -0
  15. package/dist/{TimesheetList-C_IMtsTH.js → TimesheetList-DwIcsOM-.js} +47 -46
  16. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-DGwteHIL.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-B9qlQ6KG.js} +14 -13
  17. package/dist/{app-BW91YDke.js → app-BZwE2coe.js} +2512 -2035
  18. package/dist/app.js +1 -1
  19. package/dist/approval-code-Q4666xp5.js +58 -0
  20. package/dist/{dayjs.min-DwQTpnVK.js → dayjs.min-BXBPls4m.js} +1 -1
  21. package/dist/{employee-yM0kdY70.js → employee-CJTbs1f7.js} +27 -26
  22. package/dist/grant-user-CQZaTzVt.js +67 -0
  23. package/dist/{TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js → index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js} +19 -50
  24. package/dist/iteration-BCbIbdHR.js +7682 -0
  25. package/dist/{lodash-DLReQyP0.js → lodash-CUIS1iIz.js} +1 -1
  26. package/dist/restaurant-YOVMuuFY.js +1876 -0
  27. package/dist/role-CzXchcSS.js +82 -0
  28. package/dist/{rule-BJ-o-PKi.js → rule-BO6xj2Xa.js} +37 -36
  29. package/dist/src/api/approval-code/index.d.ts +7 -0
  30. package/dist/src/router/shared.d.ts +3 -1
  31. package/dist/src/stores/approval-code.d.ts +140 -0
  32. package/dist/src/types/approval-code.d.ts +114 -0
  33. package/dist/src/views/approval-code/ApprovalCodeList.vue.d.ts +26 -0
  34. package/dist/src/views/approval-code/components/ApprovalCodeCreatedDialog.vue.d.ts +9 -0
  35. package/dist/src/views/approval-code/components/ApprovalCodeForm.vue.d.ts +22 -0
  36. package/dist/src/views/approval-code/locales/index.d.ts +360 -0
  37. package/dist/src/views/pos-access/locales/index.d.ts +48 -0
  38. package/dist/src/views/team/locales/index.d.ts +8 -0
  39. package/dist/style.css +1 -1
  40. package/dist/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/useAppStore-DNTlIeMv.js +93 -0
  42. package/dist/{useLoading-B89K5XKO.js → useLoading-BH02lYns.js} +1 -1
  43. package/dist/{useReportPermissions-Bjfhr6FD.js → useReportPermissions-Q-xLwz5N.js} +3 -3
  44. package/package.json +1 -1
  45. package/dist/Main-DUbLeLlK.js +0 -577
  46. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DddOxcG_.js +0 -4121
  47. package/dist/TeamMemberList-CAw4jr1b.js +0 -1186
  48. package/dist/iteration-Dj50K6I7.js +0 -9556
  49. package/dist/useAppStore-CHkGWiai.js +0 -169
  50. /package/dist/src/views/{grant → pos-access}/Main.vue.d.ts +0 -0
@@ -1,15 +1,16 @@
1
- import { ref as d, computed as g, defineComponent as pe, onMounted as fe, watch as Z, resolveComponent as u, createElementBlock as P, openBlock as E, Fragment as ee, createVNode as l, createElementVNode as i, unref as n, withCtx as b, createCommentVNode as ve, toDisplayString as O, createTextVNode as he, isRef as ge, renderList as we, createBlock as te, nextTick as ye } from "vue";
2
- import { d as v } from "./dayjs.min-DwQTpnVK.js";
1
+ import { ref as d, computed as g, defineComponent as pe, onMounted as fe, watch as Z, resolveComponent as u, createElementBlock as P, openBlock as E, Fragment as ee, createVNode as l, createElementVNode as i, unref as r, withCtx as b, createCommentVNode as ve, toDisplayString as O, createTextVNode as he, isRef as ge, renderList as we, createBlock as te, nextTick as ye } from "vue";
2
+ import { d as v } from "./dayjs.min-BXBPls4m.js";
3
3
  import { useI18n as _e } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as be, components as xe } from "@feedmepos/ui-library";
5
5
  import { S as De, _ as Se } from "./SelectFilter-ATOm0hdn.js";
6
- import { _ as Ve } from "./app-BW91YDke.js";
7
- import { _ as ke } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js";
8
- import { u as Ce } from "./useLoading-B89K5XKO.js";
9
- import { u as Fe, c as Ye, s as Le } from "./iteration-Dj50K6I7.js";
10
- import { f as Me } from "./utils-BZkjJbju.js";
11
- import { u as Te } from "./employee-yM0kdY70.js";
12
- import { u as Re } from "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-DGwteHIL.js";
6
+ import { _ as Ve } from "./app-BZwE2coe.js";
7
+ import { _ as ke } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
8
+ import { u as Ce } from "./useLoading-BH02lYns.js";
9
+ import { g as Fe, s as Ye } from "./iteration-BCbIbdHR.js";
10
+ import { f as Le } from "./utils-BZkjJbju.js";
11
+ import { u as Me } from "./employee-CJTbs1f7.js";
12
+ import { u as Te } from "./restaurant-YOVMuuFY.js";
13
+ import { u as Re } from "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-B9qlQ6KG.js";
13
14
  function Ie(x, a) {
14
15
  return ["years", "months"].find((S) => {
15
16
  const V = x.startOf(S), m = x.endOf(S);
@@ -86,12 +87,12 @@ const Ee = {
86
87
  }], m = d("listView"), _ = g(() => {
87
88
  var t;
88
89
  return (t = V.find((e) => e.value === m.value)) == null ? void 0 : t.label;
89
- }), c = d(""), h = Re(), k = Te(), C = Fe(), F = g(() => k.employees.value), j = g(() => h.timesheets.value.filter((s) => !A.value || A.value.includes(s.restaurantId)).map((s) => {
90
+ }), c = d(""), h = Re(), k = Me(), C = Te(), F = g(() => k.employees.value), j = g(() => h.timesheets.value.filter((s) => !A.value || A.value.includes(s.restaurantId)).map((s) => {
90
91
  var y;
91
- const r = (y = C.restaurants.value.find((f) => f._id === s.restaurantId)) == null ? void 0 : y.profile.code, w = F.value.find((f) => f._id === s.user.id);
92
+ const n = (y = C.restaurants.value.find((f) => f._id === s.restaurantId)) == null ? void 0 : y.profile.code, w = F.value.find((f) => f._id === s.user.id);
92
93
  return {
93
94
  ...s,
94
- restaurantCode: r,
95
+ restaurantCode: n,
95
96
  user: {
96
97
  ...s.user,
97
98
  code: w ? w.code : ""
@@ -101,17 +102,17 @@ const Ee = {
101
102
  var e, s;
102
103
  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()));
103
104
  })), H = g(() => {
104
- const t = Ye(j.value, (s) => s.user.name), e = Object.entries(t).map(([s, r]) => {
105
- const w = F.value.find((y) => y._id === r[0].user.id);
105
+ const t = Fe(j.value, (s) => s.user.name), e = Object.entries(t).map(([s, n]) => {
106
+ const w = F.value.find((y) => y._id === n[0].user.id);
106
107
  return {
107
108
  key: s,
108
- user: r[0].user.name,
109
- code: w ? w.code : r[0].user.code || "",
110
- timesheets: r,
111
- total: Me(r.reduce((y, f) => y + f.totalMin, 0))
109
+ user: n[0].user.name,
110
+ code: w ? w.code : n[0].user.code || "",
111
+ timesheets: n,
112
+ total: Le(n.reduce((y, f) => y + f.totalMin, 0))
112
113
  };
113
114
  });
114
- return Le(e, {
115
+ return Ye(e, {
115
116
  selector: "user"
116
117
  });
117
118
  }), N = g(() => H.value.filter((t) => {
@@ -207,8 +208,8 @@ const Ee = {
207
208
  return l("div", {
208
209
  class: "flex items-center gap-8"
209
210
  }, [l("div", {
210
- onClick: (r) => {
211
- r.stopPropagation(), t.row.getToggleExpandedHandler()(r);
211
+ onClick: (n) => {
212
+ n.stopPropagation(), t.row.getToggleExpandedHandler()(n);
212
213
  }
213
214
  }, [l(xe.FmButton, {
214
215
  variant: "tertiary",
@@ -247,7 +248,7 @@ const Ee = {
247
248
  p.value = t, T.value = v(p.value.startedAt).format("YYYY-MM-DD"), I.value = v(p.value.endedAt || p.value.startedAt).format("YYYY-MM-DD"), R.value = v(p.value.startedAt).format("HH:mm"), $.value = v(p.value.endedAt || p.value.startedAt).format("HH:mm"), M.value = !0;
248
249
  }
249
250
  const T = d(), R = d(), I = d(), $ = d(), p = d(), K = d("");
250
- async function ne() {
251
+ async function re() {
251
252
  const t = J(T.value, R.value), e = J(I.value, $.value);
252
253
  if (v(t).isAfter(e)) {
253
254
  K.value = a("hr.timesheet.checkOutMustBeforeCheckIn");
@@ -260,23 +261,23 @@ const Ee = {
260
261
  }), U(), M.value = !1;
261
262
  }
262
263
  const J = (t, e) => v(t).set("h", parseInt(e.split(":")[0])).set("m", parseInt(e.split(":")[1])).toISOString();
263
- return Z([T, I, R, $], ([t, e, s, r]) => {
264
- (t || e || s || r) && (K.value = "");
264
+ return Z([T, I, R, $], ([t, e, s, n]) => {
265
+ (t || e || s || n) && (K.value = "");
265
266
  }), (t, e) => {
266
- const s = u("FmAvatar"), r = u("FmDatePicker"), w = u("FmTimePicker"), y = u("FmIcon"), f = u("FmButton"), re = u("FmSideSheet"), Q = u("FmChip"), ie = u("FmDateRangePicker"), ue = u("FmMenuItem"), de = u("FmMenu"), ce = u("FmSpacer"), me = u("FmSearch"), W = u("FmTable");
267
- return E(), P(ee, null, [l(re, {
267
+ const s = u("FmAvatar"), n = u("FmDatePicker"), w = u("FmTimePicker"), y = u("FmIcon"), f = u("FmButton"), ne = u("FmSideSheet"), Q = u("FmChip"), ie = u("FmDateRangePicker"), ue = u("FmMenuItem"), de = u("FmMenu"), ce = u("FmSpacer"), me = u("FmSearch"), W = u("FmTable");
268
+ return E(), P(ee, null, [l(ne, {
268
269
  modelValue: M.value,
269
270
  "onUpdate:modelValue": e[5] || (e[5] = (o) => M.value = o),
270
271
  "dismiss-away": "",
271
- header: n(a)("hr.timesheet.update.title")
272
+ header: r(a)("hr.timesheet.update.title")
272
273
  }, {
273
274
  "side-sheet-footer": b(() => [i("div", qe, [l(f, {
274
- label: n(a)("common.update"),
275
+ label: r(a)("common.update"),
275
276
  size: "md",
276
277
  variant: "primary",
277
- onClick: ne
278
+ onClick: re
278
279
  }, null, 8, ["label"]), l(f, {
279
- label: n(a)("common.cancel"),
280
+ label: r(a)("common.cancel"),
280
281
  size: "md",
281
282
  variant: "secondary",
282
283
  onClick: e[4] || (e[4] = (o) => M.value = !1)
@@ -284,24 +285,24 @@ const Ee = {
284
285
  default: b(() => [i("div", Ee, [i("div", Oe, [l(s, {
285
286
  name: p.value.user.name,
286
287
  size: "lg"
287
- }, null, 8, ["name"]), i("div", Ae, [i("div", Ke, O(n(a)("hr.timesheet.employeeName")), 1), i("div", ze, O(p.value.user.name), 1)])]), i("div", Ne, [i("div", Ue, O(n(a)("hr.timesheet.update.checkIn")), 1), i("div", Be, [l(r, {
288
+ }, null, 8, ["name"]), i("div", Ae, [i("div", Ke, O(r(a)("hr.timesheet.employeeName")), 1), i("div", ze, O(p.value.user.name), 1)])]), i("div", Ne, [i("div", Ue, O(r(a)("hr.timesheet.update.checkIn")), 1), i("div", Be, [l(n, {
288
289
  modelValue: T.value,
289
290
  "onUpdate:modelValue": e[0] || (e[0] = (o) => T.value = o),
290
291
  disabled: !1,
291
- label: n(a)("hr.timesheet.update.date")
292
+ label: r(a)("hr.timesheet.update.date")
292
293
  }, null, 8, ["modelValue", "label"]), l(w, {
293
294
  modelValue: R.value,
294
295
  "onUpdate:modelValue": e[1] || (e[1] = (o) => R.value = o),
295
- label: n(a)("hr.timesheet.update.time")
296
- }, null, 8, ["modelValue", "label"])])]), i("div", Pe, [i("div", je, O(n(a)("hr.timesheet.update.checkOut")), 1), i("div", He, [l(r, {
296
+ label: r(a)("hr.timesheet.update.time")
297
+ }, null, 8, ["modelValue", "label"])])]), i("div", Pe, [i("div", je, O(r(a)("hr.timesheet.update.checkOut")), 1), i("div", He, [l(n, {
297
298
  modelValue: I.value,
298
299
  "onUpdate:modelValue": e[2] || (e[2] = (o) => I.value = o),
299
300
  disabled: !1,
300
- label: n(a)("hr.timesheet.update.date")
301
+ label: r(a)("hr.timesheet.update.date")
301
302
  }, null, 8, ["modelValue", "label"]), l(w, {
302
303
  modelValue: $.value,
303
304
  "onUpdate:modelValue": e[3] || (e[3] = (o) => $.value = o),
304
- label: n(a)("hr.timesheet.update.time")
305
+ label: r(a)("hr.timesheet.update.time")
305
306
  }, null, 8, ["modelValue", "label"])])]), K.value ? (E(), P("div", Ge, [l(y, {
306
307
  color: "#FF3B30",
307
308
  name: "error",
@@ -314,26 +315,26 @@ const Ee = {
314
315
  multiple: "",
315
316
  items: ae.value,
316
317
  variant: "dark",
317
- "selected-prefix": n(a)("hr.role.columns.restaurants"),
318
- placeholder: n(a)("hr.role.columns.restaurants"),
318
+ "selected-prefix": r(a)("hr.role.columns.restaurants"),
319
+ placeholder: r(a)("hr.role.columns.restaurants"),
319
320
  class: "!w-auto pt-[3px]"
320
321
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), i("div", We, [l(ie, {
321
- modelValue: n(L),
322
+ modelValue: r(L),
322
323
  "onUpdate:modelValue": e[7] || (e[7] = (o) => ge(L) ? L.value = o : null),
323
324
  "show-predefined-range": ""
324
325
  }, {
325
326
  "trigger-button": b(() => [l(Q, {
326
- label: n(oe)
327
+ label: r(oe)
327
328
  }, null, 8, ["label"])]),
328
329
  _: 1
329
330
  }, 8, ["modelValue"]), l(f, {
330
331
  icon: "chevron_left",
331
332
  variant: "tertiary",
332
- onClick: e[8] || (e[8] = (o) => n(G)("subtract"))
333
+ onClick: e[8] || (e[8] = (o) => r(G)("subtract"))
333
334
  }), l(f, {
334
335
  icon: "chevron_right",
335
336
  variant: "tertiary",
336
- onClick: e[9] || (e[9] = (o) => n(G)("add"))
337
+ onClick: e[9] || (e[9] = (o) => r(G)("add"))
337
338
  })]), l(de, {
338
339
  class: "pt-[3px]"
339
340
  }, {
@@ -351,7 +352,7 @@ const Ee = {
351
352
  modelValue: c.value,
352
353
  "onUpdate:modelValue": e[10] || (e[10] = (o) => c.value = o),
353
354
  class: "w-[320px]",
354
- placeholder: n(a)("hr.timesheet.search.placeholder")
355
+ placeholder: r(a)("hr.timesheet.search.placeholder")
355
356
  }, null, 8, ["modelValue", "placeholder"])]), l(Ve, {
356
357
  class: "w-full xs:px-16"
357
358
  }, {
@@ -359,7 +360,7 @@ const Ee = {
359
360
  "is-loading": Y.value,
360
361
  "is-empty": m.value === "listView" ? z.value.length === 0 : N.value.length === 0,
361
362
  "collapse-at": !1,
362
- title: n(a)("hr.timesheet.noData.title"),
363
+ title: r(a)("hr.timesheet.noData.title"),
363
364
  subtitle: ""
364
365
  }, {
365
366
  default: b(() => [m.value === "listView" ? (E(), te(W, {
@@ -393,7 +394,7 @@ const Ee = {
393
394
  })])], 64);
394
395
  };
395
396
  }
396
- }), mt = /* @__PURE__ */ Se(Ze, [["__scopeId", "data-v-2c7a177a"]]);
397
+ }), pt = /* @__PURE__ */ Se(Ze, [["__scopeId", "data-v-2c7a177a"]]);
397
398
  export {
398
- mt as default
399
+ pt as default
399
400
  };
@@ -1,7 +1,8 @@
1
- import { d as i } from "./dayjs.min-DwQTpnVK.js";
1
+ import { d as i } from "./dayjs.min-BXBPls4m.js";
2
2
  import { defineStore as p, storeToRefs as T } from "pinia";
3
3
  import { ref as l } from "vue";
4
- import { b as c, g as y, s as S } from "./iteration-Dj50K6I7.js";
4
+ import { b as c, g as y } from "./restaurant-YOVMuuFY.js";
5
+ import { s as S } from "./iteration-BCbIbdHR.js";
5
6
  import { i as f, f as g } from "./utils-BZkjJbju.js";
6
7
  const u = {
7
8
  async readTimesheets(t, e) {
@@ -13,10 +14,10 @@ const u = {
13
14
  };
14
15
  function A(t) {
15
16
  const e = t.map((n) => {
16
- const { startedAt: s, endedAt: a } = n, r = i(f(s)), o = a ? i(f(a)) : null, m = (o == null ? void 0 : o.diff(r, "minute", !1)) || 0, h = o ? g(m) : "", d = "YYYY-MM-DD hh:mm a";
17
+ const { startedAt: s, endedAt: r } = n, a = i(f(s)), o = r ? i(f(r)) : null, m = (o == null ? void 0 : o.diff(a, "minute", !1)) || 0, h = o ? g(m) : "", d = "YYYY-MM-DD hh:mm a";
17
18
  return {
18
19
  ...n,
19
- start: r.format(d),
20
+ start: a.format(d),
20
21
  end: o ? o.format(d) : "",
21
22
  totalMin: m,
22
23
  duration: h
@@ -26,18 +27,18 @@ function A(t) {
26
27
  }
27
28
  const D = p("timesheet", () => {
28
29
  const t = l([]);
29
- async function e(s, a) {
30
- const r = await u.readTimesheets(
30
+ async function e(s, r) {
31
+ const a = await u.readTimesheets(
31
32
  i(s).startOf("day").toISOString(),
32
- i(a).endOf("day").toISOString()
33
+ i(r).endOf("day").toISOString()
33
34
  );
34
- t.value = A(r);
35
+ t.value = A(a);
35
36
  }
36
- async function n(s, a, r) {
37
+ async function n(s, r, a) {
37
38
  await u.updateTimesheet(s.restaurantId, {
38
39
  id: s._id,
39
- startAt: a,
40
- endAt: r
40
+ startAt: r,
41
+ endAt: a
41
42
  });
42
43
  }
43
44
  return {
@@ -45,7 +46,7 @@ const D = p("timesheet", () => {
45
46
  readTimesheet: e,
46
47
  updateTimesheet: n
47
48
  };
48
- }), $ = () => {
49
+ }), b = () => {
49
50
  const t = D();
50
51
  return {
51
52
  ...t,
@@ -53,5 +54,5 @@ const D = p("timesheet", () => {
53
54
  };
54
55
  };
55
56
  export {
56
- $ as u
57
+ b as u
57
58
  };