@feedmepos/mf-hrm-portal 2.0.19 → 2.0.20-dev.2

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 (66) hide show
  1. package/dist/AuditLogList-ChxAzO74.js +1037 -0
  2. package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +58 -0
  3. package/dist/EmployeeList-Cs-Mn6UA.js +843 -0
  4. package/dist/FormItem.vue_vue_type_script_setup_true_lang-D3MOFOUI.js +45 -0
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +49 -0
  6. package/dist/{Main-BPM7QyFL.js → Main-B9_TyRDo.js} +2009 -2005
  7. package/dist/Main-CdHW4UkN.js +90 -0
  8. package/dist/Main-DcvmP7s-.js +574 -0
  9. package/dist/PermissionSetList-VFVS0g0v.js +347 -0
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Dr3R9JjS.js +3444 -0
  11. package/dist/RoleList-BZ6RZvm2.js +556 -0
  12. package/dist/TeamMemberList-C-zhFauD.js +1115 -0
  13. package/dist/{TimesheetList-CdWXksIf.js → TimesheetList-CZex54an.js} +129 -115
  14. package/dist/{app-D6OxaCEx.js → app-CLL3p27X.js} +699 -653
  15. package/dist/app.js +1 -1
  16. package/dist/{dayjs.min-C0I-OiL6.js → dayjs.min-CDt1i9vl.js} +1 -1
  17. package/dist/employee-BpRvjWNh.js +200 -0
  18. package/dist/{iteration-CcZFMm5X.js → iteration-BVjUzYL5.js} +9314 -9272
  19. package/dist/{lodash-CW7MBjcM.js → lodash-CrwgACp2.js} +1 -1
  20. package/dist/{rule-6Lg9M_3I.js → rule-BlQ5YZ9Z.js} +274 -275
  21. package/dist/src/api/audit-log/index.d.ts +9 -0
  22. package/dist/src/api/index.d.ts +0 -1
  23. package/dist/src/api/restaurant/index.d.ts +5 -0
  24. package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
  25. package/dist/src/components/CollapsibleWrapper.vue.d.ts +2 -0
  26. package/dist/src/components/Skeleton.vue.d.ts +7 -0
  27. package/dist/src/composables/useBasePermission.d.ts +1 -0
  28. package/dist/src/composables/useRestaurantMap.d.ts +2 -329
  29. package/dist/src/stores/restaurant.d.ts +181 -0
  30. package/dist/src/stores/role.d.ts +7 -7
  31. package/dist/src/stores/team.d.ts +6 -6
  32. package/dist/src/types/restaurant.d.ts +11 -0
  33. package/dist/src/types/team.d.ts +2 -1
  34. package/dist/src/views/hr/locales/index.d.ts +16 -0
  35. package/dist/src/views/team/components/BasePermission.vue.d.ts +3 -7
  36. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +2 -2
  37. package/dist/src/views/team/locales/index.d.ts +32 -0
  38. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +5 -3
  39. package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +3 -3
  40. package/dist/style.css +1 -1
  41. package/dist/{timesheet-CaSIm-Rv.js → timesheet-jFs4GTAL.js} +2 -2
  42. package/dist/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/useAppStore-DMAL8VFY.js +169 -0
  44. package/dist/useDebounce-CWb5QR9G.js +28 -0
  45. package/dist/useDiscardConfirm-DPhEV6v0.js +157 -0
  46. package/dist/{useLoading-cnpr1-pP.js → useLoading-AFTjRLyO.js} +1 -1
  47. package/dist/{useReportPermissions-CNr0AdOf.js → useReportPermissions-hODG0Xx3.js} +3 -3
  48. package/package.json +1 -1
  49. package/dist/AuditLogList-Bw3sRBhW.js +0 -980
  50. package/dist/EmployeeList-C4tVWPJE.js +0 -736
  51. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js +0 -71
  52. package/dist/HorizontalSplitter-o860F4xM.js +0 -12
  53. package/dist/Main-BC20s7cs.js +0 -560
  54. package/dist/Main-eN8MDWpv.js +0 -85
  55. package/dist/PermissionSetList-CPSRrCsu.js +0 -341
  56. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CXt721Zo.js +0 -3480
  57. package/dist/RoleList-tRu19xyl.js +0 -530
  58. package/dist/TeamMemberList-CvitYIKw.js +0 -1114
  59. package/dist/TeamMemberList.vue_vue_type_style_index_0_scoped_473cbd86_lang-BDjrD45a.js +0 -34
  60. package/dist/employee-yT17VCCS.js +0 -204
  61. package/dist/src/api/account/index.d.ts +0 -4
  62. package/dist/src/composables/useSupportedCountries.d.ts +0 -5
  63. package/dist/useAppStore-CONZvtGc.js +0 -171
  64. package/dist/useDebounce-B8ZPVS5C.js +0 -15
  65. package/dist/useDiscardConfirm-BHni0LNu.js +0 -28
  66. package/dist/useSearch-B6WK1LBB.js +0 -15
