@feedmepos/mf-hrm-portal 2.0.14 → 2.0.15-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.
- package/dist/{AuditLogList-n6b4-GzJ.js → AuditLogList-_iGkRjav.js} +4 -4
- package/dist/EmployeeList-BsauFDHA.js +736 -0
- package/dist/{Main-79eUPL7p.js → Main-CWSLq8gH.js} +4 -4
- package/dist/{Main-Cw4gYTr3.js → Main-D0eoxqEG.js} +5 -5
- package/dist/{Main-Dn71WvVQ.js → Main-DWBJw_Ta.js} +1298 -1294
- package/dist/{PermissionSetList-BNNwLjXj.js → PermissionSetList-CzFf90Bv.js} +20 -20
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BYyT6oya.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CBcnIfck.js} +1039 -1039
- package/dist/RoleList-CsdcFHQK.js +528 -0
- package/dist/{TeamMemberList-DSHrsX5J.js → TeamMemberList-CI24SCZz.js} +303 -300
- package/dist/{TimesheetList-CXPqOjdC.js → TimesheetList-eD8-rA_L.js} +7 -7
- package/dist/{app-DPZbZJCq.js → app-DnT6yzx7.js} +4 -4
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DW1WmkoA.js → dayjs.min-L-465Ow8.js} +1 -1
- package/dist/{employee-Kw8TDet-.js → employee-DGjXlPn1.js} +71 -74
- package/dist/{index-CQ9ZArJF.js → index-DOpSY75_.js} +1 -1
- package/dist/{iteration-BFQu0b3r.js → iteration-CAxWl04o.js} +2 -2
- package/dist/{lodash-Dsav6UyM.js → lodash-VfbpRiGW.js} +1 -1
- package/dist/rule-D6eh6FDn.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-ZmSkwQIE.js → timesheet-B11NLk-Z.js} +9 -9
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useAppStore-BaDI6IZu.js +171 -0
- package/dist/useDiscardConfirm-BHni0LNu.js +28 -0
- package/dist/{useLoading-C0ICgchk.js → useLoading-B2CoUwmJ.js} +1 -1
- package/dist/{useReportPermissions-lRru0ii7.js → useReportPermissions-BfjLdcAd.js} +3 -3
- package/dist/utils-BZkjJbju.js +17 -0
- package/package.json +1 -1
- package/dist/EmployeeList-B7cemoN0.js +0 -702
- package/dist/RoleList-DY8Za0dd.js +0 -519
- package/dist/index-nwRgIeL9.js +0 -998
- package/dist/useAppStore-CKbtSJIP.js +0 -168
- package/dist/useRestaurantMap-e9fQJiLC.js +0 -39
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ref as d, computed as b, defineComponent as ce, onMounted as me, watch as X, resolveComponent as u, createElementBlock as B, openBlock as D, Fragment as Z, createVNode as l, createElementVNode as i, unref as n, withCtx as V, createCommentVNode as pe, toDisplayString as $, createTextVNode as ve, createBlock as z, isRef as fe, renderList as he, nextTick as ge } from "vue";
|
|
2
|
-
import { d as v } from "./dayjs.min-
|
|
2
|
+
import { d as v } from "./dayjs.min-L-465Ow8.js";
|
|
3
3
|
import { useI18n as ye, useCoreStore as we, RestaurantSelector as be } from "@feedmepos/mf-common";
|
|
4
4
|
import { useSnackbar as _e, components as De } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as xe } from "./app-
|
|
5
|
+
import { _ as xe } from "./app-DnT6yzx7.js";
|
|
6
6
|
import { _ as Se } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
|
|
7
|
-
import { u as ke } from "./useLoading-
|
|
8
|
-
import { c as Ce, s as Ve } from "./iteration-
|
|
9
|
-
import {
|
|
10
|
-
import { u as Ye } from "./employee-
|
|
11
|
-
import { u as Le } from "./timesheet-
|
|
7
|
+
import { u as ke } from "./useLoading-B2CoUwmJ.js";
|
|
8
|
+
import { c as Ce, s as Ve } from "./iteration-CAxWl04o.js";
|
|
9
|
+
import { f as Fe } from "./utils-BZkjJbju.js";
|
|
10
|
+
import { u as Ye } from "./employee-DGjXlPn1.js";
|
|
11
|
+
import { u as Le } from "./timesheet-B11NLk-Z.js";
|
|
12
12
|
function Me(x, a) {
|
|
13
13
|
return ["years", "months"].find((S) => {
|
|
14
14
|
const k = x.startOf(S), f = x.endOf(S);
|
|
@@ -4498,10 +4498,10 @@ const ce = (e) => ({
|
|
|
4498
4498
|
}
|
|
4499
4499
|
]
|
|
4500
4500
|
}
|
|
4501
|
-
}), Br = re(O(() => import("./Main-
|
|
4502
|
-
O(() => import("./AuditLogList-
|
|
4503
|
-
), fr = re(O(() => import("./Main-
|
|
4504
|
-
() => import("./PermissionSetList-
|
|
4501
|
+
}), Br = re(O(() => import("./Main-DWBJw_Ta.js"))), br = re(O(() => import("./Main-D0eoxqEG.js"))), pr = re(
|
|
4502
|
+
O(() => import("./AuditLogList-_iGkRjav.js"))
|
|
4503
|
+
), fr = re(O(() => import("./Main-CWSLq8gH.js"))), wr = O(() => import("./EmployeeList-BsauFDHA.js")), Mr = O(() => import("./RoleList-CsdcFHQK.js")), yr = O(() => import("./TimesheetList-eD8-rA_L.js")), Dr = O(() => import("./TeamMemberList-CI24SCZz.js")), vr = O(
|
|
4504
|
+
() => import("./PermissionSetList-CzFf90Bv.js")
|
|
4505
4505
|
), Pr = [
|
|
4506
4506
|
{
|
|
4507
4507
|
path: "/",
|
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-L-465Ow8.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-CAxWl04o.js";
|
|
6
|
+
import { i as v } from "./utils-BZkjJbju.js";
|
|
7
|
+
import { u as _ } from "./useAppStore-BaDI6IZu.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-DnT6yzx7.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-DnT6yzx7.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) {
|
|
@@ -9468,7 +9468,7 @@ const cc = (e) => (n) => {
|
|
|
9468
9468
|
throw new Error("Invalid business");
|
|
9469
9469
|
}, Bc = () => {
|
|
9470
9470
|
var a;
|
|
9471
|
-
const n = (a = To().currentCountry.value) == null ? void 0 : a.toLowerCase(), i = "
|
|
9471
|
+
const n = (a = To().currentCountry.value) == null ? void 0 : a.toLowerCase(), i = "feedmeapidev.com", o = !n || n === "my" ? `https://query-engine.${i}` : `https://query-engine.${n}.${i}`;
|
|
9472
9472
|
return cc(o)("");
|
|
9473
9473
|
}, Nc = () => jr("user/bypass/validate/");
|
|
9474
9474
|
function jc(e) {
|