@feedmepos/mf-hrm-portal 2.0.17-dev.5 → 2.0.18-dev
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-Dl3Nmf00.js → AuditLogList-CaoW9uYd.js} +5 -5
- package/dist/EmployeeList-DcMvF9U5.js +839 -0
- package/dist/Main-CleutFvF.js +567 -0
- package/dist/{Main-CQ3KwxDY.js → Main-CvW6Vu8N.js} +2055 -2055
- package/dist/{Main-w0XUUaBp.js → Main-D7k57uq5.js} +32 -32
- package/dist/{PermissionSetList-B8qNOWH6.js → PermissionSetList-CM7kbWkO.js} +6 -6
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C9VUjAu_.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Ces9YwYB.js} +525 -525
- package/dist/{RoleList-DMFJsUZv.js → RoleList-DR3eVJ9f.js} +102 -102
- package/dist/TeamMemberList-CZZv4Pu5.js +1038 -0
- package/dist/{TimesheetList-Bwp9_xHe.js → TimesheetList-WqqoKPbg.js} +132 -126
- package/dist/{app-COJbSNM4.js → app-R5EioPr4.js} +4 -4
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-CcBi6N-K.js → dayjs.min-CN15Ft3o.js} +1 -1
- package/dist/employee-DwQlWLkL.js +204 -0
- package/dist/{iteration-JOKbtlLf.js → iteration-UBGGRoxQ.js} +9258 -9213
- package/dist/{lodash-D5xlVzib.js → lodash-CC6qHVUo.js} +1 -1
- package/dist/{rule-3sXHiW0y.js → rule-B519XbW6.js} +273 -273
- package/dist/src/api/restaurant/index.d.ts +5 -0
- package/dist/src/composables/useRestaurantMap.d.ts +2 -329
- package/dist/src/stores/restaurant.d.ts +181 -0
- package/dist/src/stores/role.d.ts +7 -7
- package/dist/src/types/restaurant.d.ts +11 -0
- package/dist/style.css +1 -1
- package/dist/{team-CyNektSD.js → team-BGLhgx5P.js} +1 -1
- package/dist/{timesheet-DkD3AysG.js → timesheet-BylrXRfd.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useAppStore-Akl8AoVN.js +171 -0
- package/dist/{useLoading-4TNmhm5N.js → useLoading-rbrVwWuj.js} +1 -1
- package/dist/{useReportPermissions-CWMFFb8E.js → useReportPermissions-BOEZU86S.js} +3 -3
- package/package.json +1 -1
- package/dist/EmployeeList-DBd_rVW2.js +0 -831
- package/dist/Main-pTgqNncY.js +0 -560
- package/dist/TeamMemberList-BLRTfKLz.js +0 -1031
- package/dist/employee-xiV0LfnL.js +0 -204
- package/dist/useAppStore-CvmsaYSG.js +0 -171
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { defineStore as x, storeToRefs as U } from "pinia";
|
|
2
|
+
import { ref as R } from "vue";
|
|
3
|
+
import { useCoreStore as D, baseClientInstance as h } from "@feedmepos/mf-common";
|
|
4
|
+
import { g as c, b as y, u as Q, s as v } from "./iteration-UBGGRoxQ.js";
|
|
5
|
+
const m = {
|
|
6
|
+
async readRoles() {
|
|
7
|
+
return c(await y().get("/pos-roles"));
|
|
8
|
+
},
|
|
9
|
+
async createRole(e) {
|
|
10
|
+
return c(await y().post("/pos-roles", e));
|
|
11
|
+
},
|
|
12
|
+
async updateRole(e, t) {
|
|
13
|
+
return c(await y().put(`/pos-roles/${e}`, t));
|
|
14
|
+
},
|
|
15
|
+
async deleteRole(e) {
|
|
16
|
+
return c(
|
|
17
|
+
await y().put(`/pos-roles/${e._id}`, {
|
|
18
|
+
restaurantIds: [],
|
|
19
|
+
role: e
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
async function b(e) {
|
|
25
|
+
const { restaurants: t } = Q(), s = e.reduce((n, r) => {
|
|
26
|
+
var g;
|
|
27
|
+
const l = n.findIndex((o) => o._id === r._id), p = {
|
|
28
|
+
id: r.restaurantId,
|
|
29
|
+
name: ((g = t.value.find((o) => o._id === r.restaurantId)) == null ? void 0 : g.profile.name) || ""
|
|
30
|
+
};
|
|
31
|
+
return l < 0 ? n.push({
|
|
32
|
+
...r,
|
|
33
|
+
restaurants: [p]
|
|
34
|
+
}) : n[l].restaurants.some((o) => o.id === r.restaurantId) || (n[l].restaurants = v([...n[l].restaurants, p], { selector: "name" })), n;
|
|
35
|
+
}, []);
|
|
36
|
+
return v(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 d = await m.readRoles();
|
|
47
|
+
s.value = await b(d), r.value = u;
|
|
48
|
+
} catch (d) {
|
|
49
|
+
console.log("Error reading roles:", d);
|
|
50
|
+
} finally {
|
|
51
|
+
n.value = !1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async function p(u) {
|
|
55
|
+
const i = await m.createRole(u);
|
|
56
|
+
s.value = await b(i);
|
|
57
|
+
}
|
|
58
|
+
async function g(u, i) {
|
|
59
|
+
const d = await m.updateRole(u, i);
|
|
60
|
+
s.value = await b(d);
|
|
61
|
+
}
|
|
62
|
+
async function o(u) {
|
|
63
|
+
const i = await m.deleteRole(u);
|
|
64
|
+
s.value = await b(i);
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
roles: s,
|
|
68
|
+
isLoading: n,
|
|
69
|
+
readRoles: l,
|
|
70
|
+
createRole: p,
|
|
71
|
+
updateRole: g,
|
|
72
|
+
deleteRole: o
|
|
73
|
+
};
|
|
74
|
+
}), q = () => {
|
|
75
|
+
const e = A();
|
|
76
|
+
return {
|
|
77
|
+
...e,
|
|
78
|
+
...U(e)
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
var a = [];
|
|
82
|
+
for (var S = 0; S < 256; ++S)
|
|
83
|
+
a.push((S + 256).toString(16).slice(1));
|
|
84
|
+
function _(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 w, L = new Uint8Array(16);
|
|
88
|
+
function C() {
|
|
89
|
+
if (!w && (w = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !w))
|
|
90
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
91
|
+
return w(L);
|
|
92
|
+
}
|
|
93
|
+
var V = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
94
|
+
const f = {
|
|
95
|
+
randomUUID: V
|
|
96
|
+
};
|
|
97
|
+
function P(e, t, s) {
|
|
98
|
+
if (f.randomUUID && !e)
|
|
99
|
+
return f.randomUUID();
|
|
100
|
+
e = e || {};
|
|
101
|
+
var n = e.random || (e.rng || C)();
|
|
102
|
+
return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, _(n);
|
|
103
|
+
}
|
|
104
|
+
const I = {
|
|
105
|
+
async read() {
|
|
106
|
+
return c(await h("/").get("/public-setting"));
|
|
107
|
+
},
|
|
108
|
+
async update(e) {
|
|
109
|
+
return c(await h("/").put("/public-setting", e));
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
function B() {
|
|
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 H = x("portal-app-store", {
|
|
136
|
+
state: () => B(),
|
|
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 s = P();
|
|
149
|
+
try {
|
|
150
|
+
const n = [{ id: s, isGlobal: t }];
|
|
151
|
+
return this.addLoadingQueues(n), await e();
|
|
152
|
+
} finally {
|
|
153
|
+
this.resolveQueues([s]);
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
async getPublicSetting() {
|
|
157
|
+
return this.publicSetting = await I.read(), this.publicSetting;
|
|
158
|
+
},
|
|
159
|
+
async updatePublicSetting(e) {
|
|
160
|
+
return this.publicSetting = await I.update({
|
|
161
|
+
...this.publicSetting,
|
|
162
|
+
...e
|
|
163
|
+
}), this.publicSetting;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
export {
|
|
168
|
+
H as a,
|
|
169
|
+
q as u,
|
|
170
|
+
P as v
|
|
171
|
+
};
|
|
@@ -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-Akl8AoVN.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-UBGGRoxQ.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-B519XbW6.js";
|
|
5
|
+
import "./app-R5EioPr4.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();
|