@feedmepos/mf-hrm-portal 2.1.1-dev.3 → 2.1.1-dev.5

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 (32) hide show
  1. package/dist/ApprovalCodeList-CXJyMKEg.js +757 -0
  2. package/dist/{AuditLogList-Q4L5Te8O.js → AuditLogList-CXUkbDyT.js} +3 -3
  3. package/dist/{EmployeeList-GtKmJZbf.js → EmployeeList-BSfUFTcN.js} +4 -4
  4. package/dist/{GrantUserList-CnLjOi5_.js → GrantUserList-DKP4MBQM.js} +175 -182
  5. package/dist/Main-CblWfQk_.js +122 -0
  6. package/dist/{Main-cskEZ3k_.js → Main-CyCfz4ka.js} +9 -9
  7. package/dist/{Main-DLlpEU3j.js → Main-Cz1pfe2k.js} +5 -5
  8. package/dist/{PermissionSetList-C2fK2pTz.js → PermissionSetList-BwyblSeE.js} +5 -5
  9. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CMh0DL1_.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BJ-PZ2Nv.js} +599 -599
  10. package/dist/{RoleList-CcuT1ERb.js → RoleList-CXYgCmHp.js} +6 -6
  11. package/dist/{TeamMemberList-Dfs2iNdC.js → TeamMemberList-CnLbqaPS.js} +6 -6
  12. package/dist/{TimesheetList-B1H_6zfP.js → TimesheetList-s_bP5OGA.js} +5 -5
  13. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-DeTpbaRk.js → TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-BCLv-2Re.js} +2 -2
  14. package/dist/{app-DX-PG6wx.js → app-BP0oihBR.js} +783 -752
  15. package/dist/app.js +1 -1
  16. package/dist/{dayjs.min-BJrHE7oz.js → dayjs.min-BTSZLci9.js} +1 -1
  17. package/dist/{employee-BJcqtqLM.js → employee-BPv1j6T4.js} +3 -3
  18. package/dist/{iteration-Cfaqt-0s.js → iteration-BNA1cEos.js} +1 -1
  19. package/dist/{lodash-ClKqCmlZ.js → lodash-DKG9IyB-.js} +1 -1
  20. package/dist/{role-CR_-nBDY.js → role-BS3LFO8u.js} +1 -1
  21. package/dist/{rule-BB-3S-2R.js → rule-DaSLVZWm.js} +2 -2
  22. package/dist/src/stores/approval-code.d.ts +6 -6
  23. package/dist/src/types/approval-code.d.ts +60 -20
  24. package/dist/src/views/approval-code/ApprovalCodeList.vue.d.ts +1 -1
  25. package/dist/src/views/approval-code/components/ApprovalCodeCreatedDialog.vue.d.ts +9 -0
  26. package/dist/src/views/approval-code/components/ApprovalCodeForm.vue.d.ts +6 -1
  27. package/dist/src/views/approval-code/locales/index.d.ts +44 -12
  28. package/dist/tsconfig.app.tsbuildinfo +1 -1
  29. package/dist/{useReportPermissions-ybHA26cJ.js → useReportPermissions-J3-DjopO.js} +3 -3
  30. package/package.json +1 -1
  31. package/dist/ApprovalCodeList-BH5sgVMU.js +0 -638
  32. package/dist/Main-Cn7Dawg4.js +0 -120
@@ -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-Cn-3MRBO.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-BS3LFO8u.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-BP0oihBR.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
+ };
@@ -5,18 +5,18 @@ import { useSnackbar as pf } from "@feedmepos/ui-library";
5
5
  import { _ as df } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
6
6
  import { _ as mf } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
7
7
  import { u as gf } from "./restaurant-YOVMuuFY.js";
8
- import { u as _f } from "./role-CR_-nBDY.js";
8
+ import { u as _f } from "./role-BS3LFO8u.js";
9
9
  /* empty css */
