@feedmepos/mf-hrm-portal 2.0.6-dev → 2.0.6-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 (50) hide show
  1. package/dist/{AuditLogList-BxigxQv3.js → AuditLogList-C23_MiyK.js} +31 -30
  2. package/dist/{EmployeeList-DyvqwZtw.js → EmployeeList-vXPEVqoh.js} +164 -169
  3. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js +71 -0
  4. package/dist/HorizontalSplitter-o860F4xM.js +12 -0
  5. package/dist/Main-CQWe1-SW.js +599 -0
  6. package/dist/{Main-B8tSMq-U.js → Main-DC9H9bAs.js} +11 -10
  7. package/dist/{Main-CtH5MCty.js → Main-k56Iy_zg.js} +8 -7
  8. package/dist/PermissionSetList-B8tJCNpR.js +338 -0
  9. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BPJpVG8_.js +3356 -0
  10. package/dist/{RoleList-jykDD_zm.js → RoleList-C5WA3Kxu.js} +26 -24
  11. package/dist/TeamMemberList-Ic-iWBHd.js +989 -0
  12. package/dist/{TimesheetList-Bk1XF9xy.js → TimesheetList-DlGpcOUp.js} +11 -10
  13. package/dist/{app-BPlaahxK.js → app-D0xH_99A.js} +1310 -937
  14. package/dist/app.js +2 -2
  15. package/dist/{dayjs.min-LweNOSZ_.js → dayjs.min-C1rTVn8X.js} +1 -1
  16. package/dist/{employee-DPfiL6rd.js → employee-BK4sYiRy.js} +21 -20
  17. package/dist/index-C2ubYSVV.js +968 -0
  18. package/dist/{index-BAhsHYNv.js → index-DSAB4vz3.js} +1 -1
  19. package/dist/{index-CBxn7cxI.js → iteration-BSGKcAZm.js} +3416 -4256
  20. package/dist/{lodash-D1uG3PY3.js → lodash-CeTePH4O.js} +1 -1
  21. package/dist/src/api/grant-user/index.d.ts +8 -0
  22. package/dist/src/api/index.d.ts +3 -1
  23. package/dist/src/api/permission-assignment/index.d.ts +3 -0
  24. package/dist/src/api/report-query/index.d.ts +1 -0
  25. package/dist/src/composables/useCustomReportPermissions.d.ts +7 -0
  26. package/dist/src/helpers/permission-set.d.ts +32 -1
  27. package/dist/src/helpers/permission-set.test.d.ts +1 -0
  28. package/dist/src/helpers/rule.d.ts +4 -1
  29. package/dist/src/router/shared.d.ts +2 -1
  30. package/dist/src/stores/grant-user.d.ts +86 -0
  31. package/dist/src/types/grant-user.d.ts +27 -0
  32. package/dist/src/types/report-query.d.ts +1 -0
  33. package/dist/src/views/grant/GrantUserList.vue.d.ts +17 -0
  34. package/dist/src/views/grant/Main.vue.d.ts +2 -0
  35. package/dist/src/views/grant/components/GrantUserForm.vue.d.ts +17 -0
  36. package/dist/src/views/grant/locales/index.d.ts +232 -0
  37. package/dist/src/views/team/components/BasePermission.vue.d.ts +17 -0
  38. package/dist/{team-B1osnB4U.js → team-B25hRkju.js} +1 -1
  39. package/dist/{timesheet-rte2utJf.js → timesheet-C8oy-bxz.js} +10 -9
  40. package/dist/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/{useAppStore-CqrjwnF_.js → useAppStore-WGnUS7Wm.js} +1 -1
  42. package/dist/{useLoading-B5IjfVEP.js → useLoading-BCi2g_rf.js} +1 -1
  43. package/dist/useReportPermissions--LOfl1e-.js +60 -0
  44. package/dist/useRestaurantMap-e9fQJiLC.js +39 -0
  45. package/package.json +2 -2
  46. package/dist/PermissionSetList-DCONmOgn.js +0 -323
  47. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-07Dsea27.js +0 -3092
  48. package/dist/TeamMemberList-DMrPgF1l.js +0 -973
  49. package/dist/useReportPermissions-C4Q29AQJ.js +0 -65
  50. package/dist/useRestaurantMap-D5BNPLKh.js +0 -107
