@feedmepos/mf-hrm-portal 2.3.2-dev.7 → 2.3.2-dev.9
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-Bw0E-hZl.js → ApprovalCodeList-gb0bre9J.js} +7 -7
- package/dist/{AuditLogList-CA-_t77n.js → AuditLogList-9cwS6bL7.js} +795 -719
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-LtjNCAFN.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DR-c15gr.js} +2 -2
- package/dist/{EmployeeList-D_bX0EhQ.js → EmployeeList-DjyoW1we.js} +8 -8
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-CyZxQa-b.js → FormSection.vue_vue_type_script_setup_true_lang-BBWlADve.js} +1 -1
- package/dist/{GrantUserList-Cg7ITk_M.js → GrantUserList-yU2NqFVO.js} +8 -8
- package/dist/{Main-Bl-Ocx1G.js → Main-4KwMqF3h.js} +5 -5
- package/dist/{Main-BaB4vgI5.js → Main-BS_Lk_eB.js} +1005 -999
- package/dist/{Main-D5wi42fp.js → Main-BuG7SPnC.js} +10 -10
- package/dist/MyPosProfile-CuDzRaRS.js +360 -0
- package/dist/{PermissionSetList-kgG9H3DX.js → PermissionSetList-D7SS1iAr.js} +30 -29
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-y1YcZpGA.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-u1UlV2Aw.js} +902 -901
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-fQyCtDXM.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CYkv2x_y.js} +1 -1
- package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-3Q8udk43.js → RoleForm.vue_vue_type_script_setup_true_lang-hiMgwiya.js} +9 -9
- package/dist/{RoleList-Cmz97HHP.js → RoleList-B3P-LQYV.js} +7 -7
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CggEy3OI.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang--dsZOhnv.js} +1 -1
- package/dist/{ScheduleGeneralPage-B39k3SQH.js → ScheduleGeneralPage-Pq6ufiDu.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-C5j3D4eF.js → ScheduleModal.vue_vue_type_script_setup_true_lang-DKFJLsTW.js} +4 -4
- package/dist/{SchedulePage-AVmRkFi1.js → SchedulePage-8EAOfiJx.js} +189 -201
- package/dist/{SchedulePositionPage-3rE-O8CG.js → SchedulePositionPage-CGXeUnju.js} +3 -3
- package/dist/{SelectFilter-R7ry_GEg.js → SelectFilter-C-UEVLla.js} +1 -1
- package/dist/{TeamMemberList-CvDnIILn.js → TeamMemberList-Bd1O44Ur.js} +102 -101
- package/dist/TimesheetList-CSCmigCM.js +437 -0
- package/dist/{app-DKUCzcrc.js → app-BohKQtlz.js} +82 -14
- package/dist/app.js +1 -1
- package/dist/{approval-code-nsETgIry.js → approval-code-Bfvxsg8h.js} +4 -4
- package/dist/{dayjs.min-CtULWW1N.js → dayjs.min-C0MqTPg1.js} +1 -1
- package/dist/employee-DWxT78W2.js +172 -0
- package/dist/{grant-user-Dpa_Rl6j.js → grant-user-LZ3b6siI.js} +2 -2
- package/dist/{iteration-DpHBtiyr.js → index-DDDG-LHm.js} +698 -726
- package/dist/iteration-CcXrOMQe.js +30 -0
- package/dist/{lodash-YaHCUo_F.js → lodash-BRqMda7F.js} +1 -1
- package/dist/{member-grant-CEokFI3_.js → member-grant-a3AGCWfT.js} +2 -2
- package/dist/{restaurant-CDFKqEFm.js → restaurant-pL7vHt-H.js} +2 -2
- package/dist/{role-DyBVVlEA.js → role--EKCVqho.js} +8 -7
- package/dist/{rule-xErZqYmH.js → rule-Db3gFVHx.js} +83 -82
- package/dist/src/api/audit-log/index.d.ts +2 -0
- package/dist/src/api/employee/index.d.ts +1 -2
- package/dist/src/stores/approval-code.d.ts +1 -1
- package/dist/src/stores/employee.d.ts +3 -9
- package/dist/src/stores/grant-user.d.ts +1 -1
- package/dist/src/stores/permission-assignment.d.ts +2 -2
- package/dist/src/stores/permission-set.d.ts +2 -2
- package/dist/src/stores/restaurant.d.ts +2 -2
- package/dist/src/stores/role.d.ts +2 -2
- package/dist/src/stores/team.d.ts +1 -1
- package/dist/src/stores/timesheet.d.ts +62 -47
- package/dist/src/types/timesheet.d.ts +3 -0
- package/dist/src/views/audit-log/locales/index.d.ts +28 -0
- package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
- package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -0
- package/dist/style.css +1 -1
- package/dist/timesheet-NYW1P4rf.js +76 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BqsvPsPB.js → useAppStore-DV13z6oc.js} +1 -1
- package/dist/{useLoading-BS1bnZg1.js → useLoading-Fcnnfywt.js} +1 -1
- package/dist/useMessage-_ywT_N9X.js +17 -0
- package/dist/{useReportPermissions-DJEhkyGc.js → useReportPermissions-BcyVoKVq.js} +13 -13
- package/package.json +3 -3
- package/dist/MyPosProfile-CUG_201f.js +0 -290
- package/dist/TimesheetList-DYoglTi8.js +0 -401
- package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_d0c6fd51_lang-DBpzyQ17.js +0 -63
- package/dist/employee-DlsSqR3i.js +0 -210
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function d(e, r = []) {
|
|
2
|
+
const c = JSON.parse(JSON.stringify(e));
|
|
3
|
+
return r.length > 0 && r.forEach((s) => {
|
|
4
|
+
c[s] !== void 0 && delete c[s];
|
|
5
|
+
}), c;
|
|
6
|
+
}
|
|
7
|
+
function f(e, r) {
|
|
8
|
+
return r === void 0 ? e : typeof r == "function" ? r(e) : `${e[r]}`;
|
|
9
|
+
}
|
|
10
|
+
function g(e, r) {
|
|
11
|
+
return d(e).sort((s, u) => {
|
|
12
|
+
let n = f(s, r == null ? void 0 : r.selector), t = f(u, r == null ? void 0 : r.selector);
|
|
13
|
+
if (r != null && r.descending) {
|
|
14
|
+
const [a, l] = [n, t];
|
|
15
|
+
n = l, t = a;
|
|
16
|
+
}
|
|
17
|
+
return n.localeCompare(t, "en", { numeric: !0, sensitivity: "base" });
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function i(e, r) {
|
|
21
|
+
return e.reduce((c, s) => {
|
|
22
|
+
const u = f(s, r);
|
|
23
|
+
return c[u] = [...c[u] || [], s], c;
|
|
24
|
+
}, {});
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
d as c,
|
|
28
|
+
i as g,
|
|
29
|
+
g as s
|
|
30
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore as m, storeToRefs as y } from "pinia";
|
|
2
2
|
import { ref as i, computed as R } from "vue";
|
|
3
3
|
import { useCoreStore as g } from "@feedmepos/mf-common";
|
|
4
|
-
import { b as f, g as w } from "./app-
|
|
4
|
+
import { b as f, g as w } from "./app-BohKQtlz.js";
|
|
5
5
|
const I = {
|
|
6
6
|
async readRestaurants() {
|
|
7
7
|
return w(await f().get("/hr-restaurants"));
|
|
@@ -12,7 +12,7 @@ const I = {
|
|
|
12
12
|
{ operatingHours: a }
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
|
-
}, h = m("restaurant", () => {
|
|
15
|
+
}, h = m("hrm-restaurant", () => {
|
|
16
16
|
const { currentBusiness: e } = g(), a = i([]), v = R(() => new Map(a.value.map((r) => [r._id, r]))), o = i(!1), u = i(null);
|
|
17
17
|
let t = null, s = null;
|
|
18
18
|
async function p(r = !1) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { defineStore as B, storeToRefs as b } from "pinia";
|
|
2
2
|
import { ref as v } from "vue";
|
|
3
3
|
import { useCoreStore as x } from "@feedmepos/mf-common";
|
|
4
|
-
import
|
|
5
|
-
import { g as d, b as f } from "./app-
|
|
6
|
-
import {
|
|
4
|
+
import "./index-DDDG-LHm.js";
|
|
5
|
+
import { g as d, b as f } from "./app-BohKQtlz.js";
|
|
6
|
+
import { s as y } from "./iteration-CcXrOMQe.js";
|
|
7
|
+
import { u as g } from "./restaurant-pL7vHt-H.js";
|
|
7
8
|
const p = {
|
|
8
9
|
async readRoles() {
|
|
9
10
|
return d(await f().get("/pos-roles"));
|
|
@@ -41,7 +42,7 @@ async function m(t) {
|
|
|
41
42
|
e.restaurants = y(e.restaurants, { selector: "name" });
|
|
42
43
|
return y(l, { selector: "name" });
|
|
43
44
|
}
|
|
44
|
-
const
|
|
45
|
+
const h = B("hrm-role", () => {
|
|
45
46
|
const { currentBusiness: t } = x(), i = g(), s = v([]), l = v(!1), n = v(null);
|
|
46
47
|
let e = null, r = null;
|
|
47
48
|
async function c(o = !1) {
|
|
@@ -85,13 +86,13 @@ const A = B("role", () => {
|
|
|
85
86
|
updateRole: I,
|
|
86
87
|
deleteRole: S
|
|
87
88
|
};
|
|
88
|
-
}),
|
|
89
|
-
const t =
|
|
89
|
+
}), P = () => {
|
|
90
|
+
const t = h();
|
|
90
91
|
return {
|
|
91
92
|
...t,
|
|
92
93
|
...b(t)
|
|
93
94
|
};
|
|
94
95
|
};
|
|
95
96
|
export {
|
|
96
|
-
|
|
97
|
+
P as u
|
|
97
98
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { y as N, m as h, k as
|
|
1
|
+
import { e as j } from "./index-DDDG-LHm.js";
|
|
2
|
+
import { y as N, m as h, k as W, z as ne, P as z, g, b, B as L, v as x, C as y, s as F } from "./app-BohKQtlz.js";
|
|
3
|
+
import { s as V, c as re } from "./iteration-CcXrOMQe.js";
|
|
3
4
|
import { s as ie } from "./utils-BZkjJbju.js";
|
|
4
|
-
import { defineStore as
|
|
5
|
-
import { ref as v, computed as
|
|
6
|
-
import { useCoreStore as
|
|
7
|
-
import { u as oe } from "./restaurant-
|
|
5
|
+
import { defineStore as K, storeToRefs as Q } from "pinia";
|
|
6
|
+
import { ref as v, computed as C } from "vue";
|
|
7
|
+
import { useCoreStore as H } from "@feedmepos/mf-common";
|
|
8
|
+
import { u as oe } from "./restaurant-pL7vHt-H.js";
|
|
8
9
|
function k(e) {
|
|
9
10
|
if (e) {
|
|
10
11
|
if (typeof e == "string") {
|
|
@@ -24,7 +25,7 @@ function w(e) {
|
|
|
24
25
|
(t) => t !== null && typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 1 && Array.isArray(t.$in)
|
|
25
26
|
) : !0;
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function Y(e) {
|
|
28
29
|
const t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), n = (r, s, o) => {
|
|
29
30
|
var a, c;
|
|
30
31
|
const u = k(s.conditions);
|
|
@@ -52,14 +53,14 @@ function G(e) {
|
|
|
52
53
|
n(s.inverted ? i : t, s, r);
|
|
53
54
|
return [...Array.from(t.values()), ...Array.from(i.values())];
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function E(e, t) {
|
|
56
57
|
return `${e}::${[...t].sort().join(",")}`;
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
+
function G(e, t) {
|
|
59
60
|
const i = [...e], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
60
61
|
for (const a of e) {
|
|
61
62
|
const c = N(a.subject);
|
|
62
|
-
n.add(
|
|
63
|
+
n.add(E(c, a.actions)), a.inverted && a.actions.includes("manage") && r.add(`set_${c}`), !a.inverted && a.actions.includes("manage") && s.add(c);
|
|
63
64
|
}
|
|
64
65
|
const o = [...e];
|
|
65
66
|
for (; o.length > 0; ) {
|
|
@@ -70,7 +71,7 @@ function X(e, t) {
|
|
|
70
71
|
a.source && !a.source.trace && (a.source = { ...a.source, trace: l });
|
|
71
72
|
const m = [...l, `${u.name} (system)`];
|
|
72
73
|
for (const d of u.permissions ?? []) {
|
|
73
|
-
const f = N(d.subject), p =
|
|
74
|
+
const f = N(d.subject), p = E(f, d.actions);
|
|
74
75
|
n.has(p) || s.has(f) || (n.add(p), i.push({
|
|
75
76
|
...d,
|
|
76
77
|
// FdoPermissionRule.fields is string[] | null; RawRule expects string[] | undefined
|
|
@@ -84,7 +85,7 @@ function X(e, t) {
|
|
|
84
85
|
}));
|
|
85
86
|
}
|
|
86
87
|
for (const d of u.permissionSets ?? []) {
|
|
87
|
-
const f = N(d), p =
|
|
88
|
+
const f = N(d), p = E(f, ["manage"]), S = {
|
|
88
89
|
subject: f,
|
|
89
90
|
actions: ["manage"],
|
|
90
91
|
source: {
|
|
@@ -112,21 +113,21 @@ function ae(e) {
|
|
|
112
113
|
return [];
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
|
-
function
|
|
116
|
+
function X(e, t) {
|
|
116
117
|
return Array.isArray(e) ? e.includes(t) : e === t;
|
|
117
118
|
}
|
|
118
119
|
function ue(e) {
|
|
119
120
|
return Array.isArray(e) ? e[0] : e;
|
|
120
121
|
}
|
|
121
|
-
function
|
|
122
|
-
const i = t.find((r) =>
|
|
122
|
+
function Te(e, t) {
|
|
123
|
+
const i = t.find((r) => X(r.subject, e));
|
|
123
124
|
if (!(i != null && i.category) || i.isCategoryCover) return;
|
|
124
125
|
const n = t.find((r) => r.category === i.category && r.isCategoryCover);
|
|
125
126
|
if (n)
|
|
126
127
|
return ue(n.subject);
|
|
127
128
|
}
|
|
128
|
-
function
|
|
129
|
-
const i = t.find((n) =>
|
|
129
|
+
function Le(e, t) {
|
|
130
|
+
const i = t.find((n) => X(n.subject, e));
|
|
130
131
|
return !!(i != null && i.isCategoryCover);
|
|
131
132
|
}
|
|
132
133
|
function Z(e, t, i = /* @__PURE__ */ new Set()) {
|
|
@@ -141,7 +142,7 @@ function Z(e, t, i = /* @__PURE__ */ new Set()) {
|
|
|
141
142
|
return r;
|
|
142
143
|
}
|
|
143
144
|
function ce(e) {
|
|
144
|
-
const t =
|
|
145
|
+
const t = Y(e).map(
|
|
145
146
|
({ setNames: r, setId: s, ...o }) => o
|
|
146
147
|
), i = t.filter((r) => !r.inverted), n = t.filter((r) => r.inverted);
|
|
147
148
|
return T(i, n);
|
|
@@ -213,9 +214,9 @@ function le(e, t) {
|
|
|
213
214
|
return s;
|
|
214
215
|
}
|
|
215
216
|
function de(e) {
|
|
216
|
-
const t =
|
|
217
|
+
const t = G(
|
|
217
218
|
e,
|
|
218
|
-
|
|
219
|
+
z
|
|
219
220
|
), i = new Set(
|
|
220
221
|
t.filter((r) => {
|
|
221
222
|
var s;
|
|
@@ -348,7 +349,7 @@ function ye(e, t) {
|
|
|
348
349
|
conditions: JSON.stringify({ roleId: { $in: t } })
|
|
349
350
|
}), i;
|
|
350
351
|
}
|
|
351
|
-
function
|
|
352
|
+
function xe(e, t, { restaurantRoles: i, allRoleIds: n }) {
|
|
352
353
|
let r = q(
|
|
353
354
|
e.filter(
|
|
354
355
|
(s) => s.subject !== h.Subject.Business.restaurant && s.subject !== h.Subject.Restaurant.restaurant
|
|
@@ -359,7 +360,7 @@ function Le(e, t, { restaurantRoles: i, allRoleIds: n }) {
|
|
|
359
360
|
category: s,
|
|
360
361
|
showByFeatureFlag: o,
|
|
361
362
|
...a
|
|
362
|
-
} =
|
|
363
|
+
} = W.restaurant;
|
|
363
364
|
r.push(a);
|
|
364
365
|
const c = {
|
|
365
366
|
actions: [h.Action.manage],
|
|
@@ -378,14 +379,14 @@ function Le(e, t, { restaurantRoles: i, allRoleIds: n }) {
|
|
|
378
379
|
}
|
|
379
380
|
return r;
|
|
380
381
|
}
|
|
381
|
-
function
|
|
382
|
+
function ke(e) {
|
|
382
383
|
let t = e.userPermissions;
|
|
383
384
|
return e.reportSubjects && (t = fe(t, e.reportSubjects)), e.defaultReportSubjects && (t = ve(t, e.defaultReportSubjects)), {
|
|
384
385
|
customPermissions: le(
|
|
385
386
|
ce(e.inheritedPermissions),
|
|
386
387
|
de(t)
|
|
387
388
|
),
|
|
388
|
-
permissions: t.filter((i) => !i.inverted).map((i) => ({ ...i, subject:
|
|
389
|
+
permissions: t.filter((i) => !i.inverted).map((i) => ({ ...i, subject: ne(i.subject) }))
|
|
389
390
|
};
|
|
390
391
|
}
|
|
391
392
|
const _ = "/permission-sets", J = {
|
|
@@ -401,8 +402,8 @@ const _ = "/permission-sets", J = {
|
|
|
401
402
|
async delete(e) {
|
|
402
403
|
return g(await b().delete(`${_}/${e}`));
|
|
403
404
|
}
|
|
404
|
-
}, je =
|
|
405
|
-
const { currentBusiness: e } =
|
|
405
|
+
}, je = K("hrm-permission-set", () => {
|
|
406
|
+
const { currentBusiness: e } = H(), t = v([]), i = v(!1), n = v(null);
|
|
406
407
|
async function r() {
|
|
407
408
|
var l;
|
|
408
409
|
const u = ((l = e.value) == null ? void 0 : l._id) ?? null;
|
|
@@ -441,7 +442,7 @@ const _ = "/permission-sets", J = {
|
|
|
441
442
|
const e = je();
|
|
442
443
|
return {
|
|
443
444
|
...e,
|
|
444
|
-
...
|
|
445
|
+
...Q(e)
|
|
445
446
|
};
|
|
446
447
|
}, P = "/permission-assignments", I = {
|
|
447
448
|
async readAll() {
|
|
@@ -467,7 +468,7 @@ const _ = "/permission-sets", J = {
|
|
|
467
468
|
await b().post("/my-permissions/report-manage", { permissionKey: e, label: t })
|
|
468
469
|
);
|
|
469
470
|
}
|
|
470
|
-
}, Pe =
|
|
471
|
+
}, Pe = K("hrm-permission-assignment", () => {
|
|
471
472
|
const e = v([]);
|
|
472
473
|
async function t() {
|
|
473
474
|
const a = await I.readAll();
|
|
@@ -503,7 +504,7 @@ const _ = "/permission-sets", J = {
|
|
|
503
504
|
const e = Pe();
|
|
504
505
|
return {
|
|
505
506
|
...e,
|
|
506
|
-
...
|
|
507
|
+
...Q(e)
|
|
507
508
|
};
|
|
508
509
|
}, Ie = {
|
|
509
510
|
async fetchReportPermissions(e, t) {
|
|
@@ -518,33 +519,33 @@ const _ = "/permission-sets", J = {
|
|
|
518
519
|
await L().get(`/report-query/hrm/${e}/reports`, { params: i })
|
|
519
520
|
);
|
|
520
521
|
}
|
|
521
|
-
}, B = v([]), U = v(!1),
|
|
522
|
-
function
|
|
523
|
-
const e =
|
|
522
|
+
}, B = v([]), U = v(!1), O = v(!1), R = v(null), D = v(null), M = v(!1);
|
|
523
|
+
function Oe() {
|
|
524
|
+
const e = H();
|
|
524
525
|
async function t() {
|
|
525
526
|
var s;
|
|
526
527
|
const n = (s = e.currentBusiness.value) == null ? void 0 : s.id;
|
|
527
528
|
if (!n) return;
|
|
528
529
|
const r = localStorage.getItem("locale");
|
|
529
|
-
if (
|
|
530
|
-
if (
|
|
530
|
+
if (R.value !== n && (B.value = [], U.value = !1, O.value = !1, R.value = n, M.value = !1), !(U.value && D.value === r)) {
|
|
531
|
+
if (O.value) {
|
|
531
532
|
M.value = !0;
|
|
532
533
|
return;
|
|
533
534
|
}
|
|
534
|
-
|
|
535
|
+
O.value = !0;
|
|
535
536
|
try {
|
|
536
537
|
const o = await Ie.fetchReportPermissionsForPortal(n, r);
|
|
537
|
-
if (
|
|
538
|
+
if (R.value !== n) return;
|
|
538
539
|
B.value = o, U.value = !0, D.value = r;
|
|
539
540
|
} catch (o) {
|
|
540
|
-
if (
|
|
541
|
+
if (R.value !== n) return;
|
|
541
542
|
console.warn("Failed to fetch custom report permissions:", o), B.value = [];
|
|
542
543
|
} finally {
|
|
543
|
-
|
|
544
|
+
R.value === n && (O.value = !1, M.value && (M.value = !1, await t()));
|
|
544
545
|
}
|
|
545
546
|
}
|
|
546
547
|
}
|
|
547
|
-
const i =
|
|
548
|
+
const i = C(() => B.value.map(
|
|
548
549
|
(n) => n.isDefault ? {
|
|
549
550
|
label: n.name,
|
|
550
551
|
subject: `business::report::reports::${n.permissionKey}`,
|
|
@@ -566,22 +567,22 @@ function Re() {
|
|
|
566
567
|
return {
|
|
567
568
|
fetchCustomReportPermissions: t,
|
|
568
569
|
customReportPermissions: i,
|
|
569
|
-
isLoading:
|
|
570
|
-
isLoaded:
|
|
570
|
+
isLoading: C(() => O.value),
|
|
571
|
+
isLoaded: C(() => U.value)
|
|
571
572
|
};
|
|
572
573
|
}
|
|
573
574
|
function A(e) {
|
|
574
|
-
const t = we(), i = $e(), n = oe().restaurants, { customReportPermissions: r } =
|
|
575
|
+
const t = we(), i = $e(), n = oe().restaurants, { customReportPermissions: r } = Oe(), s = i.getPermissionAssignmentByUserId(e.id), o = Z(
|
|
575
576
|
(s == null ? void 0 : s.permissionSetIds) ?? e.permissionSetIds ?? [],
|
|
576
577
|
t.permissionSets.value
|
|
577
|
-
), a =
|
|
578
|
+
), a = Y(o).map(
|
|
578
579
|
({ setNames: p, ...S }) => S
|
|
579
580
|
), c = s == null ? void 0 : s.customPermissions, u = c ?? e.permissions.map((p) => ({
|
|
580
581
|
...p,
|
|
581
582
|
subject: N(p.subject)
|
|
582
|
-
})), l = T(a, u), m =
|
|
583
|
+
})), l = T(a, u), m = G(
|
|
583
584
|
Se(a, u),
|
|
584
|
-
|
|
585
|
+
z
|
|
585
586
|
).filter((p) => !p.inverted), d = ee(m), f = d ?? n.value.map((p) => p._id);
|
|
586
587
|
return {
|
|
587
588
|
doc: e,
|
|
@@ -590,7 +591,7 @@ function A(e) {
|
|
|
590
591
|
name: e.status === "invited" ? e.name || "-" : e.name && e.name !== e.email && e.name !== e.phoneNumber ? e.name : "-",
|
|
591
592
|
phoneNumber: e.phoneNumber,
|
|
592
593
|
email: e.email,
|
|
593
|
-
restaurants:
|
|
594
|
+
restaurants: V(
|
|
594
595
|
f.map((p) => {
|
|
595
596
|
var S;
|
|
596
597
|
return ((S = n.value.find((se) => se._id === p)) == null ? void 0 : S.profile.name) ?? "";
|
|
@@ -603,9 +604,9 @@ function A(e) {
|
|
|
603
604
|
loginMethod: e.loginMethod ?? "feedme"
|
|
604
605
|
};
|
|
605
606
|
}
|
|
606
|
-
const
|
|
607
|
-
Object.values(
|
|
608
|
-
),
|
|
607
|
+
const Re = Object.freeze(
|
|
608
|
+
Object.values(W)
|
|
609
|
+
), De = {
|
|
609
610
|
async readTeamMembers() {
|
|
610
611
|
return g(
|
|
611
612
|
await b().get("/portal-users")
|
|
@@ -662,7 +663,7 @@ const Oe = Object.freeze(
|
|
|
662
663
|
)}`;
|
|
663
664
|
}
|
|
664
665
|
};
|
|
665
|
-
function
|
|
666
|
+
function We(e, t, i) {
|
|
666
667
|
if (e.some((o) => o.subject === "all")) return "All";
|
|
667
668
|
const n = (i ?? F).filter(
|
|
668
669
|
(o) => o.subject === t
|
|
@@ -670,7 +671,7 @@ function De(e, t, i) {
|
|
|
670
671
|
return s.length === n.length ? "All" : s.length === 0 ? "-" : `${s.length} permission allow`;
|
|
671
672
|
}
|
|
672
673
|
function $(e) {
|
|
673
|
-
const t =
|
|
674
|
+
const t = re(e), i = t.subject;
|
|
674
675
|
return {
|
|
675
676
|
...t,
|
|
676
677
|
get conditions() {
|
|
@@ -725,20 +726,20 @@ function $(e) {
|
|
|
725
726
|
}
|
|
726
727
|
};
|
|
727
728
|
}
|
|
728
|
-
function
|
|
729
|
+
function ze(e) {
|
|
729
730
|
var n, r;
|
|
730
731
|
const t = e.map((s) => $(s)).find((s) => s.isDiscountOperation);
|
|
731
732
|
if (!t) return 100;
|
|
732
733
|
const i = Number((r = (n = t.conditions) == null ? void 0 : n.adjustment) == null ? void 0 : r.$lte);
|
|
733
734
|
return Number.isFinite(i) ? parseInt((i * 100).toFixed(0)) : 0;
|
|
734
735
|
}
|
|
735
|
-
function
|
|
736
|
+
function Ve(e, t) {
|
|
736
737
|
return t.isOwner ? { restaurantIds: null, roleIds: null } : { restaurantIds: ee(e), roleIds: te(e) };
|
|
737
738
|
}
|
|
738
739
|
function Ke(e) {
|
|
739
740
|
return (e == null ? void 0 : e.some((t) => t.subject === "all")) ?? !1;
|
|
740
741
|
}
|
|
741
|
-
function
|
|
742
|
+
function Qe(e) {
|
|
742
743
|
const t = $(e);
|
|
743
744
|
if (!t.isReportPermission) return;
|
|
744
745
|
const { name: i, ...n } = t.conditions ?? {};
|
|
@@ -779,7 +780,7 @@ function Ae(e) {
|
|
|
779
780
|
reason: ""
|
|
780
781
|
})) : r = F.find((s) => s.subject === i), r ? $(r) : void 0;
|
|
781
782
|
}
|
|
782
|
-
function
|
|
783
|
+
function Ye(e, t) {
|
|
783
784
|
const i = { values: [], passthrough: [], dropped: [] };
|
|
784
785
|
for (const n of e) {
|
|
785
786
|
const r = n == null ? void 0 : n.actions;
|
|
@@ -793,9 +794,9 @@ function Qe(e, t) {
|
|
|
793
794
|
return i;
|
|
794
795
|
}
|
|
795
796
|
function Ne(e, t = []) {
|
|
796
|
-
return
|
|
797
|
+
return V(
|
|
797
798
|
e.reduce((i, n) => {
|
|
798
|
-
const r =
|
|
799
|
+
const r = Re.find(
|
|
799
800
|
(s) => s.subject === n.subject && n.actions.includes("manage")
|
|
800
801
|
) || t.find((s) => s.subject === n.subject);
|
|
801
802
|
if (r) {
|
|
@@ -807,36 +808,36 @@ function Ne(e, t = []) {
|
|
|
807
808
|
);
|
|
808
809
|
}
|
|
809
810
|
export {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
811
|
+
me as $,
|
|
812
|
+
te as A,
|
|
813
|
+
fe as B,
|
|
814
|
+
ye as C,
|
|
815
|
+
xe as D,
|
|
816
|
+
le as E,
|
|
817
|
+
Se as H,
|
|
818
|
+
G as N,
|
|
819
|
+
Z as P,
|
|
820
|
+
ee as Q,
|
|
821
|
+
ce as R,
|
|
822
|
+
de as T,
|
|
822
823
|
Te as V,
|
|
823
|
-
|
|
824
|
-
|
|
824
|
+
Le as Y,
|
|
825
|
+
Oe as a,
|
|
826
|
+
Ve as b,
|
|
825
827
|
$e as c,
|
|
826
828
|
He as d,
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
829
|
+
Qe as e,
|
|
830
|
+
We as f,
|
|
831
|
+
ze as g,
|
|
830
832
|
Ke as h,
|
|
831
|
-
|
|
832
|
-
|
|
833
|
+
Ie as i,
|
|
834
|
+
Y as j,
|
|
833
835
|
Ne as m,
|
|
834
|
-
|
|
835
|
-
Se as q,
|
|
836
|
+
Re as p,
|
|
836
837
|
$ as r,
|
|
837
|
-
|
|
838
|
-
|
|
838
|
+
Ye as s,
|
|
839
|
+
De as t,
|
|
839
840
|
we as u,
|
|
840
|
-
|
|
841
|
-
|
|
841
|
+
ve as x,
|
|
842
|
+
ke as z
|
|
842
843
|
};
|
|
@@ -14,6 +14,7 @@ declare const AuditLogAPI: {
|
|
|
14
14
|
searchSubjects?: string[];
|
|
15
15
|
sources?: string[];
|
|
16
16
|
restaurantIds?: string[];
|
|
17
|
+
traceId?: string;
|
|
17
18
|
}): Promise<number>;
|
|
18
19
|
read(params?: {
|
|
19
20
|
limit?: number;
|
|
@@ -31,6 +32,7 @@ declare const AuditLogAPI: {
|
|
|
31
32
|
searchSubjects?: string[];
|
|
32
33
|
sources?: string[];
|
|
33
34
|
restaurantIds?: string[];
|
|
35
|
+
traceId?: string;
|
|
34
36
|
}): Promise<AuditLogEntry[]>;
|
|
35
37
|
/**
|
|
36
38
|
* FeedMe-admin options for the User filter. `actors` is the named admin list (internal
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { FdtoUpdatePosUserReq, FdtoUpdatePosMasterUserReq } from '@feedmepos/core/entity';
|
|
2
|
-
import type { Employee, IFdtoEmployeePage,
|
|
2
|
+
import type { Employee, IFdtoEmployeePage, IReadEmployeesPageReq } from '@/types/employee';
|
|
3
3
|
export interface IGeneratePasscodeParams {
|
|
4
4
|
restaurantIds: string[];
|
|
5
5
|
excludePosUserId?: string;
|
|
6
6
|
}
|
|
7
7
|
declare const EmployeeAPI: {
|
|
8
|
-
readEmployees(): Promise<IFdtoPosUser[]>;
|
|
9
8
|
readEmployeesPage(query: IReadEmployeesPageReq): Promise<IFdtoEmployeePage>;
|
|
10
9
|
createEmployee(dto: FdtoUpdatePosUserReq): Promise<string>;
|
|
11
10
|
createMasterEmployee(dto: FdtoUpdatePosMasterUserReq): Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IFdtoApprovalCode, IFdtoCreateApprovalCodeReq } from '@/types/approval-code';
|
|
2
|
-
export declare const useApprovalCodeStore: import("pinia").StoreDefinition<"
|
|
2
|
+
export declare const useApprovalCodeStore: import("pinia").StoreDefinition<"hrm-approval-code", Pick<{
|
|
3
3
|
approvalCodes: import("vue").Ref<{
|
|
4
4
|
_id: string;
|
|
5
5
|
businessId: string;
|
|
@@ -374,7 +374,6 @@ export declare const useEmployeeStore: () => {
|
|
|
374
374
|
})[]>;
|
|
375
375
|
totalEmployees: import("vue").Ref<number, number>;
|
|
376
376
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
377
|
-
readEmployees: () => Promise<void>;
|
|
378
377
|
readEmployeesPage: (query: IReadEmployeesPageReq) => Promise<void>;
|
|
379
378
|
readAllEmployeesPage: (query: Omit<IReadEmployeesPageReq, "limit" | "offset">, knownTotal?: number) => Promise<Employee[]>;
|
|
380
379
|
createEmployee: (dto: FdtoUpdatePosUserReq) => Promise<string>;
|
|
@@ -692,7 +691,6 @@ export declare const useEmployeeStore: () => {
|
|
|
692
691
|
})[]>;
|
|
693
692
|
totalEmployees: import("vue").Ref<number, number>;
|
|
694
693
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
695
|
-
readEmployees: () => Promise<void>;
|
|
696
694
|
readEmployeesPage: (query: IReadEmployeesPageReq) => Promise<void>;
|
|
697
695
|
readAllEmployeesPage: (query: Omit<IReadEmployeesPageReq, "limit" | "offset">, knownTotal?: number) => Promise<Employee[]>;
|
|
698
696
|
createEmployee: (dto: FdtoUpdatePosUserReq) => Promise<string>;
|
|
@@ -706,7 +704,7 @@ export declare const useEmployeeStore: () => {
|
|
|
706
704
|
}, "isLoading" | "employees" | "listEmployees" | "totalEmployees">>, options?: {
|
|
707
705
|
detached?: boolean;
|
|
708
706
|
} & import("vue").WatchOptions): () => void;
|
|
709
|
-
$onAction(callback: import("pinia").StoreOnActionListener<"employee", Pick<{
|
|
707
|
+
$onAction(callback: import("pinia").StoreOnActionListener<"hrm-employee", Pick<{
|
|
710
708
|
employees: import("vue").Ref<({
|
|
711
709
|
faceId?: unknown;
|
|
712
710
|
name: string;
|
|
@@ -855,7 +853,6 @@ export declare const useEmployeeStore: () => {
|
|
|
855
853
|
})[]>;
|
|
856
854
|
totalEmployees: import("vue").Ref<number, number>;
|
|
857
855
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
858
|
-
readEmployees: () => Promise<void>;
|
|
859
856
|
readEmployeesPage: (query: IReadEmployeesPageReq) => Promise<void>;
|
|
860
857
|
readAllEmployeesPage: (query: Omit<IReadEmployeesPageReq, "limit" | "offset">, knownTotal?: number) => Promise<Employee[]>;
|
|
861
858
|
createEmployee: (dto: FdtoUpdatePosUserReq) => Promise<string>;
|
|
@@ -1015,7 +1012,6 @@ export declare const useEmployeeStore: () => {
|
|
|
1015
1012
|
})[]>;
|
|
1016
1013
|
totalEmployees: import("vue").Ref<number, number>;
|
|
1017
1014
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
1018
|
-
readEmployees: () => Promise<void>;
|
|
1019
1015
|
readEmployeesPage: (query: IReadEmployeesPageReq) => Promise<void>;
|
|
1020
1016
|
readAllEmployeesPage: (query: Omit<IReadEmployeesPageReq, "limit" | "offset">, knownTotal?: number) => Promise<Employee[]>;
|
|
1021
1017
|
createEmployee: (dto: FdtoUpdatePosUserReq) => Promise<string>;
|
|
@@ -1175,7 +1171,6 @@ export declare const useEmployeeStore: () => {
|
|
|
1175
1171
|
})[]>;
|
|
1176
1172
|
totalEmployees: import("vue").Ref<number, number>;
|
|
1177
1173
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
1178
|
-
readEmployees: () => Promise<void>;
|
|
1179
1174
|
readEmployeesPage: (query: IReadEmployeesPageReq) => Promise<void>;
|
|
1180
1175
|
readAllEmployeesPage: (query: Omit<IReadEmployeesPageReq, "limit" | "offset">, knownTotal?: number) => Promise<Employee[]>;
|
|
1181
1176
|
createEmployee: (dto: FdtoUpdatePosUserReq) => Promise<string>;
|
|
@@ -1186,11 +1181,10 @@ export declare const useEmployeeStore: () => {
|
|
|
1186
1181
|
deleteMasterEmployee: (employee: Employee) => Promise<void>;
|
|
1187
1182
|
migrateToMasterUser: (userId: string, dto: FdtoUpdatePosMasterUserReq) => Promise<void>;
|
|
1188
1183
|
syncUsersMeta: () => Promise<void>;
|
|
1189
|
-
}, "
|
|
1184
|
+
}, "readEmployeesPage" | "readAllEmployeesPage" | "createEmployee" | "updateEmployee" | "deleteEmployee" | "createMasterEmployee" | "updateMasterEmployee" | "deleteMasterEmployee" | "migrateToMasterUser" | "syncUsersMeta">>, detached?: boolean): () => void;
|
|
1190
1185
|
$dispose(): void;
|
|
1191
|
-
$id: "employee";
|
|
1186
|
+
$id: "hrm-employee";
|
|
1192
1187
|
_customProperties: Set<string>;
|
|
1193
|
-
readEmployees: () => Promise<void>;
|
|
1194
1188
|
readEmployeesPage: (query: IReadEmployeesPageReq) => Promise<void>;
|
|
1195
1189
|
readAllEmployeesPage: (query: Omit<IReadEmployeesPageReq, "limit" | "offset">, knownTotal?: number) => Promise<Employee[]>;
|
|
1196
1190
|
createEmployee: (dto: FdtoUpdatePosUserReq) => Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IFdtoGrantUser, IFdtoCreateGrantUserReq } from '@/types/grant-user';
|
|
2
|
-
export declare const useGrantUserStore: import("pinia").StoreDefinition<"
|
|
2
|
+
export declare const useGrantUserStore: import("pinia").StoreDefinition<"hrm-grant-user", Pick<{
|
|
3
3
|
grantUsers: import("vue").Ref<{
|
|
4
4
|
_id: string;
|
|
5
5
|
passcode: string;
|
|
@@ -156,7 +156,7 @@ export declare const usePermissionAssignmentStore: () => {
|
|
|
156
156
|
}, "permissionAssignments">>, options?: {
|
|
157
157
|
detached?: boolean;
|
|
158
158
|
} & import("vue").WatchOptions): () => void;
|
|
159
|
-
$onAction(callback: import("pinia").StoreOnActionListener<"
|
|
159
|
+
$onAction(callback: import("pinia").StoreOnActionListener<"hrm-permission-assignment", Pick<{
|
|
160
160
|
permissionAssignments: import("vue").Ref<{
|
|
161
161
|
id: string;
|
|
162
162
|
customPermissions: {
|
|
@@ -266,7 +266,7 @@ export declare const usePermissionAssignmentStore: () => {
|
|
|
266
266
|
getPermissionAssignmentByUserId: (userId: string) => IFdtoPermissionAssignment | undefined;
|
|
267
267
|
}, "readPermissionAssignments" | "readPermissionAssignmentByUserId" | "createPermissionAssignment" | "updatePermissionAssignment" | "deletePermissionAssignment" | "getPermissionAssignmentByUserId">>, detached?: boolean): () => void;
|
|
268
268
|
$dispose(): void;
|
|
269
|
-
$id: "
|
|
269
|
+
$id: "hrm-permission-assignment";
|
|
270
270
|
_customProperties: Set<string>;
|
|
271
271
|
readPermissionAssignments: () => Promise<void>;
|
|
272
272
|
readPermissionAssignmentByUserId: (userId: string) => Promise<IFdtoPermissionAssignment | null>;
|
|
@@ -158,7 +158,7 @@ export declare const usePermissionSetStore: () => {
|
|
|
158
158
|
}, "isLoading" | "permissionSets">>, options?: {
|
|
159
159
|
detached?: boolean;
|
|
160
160
|
} & import("vue").WatchOptions): () => void;
|
|
161
|
-
$onAction(callback: import("pinia").StoreOnActionListener<"
|
|
161
|
+
$onAction(callback: import("pinia").StoreOnActionListener<"hrm-permission-set", Pick<{
|
|
162
162
|
permissionSets: import("vue").Ref<{
|
|
163
163
|
id: string;
|
|
164
164
|
permissions: {
|
|
@@ -265,7 +265,7 @@ export declare const usePermissionSetStore: () => {
|
|
|
265
265
|
deletePermissionSet: (id: string) => Promise<void>;
|
|
266
266
|
}, "readPermissionSets" | "createPermissionSet" | "updatePermissionSet" | "deletePermissionSet">>, detached?: boolean): () => void;
|
|
267
267
|
$dispose(): void;
|
|
268
|
-
$id: "
|
|
268
|
+
$id: "hrm-permission-set";
|
|
269
269
|
_customProperties: Set<string>;
|
|
270
270
|
readPermissionSets: () => Promise<void>;
|
|
271
271
|
createPermissionSet: (dto: IFdtoCreatePermissionSetReq) => Promise<void>;
|
|
@@ -137,7 +137,7 @@ export declare const useRestaurantStore: () => {
|
|
|
137
137
|
}, "isLoading" | "restaurants">>, options?: {
|
|
138
138
|
detached?: boolean;
|
|
139
139
|
} & import("vue").WatchOptions): () => void;
|
|
140
|
-
$onAction(callback: import("pinia").StoreOnActionListener<"restaurant", Pick<{
|
|
140
|
+
$onAction(callback: import("pinia").StoreOnActionListener<"hrm-restaurant", Pick<{
|
|
141
141
|
restaurants: import("vue").Ref<{
|
|
142
142
|
_id: string;
|
|
143
143
|
businessId: string;
|
|
@@ -235,7 +235,7 @@ export declare const useRestaurantStore: () => {
|
|
|
235
235
|
readRestaurants: (force?: boolean) => Promise<void>;
|
|
236
236
|
}, "readRestaurants">>, detached?: boolean): () => void;
|
|
237
237
|
$dispose(): void;
|
|
238
|
-
$id: "restaurant";
|
|
238
|
+
$id: "hrm-restaurant";
|
|
239
239
|
_customProperties: Set<string>;
|
|
240
240
|
readRestaurants: (force?: boolean) => Promise<void>;
|
|
241
241
|
};
|