@feedmepos/mf-hrm-portal 2.0.18-dev.2 → 2.0.18-dev.3
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.
- package/dist/AuditLogList-CPG5uNyJ.js +980 -0
- package/dist/EmployeeList-CyF7_ax8.js +736 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-BVb8c4YU.js +71 -0
- package/dist/HorizontalSplitter-o860F4xM.js +12 -0
- package/dist/{Main-BbOMNP31.js → Main-BwMCrfKS.js} +761 -758
- package/dist/Main-S5kR_LNV.js +85 -0
- package/dist/{Main-dqgR1UXY.js → Main-y2ea2vuC.js} +175 -181
- package/dist/PermissionSetList-C5oGIsQP.js +341 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-VaY4Fg_h.js +3480 -0
- package/dist/RoleList-C95uKJ8O.js +530 -0
- package/dist/TeamMemberList-CEqYCWn6.js +1114 -0
- package/dist/TeamMemberList.vue_vue_type_style_index_0_scoped_473cbd86_lang-DJ-znUI3.js +34 -0
- package/dist/{TimesheetList-D29EFj1Q.js → TimesheetList-DXtxCeNh.js} +126 -132
- package/dist/{app-SadE2J6-.js → app-BwtXEFgW.js} +711 -759
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DKCxxK08.js → dayjs.min-uVMAR_wK.js} +1 -1
- package/dist/employee-ImeXt_Q7.js +204 -0
- package/dist/{iteration-QZxp7XeE.js → iteration-BjJgU8cS.js} +4688 -4732
- package/dist/{lodash-DrksHyHu.js → lodash-CSw3Ei7_.js} +1 -1
- package/dist/{rule-CSsgDC6F.js → rule-B6wBPpcM.js} +265 -263
- package/dist/src/api/account/index.d.ts +4 -0
- package/dist/src/api/audit-log/index.d.ts +0 -9
- package/dist/src/api/index.d.ts +1 -0
- package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +0 -2
- package/dist/src/composables/useBasePermission.d.ts +0 -1
- package/dist/src/composables/useRestaurantMap.d.ts +329 -2
- package/dist/src/composables/useSupportedCountries.d.ts +5 -0
- package/dist/src/stores/role.d.ts +7 -7
- package/dist/src/stores/team.d.ts +6 -6
- package/dist/src/types/restaurant.d.ts +0 -11
- package/dist/src/types/team.d.ts +1 -1
- package/dist/src/views/hr/locales/index.d.ts +0 -16
- package/dist/src/views/team/components/BasePermission.vue.d.ts +7 -3
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +2 -2
- package/dist/src/views/team/locales/index.d.ts +0 -32
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -5
- package/dist/style.css +1 -1
- package/dist/{timesheet-sBe_HCZh.js → timesheet-D1f9XDxj.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useAppStore-D7jswOfq.js +171 -0
- package/dist/useDebounce-B8ZPVS5C.js +15 -0
- package/dist/useDiscardConfirm-BHni0LNu.js +28 -0
- package/dist/{useLoading-PTqnaz_W.js → useLoading-kFlAIf6Y.js} +1 -1
- package/dist/{useReportPermissions-C3Uzu7vB.js → useReportPermissions-ClWD1GSr.js} +3 -3
- package/dist/useSearch-B6WK1LBB.js +15 -0
- package/package.json +1 -1
- package/dist/AuditLogList-D4E8pss5.js +0 -1037
- package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +0 -58
- package/dist/EmployeeList-BfJO89pN.js +0 -827
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-D3MOFOUI.js +0 -45
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
- package/dist/Main-XmxzThcC.js +0 -86
- package/dist/PermissionSetList-DO0PRS6Z.js +0 -347
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DL4_xvBZ.js +0 -3443
- package/dist/RoleList-DB3NfUYF.js +0 -545
- package/dist/TeamMemberList-4hEx6L5r.js +0 -1090
- package/dist/employee-3KJs872J.js +0 -204
- package/dist/src/api/restaurant/index.d.ts +0 -5
- package/dist/src/components/Skeleton.vue.d.ts +0 -7
- package/dist/src/stores/restaurant.d.ts +0 -181
- package/dist/useAppStore-BDADkWuX.js +0 -171
- package/dist/useDebounce-CWb5QR9G.js +0 -28
- package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { defineStore as I, storeToRefs as Q } from "pinia";
|
|
2
|
+
import { ref as w } from "vue";
|
|
3
|
+
import { useCoreStore as x, baseClientInstance as S } from "@feedmepos/mf-common";
|
|
4
|
+
import { g as l, b as g, s as h } from "./iteration-BjJgU8cS.js";
|
|
5
|
+
const y = {
|
|
6
|
+
async readRoles() {
|
|
7
|
+
return l(await g().get("/pos-roles"));
|
|
8
|
+
},
|
|
9
|
+
async createRole(e) {
|
|
10
|
+
return l(await g().post("/pos-roles", e));
|
|
11
|
+
},
|
|
12
|
+
async updateRole(e, t) {
|
|
13
|
+
return l(await g().put(`/pos-roles/${e}`, t));
|
|
14
|
+
},
|
|
15
|
+
async deleteRole(e) {
|
|
16
|
+
return l(
|
|
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 } = x(), r = e.reduce((n, i) => {
|
|
26
|
+
var p;
|
|
27
|
+
const o = n.findIndex((s) => s._id === i._id), d = {
|
|
28
|
+
id: i.restaurantId,
|
|
29
|
+
name: ((p = t.value.find((s) => s._id === i.restaurantId)) == null ? void 0 : p.profile.name) || ""
|
|
30
|
+
};
|
|
31
|
+
return o < 0 ? n.push({
|
|
32
|
+
...i,
|
|
33
|
+
restaurants: [d]
|
|
34
|
+
}) : n[o].restaurants.some((s) => s.id === i.restaurantId) || (n[o].restaurants = h([...n[o].restaurants, d], { selector: "name" })), n;
|
|
35
|
+
}, []);
|
|
36
|
+
return h(r, { selector: "name" });
|
|
37
|
+
}
|
|
38
|
+
const U = I("role", () => {
|
|
39
|
+
const { currentBusiness: e } = x(), t = w([]), r = w(!1), n = w(null);
|
|
40
|
+
async function i() {
|
|
41
|
+
var u;
|
|
42
|
+
const s = ((u = e.value) == null ? void 0 : u._id) ?? null;
|
|
43
|
+
if (n.value !== s)
|
|
44
|
+
try {
|
|
45
|
+
r.value = !0;
|
|
46
|
+
const c = await y.readRoles();
|
|
47
|
+
t.value = await m(c), n.value = s;
|
|
48
|
+
} catch (c) {
|
|
49
|
+
console.log("Error reading roles:", c);
|
|
50
|
+
} finally {
|
|
51
|
+
r.value = !1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async function o(s) {
|
|
55
|
+
const u = await y.createRole(s);
|
|
56
|
+
t.value = await m(u);
|
|
57
|
+
}
|
|
58
|
+
async function d(s, u) {
|
|
59
|
+
const c = await y.updateRole(s, u);
|
|
60
|
+
t.value = await m(c);
|
|
61
|
+
}
|
|
62
|
+
async function p(s) {
|
|
63
|
+
const u = await y.deleteRole(s);
|
|
64
|
+
t.value = await m(u);
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
roles: t,
|
|
68
|
+
isLoading: r,
|
|
69
|
+
readRoles: i,
|
|
70
|
+
createRole: o,
|
|
71
|
+
updateRole: d,
|
|
72
|
+
deleteRole: p
|
|
73
|
+
};
|
|
74
|
+
}), $ = () => {
|
|
75
|
+
const e = U();
|
|
76
|
+
return {
|
|
77
|
+
...e,
|
|
78
|
+
...Q(e)
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
var a = [];
|
|
82
|
+
for (var R = 0; R < 256; ++R)
|
|
83
|
+
a.push((R + 256).toString(16).slice(1));
|
|
84
|
+
function D(e, t = 0) {
|
|
85
|
+
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();
|
|
86
|
+
}
|
|
87
|
+
var b, A = new Uint8Array(16);
|
|
88
|
+
function _() {
|
|
89
|
+
if (!b && (b = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !b))
|
|
90
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
91
|
+
return b(A);
|
|
92
|
+
}
|
|
93
|
+
var L = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
94
|
+
const v = {
|
|
95
|
+
randomUUID: L
|
|
96
|
+
};
|
|
97
|
+
function C(e, t, r) {
|
|
98
|
+
if (v.randomUUID && !e)
|
|
99
|
+
return v.randomUUID();
|
|
100
|
+
e = e || {};
|
|
101
|
+
var n = e.random || (e.rng || _)();
|
|
102
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, D(n);
|
|
103
|
+
}
|
|
104
|
+
const f = {
|
|
105
|
+
async read() {
|
|
106
|
+
return l(await S("/").get("/public-setting"));
|
|
107
|
+
},
|
|
108
|
+
async update(e) {
|
|
109
|
+
return l(await S("/").put("/public-setting", e));
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
function V() {
|
|
113
|
+
return {
|
|
114
|
+
loadingQueue: [],
|
|
115
|
+
publicSetting: {
|
|
116
|
+
delivery: {
|
|
117
|
+
feedMe: {
|
|
118
|
+
areas: [],
|
|
119
|
+
enable: !1,
|
|
120
|
+
maxDistance: 0
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
sms: {
|
|
124
|
+
firebase: !1
|
|
125
|
+
},
|
|
126
|
+
assets: {
|
|
127
|
+
groups: []
|
|
128
|
+
},
|
|
129
|
+
aiSettings: {
|
|
130
|
+
remy: { enable: !1 }
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
const j = I("portal-app-store", {
|
|
136
|
+
state: () => V(),
|
|
137
|
+
actions: {
|
|
138
|
+
addLoadingQueues(e) {
|
|
139
|
+
this.loadingQueue = [...this.loadingQueue, ...e];
|
|
140
|
+
},
|
|
141
|
+
clearLoadingQueue() {
|
|
142
|
+
this.loadingQueue = [];
|
|
143
|
+
},
|
|
144
|
+
resolveQueues(e) {
|
|
145
|
+
this.loadingQueue = this.loadingQueue.filter((t) => !e.includes(t.id));
|
|
146
|
+
},
|
|
147
|
+
async promise(e, t = !0) {
|
|
148
|
+
const r = C();
|
|
149
|
+
try {
|
|
150
|
+
const n = [{ id: r, isGlobal: t }];
|
|
151
|
+
return this.addLoadingQueues(n), await e();
|
|
152
|
+
} finally {
|
|
153
|
+
this.resolveQueues([r]);
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
async getPublicSetting() {
|
|
157
|
+
return this.publicSetting = await f.read(), this.publicSetting;
|
|
158
|
+
},
|
|
159
|
+
async updatePublicSetting(e) {
|
|
160
|
+
return this.publicSetting = await f.update({
|
|
161
|
+
...this.publicSetting,
|
|
162
|
+
...e
|
|
163
|
+
}), this.publicSetting;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
export {
|
|
168
|
+
j as a,
|
|
169
|
+
$ as u,
|
|
170
|
+
C as v
|
|
171
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { watch as s } from "vue";
|
|
2
|
+
function m(o, e, c = 300) {
|
|
3
|
+
let t;
|
|
4
|
+
const i = s(o, (r) => {
|
|
5
|
+
t && clearTimeout(t), t = setTimeout(() => {
|
|
6
|
+
e(r);
|
|
7
|
+
}, c);
|
|
8
|
+
});
|
|
9
|
+
return () => {
|
|
10
|
+
i(), t && (clearTimeout(t), t = void 0);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
m as u
|
|
15
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useI18n as e } from "@feedmepos/mf-common";
|
|
2
|
+
import { useDialog as m } from "@feedmepos/ui-library";
|
|
3
|
+
function c(i, t) {
|
|
4
|
+
const r = m(), { t: o } = e();
|
|
5
|
+
function s() {
|
|
6
|
+
i() ? r.open({
|
|
7
|
+
title: o("portalCommon.dismiss.title"),
|
|
8
|
+
message: o("portalCommon.dismiss.message"),
|
|
9
|
+
zIndex: 200,
|
|
10
|
+
primaryActions: {
|
|
11
|
+
text: o("portalCommon.dismiss.primaryActions"),
|
|
12
|
+
variant: "primary",
|
|
13
|
+
close: !0
|
|
14
|
+
},
|
|
15
|
+
secondaryActions: {
|
|
16
|
+
text: o("common.cancel"),
|
|
17
|
+
variant: "tertiary",
|
|
18
|
+
close: !0
|
|
19
|
+
}
|
|
20
|
+
}).onPrimary(() => {
|
|
21
|
+
t();
|
|
22
|
+
}) : t();
|
|
23
|
+
}
|
|
24
|
+
return s;
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
c as u
|
|
28
|
+
};
|
|
@@ -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-
|
|
3
|
+
import { a as w, v } from "./useAppStore-D7jswOfq.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-
|
|
2
|
+
import { e as d } from "./iteration-BjJgU8cS.js";
|
|
3
3
|
import { useCoreStore as h } from "@feedmepos/mf-common";
|
|
4
|
-
import { e as S, R as g } from "./rule-
|
|
5
|
-
import "./app-
|
|
4
|
+
import { e as S, R as g } from "./rule-B6wBPpcM.js";
|
|
5
|
+
import "./app-BwtXEFgW.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();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ref as c, computed as s } from "vue";
|
|
2
|
+
const i = (u) => {
|
|
3
|
+
const r = c(u || "");
|
|
4
|
+
function t(e) {
|
|
5
|
+
return `${e}`.trim().toLowerCase();
|
|
6
|
+
}
|
|
7
|
+
const o = s(() => t(r.value));
|
|
8
|
+
function n(e) {
|
|
9
|
+
return o.value ? e.some((a) => t(a).includes(o.value)) : !0;
|
|
10
|
+
}
|
|
11
|
+
return { searchKey: r, filter: n };
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
i as u
|
|
15
|
+
};
|