@@ -1,22 +1,23 @@
1
- import { defineComponent as de, ref as h, computed as k, watch as R, resolveComponent as D, createElementBlock as f, openBlock as m, Fragment as F, createVNode as d, unref as n, withCtx as N, createElementVNode as e, createBlock as $, createCommentVNode as x, toDisplayString as s, renderList as re, createTextVNode as Y } from "vue";
2
- import { d as ce } from "./dayjs.min-LweNOSZ_.js";
1
+ import { defineComponent as de, ref as h, computed as k, watch as R, resolveComponent as D, createElementBlock as f, openBlock as m, Fragment as A, createVNode as d, unref as n, withCtx as N, createElementVNode as e, createBlock as $, createCommentVNode as x, toDisplayString as s, renderList as re, createTextVNode as Y } from "vue";
2
+ import { d as ce } from "./dayjs.min-C1rTVn8X.js";
3
3
  import { useI18n as ue, useCoreStore as me } from "@feedmepos/mf-common";
4
- import { G, _ as fe } from "./app-BPlaahxK.js";
4
+ import { F as J, _ as fe } from "./app-D0xH_99A.js";
5
5
  import { _ as pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
6
  import { _ as ve } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
7
- import { components as J } from "@feedmepos/ui-library";
8
- import { g as _e, b as ge, p as Z } from "./index-CBxn7cxI.js";
9
- import { u as he } from "./team-B1osnB4U.js";
7
+ import { components as G } from "@feedmepos/ui-library";
8
+ import { g as _e, b as ge } from "./iteration-BSGKcAZm.js";
9
+ import { u as he } from "./team-B25hRkju.js";
10
10
  import { S as U } from "./SelectFilter-DUj7GBtT.js";
11
+ import { p as Z } from "./index-C2ubYSVV.js";
11
12
  const be = "/audit-logs", xe = {
12
13
  async read(i) {
13
- var O, g, L, w;
14
+ var F, g, L, w;
14
15
  const o = {
15
16
  limit: (i == null ? void 0 : i.limit) ?? 100,
16
17
  offset: (i == null ? void 0 : i.offset) ?? 0,
17
18
  ...i != null && i.from ? { from: i.from } : {},
18
19
  ...i != null && i.to ? { to: i.to } : {},
19
- ...(O = i == null ? void 0 : i.userIds) != null && O.length ? { userIds: i.userIds } : {},
20
+ ...(F = i == null ? void 0 : i.userIds) != null && F.length ? { userIds: i.userIds } : {},
20
21
  ...(g = i == null ? void 0 : i.subjects) != null && g.length ? { subjects: i.subjects } : {},
21
22
  ...(L = i == null ? void 0 : i.actions) != null && L.length ? { actions: i.actions } : {},
22
23
  ...(w = i == null ? void 0 : i.outcomes) != null && w.length ? { outcomes: i.outcomes } : {}
@@ -30,7 +31,7 @@ const be = "/audit-logs", xe = {
30
31
  const y = new URLSearchParams();
31
32
  for (const [p, b] of Object.entries(a))
32
33
  if (Array.isArray(b))
33
- for (const A of b) y.append(p, String(A));
34
+ for (const O of b) y.append(p, String(O));
34
35
  else b != null && y.append(p, String(b));
35
36
  return console.log("[AuditLogAPI] serialized query string:", y.toString()), y.toString();
36
37
  }
@@ -63,11 +64,11 @@ const be = "/audit-logs", xe = {
63
64
  class: "rounded-lg border border-fm-color-border-default"
64
65
  }, De = {
65
66
  class: "flex items-start justify-between gap-8 p-12"
66
- }, Oe = {
67
+ }, Fe = {
67
68
  class: "text-base font-bold leading-snug text-fm-color-typo-primary flex-1 min-w-0"
68
- }, Ae = {
69
+ }, Oe = {
69
70
  class: "audit-log-operation-label-detail font-semibold"
70
- }, Fe = {
71
+ }, Ae = {
71
72
  class: "space-y-12 p-12"
72
73
  }, Ne = {
73
74
  class: "text-xs text-fm-color-typo-secondary"
@@ -91,9 +92,9 @@ const be = "/audit-logs", xe = {
91
92
  class: "text-xs text-fm-color-typo-secondary"
92
93
  }, Ye = {
93
94
  class: "font-semibold"
94
- }, Ge = {
95
- key: 1
96
95
  }, Je = {
96
+ key: 1
97
+ }, Ge = {
97
98
  class: "text-xs text-fm-color-typo-secondary"
98
99
  }, Ze = {
99
100
  class: "font-semibold"
@@ -163,14 +164,14 @@ const be = "/audit-logs", xe = {
163
164
  class: "text-xs text-fm-color-typo-secondary"
164
165
  }, Ct = {
165
166
  class: "mt-4 max-h-[400px] overflow-auto rounded bg-gray-100 p-8 font-mono text-xs leading-relaxed shadow-inner"
166
- }, q = 100, Bt = /* @__PURE__ */ de({
167
+ }, q = 100, Et = /* @__PURE__ */ de({
167
168
  __name: "AuditLogList",
168
169
  setup(i) {
169
170
  const {
170
171
  t: o
171
- } = ue(), O = me(), g = he(), L = h(!1), w = h([]), a = h(null), y = h(!1), p = h(1), b = h(!1), A = ce().format("YYYY-MM-DD"), I = h({
172
- startDate: A,
173
- endDate: A
172
+ } = ue(), F = me(), g = he(), L = h(!1), w = h([]), a = h(null), y = h(!1), p = h(1), b = h(!1), O = ce().format("YYYY-MM-DD"), I = h({
173
+ startDate: O,
174
+ endDate: O
174
175
  }), C = h(), P = h(), T = h(), V = h();
175
176
  function H(l) {
176
177
  return typeof l == "string" ? [l] : Array.isArray(l) ? l.filter((t) => typeof t == "string") : [];
@@ -182,7 +183,7 @@ const be = "/audit-logs", xe = {
182
183
  const l = Z.flatMap((c) => H(c.subject).map((_) => ({
183
184
  label: c.label,
184
185
  value: _
185
- }))), t = Object.entries(G).map(([c, _]) => ({
186
+ }))), t = Object.entries(J).map(([c, _]) => ({
186
187
  label: _,
187
188
  value: c
188
189
  })), r = /* @__PURE__ */ new Set(), v = [];
@@ -227,7 +228,7 @@ const be = "/audit-logs", xe = {
227
228
  }), B = k(() => w.value);
228
229
  function z(l) {
229
230
  var t;
230
- return ((t = Z.find((r) => r.subject === l)) == null ? void 0 : t.label) ?? G[l];
231
+ return ((t = Z.find((r) => r.subject === l)) == null ? void 0 : t.label) ?? J[l];
231
232
  }
232
233
  const M = {
233
234
  allowed: "success",
@@ -249,7 +250,7 @@ const be = "/audit-logs", xe = {
249
250
  const t = l.row.original, r = g.userIdToName[t.userId], v = g.userIdToPhone[t.userId], c = g.userIdToEmail[t.userId];
250
251
  return d("div", {
251
252
  class: "flex items-center gap-8"
252
- }, [d(J.FmAvatar, {
253
+ }, [d(G.FmAvatar, {
253
254
  initials: r || t.userId,
254
255
  size: "sm",
255
256
  class: "shrink-0"
@@ -302,7 +303,7 @@ const be = "/audit-logs", xe = {
302
303
  enableSorting: !1,
303
304
  cell(l) {
304
305
  const t = l.row.original;
305
- return d(J.FmChip, {
306
+ return d(G.FmChip, {
306
307
  variant: M[t.outcome] ?? "neutral",
307
308
  label: t.outcome,
308
309
  compact: !0
@@ -366,13 +367,13 @@ const be = "/audit-logs", xe = {
366
367
  function ie() {
367
368
  y.value = !1, a.value = null;
368
369
  }
369
- return R(O.currentBusiness, (l) => {
370
+ return R(F.currentBusiness, (l) => {
370
371
  l && (p.value = 1, g.readTeamMembers(), j());
371
372
  }, {
372
373
  immediate: !0
373
374
  }), (l, t) => {
374
375
  const r = D("FmChip"), v = D("FmDateRangePicker"), c = D("FmTable"), _ = D("FmButton"), E = D("FmSideSheet");
375
- return m(), f(F, null, [d(pe, {
376
+ return m(), f(A, null, [d(pe, {
376
377
  heading: n(o)("auditLog.title")
377
378
  }, {
378
379
  default: N(() => [e("div", ye, [e("div", Le, [d(v, {
@@ -466,19 +467,19 @@ const be = "/audit-logs", xe = {
466
467
  u || ie();
467
468
  })
468
469
  }, {
469
- default: N(() => [a.value ? (m(), f("div", Ve, [e("div", je, [e("div", De, [e("div", Oe, [e("p", Ae, s(a.value.metadata.operationLabel || "-"), 1)]), d(r, {
470
+ default: N(() => [a.value ? (m(), f("div", Ve, [e("div", je, [e("div", De, [e("div", Fe, [e("p", Oe, s(a.value.metadata.operationLabel || "-"), 1)]), d(r, {
470
471
  variant: M[a.value.outcome] ?? "neutral",
471
472
  label: a.value.outcome,
472
473
  compact: ""
473
474
  }, null, 8, ["variant", "label"])]), t[7] || (t[7] = e("hr", {
474
475
  class: "border-fm-color-border-default"
475
- }, null, -1)), e("div", Fe, [e("div", null, [e("p", Ne, s(n(o)("auditLog.detail.timestamp")), 1), e("p", Ue, s(new Date(a.value.timestamp).toLocaleString()), 1)]), n(g).userIdToName[a.value.userId] ? (m(), f("div", Be, [e("p", Ee, s(n(o)("auditLog.detail.user")), 1), e("p", Re, s(n(g).userIdToName[a.value.userId]), 1)])) : x("", !0), e("div", null, [e("p", qe, s(n(o)("auditLog.detail.email")), 1), e("p", ze, s(n(g).userIdToEmail[a.value.userId] || a.value.userId), 1)]), e("div", null, [e("p", Me, s(n(o)("auditLog.detail.action")), 1), e("p", Ke, s(a.value.action), 1)]), e("div", null, [e("p", $e, s(n(o)("auditLog.detail.subject")), 1), e("p", Ye, s(z(a.value.subject) || a.value.subject), 1)]), a.value.field ? (m(), f("div", Ge, [e("p", Je, s(n(o)("auditLog.detail.field")), 1), e("p", Ze, s(a.value.field), 1)])) : x("", !0), e("div", null, [e("p", He, s(n(o)("auditLog.detail.business")), 1), e("p", Qe, s(a.value.businessId || "-"), 1)]), e("div", null, [e("p", We, s(n(o)("auditLog.detail.restaurant")), 1), e("p", Xe, s(a.value.restaurantId || "-"), 1)])])]), e("div", et, [e("div", tt, [e("p", ot, s(n(o)("auditLog.detail.metadata")), 1)]), t[8] || (t[8] = e("hr", {
476
+ }, null, -1)), e("div", Ae, [e("div", null, [e("p", Ne, s(n(o)("auditLog.detail.timestamp")), 1), e("p", Ue, s(new Date(a.value.timestamp).toLocaleString()), 1)]), n(g).userIdToName[a.value.userId] ? (m(), f("div", Be, [e("p", Ee, s(n(o)("auditLog.detail.user")), 1), e("p", Re, s(n(g).userIdToName[a.value.userId]), 1)])) : x("", !0), e("div", null, [e("p", qe, s(n(o)("auditLog.detail.email")), 1), e("p", ze, s(n(g).userIdToEmail[a.value.userId] || a.value.userId), 1)]), e("div", null, [e("p", Me, s(n(o)("auditLog.detail.action")), 1), e("p", Ke, s(a.value.action), 1)]), e("div", null, [e("p", $e, s(n(o)("auditLog.detail.subject")), 1), e("p", Ye, s(z(a.value.subject) || a.value.subject), 1)]), a.value.field ? (m(), f("div", Je, [e("p", Ge, s(n(o)("auditLog.detail.field")), 1), e("p", Ze, s(a.value.field), 1)])) : x("", !0), e("div", null, [e("p", He, s(n(o)("auditLog.detail.business")), 1), e("p", Qe, s(a.value.businessId || "-"), 1)]), e("div", null, [e("p", We, s(n(o)("auditLog.detail.restaurant")), 1), e("p", Xe, s(a.value.restaurantId || "-"), 1)])])]), e("div", et, [e("div", tt, [e("p", ot, s(n(o)("auditLog.detail.metadata")), 1)]), t[8] || (t[8] = e("hr", {
476
477
  class: "border-fm-color-border-default"
477
- }, null, -1)), e("div", at, [a.value.metadata.reason ? (m(), f("div", lt, [e("p", st, s(n(o)("auditLog.detail.reason")), 1), e("p", nt, s(a.value.metadata.reason), 1)])) : x("", !0), e("div", null, [e("p", it, s(n(o)("auditLog.detail.resolvedFrom")), 1), e("p", dt, s(a.value.metadata.resolvedFrom), 1)]), a.value.metadata.permissionSetId ? (m(), f("div", rt, [e("p", ct, s(n(o)("auditLog.detail.permissionSet")), 1), a.value.metadata.resolvedFrom === "systemPermissionSet" ? (m(), f(F, {
478
+ }, null, -1)), e("div", at, [a.value.metadata.reason ? (m(), f("div", lt, [e("p", st, s(n(o)("auditLog.detail.reason")), 1), e("p", nt, s(a.value.metadata.reason), 1)])) : x("", !0), e("div", null, [e("p", it, s(n(o)("auditLog.detail.resolvedFrom")), 1), e("p", dt, s(a.value.metadata.resolvedFrom), 1)]), a.value.metadata.permissionSetId ? (m(), f("div", rt, [e("p", ct, s(n(o)("auditLog.detail.permissionSet")), 1), a.value.metadata.resolvedFrom === "systemPermissionSet" ? (m(), f(A, {
478
479
  key: 0
479
- }, [e("p", ut, s(a.value.metadata.permissionSetName) + " (system)", 1), e("p", mt, s(a.value.metadata.permissionSetId), 1)], 64)) : (m(), f(F, {
480
+ }, [e("p", ut, s(a.value.metadata.permissionSetName) + " (system)", 1), e("p", mt, s(a.value.metadata.permissionSetId), 1)], 64)) : (m(), f(A, {
480
481
  key: 1
481
- }, [e("p", ft, s(a.value.metadata.permissionSetName || a.value.metadata.permissionSetId), 1), a.value.metadata.permissionSetName ? (m(), f("p", pt, s(a.value.metadata.permissionSetId), 1)) : x("", !0)], 64))])) : x("", !0), a.value.metadata.trace && a.value.metadata.trace.length > 0 ? (m(), f("div", vt, [e("p", _t, s(n(o)("auditLog.detail.permissionTrace")), 1), e("ol", gt, [(m(!0), f(F, null, re(a.value.metadata.trace, (u, S) => (m(), f("li", {
482
+ }, [e("p", ft, s(a.value.metadata.permissionSetName || a.value.metadata.permissionSetId), 1), a.value.metadata.permissionSetName ? (m(), f("p", pt, s(a.value.metadata.permissionSetId), 1)) : x("", !0)], 64))])) : x("", !0), a.value.metadata.trace && a.value.metadata.trace.length > 0 ? (m(), f("div", vt, [e("p", _t, s(n(o)("auditLog.detail.permissionTrace")), 1), e("ol", gt, [(m(!0), f(A, null, re(a.value.metadata.trace, (u, S) => (m(), f("li", {
482
483
  key: S,
483
484
  class: "flex items-center gap-6"
484
485
  }, [e("span", ht, s(S + 1), 1), e("span", bt, s(u), 1), S < a.value.metadata.trace.length - 1 ? (m(), f("span", xt, "→")) : x("", !0)]))), 128))])])) : x("", !0), e("div", null, [e("p", yt, s(n(o)("auditLog.detail.requestMethod")), 1), e("p", Lt, s(a.value.metadata.requestMethod), 1)]), e("div", null, [e("p", St, s(n(o)("auditLog.detail.requestPath")), 1), e("p", kt, s(a.value.metadata.requestPath), 1)]), a.value.metadata.requestBody && Object.keys(a.value.metadata.requestBody).length > 0 ? (m(), f("div", wt, [e("p", It, s(n(o)("auditLog.detail.requestBody")), 1), e("pre", Ct, s(JSON.stringify(a.value.metadata.requestBody, null, 2)), 1)])) : x("", !0)])])])) : x("", !0)]),
@@ -488,5 +489,5 @@ const be = "/audit-logs", xe = {
488
489
  }
489
490
  });
490
491
  export {
491
- Bt as default
492
+ Et as default
492
493
  };