@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
@@ -0,0 +1,122 @@
1
+ import { defineComponent as F, computed as n, ref as y, watch as S, resolveComponent as f, createBlock as m, openBlock as p, withCtx as _, createElementVNode as b, createVNode as B, createCommentVNode as T, normalizeClass as G, toDisplayString as q, resolveDynamicComponent as x } from "vue";
2
+ import { useRoute as E, useRouter as $ } from "vue-router";
3
+ import { useI18n as I, useCoreStore as z } from "@feedmepos/mf-common";
4
+ import { useSnackbar as M } from "@feedmepos/ui-library";
5
+ import { _ as j } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
6
+ import { _ as H } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
7
+ import { u as J } from "./restaurant-YOVMuuFY.js";
8
+ import { u as K } from "./role-CzXchcSS.js";
9
+ import { u as Q } from "./grant-user-CQZaTzVt.js";
10
+ import { u as W } from "./approval-code-Q4666xp5.js";
11
+ import { R as u } from "./app-BZwE2coe.js";
12
+ const X = { class: "space-y-24" }, ie = /* @__PURE__ */ F({
13
+ __name: "Main",
14
+ setup(Y) {
15
+ const { t: a } = I(), l = E(), d = $(), V = M(), { sessionUser: h, currentBusiness: A } = z(), { readRestaurants: P } = J(), { readRoles: L } = K(), { readGrantUsers: O } = Q(), { readApprovalCodes: k } = W(), o = n(() => {
16
+ var t;
17
+ return !!((t = h.value) != null && t.role.isAdmin);
18
+ }), R = y(), g = y(), s = n({
19
+ get: () => l.name === u.POS_GRANT ? "grants" : "codes",
20
+ set: (t) => {
21
+ d.push({
22
+ name: t === "grants" ? u.POS_GRANT : u.APPROVAL_CODE,
23
+ query: d.currentRoute.value.query
24
+ });
25
+ }
26
+ }), v = n(() => {
27
+ const t = [];
28
+ return o.value && t.push({
29
+ label: a("posAccess.tabs.grants"),
30
+ subTitle: a("posAccess.tabs.grantsDescription"),
31
+ value: "grants",
32
+ createButtonLabel: a("grantUser.actions.create"),
33
+ createButtonAction: () => {
34
+ var e;
35
+ return (e = g.value) == null ? void 0 : e.create();
36
+ }
37
+ }), t.push({
38
+ label: a("posAccess.tabs.codes"),
39
+ subTitle: a("posAccess.tabs.codesDescription"),
40
+ value: "codes",
41
+ createButtonLabel: a("approvalCode.actions.create"),
42
+ createButtonAction: () => {
43
+ var e;
44
+ return (e = R.value) == null ? void 0 : e.create();
45
+ }
46
+ }), t;
47
+ }), c = n(
48
+ () => v.value.find((t) => t.value === s.value) ?? v.value[0]
49
+ ), N = n(() => o.value ? a("posAccess.title") : a("approvalCode.title"));
50
+ return S(
51
+ [o, () => l.name],
52
+ () => {
53
+ !o.value && l.name === u.POS_GRANT && d.replace({ name: u.APPROVAL_CODE, query: l.query });
54
+ },
55
+ { immediate: !0 }
56
+ ), S(
57
+ [A, o],
58
+ async () => {
59
+ var t;
60
+ if ((t = A.value) != null && t._id)
61
+ try {
62
+ const e = [P(), k()];
63
+ o.value && e.push(L(), O()), await Promise.all(e);
64
+ } catch (e) {
65
+ console.error("Failed to load POS access dependencies:", e), V.open({
66
+ message: e instanceof Error ? e.message : String(e),
67
+ type: "error"
68
+ });
69
+ }
70
+ },
71
+ { immediate: !0 }
72
+ ), (t, e) => {
73
+ const D = f("FmSpacer"), U = f("FmTabs"), w = f("RouterView");
74
+ return p(), m(H, { heading: N.value }, {
75
+ "append-heading": _(() => {
76
+ var r;
77
+ return [
78
+ B(D),
79
+ (r = c.value) != null && r.createButtonLabel ? (p(), m(j, {
80
+ key: 0,
81
+ icon: "add",
82
+ label: c.value.createButtonLabel,
83
+ onClick: e[0] || (e[0] = (i) => c.value.createButtonAction())
84
+ }, null, 8, ["label"])) : T("", !0)
85
+ ];
86
+ }),
87
+ default: _(() => {
88
+ var r;
89
+ return [
90
+ b("div", X, [
91
+ b("div", null, [
92
+ o.value ? (p(), m(U, {
93
+ key: 0,
94
+ modelValue: s.value,
95
+ "onUpdate:modelValue": e[1] || (e[1] = (i) => s.value = i),
96
+ items: v.value
97
+ }, null, 8, ["modelValue", "items"])) : T("", !0),
98
+ b("p", {
99
+ class: G(["text-fm-color-typo-secondary", { "mt-8": o.value }])
100
+ }, q((r = c.value) == null ? void 0 : r.subTitle), 3)
101
+ ]),
102
+ B(w, null, {
103
+ default: _(({ Component: i }) => [
104
+ (p(), m(x(i), {
105
+ ref: (C) => {
106
+ s.value === "codes" && (R.value = C), s.value === "grants" && (g.value = C);
107
+ }
108
+ }, null, 512))
109
+ ]),
110
+ _: 1
111
+ })
112
+ ])
113
+ ];
114
+ }),
115
+ _: 1
116
+ }, 8, ["heading"]);
117
+ };
118
+ }
119
+ });
120
+ export {
121
+ ie as default
122
+ };
@@ -3,15 +3,17 @@ import { useRouter as N, useRoute as h } from "vue-router";
3
3
  import { useI18n as k } from "@feedmepos/mf-common";
