@feedmepos/mf-hrm-portal 2.0.15-dev → 2.0.15-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-DBIsI4YF.js → AuditLogList-eyzJecZc.js} +4 -4
- package/dist/EmployeeList-QibdsTN-.js +736 -0
- package/dist/{Main-BAZAQTWi.js → Main-B_QCpWOx.js} +4 -4
- package/dist/{Main-D7yzD5SW.js → Main-Bjfm9a6M.js} +5 -5
- package/dist/{Main-B3YiMuFq.js → Main-DX1aet8y.js} +1298 -1294
- package/dist/{PermissionSetList-DBT9LtfT.js → PermissionSetList-fE9Zfrl6.js} +30 -30
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BfqnjeTK.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-JpCfRxA9.js} +500 -500
- package/dist/RoleList-ByXZemFz.js +528 -0
- package/dist/{TeamMemberList-BCv5Vixx.js → TeamMemberList-D-_icv19.js} +327 -324
- package/dist/{TimesheetList-DpMBgVtY.js → TimesheetList-DVvz6id4.js} +7 -7
- package/dist/{app-pvHHFjbx.js → app-DJG3HGqG.js} +220 -261
- package/dist/app.js +2 -2
- package/dist/{dayjs.min-BK_bM9xY.js → dayjs.min-CN6o-ax9.js} +1 -1
- package/dist/{employee-DhkixwiI.js → employee-CU-G-rAZ.js} +71 -74
- package/dist/{index-DK4fVbTF.js → index-ynxje0mm.js} +1 -1
- package/dist/{iteration-Bk3cnP07.js → iteration-C6Km_Rno.js} +1 -1
- package/dist/{lodash-TrOlqj07.js → lodash-DZvG4gEx.js} +1 -1
- package/dist/rule-X41LxaES.js +991 -0
- package/dist/src/helpers/rule.d.ts +1 -1
- package/dist/src/stores/employee.d.ts +124 -19
- package/dist/src/types/employee.d.ts +3 -0
- package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/{timesheet-DSQeCVfL.js → timesheet-DUtxTIA4.js} +9 -9
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useAppStore-CrUYEAtX.js +171 -0
- package/dist/useDiscardConfirm-BHni0LNu.js +28 -0
- package/dist/{useLoading-fEAOlgoV.js → useLoading-hGUqfW4U.js} +1 -1
- package/dist/{useReportPermissions-CkOk_2tl.js → useReportPermissions-BgTdISQy.js} +3 -3
- package/dist/utils-BZkjJbju.js +17 -0
- package/package.json +1 -1
- package/dist/EmployeeList-BOSxLZbY.js +0 -702
- package/dist/RoleList-DeE5tN-5.js +0 -519
- package/dist/index-Bckj5jnu.js +0 -998
- package/dist/useAppStore-DwfwjZpc.js +0 -168
- package/dist/useRestaurantMap-e9fQJiLC.js +0 -39
package/dist/app.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { d as M } from "./dayjs.min-
|
|
2
|
-
import { defineStore as S, storeToRefs as
|
|
3
|
-
import { ref as
|
|
1
|
+
import { d as M } from "./dayjs.min-CN6o-ax9.js";
|
|
2
|
+
import { defineStore as S, storeToRefs as U } from "pinia";
|
|
3
|
+
import { ref as m } from "vue";
|
|
4
4
|
import { useCoreStore as w } from "@feedmepos/mf-common";
|
|
5
|
-
import { b as
|
|
6
|
-
import {
|
|
7
|
-
import { u as _ } from "./useAppStore-
|
|
5
|
+
import { b as p, g as f, s as E } from "./iteration-C6Km_Rno.js";
|
|
6
|
+
import { i as v } from "./utils-BZkjJbju.js";
|
|
7
|
+
import { u as _ } from "./useAppStore-CrUYEAtX.js";
|
|
8
8
|
const n = {
|
|
9
9
|
async readEmployees() {
|
|
10
|
-
return f(await
|
|
10
|
+
return f(await p().get("/pos-users"));
|
|
11
11
|
},
|
|
12
12
|
async readEmployeesPage(e) {
|
|
13
|
-
var t,
|
|
13
|
+
var t, i;
|
|
14
14
|
return f(
|
|
15
|
-
await
|
|
15
|
+
await p().get("/pos-users/paged", {
|
|
16
16
|
params: {
|
|
17
17
|
limit: e.limit,
|
|
18
18
|
offset: e.offset,
|
|
19
19
|
search: e.search,
|
|
20
20
|
restaurantIds: (t = e.restaurantIds) != null && t.length ? e.restaurantIds : void 0,
|
|
21
|
-
roleIds: (
|
|
21
|
+
roleIds: (i = e.roleIds) != null && i.length ? e.roleIds : void 0
|
|
22
22
|
}
|
|
23
23
|
})
|
|
24
24
|
);
|
|
25
25
|
},
|
|
26
26
|
async createEmployee(e) {
|
|
27
|
-
await
|
|
27
|
+
await p().post("/pos-users", e);
|
|
28
28
|
},
|
|
29
29
|
async createMasterEmployee(e) {
|
|
30
|
-
await
|
|
30
|
+
await p().post("/pos-users/master-user", e);
|
|
31
31
|
},
|
|
32
32
|
async migrateToMasterEmployee(e, t) {
|
|
33
|
-
await
|
|
33
|
+
await p().put(`/pos-users/migrate/${e}`, t);
|
|
34
34
|
},
|
|
35
35
|
async updateEmployee(e, t) {
|
|
36
|
-
await
|
|
36
|
+
await p().put(`/pos-users/${e}`, t);
|
|
37
37
|
},
|
|
38
38
|
async updateMasterEmployee(e, t) {
|
|
39
|
-
await
|
|
39
|
+
await p().put(`/pos-users/master-user/${e}`, t);
|
|
40
40
|
},
|
|
41
41
|
async deleteEmployee(e) {
|
|
42
|
-
await
|
|
42
|
+
await p().put(`/pos-users/${e._id}`, {
|
|
43
43
|
user: e,
|
|
44
44
|
roles: [],
|
|
45
45
|
previousRoles: e.restaurants.map((t) => ({
|
|
@@ -49,7 +49,7 @@ const n = {
|
|
|
49
49
|
});
|
|
50
50
|
},
|
|
51
51
|
async deleteMasterEmployee(e) {
|
|
52
|
-
await
|
|
52
|
+
await p().put(`/pos-users/master-user/${e._id}`, {
|
|
53
53
|
user: e,
|
|
54
54
|
roles: [],
|
|
55
55
|
previousRoles: e.restaurants.map((t) => ({
|
|
@@ -60,148 +60,145 @@ const n = {
|
|
|
60
60
|
},
|
|
61
61
|
async generateEmployeePasscode() {
|
|
62
62
|
return `${f(
|
|
63
|
-
await
|
|
63
|
+
await p().get("/pos-users/generate-passcode")
|
|
64
64
|
)}`;
|
|
65
65
|
},
|
|
66
66
|
async syncUsersMeta() {
|
|
67
|
-
await
|
|
67
|
+
await p().post("/pos-users/create-users-meta");
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
-
async function
|
|
71
|
-
const t = _().roles.value, { restaurants:
|
|
72
|
-
|
|
73
|
-
),
|
|
70
|
+
async function $(e) {
|
|
71
|
+
const t = _().roles.value, { restaurants: i } = w(), c = new Map(
|
|
72
|
+
i.value.map((a) => [a._id, a.profile.name])
|
|
73
|
+
), d = new Map(t.map((a) => [a._id, a.name])), r = /* @__PURE__ */ new Map();
|
|
74
74
|
for (const a of e) {
|
|
75
|
-
const
|
|
75
|
+
const l = {
|
|
76
76
|
restaurantId: a.restaurantId,
|
|
77
77
|
restaurantName: c.get(a.restaurantId) || "",
|
|
78
78
|
roleId: a.role,
|
|
79
|
-
roleName:
|
|
80
|
-
},
|
|
81
|
-
if (!
|
|
79
|
+
roleName: d.get(a.role) || ""
|
|
80
|
+
}, u = r.get(a._id);
|
|
81
|
+
if (!u) {
|
|
82
82
|
r.set(a._id, {
|
|
83
83
|
...a,
|
|
84
|
+
isRestricted: !1,
|
|
84
85
|
since: M(v(a._id)).format("DD/MM/YYYY"),
|
|
85
|
-
restaurants: [
|
|
86
|
+
restaurants: [l]
|
|
86
87
|
});
|
|
87
88
|
continue;
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
+
u.restaurants.some((y) => y.restaurantId === a.restaurantId) || (u.restaurants = E([...u.restaurants, l], {
|
|
90
91
|
selector: "restaurantName"
|
|
91
92
|
}));
|
|
92
93
|
}
|
|
93
94
|
return E([...r.values()], { selector: "name" });
|
|
94
95
|
}
|
|
95
96
|
function I(e) {
|
|
96
|
-
const { restaurants: t } = w(),
|
|
97
|
-
t.value.map((a) => [a._id, a
|
|
98
|
-
),
|
|
97
|
+
const { restaurants: t } = w(), i = _().roles.value, c = new Map(
|
|
98
|
+
t.value.map((a) => [a._id, a])
|
|
99
|
+
), d = new Map(i.map((a) => [a._id, a.name])), r = e.restaurantRole[0];
|
|
99
100
|
return {
|
|
100
101
|
_id: e._id,
|
|
101
102
|
name: e.name,
|
|
102
103
|
code: e.code,
|
|
103
104
|
passcode: e.passcode,
|
|
104
105
|
isMasterUser: e.isMasterUser,
|
|
106
|
+
isRestricted: e.isRestricted,
|
|
105
107
|
restaurantId: (r == null ? void 0 : r.restaurantId) || "",
|
|
106
108
|
role: (r == null ? void 0 : r.roleId) || "",
|
|
107
109
|
since: M(v(e._id)).format("DD/MM/YYYY"),
|
|
108
110
|
restaurants: E(
|
|
109
|
-
e.restaurantRole.map((a) =>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
e.restaurantRole.map((a) => {
|
|
112
|
+
const l = c.get(a.restaurantId);
|
|
113
|
+
return {
|
|
114
|
+
restaurantId: a.restaurantId,
|
|
115
|
+
restaurantName: (l == null ? void 0 : l.profile.name) || "",
|
|
116
|
+
restaurantCode: (l == null ? void 0 : l.profile.code) ?? void 0,
|
|
117
|
+
roleId: a.roleId,
|
|
118
|
+
roleName: d.get(a.roleId) || ""
|
|
119
|
+
};
|
|
120
|
+
}),
|
|
115
121
|
{ selector: "restaurantName" }
|
|
116
122
|
)
|
|
117
123
|
};
|
|
118
124
|
}
|
|
119
|
-
const
|
|
120
|
-
const e =
|
|
121
|
-
async function
|
|
125
|
+
const T = S("employee", () => {
|
|
126
|
+
const e = m([]), t = m([]), i = m(0), c = m(!1);
|
|
127
|
+
async function d() {
|
|
122
128
|
try {
|
|
123
129
|
c.value = !0;
|
|
124
130
|
const s = await n.readEmployees();
|
|
125
|
-
e.value = await
|
|
131
|
+
e.value = await $(s);
|
|
126
132
|
} catch (s) {
|
|
127
133
|
console.log("Error reading employees:", s);
|
|
128
134
|
} finally {
|
|
129
135
|
c.value = !1;
|
|
130
136
|
}
|
|
131
137
|
}
|
|
132
|
-
async function
|
|
138
|
+
async function r(s) {
|
|
133
139
|
try {
|
|
134
140
|
c.value = !0;
|
|
135
141
|
const o = await n.readEmployeesPage(s);
|
|
136
|
-
t.value = o.items.map(I),
|
|
142
|
+
t.value = o.items.map(I), i.value = o.total;
|
|
137
143
|
} catch (o) {
|
|
138
144
|
console.log("Error reading employee page:", o);
|
|
139
145
|
} finally {
|
|
140
146
|
c.value = !1;
|
|
141
147
|
}
|
|
142
148
|
}
|
|
143
|
-
async function
|
|
149
|
+
async function a(s, o) {
|
|
144
150
|
const g = o ?? (await n.readEmployeesPage({ ...s, limit: 1, offset: 0 })).total;
|
|
145
151
|
return g === 0 ? [] : (await n.readEmployeesPage({ ...s, limit: g, offset: 0 })).items.map(I);
|
|
146
152
|
}
|
|
147
|
-
async function
|
|
153
|
+
async function l(s) {
|
|
148
154
|
await n.createEmployee(s);
|
|
149
155
|
}
|
|
150
|
-
async function
|
|
156
|
+
async function u(s, o) {
|
|
151
157
|
await n.updateEmployee(s, o);
|
|
152
158
|
}
|
|
153
|
-
async function
|
|
159
|
+
async function y(s) {
|
|
154
160
|
await n.deleteEmployee(s);
|
|
155
161
|
}
|
|
156
|
-
async function
|
|
162
|
+
async function P(s) {
|
|
157
163
|
await n.deleteMasterEmployee(s);
|
|
158
164
|
}
|
|
159
|
-
async function
|
|
165
|
+
async function Y(s) {
|
|
160
166
|
await n.createMasterEmployee(s);
|
|
161
167
|
}
|
|
162
|
-
async function
|
|
168
|
+
async function N(s, o) {
|
|
163
169
|
await n.updateMasterEmployee(s, o);
|
|
164
170
|
}
|
|
165
171
|
async function h(s, o) {
|
|
166
172
|
await n.migrateToMasterEmployee(s, o);
|
|
167
173
|
}
|
|
168
|
-
async function T() {
|
|
169
|
-
try {
|
|
170
|
-
i.value = await b.readTeamMemberPosUserIds();
|
|
171
|
-
} catch (s) {
|
|
172
|
-
console.log("Error reading team member pos user ids:", s);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
174
|
async function D() {
|
|
176
175
|
await n.syncUsersMeta();
|
|
177
176
|
}
|
|
178
177
|
return {
|
|
179
178
|
employees: e,
|
|
180
179
|
listEmployees: t,
|
|
181
|
-
totalEmployees:
|
|
182
|
-
restrictEmployeeIds: i,
|
|
180
|
+
totalEmployees: i,
|
|
183
181
|
isLoading: c,
|
|
184
|
-
readEmployees:
|
|
185
|
-
readEmployeesPage:
|
|
186
|
-
readAllEmployeesPage:
|
|
187
|
-
createEmployee:
|
|
188
|
-
updateEmployee:
|
|
189
|
-
deleteEmployee:
|
|
190
|
-
createMasterEmployee:
|
|
191
|
-
updateMasterEmployee:
|
|
192
|
-
deleteMasterEmployee:
|
|
182
|
+
readEmployees: d,
|
|
183
|
+
readEmployeesPage: r,
|
|
184
|
+
readAllEmployeesPage: a,
|
|
185
|
+
createEmployee: l,
|
|
186
|
+
updateEmployee: u,
|
|
187
|
+
deleteEmployee: y,
|
|
188
|
+
createMasterEmployee: Y,
|
|
189
|
+
updateMasterEmployee: N,
|
|
190
|
+
deleteMasterEmployee: P,
|
|
193
191
|
migrateToMasterUser: h,
|
|
194
|
-
readTeamMemberPosUserIds: T,
|
|
195
192
|
syncUsersMeta: D
|
|
196
193
|
};
|
|
197
|
-
}),
|
|
198
|
-
const e =
|
|
194
|
+
}), z = () => {
|
|
195
|
+
const e = T();
|
|
199
196
|
return {
|
|
200
197
|
...e,
|
|
201
|
-
|
|
198
|
+
...U(e)
|
|
202
199
|
};
|
|
203
200
|
};
|
|
204
201
|
export {
|
|
205
202
|
n as E,
|
|
206
|
-
|
|
203
|
+
z as u
|
|
207
204
|
};
|
|
@@ -2,7 +2,7 @@ var oe = Object.defineProperty;
|
|
|
2
2
|
var se = (_, h, y) => h in _ ? oe(_, h, { enumerable: !0, configurable: !0, writable: !0, value: y }) : _[h] = y;
|
|
3
3
|
var ot = (_, h, y) => se(_, typeof h != "symbol" ? h + "" : h, y);
|
|
4
4
|
import { readonly as Nt, ref as Rt } from "vue";
|
|
5
|
-
import { c as st } from "./app-
|
|
5
|
+
import { c as st } from "./app-DJG3HGqG.js";
|
|
6
6
|
var Pt = { exports: {} };
|
|
7
7
|
(function(_, h) {
|
|
8
8
|
(function(y, p) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as U } from "./app-
|
|
1
|
+
import { c as U } from "./app-DJG3HGqG.js";
|
|
2
2
|
import { useCoreStore as To, baseClientInstance as jr, FeedMeAuth as Zs } from "@feedmepos/mf-common";
|
|
3
3
|
var Ys = {}, _n = {}, _ = {}, zo = {}, $i = {}, eo = {}, ui = {};
|
|
4
4
|
(function(e) {
|