@feedmepos/mf-hrm-portal 2.0.10-dev.3 → 2.0.11-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-C7QcWwHq.js +941 -0
- package/dist/EmployeeList-CQzS4gXV.js +690 -0
- package/dist/{Main-g0xYhlQL.js → Main-6td6JhCb.js} +1055 -1054
- package/dist/{Main-CvuyDkkJ.js → Main-BhNhmkn8.js} +4 -4
- package/dist/{Main-pViKokej.js → Main-Bu-UNnSQ.js} +6 -6
- package/dist/{PermissionSetList-C71zXeNi.js → PermissionSetList-IG15Aj5D.js} +124 -128
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Dx9qaSOy.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CDA9oDkd.js} +701 -701
- package/dist/RoleList-Cziztrpo.js +519 -0
- package/dist/TeamMemberList-DwxhZcrA.js +1081 -0
- package/dist/{TimesheetList-bEatYw_W.js → TimesheetList-D_JT5iyS.js} +74 -74
- package/dist/{app-CXo7sYZ7.js → app-h2mRYtCE.js} +4 -4
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DDneYlAk.js → dayjs.min-QbzmY4D1.js} +1 -1
- package/dist/employee-CY4sYUu8.js +232 -0
- package/dist/{index-CiQs6mxE.js → index-BLm_-G4e.js} +104 -81
- package/dist/{index-BAlO0GI7.js → index-CBgvOHm7.js} +1 -1
- package/dist/{iteration-BxC7Vx_7.js → iteration-J_5O7DIo.js} +1 -1
- package/dist/{lodash-Cgp0qhfw.js → lodash-btS1GWf0.js} +1 -1
- package/dist/src/api/employee/index.d.ts +4 -3
- package/dist/src/api/team/index.d.ts +3 -1
- package/dist/src/components/table/TablePagination.vue.d.ts +14 -0
- package/dist/src/composables/useDebounce.d.ts +9 -0
- package/dist/src/stores/employee.d.ts +515 -6
- package/dist/src/stores/team.d.ts +6 -0
- package/dist/src/types/employee.d.ts +35 -1
- package/dist/src/types/team.d.ts +18 -2
- package/dist/src/views/hr/employee/EmployeeForm.vue.d.ts +6 -2
- package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +3 -0
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +9 -0
- package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +5 -5
- package/dist/style.css +1 -1
- package/dist/{timesheet-DtpxRbZd.js → timesheet-B4Vja79b.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-4gHWq2VT.js → useAppStore-CEidzV7L.js} +1 -1
- package/dist/useDebounce-Cnv3r01W.js +83 -0
- package/dist/{useLoading-Ef4IqHD8.js → useLoading-fH82N_CS.js} +1 -1
- package/dist/{useReportPermissions-C4HbISVo.js → useReportPermissions-BZS4zPhT.js} +3 -3
- package/package.json +1 -1
- package/dist/AuditLogList-DaFC8LUT.js +0 -915
- package/dist/EmployeeList-fzS5kLyE.js +0 -621
- package/dist/RoleList-CAGV8HIy.js +0 -499
- package/dist/TeamMemberList-BOSxsyhc.js +0 -989
- package/dist/employee-CfNSjKLV.js +0 -145
- package/dist/team-DYjRRZA-.js +0 -33
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { d as T } from "./dayjs.min-DDneYlAk.js";
|
|
2
|
-
import { defineStore as _, storeToRefs as U } from "pinia";
|
|
3
|
-
import { ref as I } from "vue";
|
|
4
|
-
import { useCoreStore as $ } from "@feedmepos/mf-common";
|
|
5
|
-
import { b as r, g as o, s as v } from "./iteration-BxC7Vx_7.js";
|
|
6
|
-
import { t as b, i as S } from "./index-CiQs6mxE.js";
|
|
7
|
-
import { u as x } from "./useAppStore-4gHWq2VT.js";
|
|
8
|
-
const n = {
|
|
9
|
-
async readEmployees() {
|
|
10
|
-
return o(await r().get("/pos-users"));
|
|
11
|
-
},
|
|
12
|
-
async createEmployee(e) {
|
|
13
|
-
return o(await r().post("/pos-users", e));
|
|
14
|
-
},
|
|
15
|
-
async createMasterEmployee(e) {
|
|
16
|
-
return o(await r().post("/pos-users/master-user", e));
|
|
17
|
-
},
|
|
18
|
-
async migrateToMasterEmployee(e, t) {
|
|
19
|
-
return o(await r().put(`/pos-users/migrate/${e}`, t));
|
|
20
|
-
},
|
|
21
|
-
async updateEmployee(e, t) {
|
|
22
|
-
return o(await r().put(`/pos-users/${e}`, t));
|
|
23
|
-
},
|
|
24
|
-
async updateMasterEmployee(e, t) {
|
|
25
|
-
return o(await r().put(`/pos-users/master-user/${e}`, t));
|
|
26
|
-
},
|
|
27
|
-
async deleteEmployee(e) {
|
|
28
|
-
return o(
|
|
29
|
-
await r().put(`/pos-users/${e._id}`, {
|
|
30
|
-
user: e,
|
|
31
|
-
roles: []
|
|
32
|
-
})
|
|
33
|
-
);
|
|
34
|
-
},
|
|
35
|
-
async deleteMasterEmployee(e) {
|
|
36
|
-
return o(
|
|
37
|
-
await r().put(`/pos-users/master-user/${e._id}`, {
|
|
38
|
-
user: e,
|
|
39
|
-
roles: []
|
|
40
|
-
})
|
|
41
|
-
);
|
|
42
|
-
},
|
|
43
|
-
async generateEmployeePasscode() {
|
|
44
|
-
return `${o(await r().get("/pos-users/generate-passcode"))}`;
|
|
45
|
-
},
|
|
46
|
-
async syncUsersMeta() {
|
|
47
|
-
await r().post("/pos-users/create-users-meta");
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
async function i(e) {
|
|
51
|
-
const t = x().roles.value, { restaurants: d } = $(), M = e.reduce((u, m) => {
|
|
52
|
-
var w;
|
|
53
|
-
const { _id: f, restaurantId: l } = m, p = u.findIndex((s) => s._id === f), g = ((w = d.value.find((s) => s._id === l)) == null ? void 0 : w.profile.name) || "", c = t.find((s) => s._id === m.role), E = {
|
|
54
|
-
restaurantId: l,
|
|
55
|
-
restaurantName: g,
|
|
56
|
-
roleId: (c == null ? void 0 : c._id) || "",
|
|
57
|
-
roleName: (c == null ? void 0 : c.name) || ""
|
|
58
|
-
};
|
|
59
|
-
return p < 0 ? u.push({
|
|
60
|
-
...m,
|
|
61
|
-
since: T(S(f)).format("DD/MM/YYYY"),
|
|
62
|
-
restaurants: [E]
|
|
63
|
-
}) : u[p].restaurants.some((s) => s.restaurantId === l) || (u[p].restaurants = v([...u[p].restaurants, E], {
|
|
64
|
-
selector: "restaurantName"
|
|
65
|
-
})), u;
|
|
66
|
-
}, []);
|
|
67
|
-
return v(M, { selector: "name" });
|
|
68
|
-
}
|
|
69
|
-
const D = _("employee", () => {
|
|
70
|
-
const e = I([]), t = I(!1), d = I([]);
|
|
71
|
-
async function M() {
|
|
72
|
-
try {
|
|
73
|
-
t.value = !0;
|
|
74
|
-
const s = await n.readEmployees();
|
|
75
|
-
e.value = await i(s);
|
|
76
|
-
} catch (s) {
|
|
77
|
-
console.log("Error reading employees:", s);
|
|
78
|
-
} finally {
|
|
79
|
-
t.value = !1;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
async function u(s) {
|
|
83
|
-
const a = await n.createEmployee(s);
|
|
84
|
-
e.value = await i(a);
|
|
85
|
-
}
|
|
86
|
-
async function m(s, a) {
|
|
87
|
-
const y = await n.updateEmployee(s, a);
|
|
88
|
-
e.value = await i(y);
|
|
89
|
-
}
|
|
90
|
-
async function f(s) {
|
|
91
|
-
const a = await n.deleteEmployee(s);
|
|
92
|
-
e.value = await i(a);
|
|
93
|
-
}
|
|
94
|
-
async function l(s) {
|
|
95
|
-
const a = await n.deleteMasterEmployee(s);
|
|
96
|
-
e.value = await i(a);
|
|
97
|
-
}
|
|
98
|
-
async function p(s) {
|
|
99
|
-
const a = await n.createMasterEmployee(s);
|
|
100
|
-
e.value = await i(a);
|
|
101
|
-
}
|
|
102
|
-
async function g(s, a) {
|
|
103
|
-
const y = await n.updateMasterEmployee(s, a);
|
|
104
|
-
e.value = await i(y);
|
|
105
|
-
}
|
|
106
|
-
async function c(s, a) {
|
|
107
|
-
const y = await n.migrateToMasterEmployee(s, a);
|
|
108
|
-
e.value = await i(y);
|
|
109
|
-
}
|
|
110
|
-
async function E() {
|
|
111
|
-
try {
|
|
112
|
-
d.value = await b.readTeamMemberPosUserIds();
|
|
113
|
-
} catch (s) {
|
|
114
|
-
console.log("Error reading team member pos user ids:", s);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
async function w() {
|
|
118
|
-
await n.syncUsersMeta();
|
|
119
|
-
}
|
|
120
|
-
return {
|
|
121
|
-
employees: e,
|
|
122
|
-
restrictEmployeeIds: d,
|
|
123
|
-
isLoading: t,
|
|
124
|
-
readEmployees: M,
|
|
125
|
-
createEmployee: u,
|
|
126
|
-
updateEmployee: m,
|
|
127
|
-
deleteEmployee: f,
|
|
128
|
-
createMasterEmployee: p,
|
|
129
|
-
updateMasterEmployee: g,
|
|
130
|
-
deleteMasterEmployee: l,
|
|
131
|
-
migrateToMasterUser: c,
|
|
132
|
-
readTeamMemberPosUserIds: E,
|
|
133
|
-
syncUsersMeta: w
|
|
134
|
-
};
|
|
135
|
-
}), j = () => {
|
|
136
|
-
const e = D();
|
|
137
|
-
return {
|
|
138
|
-
...e,
|
|
139
|
-
...U(e)
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
export {
|
|
143
|
-
n as E,
|
|
144
|
-
j as u
|
|
145
|
-
};
|
package/dist/team-DYjRRZA-.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineStore as d } from "pinia";
|
|
2
|
-
import { ref as s, computed as o } from "vue";
|
|
3
|
-
import { t as f } from "./index-CiQs6mxE.js";
|
|
4
|
-
const I = d("team", () => {
|
|
5
|
-
const r = s([]), a = s(!1), m = o(
|
|
6
|
-
() => Object.fromEntries(r.value.map((e) => [e.doc.userId, e.name]))
|
|
7
|
-
), n = o(
|
|
8
|
-
() => Object.fromEntries(r.value.map((e) => [e.doc.userId, e.email]))
|
|
9
|
-
), u = o(
|
|
10
|
-
() => Object.fromEntries(r.value.map((e) => [e.doc.userId, e.phoneNumber]))
|
|
11
|
-
);
|
|
12
|
-
async function c({ force: e = !1 } = {}) {
|
|
13
|
-
if (!(!e && r.value.length > 0))
|
|
14
|
-
try {
|
|
15
|
-
a.value = !0;
|
|
16
|
-
const i = await f.readTeamMembers();
|
|
17
|
-
r.value = i.sort((t, l) => t.doc.isOwner ? -1 : t.name.localeCompare(l.name));
|
|
18
|
-
} finally {
|
|
19
|
-
a.value = !1;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
members: r,
|
|
24
|
-
isLoading: a,
|
|
25
|
-
userIdToName: m,
|
|
26
|
-
userIdToEmail: n,
|
|
27
|
-
userIdToPhone: u,
|
|
28
|
-
readTeamMembers: c
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
export {
|
|
32
|
-
I as u
|
|
33
|
-
};
|