@@ -0,0 +1,169 @@
1
+ import { defineStore as x, storeToRefs as U } from "pinia";
2
+ import { ref as R } from "vue";
3
+ import { useCoreStore as D, baseClientInstance as v } from "@feedmepos/mf-common";
4
+ import { g as c, b as g, u as Q, s as f } from "./iteration-BVjUzYL5.js";
5
+ const y = {
6
+ async readRoles() {
7
+ return c(await g().get("/pos-roles"));
8
+ },
9
+ async createRole(e) {
10
+ return c(await g().post("/pos-roles", e));
11
+ },
12
+ async updateRole(e, t) {
13
+ return c(await g().put(`/pos-roles/${e}`, t));
14
+ },
15
+ async deleteRole(e) {
16
+ return c(
17
+ await g().put(`/pos-roles/${e._id}`, {
18
+ restaurantIds: [],
19
+ role: e
20
+ })
21
+ );
22
+ }
23
+ };
24
+ async function m(e) {
25
+ const { restaurants: t } = Q(), s = e.reduce((n, r) => {
26
+ var p;
27
+ const l = n.findIndex((o) => o._id === r._id), d = {
28
+ id: r.restaurantId,
29
+ name: ((p = t.value.find((o) => o._id === r.restaurantId)) == null ? void 0 : p.profile.name) || ""
30
+ };
31
+ return l < 0 ? n.push({
32
+ ...r,
33
+ restaurants: [d]
34
+ }) : n[l].restaurants.some((o) => o.id === r.restaurantId) || (n[l].restaurants = f([...n[l].restaurants, d], { selector: "name" })), n;
35
+ }, []);
36
+ return f(s, { selector: "name" });
37
+ }
38
+ const A = x("role", () => {
39
+ const { currentBusiness: e } = D(), t = Q(), s = R([]), n = R(!1), r = R(null);
40
+ async function l() {
41
+ var i;
42
+ const u = ((i = e.value) == null ? void 0 : i._id) ?? null;
43
+ if (r.value !== u)
44
+ try {
45
+ n.value = !0, await t.readRestaurants();
46
+ const w = await y.readRoles();
47
+ s.value = await m(w), r.value = u;
48
+ } finally {
49
+ n.value = !1;
50
+ }
51
+ }
52
+ async function d(u) {
53
+ const i = await y.createRole(u);
54
+ s.value = await m(i);
55
+ }
56
+ async function p(u, i) {
57
+ const w = await y.updateRole(u, i);
58
+ s.value = await m(w);
59
+ }
60
+ async function o(u) {
61
+ const i = await y.deleteRole(u);
62
+ s.value = await m(i);
63
+ }
64
+ return {
65
+ roles: s,
66
+ isLoading: n,
67
+ readRoles: l,
68
+ createRole: d,
69
+ updateRole: p,
70
+ deleteRole: o
71
+ };
72
+ }), E = () => {
73
+ const e = A();
74
+ return {
75
+ ...e,
76
+ ...U(e)
77
+ };
78
+ };
79
+ var a = [];
80
+ for (var S = 0; S < 256; ++S)
81
+ a.push((S + 256).toString(16).slice(1));
82
+ function _(e, t = 0) {
83
+ return (a[e[t + 0]] + a[e[t + 1]] + a[e[t + 2]] + a[e[t + 3]] + "-" + a[e[t + 4]] + a[e[t + 5]] + "-" + a[e[t + 6]] + a[e[t + 7]] + "-" + a[e[t + 8]] + a[e[t + 9]] + "-" + a[e[t + 10]] + a[e[t + 11]] + a[e[t + 12]] + a[e[t + 13]] + a[e[t + 14]] + a[e[t + 15]]).toLowerCase();
84
+ }
85
+ var b, L = new Uint8Array(16);
86
+ function C() {
87
+ if (!b && (b = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !b))
88
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
89
+ return b(L);
90
+ }
91
+ var V = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
92
+ const h = {
93
+ randomUUID: V
94
+ };
95
+ function P(e, t, s) {
96
+ if (h.randomUUID && !e)
97
+ return h.randomUUID();
98
+ e = e || {};
99
+ var n = e.random || (e.rng || C)();
100
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, _(n);
101
+ }
102
+ const I = {
103
+ async read() {
104
+ return c(await v("/").get("/public-setting"));
105
+ },
106
+ async update(e) {
107
+ return c(await v("/").put("/public-setting", e));
108
+ }
109
+ };
110
+ function B() {
111
+ return {
112
+ loadingQueue: [],
113
+ publicSetting: {
114
+ delivery: {
115
+ feedMe: {
116
+ areas: [],
117
+ enable: !1,
118
+ maxDistance: 0
119
+ }
120
+ },
121
+ sms: {
122
+ firebase: !1
123
+ },
124
+ assets: {
125
+ groups: []
126
+ },
127
+ aiSettings: {
128
+ remy: { enable: !1 }
129
+ }
130
+ }
131
+ };
132
+ }
133
+ const H = x("portal-app-store", {
134
+ state: () => B(),
135
+ actions: {
136
+ addLoadingQueues(e) {
137
+ this.loadingQueue = [...this.loadingQueue, ...e];
138
+ },
139
+ clearLoadingQueue() {
140
+ this.loadingQueue = [];
141
+ },
142
+ resolveQueues(e) {
143
+ this.loadingQueue = this.loadingQueue.filter((t) => !e.includes(t.id));
144
+ },
145
+ async promise(e, t = !0) {
146
+ const s = P();
147
+ try {
148
+ const n = [{ id: s, isGlobal: t }];
149
+ return this.addLoadingQueues(n), await e();
150
+ } finally {
151
+ this.resolveQueues([s]);
152
+ }
153
+ },
154
+ async getPublicSetting() {
155
+ return this.publicSetting = await I.read(), this.publicSetting;
156
+ },
157
+ async updatePublicSetting(e) {
158
+ return this.publicSetting = await I.update({
159
+ ...this.publicSetting,
160
+ ...e
161
+ }), this.publicSetting;
162
+ }
163
+ }
164
+ });
165
+ export {
166
+ H as a,
167
+ E as u,
168
+ P as v
169
+ };
@@ -0,0 +1,28 @@
1
+ import { defineComponent as a, createElementBlock as i, openBlock as l, normalizeStyle as s, watch as u } from "vue";
2
+ const d = /* @__PURE__ */ a({
3
+ __name: "Skeleton",
4
+ props: {
5
+ width: { default: "160px" }
6
+ },
7
+ setup(t) {
8
+ return (o, n) => (l(), i("div", {
9
+ class: "h-16 animate-pulse rounded bg-fm-color-neutral-gray-200",
10
+ style: s({ width: t.width })
11
+ }, null, 4));
12
+ }
13
+ });
14
+ function f(t, o, n = 300) {
15
+ let e;
16
+ const c = u(t, (r) => {
17
+ e && clearTimeout(e), e = setTimeout(() => {
18
+ o(r);
19
+ }, n);
20
+ });
21
+ return () => {
22
+ c(), e && (clearTimeout(e), e = void 0);
23
+ };
24
+ }
25
+ export {
26
+ d as _,
27
+ f as u
28
+ };
@@ -0,0 +1,157 @@
1
+ import { defineComponent as x, ref as M, resolveComponent as l, createBlock as a, openBlock as t, withCtx as i, createElementVNode as g, renderSlot as b, createCommentVNode as k, withModifiers as $, nextTick as I, createElementBlock as f, normalizeClass as h, createTextVNode as V, toDisplayString as C, computed as w, Fragment as B, renderList as F, createVNode as S } from "vue";
2
+ import { useBreakpoints as z, useDialog as D } from "@feedmepos/ui-library";
3
+ import { useI18n as N } from "@feedmepos/mf-common";
4
+ const A = /* @__PURE__ */ x({
5
+ __name: "BottomSheetMenu",
6
+ setup(o) {
7
+ const e = M(!1);
8
+ async function r() {
9
+ await I(), e.value = !e.value;
10
+ }
11
+ return (n, s) => {
12
+ const y = l("FmButton"), _ = l("FmBottomSheet");
13
+ return t(), a(_, {
14
+ modelValue: e.value,
15
+ "onUpdate:modelValue": s[1] || (s[1] = (d) => e.value = d),
16
+ "dismiss-away": "",
17
+ "no-header": "",
18
+ "z-index": 110
19
+ }, {
20
+ "bottom-sheet-button": i(() => [
21
+ n.$slots.button ? k("", !0) : (t(), a(y, {
22
+ key: 0,
23
+ icon: "more_vert",
24
+ variant: "tertiary",
25
+ onClick: $(r, ["stop"])
26
+ })),
27
+ b(n.$slots, "button")
28
+ ]),
29
+ default: i(() => [
30
+ g("div", {
31
+ onClick: s[0] || (s[0] = (d) => e.value = !1)
32
+ }, [
33
+ b(n.$slots, "default")
34
+ ])
35
+ ]),
36
+ _: 3
37
+ }, 8, ["modelValue"]);
38
+ };
39
+ }
40
+ }), E = { class: "py-8 px-12 hover:bg-fm-color-neutral-gray-100" }, T = /* @__PURE__ */ x({
41
+ __name: "BottomSheetMenuItem",
42
+ props: {
43
+ label: {},
44
+ icon: {},
45
+ disabled: { type: Boolean },
46
+ itemClass: {}
47
+ },
48
+ setup(o) {
49
+ const e = o;
50
+ return (r, n) => {
51
+ const s = l("FmIcon");
52
+ return t(), f("div", E, [
53
+ r.$slots.content ? k("", !0) : (t(), f("div", {
54
+ key: 0,
55
+ class: h(["flex items-center", {
56
+ "text-fm-color-typo-disabled": e.disabled,
57
+ "cursor-pointer": !e.disabled,
58
+ "cursor-not-allowed": e.disabled,
59
+ [e.itemClass || ""]: e.itemClass && !e.disabled
60
+ }])
61
+ }, [
62
+ o.icon ? (t(), a(s, {
63
+ key: 0,
64
+ name: o.icon
65
+ }, null, 8, ["name"])) : k("", !0),
66
+ V(" " + C(o.label), 1)
67
+ ], 2)),
68
+ b(r.$slots, "content")
69
+ ]);
70
+ };
71
+ }
72
+ }), U = /* @__PURE__ */ x({
73
+ __name: "ResponsiveContextMenu",
74
+ props: {
75
+ items: {}
76
+ },
77
+ setup(o) {
78
+ const e = z(), r = w(() => e.breakpoints.value.xs);
79
+ return (n, s) => {
80
+ const y = l("FmButton"), _ = l("FmMenuItem"), d = l("FmMenu");
81
+ return r.value ? (t(), a(A, { key: 0 }, {
82
+ default: i(() => [
83
+ (t(!0), f(B, null, F(o.items, ({ icon: c, label: m, disabled: p, itemClass: u, onClick: v }) => (t(), a(T, {
84
+ key: m,
85
+ icon: c,
86
+ label: m,
87
+ disabled: p,
88
+ itemClass: u,
89
+ onClick: () => {
90
+ !p && (v == null || v());
91
+ }
92
+ }, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
93
+ ]),
94
+ _: 1
95
+ })) : (t(), a(d, {
96
+ key: 1,
97
+ "stop-click-propagation": "",
98
+ shift: !0
99
+ }, {
100
+ "menu-button": i(() => [
101
+ S(y, {
102
+ type: "button",
103
+ variant: "tertiary",
104
+ icon: "more_vert",
105
+ "text-color": "neutral-gray-400",
106
+ size: "md"
107
+ })
108
+ ]),
109
+ default: i(() => [
110
+ (t(!0), f(B, null, F(o.items, ({ label: c, disabled: m, itemClass: p, onClick: u }) => (t(), a(_, {
111
+ key: c,
112
+ disabled: m,
113
+ label: c,
114
+ onClick: () => {
115
+ !m && (u == null || u());
116
+ }
117
+ }, {
118
+ label: i(() => [
119
+ g("span", {
120
+ class: h(m ? "text-fm-color-typo-disabled" : p)
121
+ }, C(c), 3)
122
+ ]),
123
+ _: 2
124
+ }, 1032, ["disabled", "label", "onClick"]))), 128))
125
+ ]),
126
+ _: 1
127
+ }));
128
+ };
129
+ }
130
+ });
131
+ function j(o, e) {
132
+ const r = D(), { t: n } = N();
133
+ function s() {
134
+ o() ? r.open({
135
+ title: n("portalCommon.dismiss.title"),
136
+ message: n("portalCommon.dismiss.message"),
137
+ zIndex: 200,
138
+ primaryActions: {
139
+ text: n("portalCommon.dismiss.primaryActions"),
140
+ variant: "primary",
141
+ close: !0
142
+ },
143
+ secondaryActions: {
144
+ text: n("common.cancel"),
145
+ variant: "tertiary",
146
+ close: !0
147
+ }
148
+ }).onPrimary(() => {
149
+ e();
150
+ }) : e();
151
+ }
152
+ return s;
153
+ }
154
+ export {
155
+ U as _,
156
+ j as u
157
+ };
@@ -1,6 +1,6 @@
1
1
  import { computed as I, isRef as L, watch as M } from "vue";
2
2
  import { SnackbarPosition as y } from "@feedmepos/ui-library";
3
- import { a as w, v } from "./useAppStore-CONZvtGc.js";
3
+ import { a as w, v } from "./useAppStore-DMAL8VFY.js";
4
4
  const E = (r) => {
5
5
  async function d(u, e) {
6
6
  var l, a;
@@ -1,8 +1,8 @@
1
1
  import { computed as u, ref as t } from "vue";
2
- import { e as d } from "./iteration-CcZFMm5X.js";
2
+ import { e as d } from "./iteration-BVjUzYL5.js";
3
3
  import { useCoreStore as h } from "@feedmepos/mf-common";
4
- import { e as S, R as g } from "./rule-6Lg9M_3I.js";
5
- import "./app-D6OxaCEx.js";
4
+ import { e as S, R as g } from "./rule-BlQ5YZ9Z.js";
5
+ import "./app-CLL3p27X.js";
6
6
  const r = t([]), c = t(!1), a = t(!1), f = t(null), p = t(null), i = t(!1);
7
7
  function B() {
8
8
  const v = h();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-hrm-portal",
3
- "version": "2.0.19",
3
+ "version": "2.0.20-dev.2",
4
4
  "files": [
5
5
  "dist"
6
6
  ],