10
- import "./employee-BJcqtqLM.js";
11
- import "./lodash-ClKqCmlZ.js";
10
+ import "./employee-BPv1j6T4.js";
11
+ import "./lodash-DKG9IyB-.js";
12
12
  import "./useAppStore-DNTlIeMv.js";
13
- import "./iteration-Cfaqt-0s.js";
13
+ import "./iteration-BNA1cEos.js";
14
14
  /* empty css */
15
- import { R as vt } from "./app-DX-PG6wx.js";
16
- import "./rule-BB-3S-2R.js";
17
- import "./useReportPermissions-ybHA26cJ.js";
18
- import "./dayjs.min-BJrHE7oz.js";
19
- import "./TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-DeTpbaRk.js";
15
+ import { R as vt } from "./app-BP0oihBR.js";
16
+ import "./rule-DaSLVZWm.js";
17
+ import "./useReportPermissions-J3-DjopO.js";
18
+ import "./dayjs.min-BTSZLci9.js";
19
+ import "./TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-BCLv-2Re.js";
20
20
  var Nn = {};
21
21
  /*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
22
22
  var qt = {};
@@ -5,12 +5,12 @@ import { _ as x } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lan
5
5
  import { _ as F } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
6
  import { u as w } from "./restaurant-YOVMuuFY.js";
7
7
  import "@feedmepos/ui-library";
8
- import "./rule-BB-3S-2R.js";
9
- import "./lodash-ClKqCmlZ.js";
10
- import "./iteration-Cfaqt-0s.js";
8
+ import "./rule-DaSLVZWm.js";
9
+ import "./lodash-DKG9IyB-.js";
10
+ import "./iteration-BNA1cEos.js";
11
11
  import "./useAppStore-DNTlIeMv.js";
12
- import { R as v } from "./app-DX-PG6wx.js";
13
- import "./role-CR_-nBDY.js";
12
+ import { R as v } from "./app-BP0oihBR.js";
13
+ import "./role-BS3LFO8u.js";
14
14
  /* empty css */
15
15
  import "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BJp9hEfv.js";
16
16
  const $ = { class: "space-y-24" }, Z = /* @__PURE__ */ M({
@@ -3,12 +3,12 @@ import { useI18n as Y, useCoreStore as ue } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as Z, useDialog as de, useBreakpoints as pe, components as X } from "@feedmepos/ui-library";
4
4
  import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
5
5
  import { u as ve, _ as Se } from "./useDiscardConfirm-DPhEV6v0.js";
6
- import { u as ee, c as se, d as oe, p as G, i as be, b as _e, m as D, l as he, n as Pe, s as ge, o as ye, v as we } from "./rule-BB-3S-2R.js";
7
- import { l as q } from "./lodash-ClKqCmlZ.js";
8
- import { c as Fe } from "./iteration-Cfaqt-0s.js";
6
+ import { u as ee, c as se, d as oe, p as G, i as be, b as _e, m as D, l as he, n as Pe, s as ge, o as ye, v as we } from "./rule-DaSLVZWm.js";
7
+ import { l as q } from "./lodash-DKG9IyB-.js";
8
+ import { c as Fe } from "./iteration-BNA1cEos.js";
9
9
  import { u as ke } from "./useLoading-BH02lYns.js";
10
- import { e as H } from "./app-DX-PG6wx.js";
11
- import { _ as xe } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CMh0DL1_.js";
10
+ import { e as H } from "./app-BP0oihBR.js";
11
+ import { _ as xe } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BJ-PZ2Nv.js";
12
12
  import { A as Ce } from "./restaurant-YOVMuuFY.js";
13
13
  const Ve = { class: "flex w-full items-center justify-between" }, Re = { class: "fm-typo-en-title-md-600" }, Ie = { class: "fm-typo-en-title-sm-600 mt-24" }, je = { class: "flex items-center justify-start gap-8" }, Ee = /* @__PURE__ */ Q({
14
14
  __name: "PermissionSetForm",