@feedmepos/mf-hrm-portal 2.1.1-dev → 2.1.1-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/ApprovalCodeList-BH5sgVMU.js +638 -0
- package/dist/AuditLogList-Q4L5Te8O.js +1145 -0
- package/dist/CollapsibleWrapper.vue_vue_type_script_setup_true_lang-BLJlmPVa.js +58 -0
- package/dist/EmployeeList-GtKmJZbf.js +899 -0
- package/dist/GrantUserList-CnLjOi5_.js +468 -0
- package/dist/Main-Cn7Dawg4.js +120 -0
- package/dist/{Main-mTxcltDY.js → Main-DLlpEU3j.js} +11 -9
- package/dist/{Main-BLRr_ORG.js → Main-cskEZ3k_.js} +1033 -1035
- package/dist/PermissionSetList-C2fK2pTz.js +357 -0
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CMh0DL1_.js +3458 -0
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_79737e32_lang-Czo3FLbc.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_a439fdd8_lang-BJp9hEfv.js} +1 -2
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +38 -0
- package/dist/RoleList-CcuT1ERb.js +567 -0
- package/dist/TeamMemberList-Dfs2iNdC.js +1131 -0
- package/dist/{TimesheetList-D21j4zLV.js → TimesheetList-B1H_6zfP.js} +136 -141
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CRmmIfTk.js → TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-DeTpbaRk.js} +14 -13
- package/dist/{app-CX-St7pv.js → app-DX-PG6wx.js} +2725 -5281
- package/dist/app.js +1 -1
- package/dist/approval-code-Q4666xp5.js +58 -0
- package/dist/{dayjs.min-MDoe5X-P.js → dayjs.min-BJrHE7oz.js} +1 -1
- package/dist/{employee-B2cdx2t4.js → employee-BJcqtqLM.js} +27 -26
- package/dist/grant-user-CQZaTzVt.js +67 -0
- package/dist/{TableEmptyState.vue_vue_type_script_setup_true_lang-Ci_MVqGK.js → index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js} +19 -50
- package/dist/iteration-Cfaqt-0s.js +7682 -0
- package/dist/{lodash-DZAGPZLQ.js → lodash-ClKqCmlZ.js} +1 -1
- package/dist/restaurant-YOVMuuFY.js +1876 -0
- package/dist/role-CR_-nBDY.js +82 -0
- package/dist/rule-BB-3S-2R.js +996 -0
- package/dist/src/api/approval-code/index.d.ts +7 -0
- package/dist/src/api/audit-log/index.d.ts +0 -6
- package/dist/src/components/CheckboxInput.vue.d.ts +1 -1
- package/dist/src/components/button/ResponsiveFabButton.vue.d.ts +1 -7
- package/dist/src/components/table/TableEmptyState.vue.d.ts +15 -7
- package/dist/src/composables/useBasePermission.d.ts +1 -2
- package/dist/src/helpers/permission-set.d.ts +4 -8
- package/dist/src/helpers/rule.d.ts +1 -2
- package/dist/src/router/shared.d.ts +3 -1
- package/dist/src/stores/approval-code.d.ts +140 -0
- package/dist/src/stores/permission-set.d.ts +3 -12
- package/dist/src/types/approval-code.d.ts +99 -0
- package/dist/src/types/audit-log.d.ts +1 -1
- package/dist/src/views/approval-code/ApprovalCodeList.vue.d.ts +26 -0
- package/dist/src/views/approval-code/components/ApprovalCodeForm.vue.d.ts +17 -0
- package/dist/src/views/approval-code/locales/index.d.ts +320 -0
- package/dist/src/views/audit-log/locales/index.d.ts +0 -296
- package/dist/src/views/hr/employee/EmployeeList.vue.d.ts +0 -1
- package/dist/src/views/pos-access/locales/index.d.ts +48 -0
- package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -13
- package/dist/src/views/team/locales/index.d.ts +0 -72
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/useAppStore-DNTlIeMv.js +93 -0
- package/dist/useDebounce-CWb5QR9G.js +28 -0
- package/dist/{useLoading-qgSjOzRD.js → useLoading-BH02lYns.js} +1 -1
- package/dist/{useReportPermissions-CIhkjN3B.js → useReportPermissions-ybHA26cJ.js} +3 -3
- package/package.json +2 -2
- package/dist/AuditLogList-Cvp-5_0y.js +0 -1608
- package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-Cb8-YaiH.js +0 -387
- package/dist/EmployeeList-DgrD3Hjm.js +0 -884
- package/dist/Main-G3am-0Xi.js +0 -577
- package/dist/PermissionSetList-OzyfE-Yg.js +0 -392
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Ca2NnAAF.js +0 -4121
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js +0 -42
- package/dist/RoleList-DOZ5RJ6A.js +0 -684
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
- package/dist/TeamMemberList-CAqLUyQK.js +0 -1186
- package/dist/iteration-B38iapI_.js +0 -9556
- package/dist/rule-DftQBR76.js +0 -1057
- package/dist/src/composables/useConditionDraft.d.ts +0 -40
- package/dist/src/composables/useCoverConditionOverride.d.ts +0 -61
- package/dist/src/helpers/business-timezone.d.ts +0 -22
- package/dist/src/helpers/filter.d.ts +0 -15
- package/dist/src/helpers/permission-reconcile.d.ts +0 -15
- package/dist/src/helpers/permission-reconcile.test.d.ts +0 -1
- package/dist/src/views/audit-log/event-line.d.ts +0 -13
- package/dist/src/views/audit-log/snapshot-diff.d.ts +0 -11
- package/dist/src/views/team/condition-builders/ConditionFormHost.vue.d.ts +0 -22
- package/dist/src/views/team/condition-builders/ConditionFormRenderer.vue.d.ts +0 -23
- package/dist/src/views/team/condition-builders/component-map.d.ts +0 -4
- package/dist/src/views/team/condition-builders/condition-form-dedupe.d.ts +0 -23
- package/dist/useAppStore-BBsP5C3E.js +0 -169
- package/dist/useDebounce-B8ZPVS5C.js +0 -15
- /package/dist/src/views/{grant → pos-access}/Main.vue.d.ts +0 -0
package/dist/app.js
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineStore as C } from "pinia";
|
|
2
|
+
import { ref as l } from "vue";
|
|
3
|
+
import { g as p, b as s } from "./restaurant-YOVMuuFY.js";
|
|
4
|
+
const n = {
|
|
5
|
+
async getApprovalCodes() {
|
|
6
|
+
return p(await s("approval-codes").get(""));
|
|
7
|
+
},
|
|
8
|
+
async createApprovalCodes(r) {
|
|
9
|
+
return p(await s("approval-codes").post("", r));
|
|
10
|
+
},
|
|
11
|
+
async revokeApprovalCode(r, a) {
|
|
12
|
+
return p(
|
|
13
|
+
await s("approval-codes").patch(`/revoke/${r}`, null, {
|
|
14
|
+
params: { restaurantId: a }
|
|
15
|
+
})
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
}, A = C("approvalCode", () => {
|
|
19
|
+
const r = l([]), a = l(!1);
|
|
20
|
+
async function d() {
|
|
21
|
+
a.value = !0;
|
|
22
|
+
try {
|
|
23
|
+
r.value = (await n.getApprovalCodes()).sort(
|
|
24
|
+
(o, e) => o.createdAt < e.createdAt ? 1 : -1
|
|
25
|
+
);
|
|
26
|
+
} catch (o) {
|
|
27
|
+
throw console.error("Error reading approval codes:", o), o;
|
|
28
|
+
} finally {
|
|
29
|
+
a.value = !1;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async function v(o) {
|
|
33
|
+
try {
|
|
34
|
+
const e = await n.createApprovalCodes(o);
|
|
35
|
+
return r.value = [...e, ...r.value], e;
|
|
36
|
+
} catch (e) {
|
|
37
|
+
throw console.error("Error creating approval codes:", e), e;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async function i(o, e) {
|
|
41
|
+
try {
|
|
42
|
+
const t = await n.revokeApprovalCode(o, e), c = r.value.findIndex((u) => u._id === o);
|
|
43
|
+
c !== -1 && (r.value[c] = t);
|
|
44
|
+
} catch (t) {
|
|
45
|
+
throw console.error("Error revoking approval code:", t), t;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
approvalCodes: r,
|
|
50
|
+
isLoading: a,
|
|
51
|
+
readApprovalCodes: d,
|
|
52
|
+
createApprovalCodes: v,
|
|
53
|
+
revokeApprovalCode: i
|
|
54
|
+
};
|
|
55
|
+
}), g = A;
|
|
56
|
+
export {
|
|
57
|
+
g as u
|
|
58
|
+
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { d as g } from "./dayjs.min-
|
|
1
|
+
import { d as g } from "./dayjs.min-BJrHE7oz.js";
|
|
2
2
|
import { defineStore as $, storeToRefs as T } from "pinia";
|
|
3
3
|
import { ref as m } from "vue";
|
|
4
|
-
import {
|
|
4
|
+
import { s as E } from "./iteration-Cfaqt-0s.js";
|
|
5
|
+
import { b as i, g as f, u as w } from "./restaurant-YOVMuuFY.js";
|
|
5
6
|
import { i as v } from "./utils-BZkjJbju.js";
|
|
6
|
-
import { u as _ } from "./
|
|
7
|
+
import { u as _ } from "./role-CR_-nBDY.js";
|
|
7
8
|
const o = {
|
|
8
9
|
async readEmployees() {
|
|
9
|
-
return f(await
|
|
10
|
+
return f(await i().get("/pos-users"));
|
|
10
11
|
},
|
|
11
12
|
async readEmployeesPage(e) {
|
|
12
13
|
var t, p;
|
|
13
14
|
return f(
|
|
14
|
-
await
|
|
15
|
+
await i().get("/pos-users/paged", {
|
|
15
16
|
params: {
|
|
16
17
|
limit: e.limit,
|
|
17
18
|
offset: e.offset,
|
|
@@ -23,22 +24,22 @@ const o = {
|
|
|
23
24
|
);
|
|
24
25
|
},
|
|
25
26
|
async createEmployee(e) {
|
|
26
|
-
await
|
|
27
|
+
await i().post("/pos-users", e);
|
|
27
28
|
},
|
|
28
29
|
async createMasterEmployee(e) {
|
|
29
|
-
await
|
|
30
|
+
await i().post("/pos-users/master-user", e);
|
|
30
31
|
},
|
|
31
32
|
async migrateToMasterEmployee(e, t) {
|
|
32
|
-
await
|
|
33
|
+
await i().put(`/pos-users/migrate/${e}`, t);
|
|
33
34
|
},
|
|
34
35
|
async updateEmployee(e, t) {
|
|
35
|
-
await
|
|
36
|
+
await i().put(`/pos-users/${e}`, t);
|
|
36
37
|
},
|
|
37
38
|
async updateMasterEmployee(e, t) {
|
|
38
|
-
await
|
|
39
|
+
await i().put(`/pos-users/master-user/${e}`, t);
|
|
39
40
|
},
|
|
40
41
|
async deleteEmployee(e) {
|
|
41
|
-
await
|
|
42
|
+
await i().put(`/pos-users/${e._id}`, {
|
|
42
43
|
user: e,
|
|
43
44
|
roles: [],
|
|
44
45
|
previousRoles: e.restaurants.map((t) => ({
|
|
@@ -48,7 +49,7 @@ const o = {
|
|
|
48
49
|
});
|
|
49
50
|
},
|
|
50
51
|
async deleteMasterEmployee(e) {
|
|
51
|
-
await
|
|
52
|
+
await i().put(`/pos-users/master-user/${e._id}`, {
|
|
52
53
|
user: e,
|
|
53
54
|
roles: [],
|
|
54
55
|
previousRoles: e.restaurants.map((t) => ({
|
|
@@ -59,11 +60,11 @@ const o = {
|
|
|
59
60
|
},
|
|
60
61
|
async generateEmployeePasscode() {
|
|
61
62
|
return `${f(
|
|
62
|
-
await
|
|
63
|
+
await i().get("/pos-users/generate-passcode")
|
|
63
64
|
)}`;
|
|
64
65
|
},
|
|
65
66
|
async syncUsersMeta() {
|
|
66
|
-
await
|
|
67
|
+
await i().post("/pos-users/create-users-meta");
|
|
67
68
|
}
|
|
68
69
|
};
|
|
69
70
|
async function h(e) {
|
|
@@ -135,22 +136,22 @@ const R = $("employee", () => {
|
|
|
135
136
|
async function a(s) {
|
|
136
137
|
try {
|
|
137
138
|
c.value = !0, await e.readRestaurants();
|
|
138
|
-
const
|
|
139
|
-
p.value =
|
|
139
|
+
const l = await o.readEmployeesPage(s);
|
|
140
|
+
p.value = l.items.map(M), u.value = l.total;
|
|
140
141
|
} finally {
|
|
141
142
|
c.value = !1;
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
|
-
async function n(s,
|
|
145
|
+
async function n(s, l) {
|
|
145
146
|
await e.readRestaurants();
|
|
146
|
-
const I =
|
|
147
|
+
const I = l ?? (await o.readEmployeesPage({ ...s, limit: 1, offset: 0 })).total;
|
|
147
148
|
return I === 0 ? [] : (await o.readEmployeesPage({ ...s, limit: I, offset: 0 })).items.map(M);
|
|
148
149
|
}
|
|
149
150
|
async function d(s) {
|
|
150
151
|
await o.createEmployee(s);
|
|
151
152
|
}
|
|
152
|
-
async function y(s,
|
|
153
|
-
await o.updateEmployee(s,
|
|
153
|
+
async function y(s, l) {
|
|
154
|
+
await o.updateEmployee(s, l);
|
|
154
155
|
}
|
|
155
156
|
async function P(s) {
|
|
156
157
|
await o.deleteEmployee(s);
|
|
@@ -161,11 +162,11 @@ const R = $("employee", () => {
|
|
|
161
162
|
async function N(s) {
|
|
162
163
|
await o.createMasterEmployee(s);
|
|
163
164
|
}
|
|
164
|
-
async function S(s,
|
|
165
|
-
await o.updateMasterEmployee(s,
|
|
165
|
+
async function S(s, l) {
|
|
166
|
+
await o.updateMasterEmployee(s, l);
|
|
166
167
|
}
|
|
167
|
-
async function D(s,
|
|
168
|
-
await o.migrateToMasterEmployee(s,
|
|
168
|
+
async function D(s, l) {
|
|
169
|
+
await o.migrateToMasterEmployee(s, l);
|
|
169
170
|
}
|
|
170
171
|
async function U() {
|
|
171
172
|
await o.syncUsersMeta();
|
|
@@ -187,7 +188,7 @@ const R = $("employee", () => {
|
|
|
187
188
|
migrateToMasterUser: D,
|
|
188
189
|
syncUsersMeta: U
|
|
189
190
|
};
|
|
190
|
-
}),
|
|
191
|
+
}), z = () => {
|
|
191
192
|
const e = R();
|
|
192
193
|
return {
|
|
193
194
|
...e,
|
|
@@ -196,5 +197,5 @@ const R = $("employee", () => {
|
|
|
196
197
|
};
|
|
197
198
|
export {
|
|
198
199
|
o as E,
|
|
199
|
-
|
|
200
|
+
z as u
|
|
200
201
|
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineStore as f } from "pinia";
|
|
2
|
+
import { ref as u } from "vue";
|
|
3
|
+
import { g as s, a as v, b as o } from "./restaurant-YOVMuuFY.js";
|
|
4
|
+
const c = {
|
|
5
|
+
async getGrantUsers() {
|
|
6
|
+
return s(await o("grant").get(""));
|
|
7
|
+
},
|
|
8
|
+
async createGrantUser(r) {
|
|
9
|
+
return s(await o("grant").post("", r));
|
|
10
|
+
},
|
|
11
|
+
async revokeGrantUser(r, a) {
|
|
12
|
+
return s(
|
|
13
|
+
await o("grant").patch(`/revoke/${r}`, null, {
|
|
14
|
+
params: { restaurantId: a }
|
|
15
|
+
})
|
|
16
|
+
);
|
|
17
|
+
},
|
|
18
|
+
// Test grant validation
|
|
19
|
+
async validatePasscode(r, a) {
|
|
20
|
+
return s(
|
|
21
|
+
await v().post("", {
|
|
22
|
+
passcode: r,
|
|
23
|
+
restaurantId: a
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}, w = f("grantUser", () => {
|
|
28
|
+
const r = u([]), a = u(!1);
|
|
29
|
+
async function l() {
|
|
30
|
+
a.value = !0;
|
|
31
|
+
try {
|
|
32
|
+
r.value = (await c.getGrantUsers()).sort(
|
|
33
|
+
(e, t) => e.createdAt < t.createdAt ? 1 : -1
|
|
34
|
+
);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
throw console.error("Error reading grant users:", e), e;
|
|
37
|
+
} finally {
|
|
38
|
+
a.value = !1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function g(e) {
|
|
42
|
+
try {
|
|
43
|
+
const t = await c.createGrantUser(e);
|
|
44
|
+
return r.value = [t, ...r.value], t;
|
|
45
|
+
} catch (t) {
|
|
46
|
+
throw console.error("Error creating grant user:", t), t;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async function U(e, t) {
|
|
50
|
+
try {
|
|
51
|
+
const n = await c.revokeGrantUser(e, t), i = r.value.findIndex((d) => d._id === e);
|
|
52
|
+
i !== -1 && (r.value[i] = n);
|
|
53
|
+
} catch (n) {
|
|
54
|
+
throw console.error("Error revoking grant user:", n), n;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
grantUsers: r,
|
|
59
|
+
isLoading: a,
|
|
60
|
+
readGrantUsers: l,
|
|
61
|
+
createGrantUser: g,
|
|
62
|
+
revokeGrantUser: U
|
|
63
|
+
};
|
|
64
|
+
}), h = w;
|
|
65
|
+
export {
|
|
66
|
+
h as u
|
|
67
|
+
};
|