4
4
  import { _ as x } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
5
5
  import { _ as F } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
- import { u as w } from "./iteration-Dj50K6I7.js";
6
+ import { u as w } from "./restaurant-YOVMuuFY.js";
7
7
  import "@feedmepos/ui-library";
8
- import "./rule-BJ-o-PKi.js";
9
- import "./lodash-DLReQyP0.js";
10
- import "./useAppStore-CHkGWiai.js";
11
- import { R as v } from "./app-BW91YDke.js";
8
+ import "./rule-BO6xj2Xa.js";
9
+ import "./lodash-CUIS1iIz.js";
10
+ import "./iteration-BCbIbdHR.js";
11
+ import "./useAppStore-DNTlIeMv.js";
12
+ import { R as v } from "./app-BZwE2coe.js";
13
+ import "./role-CzXchcSS.js";
12
14
  /* empty css */
13
- import "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_79737e32_lang-DbPzVpnG.js";
14
- const $ = { class: "space-y-24" }, X = /* @__PURE__ */ M({
15
+ import "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js";
16
+ const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
15
17
  __name: "Main",
16
18
  setup(q) {
17
19
  const { t: o } = k(), b = N(), B = h(), { readRestaurants: T } = w(), _ = R(), f = R(), a = s({
@@ -90,5 +92,5 @@ const $ = { class: "space-y-24" }, X = /* @__PURE__ */ M({
90
92
  }
91
93
  });
92
94
  export {
93
- X as default
95
+ Z as default
94
96
  };
@@ -1,14 +1,15 @@
1
1
  import { defineComponent as Z, ref as f, computed as h, watch as ue, resolveComponent as _, createBlock as de, openBlock as ee, unref as r, withCtx as C, createVNode as m, createElementVNode as y, toDisplayString as G, nextTick as pe, onMounted as fe, createElementBlock as ve, Fragment as Se, h as S } from "vue";
2
2
  import { useI18n as se, useCoreStore as he } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as oe, useDialog as te, useBreakpoints as ne, components as H } from "@feedmepos/ui-library";
4
- import { v as Q, _ as _e } from "./app-BW91YDke.js";
5
- import { _ as be } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js";
4
+ import { v as Q, _ as _e } from "./app-BZwE2coe.js";
5
+ import { _ as be } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
6
6
  import { u as ge, _ as Pe } from "./useDiscardConfirm-DPhEV6v0.js";
7
- import { u as ie, c as M, i as ae, p as Y, j as ye, d as we, m as L, n as xe, o as Fe, s as ke, q as Ce, w as Ie } from "./rule-BJ-o-PKi.js";
8
- import { l as j } from "./lodash-DLReQyP0.js";
9
- import { d as Re, A as Ve } from "./iteration-Dj50K6I7.js";
10
- import { u as Ee } from "./useLoading-B89K5XKO.js";
11
- import { _ as je } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DddOxcG_.js";
7
+ import { u as ie, c as M, i as ae, p as Y, j as ye, d as we, m as L, o as xe, q as Fe, s as ke, n as Ce, w as Ie } from "./rule-BO6xj2Xa.js";
8
+ import { l as j } from "./lodash-CUIS1iIz.js";
9
+ import { c as Re } from "./iteration-BCbIbdHR.js";
10
+ import { u as Ve } from "./useLoading-BH02lYns.js";
11
+ import { _ as Ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-D0luaKDb.js";
12
+ import { A as je } from "./restaurant-YOVMuuFY.js";
12
13
  const Te = { class: "flex w-full items-center justify-between" }, $e = { class: "fm-typo-en-title-md-600" }, Be = { class: "fm-typo-en-title-sm-600 mt-24" }, Le = { class: "flex items-center justify-start gap-8" }, Ae = /* @__PURE__ */ Z({
13
14
  __name: "PermissionSetForm",
14
15
  props: {
@@ -21,7 +22,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
21
22
  const o = K, { t: i } = se(), v = f(!1), T = h(() => {
22
23
  var e;
23
24
  return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
24
- }), I = f(), D = oe(), w = te(), { breakpoints: R } = ne(), V = Ee(D), l = ie(), d = f({ ...o.modelValue }), a = f([]), p = f([]), $ = [(e) => !!e || i("permissionSet.form.nameRequired")], q = h(() => {
25
+ }), I = f(), D = oe(), w = te(), { breakpoints: R } = ne(), V = Ve(D), l = ie(), d = f({ ...o.modelValue }), a = f([]), p = f([]), $ = [(e) => !!e || i("permissionSet.form.nameRequired")], q = h(() => {
25
26
  var e;
26
27
  return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
27
28
  }), N = h(
@@ -199,7 +200,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
199
200
  "onUpdate:modelValue": le
200
201
  }, null, 8, ["model-value", "items", "label", "placeholder"]),
201
202
  y("div", Be, G(r(i)("team.memberForm.permissions.title")), 1),
202
- m(je, {
203
+ m(Ee, {
203
204
  modelValue: p.value,
204
205
  "onUpdate:modelValue": s[1] || (s[1] = (W) => p.value = W),
205
206
  "inherit-permissions": E.value,
@@ -213,7 +214,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
213
214
  }, 8, ["model-value", "onOn:clickedAway"]);
214
215
  };
215
216
  }
216
- }), De = { class: "space-y-8" }, qe = { class: "flex justify-end xs:px-16" }, Ne = { class: "flex flex-col h-full overflow-auto" }, Ye = /* @__PURE__ */ Z({
217
+ }), De = { class: "space-y-8" }, qe = { class: "flex justify-end xs:px-16" }, Ne = { class: "flex flex-col h-full overflow-auto" }, Ze = /* @__PURE__ */ Z({
217
218
  __name: "PermissionSetList",
218
219
  setup(K, { expose: A }) {
219
220
  const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: v } = ae(), T = oe(), I = te(), { breakpoints: D } = ne(), w = f(""), R = h(() => {
@@ -324,7 +325,7 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
324
325
  type: "success"
325
326
  });
326
327
  } catch (t) {
327
- const c = t instanceof Ve && t.status === 409 ? t.message.includes("referenced by") ? o("permissionSet.form.delete.setReferencedConflictError", {
328
+ const c = t instanceof je && t.status === 409 ? t.message.includes("referenced by") ? o("permissionSet.form.delete.setReferencedConflictError", {
328
329
  permissionSetName: n.name
329
330
  }) : o("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : t instanceof Error ? t.message : `${t}`;
330
331
  T.open({ message: c, type: "error" });
@@ -388,5 +389,5 @@ const Te = { class: "flex w-full items-center justify-between" }, $e = { class:
388
389
  }
389
390
  });
390
391
  export {
391
- Ye as default
392
+ Ze as default
392
393
  };