@feedmepos/mf-hrm-portal 2.3.2-dev.2 → 2.3.2-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-sHnINTik.js → ApprovalCodeList-D3U4nvlF.js} +15 -14
- package/dist/{AuditLogList-C9C2emU9.js → AuditLogList-qGCW7tf0.js} +13 -13
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-B0VcRYUg.js +438 -0
- package/dist/EmployeeList-Bd73xDCX.js +776 -0
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-cLEnrtC6.js +45 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +49 -0
- package/dist/{GrantUserList-LWpqhl-5.js → GrantUserList-C71pal0N.js} +16 -15
- package/dist/{Main-PBJjfzBg.js → Main-BWJPyEU1.js} +5 -5
- package/dist/{Main-BWKb-QIE.js → Main-CCdTWngg.js} +11 -11
- package/dist/Main-DGf0bQvy.js +96 -0
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
- package/dist/{PermissionSetList-D2qZVlF4.js → PermissionSetList-BS-oBunI.js} +46 -45
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CkOAT-oX.js +4167 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js +35 -0
- package/dist/RoleList-B_7UnVNb.js +740 -0
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Cs0rhCa3.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BXihM4sl.js} +1 -1
- package/dist/{ScheduleGeneralPage-C4J6jYtG.js → ScheduleGeneralPage-DpNvWNGs.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-3UqO6uPu.js → ScheduleModal.vue_vue_type_script_setup_true_lang-DIYLOF9N.js} +186 -187
- package/dist/{SchedulePage-ICzggri0.js → SchedulePage-QW-cYvu2.js} +13 -13
- package/dist/{SchedulePositionPage-BshUCd_C.js → SchedulePositionPage-BtFfVo2N.js} +3 -3
- package/dist/{SelectFilter-D9T0nFvG.js → SelectFilter-BXeVKgHN.js} +1 -1
- package/dist/TeamMemberList-DoisBYnk.js +1154 -0
- package/dist/{TimesheetList-nxhr0EWj.js → TimesheetList-D-bESKe5.js} +9 -9
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BLqgALLe.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D0zAVqCa.js} +3 -3
- package/dist/{app-n6d4AmtP.js → app-D-MUq9Ab.js} +3429 -6368
- package/dist/app.js +3 -3
- package/dist/{approval-code-1j1OoXt1.js → approval-code-BXUiojPH.js} +1 -1
- package/dist/{dayjs.min-DdNivv4b.js → dayjs.min-BZ1pM-6M.js} +34 -34
- package/dist/{employee-BlfleiCU.js → employee-HQEU8fjb.js} +47 -48
- package/dist/{grant-user-BmTyexk3.js → grant-user-CBJ3gEgW.js} +1 -1
- package/dist/{iteration-y_jodvfN.js → iteration-ogxW2-Tv.js} +1 -1
- package/dist/{lodash-B2eWEGH4.js → lodash-Def4gaas.js} +1 -1
- package/dist/restaurant-D2mfKHaH.js +1880 -0
- package/dist/{role-DfZi7Ssk.js → role-JDoDFVd9.js} +4 -5
- package/dist/{rule-ChmhcGgA.js → rule-DPtqlnz-.js} +100 -105
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +3 -11
- package/dist/src/helpers/string.d.ts +1 -10
- package/dist/src/router/shared.d.ts +1 -3
- package/dist/src/stores/restaurant.d.ts +7 -7
- package/dist/src/stores/team.d.ts +0 -30
- package/dist/src/types/team.d.ts +1 -17
- package/dist/src/views/hr/locales/index.d.ts +4 -24
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +2 -29
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
- package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -11
- package/dist/src/views/team/components/ConditionPermission.vue.d.ts +0 -11
- package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +0 -21
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +0 -11
- package/dist/src/views/team/locales/index.d.ts +0 -716
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -48
- package/dist/src/views/team/{components/MemberStatusBadge.vue.d.ts → member/MemberInfo.vue.d.ts} +2 -2
- package/dist/src/views/team/member/TeamMemberList.vue.d.ts +0 -1
- package/dist/string-VNuQNweN.js +15 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BPARQyvJ.js → useAppStore-DZCdxlCd.js} +1 -1
- package/dist/{useLoading-iPESFb6R.js → useLoading-Nygx2zn8.js} +1 -1
- package/dist/{useReportPermissions-By-BoJZb.js → useReportPermissions-CxV7Dz1B.js} +5 -5
- package/package.json +2 -2
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BbsPesWY.js +0 -459
- package/dist/EmployeeList-D4oy5hXz.js +0 -896
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-Cl053Tg1.js +0 -90
- package/dist/Main-CVGiOYpC.js +0 -101
- package/dist/MyPosProfile-BQCBFMFw.js +0 -301
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +0 -126
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-ZSREAS1r.js +0 -4243
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DRGTxOMW.js +0 -1831
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-DFDTw0lj.js +0 -547
- package/dist/RoleList-DG0crFzW.js +0 -274
- package/dist/TeamMemberList-C970Iqlj.js +0 -2086
- package/dist/member-grant-CzZUdO_s.js +0 -55
- package/dist/restaurant-Dl6yx37M.js +0 -51
- package/dist/src/api/my-pos-profile/index.d.ts +0 -5
- package/dist/src/api/sso-provider/index.d.ts +0 -5
- package/dist/src/api/staff-invite/index.d.ts +0 -16
- package/dist/src/components/form/SegmentedTabs.vue.d.ts +0 -23
- package/dist/src/composables/useMenuAccess.d.ts +0 -56
- package/dist/src/composables/useSsoProviders.d.ts +0 -19
- package/dist/src/composables/useStaffInviteProviders.d.ts +0 -8
- package/dist/src/helpers/member-grant.d.ts +0 -36
- package/dist/src/helpers/my-pos-profile.d.ts +0 -37
- package/dist/src/helpers/pos-assignment-rows.d.ts +0 -28
- package/dist/src/helpers/staff-invite.d.ts +0 -54
- package/dist/src/router/menu-access-guard.d.ts +0 -17
- package/dist/src/types/my-pos-profile.d.ts +0 -25
- package/dist/src/types/sso-provider.d.ts +0 -10
- package/dist/src/types/staff-invite.d.ts +0 -100
- package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +0 -2
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +0 -4
- package/dist/src/views/my-pos-profile/locales/index.d.ts +0 -200
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +0 -51
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -44
- package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +0 -11
- package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +0 -35
- package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +0 -19
- package/dist/string-DZQ1uNjn.js +0 -22
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { defineStore as x, storeToRefs as b } from "pinia";
|
|
2
2
|
import { ref as w } from "vue";
|
|
3
3
|
import { useCoreStore as B } from "@feedmepos/mf-common";
|
|
4
|
-
import { s as v } from "./iteration-
|
|
5
|
-
import { g as f, b as p } from "./
|
|
6
|
-
import { u as I } from "./restaurant-Dl6yx37M.js";
|
|
4
|
+
import { s as v } from "./iteration-ogxW2-Tv.js";
|
|
5
|
+
import { g as f, b as p, u as I } from "./restaurant-D2mfKHaH.js";
|
|
7
6
|
const R = {
|
|
8
7
|
async readRoles() {
|
|
9
8
|
return f(await p().get("/pos-roles"));
|
|
@@ -81,7 +80,7 @@ const A = x("role", () => {
|
|
|
81
80
|
updateRole: g,
|
|
82
81
|
deleteRole: S
|
|
83
82
|
};
|
|
84
|
-
}),
|
|
83
|
+
}), L = () => {
|
|
85
84
|
const e = A();
|
|
86
85
|
return {
|
|
87
86
|
...e,
|
|
@@ -89,5 +88,5 @@ const A = x("role", () => {
|
|
|
89
88
|
};
|
|
90
89
|
};
|
|
91
90
|
export {
|
|
92
|
-
|
|
91
|
+
L as u
|
|
93
92
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { s as W, c as q, e as y } from "./iteration-
|
|
2
|
-
import {
|
|
1
|
+
import { s as W, c as q, e as y } from "./iteration-ogxW2-Tv.js";
|
|
2
|
+
import { h as O, c as V, d as _, v as F, n as h, O as ee, D as M } from "./app-D-MUq9Ab.js";
|
|
3
3
|
import { s as se } from "./utils-BZkjJbju.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { g, b as v, q as x, u as te } from "./restaurant-D2mfKHaH.js";
|
|
5
|
+
import { defineStore as z, storeToRefs as K } from "pinia";
|
|
6
|
+
import { ref as S, computed as T } from "vue";
|
|
6
7
|
import { useCoreStore as X } from "@feedmepos/mf-common";
|
|
7
|
-
import { u as te } from "./restaurant-Dl6yx37M.js";
|
|
8
8
|
const E = "/permission-sets", N = {
|
|
9
9
|
async read() {
|
|
10
10
|
return g(await v().get(E));
|
|
@@ -18,8 +18,8 @@ const E = "/permission-sets", N = {
|
|
|
18
18
|
async delete(e) {
|
|
19
19
|
return g(await v().delete(`${E}/${e}`));
|
|
20
20
|
}
|
|
21
|
-
}, ne =
|
|
22
|
-
const { currentBusiness: e } = X(), s =
|
|
21
|
+
}, ne = z("permissionSet", () => {
|
|
22
|
+
const { currentBusiness: e } = X(), s = S([]), r = S(!1), n = S(null);
|
|
23
23
|
async function i() {
|
|
24
24
|
var l;
|
|
25
25
|
const c = ((l = e.value) == null ? void 0 : l._id) ?? null;
|
|
@@ -38,7 +38,7 @@ const E = "/permission-sets", N = {
|
|
|
38
38
|
}
|
|
39
39
|
async function a(c, l) {
|
|
40
40
|
const d = await N.update(c, l);
|
|
41
|
-
s.value = u(s.value.map((
|
|
41
|
+
s.value = u(s.value.map((f) => f.id === c ? d : f));
|
|
42
42
|
}
|
|
43
43
|
async function o(c) {
|
|
44
44
|
await N.delete(c), s.value = u(s.value.filter((l) => l.id !== c));
|
|
@@ -92,30 +92,30 @@ function Q(e) {
|
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
d.setNames.push(a.name);
|
|
95
|
-
const
|
|
96
|
-
if (!
|
|
95
|
+
const f = D(d.conditions);
|
|
96
|
+
if (!f || !c) {
|
|
97
97
|
d.conditions = void 0;
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
|
-
for (const
|
|
101
|
-
(o = m
|
|
102
|
-
/* @__PURE__ */ new Set([...m
|
|
103
|
-
) : m
|
|
104
|
-
d.conditions = JSON.stringify(
|
|
100
|
+
for (const m in c)
|
|
101
|
+
(o = f[m]) != null && o.$in && (u = c[m]) != null && u.$in ? f[m].$in = Array.from(
|
|
102
|
+
/* @__PURE__ */ new Set([...f[m].$in, ...c[m].$in])
|
|
103
|
+
) : f[m] || (f[m] = c[m]);
|
|
104
|
+
d.conditions = JSON.stringify(f);
|
|
105
105
|
};
|
|
106
106
|
for (const i of e)
|
|
107
107
|
for (const t of i.permissions)
|
|
108
108
|
n(t.inverted ? r : s, t, i);
|
|
109
109
|
return [...Array.from(s.values()), ...Array.from(r.values())];
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function B(e, s) {
|
|
112
112
|
return `${e}::${[...s].sort().join(",")}`;
|
|
113
113
|
}
|
|
114
114
|
function G(e, s) {
|
|
115
115
|
const r = [...e], n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
|
|
116
116
|
for (const o of e) {
|
|
117
117
|
const u = O(o.subject);
|
|
118
|
-
n.add(
|
|
118
|
+
n.add(B(u, o.actions)), o.inverted && o.actions.includes("manage") && i.add(`set_${u}`), !o.inverted && o.actions.includes("manage") && t.add(u);
|
|
119
119
|
}
|
|
120
120
|
const a = [...e];
|
|
121
121
|
for (; a.length > 0; ) {
|
|
@@ -125,12 +125,12 @@ function G(e, s) {
|
|
|
125
125
|
const l = ie(o);
|
|
126
126
|
o.source && !o.source.trace && (o.source = { ...o.source, trace: l });
|
|
127
127
|
const d = [...l, `${c.name} (system)`];
|
|
128
|
-
for (const
|
|
129
|
-
const
|
|
130
|
-
n.has(p) || t.has(
|
|
131
|
-
...
|
|
128
|
+
for (const f of c.permissions ?? []) {
|
|
129
|
+
const m = O(f.subject), p = B(m, f.actions);
|
|
130
|
+
n.has(p) || t.has(m) || (n.add(p), r.push({
|
|
131
|
+
...f,
|
|
132
132
|
// FdoPermissionRule.fields is string[] | null; RawRule expects string[] | undefined
|
|
133
|
-
fields:
|
|
133
|
+
fields: f.fields ?? void 0,
|
|
134
134
|
source: {
|
|
135
135
|
type: "systemPermissionSet",
|
|
136
136
|
permissionSetId: c.key,
|
|
@@ -139,9 +139,9 @@ function G(e, s) {
|
|
|
139
139
|
}
|
|
140
140
|
}));
|
|
141
141
|
}
|
|
142
|
-
for (const
|
|
143
|
-
const
|
|
144
|
-
subject:
|
|
142
|
+
for (const f of c.permissionSets ?? []) {
|
|
143
|
+
const m = O(f), p = B(m, ["manage"]), b = {
|
|
144
|
+
subject: m,
|
|
145
145
|
actions: ["manage"],
|
|
146
146
|
source: {
|
|
147
147
|
type: "systemPermissionSet",
|
|
@@ -226,28 +226,28 @@ function _e(e, s) {
|
|
|
226
226
|
JSON.stringify(l) !== JSON.stringify(d) && t.push(c);
|
|
227
227
|
continue;
|
|
228
228
|
}
|
|
229
|
-
const
|
|
230
|
-
(b) => !d[
|
|
229
|
+
const f = Object.keys(l)[0], m = l[f].$in.filter(
|
|
230
|
+
(b) => !d[f].$in.includes(b)
|
|
231
231
|
);
|
|
232
|
-
|
|
233
|
-
(b) => !l[
|
|
232
|
+
m.length > 0 && t.push(r(u, m)), d[f].$in.filter(
|
|
233
|
+
(b) => !l[f].$in.includes(b)
|
|
234
234
|
).length > 0 && t.push(c);
|
|
235
235
|
} else if (!u.conditions && c.conditions)
|
|
236
236
|
t.push(c);
|
|
237
237
|
else if (u.conditions && !c.conditions)
|
|
238
238
|
j(JSON.parse(u.conditions)) || t.push(c);
|
|
239
239
|
else if (!u.conditions && !c.conditions) {
|
|
240
|
-
const l = new Set(u.actions), d = new Set(c.actions),
|
|
241
|
-
if (
|
|
240
|
+
const l = new Set(u.actions), d = new Set(c.actions), f = c.actions.some((p) => !l.has(p)), m = u.actions.filter((p) => !d.has(p));
|
|
241
|
+
if (f) {
|
|
242
242
|
const p = c.actions.filter((b) => !l.has(b));
|
|
243
243
|
t.push({
|
|
244
244
|
...c,
|
|
245
245
|
actions: p
|
|
246
246
|
});
|
|
247
247
|
}
|
|
248
|
-
|
|
248
|
+
m.length > 0 && t.push({
|
|
249
249
|
...u,
|
|
250
|
-
actions:
|
|
250
|
+
actions: m,
|
|
251
251
|
inverted: !0
|
|
252
252
|
});
|
|
253
253
|
}
|
|
@@ -271,7 +271,7 @@ function _e(e, s) {
|
|
|
271
271
|
function Ee(e) {
|
|
272
272
|
const s = G(
|
|
273
273
|
e,
|
|
274
|
-
|
|
274
|
+
V
|
|
275
275
|
), r = new Set(
|
|
276
276
|
s.filter((i) => {
|
|
277
277
|
var t;
|
|
@@ -317,13 +317,13 @@ function Ue(e, s) {
|
|
|
317
317
|
if (!l || !d || !le(d, o))
|
|
318
318
|
return a.push(o), a;
|
|
319
319
|
if (l.has("manage")) return a;
|
|
320
|
-
const
|
|
321
|
-
if (
|
|
320
|
+
const f = o.actions;
|
|
321
|
+
if (f.includes("manage"))
|
|
322
322
|
return a.push(o), a;
|
|
323
|
-
const
|
|
323
|
+
const m = new Set(f);
|
|
324
324
|
for (const p of l)
|
|
325
|
-
|
|
326
|
-
return
|
|
325
|
+
m.delete(p);
|
|
326
|
+
return m.size === 0 || a.push({ ...o, actions: Array.from(m) }), a;
|
|
327
327
|
}, []);
|
|
328
328
|
}
|
|
329
329
|
function L(e, s) {
|
|
@@ -339,10 +339,10 @@ function L(e, s) {
|
|
|
339
339
|
r.delete(t.subject);
|
|
340
340
|
continue;
|
|
341
341
|
}
|
|
342
|
-
const l = Object.keys(c)[0], d = ((n = c[l]) == null ? void 0 : n.$in) ?? [],
|
|
343
|
-
|
|
342
|
+
const l = Object.keys(c)[0], d = ((n = c[l]) == null ? void 0 : n.$in) ?? [], m = (((i = u[l]) == null ? void 0 : i.$in) ?? []).filter((p) => !d.includes(p));
|
|
343
|
+
m.length > 0 ? r.set(t.subject, {
|
|
344
344
|
...o,
|
|
345
|
-
conditions: JSON.stringify({ [l]: { $in:
|
|
345
|
+
conditions: JSON.stringify({ [l]: { $in: m } })
|
|
346
346
|
}) : r.delete(t.subject);
|
|
347
347
|
} else
|
|
348
348
|
r.delete(t.subject);
|
|
@@ -407,8 +407,8 @@ const P = "/permission-assignments", I = {
|
|
|
407
407
|
await v().post("/my-permissions/report-manage", { permissionKey: e, label: s })
|
|
408
408
|
);
|
|
409
409
|
}
|
|
410
|
-
},
|
|
411
|
-
const e =
|
|
410
|
+
}, fe = z("permissionAssignment", () => {
|
|
411
|
+
const e = S([]);
|
|
412
412
|
async function s() {
|
|
413
413
|
const o = await I.readAll();
|
|
414
414
|
e.value = o;
|
|
@@ -439,8 +439,8 @@ const P = "/permission-assignments", I = {
|
|
|
439
439
|
deletePermissionAssignment: t,
|
|
440
440
|
getPermissionAssignmentByUserId: a
|
|
441
441
|
};
|
|
442
|
-
}),
|
|
443
|
-
const e =
|
|
442
|
+
}), me = () => {
|
|
443
|
+
const e = fe();
|
|
444
444
|
return {
|
|
445
445
|
...e,
|
|
446
446
|
...K(e)
|
|
@@ -449,16 +449,16 @@ const P = "/permission-assignments", I = {
|
|
|
449
449
|
async fetchReportPermissions(e, s) {
|
|
450
450
|
const r = s ? { lang: s } : {};
|
|
451
451
|
return g(
|
|
452
|
-
await
|
|
452
|
+
await x().get(`/report-query/hrm/${e}/reports`, { params: r })
|
|
453
453
|
);
|
|
454
454
|
},
|
|
455
455
|
async fetchReportPermissionsForPortal(e, s) {
|
|
456
456
|
const r = s ? { isSupportPos: !1, lang: s } : { isSupportPos: !1 };
|
|
457
457
|
return g(
|
|
458
|
-
await
|
|
458
|
+
await x().get(`/report-query/hrm/${e}/reports`, { params: r })
|
|
459
459
|
);
|
|
460
460
|
}
|
|
461
|
-
}, U =
|
|
461
|
+
}, U = S([]), C = S(!1), R = S(!1), $ = S(null), k = S(null), J = S(!1);
|
|
462
462
|
function ge() {
|
|
463
463
|
const e = X();
|
|
464
464
|
async function s() {
|
|
@@ -466,9 +466,9 @@ function ge() {
|
|
|
466
466
|
const n = (t = e.currentBusiness.value) == null ? void 0 : t.id;
|
|
467
467
|
if (!n) return;
|
|
468
468
|
const i = localStorage.getItem("locale");
|
|
469
|
-
if ($.value !== n && (U.value = [], C.value = !1, R.value = !1, $.value = n,
|
|
469
|
+
if ($.value !== n && (U.value = [], C.value = !1, R.value = !1, $.value = n, J.value = !1), !(C.value && k.value === i)) {
|
|
470
470
|
if (R.value) {
|
|
471
|
-
|
|
471
|
+
J.value = !0;
|
|
472
472
|
return;
|
|
473
473
|
}
|
|
474
474
|
R.value = !0;
|
|
@@ -480,39 +480,39 @@ function ge() {
|
|
|
480
480
|
if ($.value !== n) return;
|
|
481
481
|
console.warn("Failed to fetch custom report permissions:", a), U.value = [];
|
|
482
482
|
} finally {
|
|
483
|
-
$.value === n && (R.value = !1,
|
|
483
|
+
$.value === n && (R.value = !1, J.value && (J.value = !1, await s()));
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
const r =
|
|
487
|
+
const r = T(() => U.value.map(
|
|
488
488
|
(n) => n.isDefault ? {
|
|
489
489
|
label: n.name,
|
|
490
490
|
subject: `business::report::reports::${n.permissionKey}`,
|
|
491
|
-
actions: [
|
|
492
|
-
category:
|
|
491
|
+
actions: [h.manage, h.read, h.create],
|
|
492
|
+
category: F.reports
|
|
493
493
|
} : {
|
|
494
494
|
label: n.name,
|
|
495
495
|
subject: `business::report::reports::${n.permissionKey}`,
|
|
496
496
|
actions: [
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
497
|
+
h.manage,
|
|
498
|
+
h.read,
|
|
499
|
+
h.create,
|
|
500
|
+
h.update,
|
|
501
|
+
h.delete
|
|
502
502
|
],
|
|
503
|
-
category:
|
|
503
|
+
category: F.customReports
|
|
504
504
|
}
|
|
505
505
|
));
|
|
506
506
|
return {
|
|
507
507
|
fetchCustomReportPermissions: s,
|
|
508
508
|
customReportPermissions: r,
|
|
509
|
-
isLoading:
|
|
510
|
-
isLoaded:
|
|
509
|
+
isLoading: T(() => R.value),
|
|
510
|
+
isLoaded: T(() => C.value)
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
513
|
function A(e) {
|
|
514
|
-
const s = re(), r =
|
|
515
|
-
(t == null ? void 0 : t.permissionSetIds) ??
|
|
514
|
+
const s = re(), r = me(), n = te().restaurants, { customReportPermissions: i } = ge(), t = r.getPermissionAssignmentByUserId(e.id), a = H(
|
|
515
|
+
(t == null ? void 0 : t.permissionSetIds) ?? [],
|
|
516
516
|
s.permissionSets.value
|
|
517
517
|
), o = Q(a).map(
|
|
518
518
|
({ setNames: p, ...b }) => b
|
|
@@ -521,26 +521,23 @@ function A(e) {
|
|
|
521
521
|
subject: O(p.subject)
|
|
522
522
|
})), l = L(o, c), d = G(
|
|
523
523
|
de(o, c),
|
|
524
|
-
|
|
525
|
-
).filter((p) => !p.inverted),
|
|
524
|
+
V
|
|
525
|
+
).filter((p) => !p.inverted), f = Y(d), m = f ?? n.value.map((p) => p._id);
|
|
526
526
|
return {
|
|
527
527
|
doc: e,
|
|
528
528
|
id: e.id,
|
|
529
|
-
|
|
530
|
-
name: e.status === "invited" ? e.name || "-" : e.name && e.name !== e.email && e.name !== e.phoneNumber ? e.name : "-",
|
|
529
|
+
name: e.name && e.name !== e.email && e.name !== e.phoneNumber ? e.name : "-",
|
|
531
530
|
phoneNumber: e.phoneNumber,
|
|
532
531
|
email: e.email,
|
|
533
532
|
restaurants: W(
|
|
534
|
-
|
|
533
|
+
m.map((p) => {
|
|
535
534
|
var b;
|
|
536
535
|
return ((b = n.value.find((Z) => Z._id === p)) == null ? void 0 : b.profile.name) ?? "";
|
|
537
536
|
})
|
|
538
537
|
),
|
|
539
|
-
managableRestaurantIds:
|
|
540
|
-
permissionLabels:
|
|
541
|
-
permissions: l
|
|
542
|
-
status: e.status ?? "active",
|
|
543
|
-
loginMethod: e.loginMethod ?? "feedme"
|
|
538
|
+
managableRestaurantIds: f,
|
|
539
|
+
permissionLabels: he(d, i.value),
|
|
540
|
+
permissions: l
|
|
544
541
|
};
|
|
545
542
|
}
|
|
546
543
|
const ve = Object.freeze(
|
|
@@ -552,7 +549,7 @@ const ve = Object.freeze(
|
|
|
552
549
|
).map(A);
|
|
553
550
|
},
|
|
554
551
|
async readTeamMembersPage(e) {
|
|
555
|
-
var r, n, i
|
|
552
|
+
var r, n, i;
|
|
556
553
|
const s = g(
|
|
557
554
|
await v().get("/portal-users/paged", {
|
|
558
555
|
params: {
|
|
@@ -561,9 +558,7 @@ const ve = Object.freeze(
|
|
|
561
558
|
search: e.search,
|
|
562
559
|
restaurantIds: (r = e.restaurantIds) != null && r.length ? e.restaurantIds : void 0,
|
|
563
560
|
permissionSubjects: (n = e.permissionSubjects) != null && n.length ? e.permissionSubjects : void 0,
|
|
564
|
-
permissionSetIds: (i = e.permissionSetIds) != null && i.length ? e.permissionSetIds : void 0
|
|
565
|
-
statuses: (t = e.statuses) != null && t.length ? e.statuses : void 0,
|
|
566
|
-
loginMethods: (a = e.loginMethods) != null && a.length ? e.loginMethods : void 0
|
|
561
|
+
permissionSetIds: (i = e.permissionSetIds) != null && i.length ? e.permissionSetIds : void 0
|
|
567
562
|
}
|
|
568
563
|
})
|
|
569
564
|
);
|
|
@@ -602,9 +597,9 @@ const ve = Object.freeze(
|
|
|
602
597
|
)}`;
|
|
603
598
|
}
|
|
604
599
|
};
|
|
605
|
-
function
|
|
600
|
+
function Je(e, s, r) {
|
|
606
601
|
if (e.some((a) => a.subject === "all")) return "All";
|
|
607
|
-
const n = (r ??
|
|
602
|
+
const n = (r ?? M).filter(
|
|
608
603
|
(a) => a.subject === s
|
|
609
604
|
), i = new Set(n.map((a) => w(a).value)), t = e.filter((a) => a.subject === s).filter((a) => i.has(w(a).value));
|
|
610
605
|
return t.length === n.length ? "All" : t.length === 0 ? "-" : `${t.length} permission allow`;
|
|
@@ -665,7 +660,7 @@ function w(e) {
|
|
|
665
660
|
}
|
|
666
661
|
};
|
|
667
662
|
}
|
|
668
|
-
function
|
|
663
|
+
function Te(e) {
|
|
669
664
|
var n, i;
|
|
670
665
|
const s = e.map((t) => w(t)).find((t) => t.isDiscountOperation);
|
|
671
666
|
if (!s) return 100;
|
|
@@ -678,10 +673,10 @@ function Y(e) {
|
|
|
678
673
|
);
|
|
679
674
|
return s ? s.conditions ? JSON.parse(s.conditions).restaurantId.$in : null : [];
|
|
680
675
|
}
|
|
681
|
-
function
|
|
676
|
+
function Be(e, s) {
|
|
682
677
|
return s.isOwner ? { restaurantIds: null, roleIds: null } : { restaurantIds: Y(e), roleIds: be(e) };
|
|
683
678
|
}
|
|
684
|
-
function
|
|
679
|
+
function Me(e) {
|
|
685
680
|
return (e == null ? void 0 : e.some((s) => s.subject === "all")) ?? !1;
|
|
686
681
|
}
|
|
687
682
|
function be(e) {
|
|
@@ -696,7 +691,7 @@ function Le(e) {
|
|
|
696
691
|
}
|
|
697
692
|
function Fe(e, s, r) {
|
|
698
693
|
return e.flatMap((n) => {
|
|
699
|
-
const i =
|
|
694
|
+
const i = Se(n);
|
|
700
695
|
if (!i) return [];
|
|
701
696
|
const t = i.isReportPermission ? r == null ? void 0 : r.get(n) : void 0;
|
|
702
697
|
return [
|
|
@@ -712,11 +707,11 @@ function Fe(e, s, r) {
|
|
|
712
707
|
];
|
|
713
708
|
});
|
|
714
709
|
}
|
|
715
|
-
function
|
|
710
|
+
function Se(e) {
|
|
716
711
|
const s = e.indexOf(":"), r = s === -1 ? e : e.slice(0, s), n = s === -1 ? void 0 : e.slice(s + 1);
|
|
717
712
|
if (s !== -1 && !n) return;
|
|
718
713
|
let i;
|
|
719
|
-
return n ? (i =
|
|
714
|
+
return n ? (i = M.find((t) => {
|
|
720
715
|
if (t.subject !== r) return !1;
|
|
721
716
|
const a = typeof t.conditions == "string" ? JSON.parse(t.conditions) : t.conditions;
|
|
722
717
|
return [a == null ? void 0 : a.operation, a == null ? void 0 : a.name].includes(n);
|
|
@@ -727,7 +722,7 @@ function he(e) {
|
|
|
727
722
|
conditions: { name: n },
|
|
728
723
|
inverted: !1,
|
|
729
724
|
reason: ""
|
|
730
|
-
})) : i =
|
|
725
|
+
})) : i = M.find((t) => t.subject === r), i ? w(i) : void 0;
|
|
731
726
|
}
|
|
732
727
|
function xe(e, s) {
|
|
733
728
|
const r = { values: [], passthrough: [], dropped: [] };
|
|
@@ -742,7 +737,7 @@ function xe(e, s) {
|
|
|
742
737
|
}
|
|
743
738
|
return r;
|
|
744
739
|
}
|
|
745
|
-
function
|
|
740
|
+
function he(e, s = []) {
|
|
746
741
|
return W(
|
|
747
742
|
e.reduce((r, n) => {
|
|
748
743
|
const i = ve.find(
|
|
@@ -759,29 +754,29 @@ function Se(e, s = []) {
|
|
|
759
754
|
export {
|
|
760
755
|
G as N,
|
|
761
756
|
Q as P,
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
757
|
+
pe as R,
|
|
758
|
+
Je as a,
|
|
759
|
+
de as b,
|
|
765
760
|
H as c,
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
761
|
+
ge as d,
|
|
762
|
+
Le as e,
|
|
763
|
+
Fe as f,
|
|
764
|
+
Te as g,
|
|
765
|
+
Me as h,
|
|
766
|
+
oe as i,
|
|
767
|
+
Be as j,
|
|
768
|
+
Ee as k,
|
|
769
|
+
_e as l,
|
|
775
770
|
Ae as m,
|
|
776
|
-
|
|
777
|
-
|
|
771
|
+
Ne as n,
|
|
772
|
+
Ue as o,
|
|
778
773
|
ve as p,
|
|
779
|
-
|
|
774
|
+
me as q,
|
|
780
775
|
w as r,
|
|
781
776
|
xe as s,
|
|
782
777
|
Ce as t,
|
|
783
778
|
re as u,
|
|
784
|
-
|
|
779
|
+
he as v,
|
|
785
780
|
Oe as w,
|
|
786
781
|
Y as x,
|
|
787
782
|
be as y
|
|
@@ -2,25 +2,17 @@ interface Props {
|
|
|
2
2
|
title?: string;
|
|
3
3
|
subtitle?: string;
|
|
4
4
|
initiallyCollapsed?: boolean;
|
|
5
|
-
/**
|
|
6
|
-
* 'trailing': toggle on the right, subtitle beside the title while collapsed.
|
|
7
|
-
* 'leading': chevron before the title, subtitle always under it (member sheet cards).
|
|
8
|
-
*/
|
|
9
|
-
layout?: 'trailing' | 'leading';
|
|
10
5
|
}
|
|
11
|
-
declare var
|
|
6
|
+
declare var __VLS_1: {}, __VLS_7: {};
|
|
12
7
|
type __VLS_Slots = {} & {
|
|
13
|
-
title?: (props: typeof
|
|
8
|
+
title?: (props: typeof __VLS_1) => any;
|
|
14
9
|
} & {
|
|
15
|
-
|
|
16
|
-
} & {
|
|
17
|
-
default?: (props: typeof __VLS_13) => any;
|
|
10
|
+
default?: (props: typeof __VLS_7) => any;
|
|
18
11
|
};
|
|
19
12
|
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
20
13
|
title: string;
|
|
21
14
|
subtitle: string;
|
|
22
15
|
initiallyCollapsed: boolean;
|
|
23
|
-
layout: "trailing" | "leading";
|
|
24
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
17
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
26
18
|
export default _default;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
declare function randomString(length: number, config?: {
|
|
2
2
|
includeSpecialCase: boolean;
|
|
3
3
|
}): string;
|
|
4
|
-
/**
|
|
5
|
-
* "A, B +2 more" for a selection; null means everything (the "include future" choice).
|
|
6
|
-
* Collapsed permission rows show it under their title.
|
|
7
|
-
*/
|
|
8
|
-
declare function summarizeNames(names: string[] | null, labels: {
|
|
9
|
-
all: string;
|
|
10
|
-
none: string;
|
|
11
|
-
more: (count: number) => string;
|
|
12
|
-
}, shown?: number): string;
|
|
13
4
|
declare const filter: {
|
|
14
5
|
alphabetOnly(word: string): string;
|
|
15
6
|
alphaNumeric(word: string): string;
|
|
@@ -19,4 +10,4 @@ declare const validate: {
|
|
|
19
10
|
email(input: string): RegExpMatchArray | null;
|
|
20
11
|
};
|
|
21
12
|
declare function nameInitials(name: string | null | undefined): string;
|
|
22
|
-
export { filter, validate, randomString, nameInitials
|
|
13
|
+
export { filter, validate, randomString, nameInitials };
|
|
@@ -8,14 +8,12 @@ export declare enum RouteName {
|
|
|
8
8
|
TEAM = "team",
|
|
9
9
|
TEAM_MEMBER = "team-member",
|
|
10
10
|
TEAM_ROLE = "team-role",
|
|
11
|
-
TEAM_INVITE = "team-invite",
|
|
12
11
|
POS_ACCESS = "pos-access",
|
|
13
12
|
POS_GRANT = "pos-grant",
|
|
14
13
|
APPROVAL_CODE = "approval-code",
|
|
15
14
|
SCHEDULE = "schedule",
|
|
16
15
|
SCHEDULE_POSITION = "schedule-position",
|
|
17
|
-
SCHEDULE_GENERAL = "schedule-general"
|
|
18
|
-
MY_POS_PROFILE = "my-pos-profile"
|
|
16
|
+
SCHEDULE_GENERAL = "schedule-general"
|
|
19
17
|
}
|
|
20
18
|
declare const routes: RouteRecordRaw[];
|
|
21
19
|
export { routes };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { HrmRestaurant } from '@/types/restaurant';
|
|
2
2
|
export declare const useRestaurantStore: () => {
|
|
3
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
4
3
|
restaurants: import("vue").Ref<{
|
|
5
4
|
_id: string;
|
|
6
5
|
businessId: string;
|
|
@@ -20,8 +19,8 @@ export declare const useRestaurantStore: () => {
|
|
|
20
19
|
};
|
|
21
20
|
managable: boolean;
|
|
22
21
|
}[]>;
|
|
22
|
+
isLoading: import("vue").Ref<boolean, boolean>;
|
|
23
23
|
$state: {
|
|
24
|
-
isLoading: boolean;
|
|
25
24
|
restaurants: {
|
|
26
25
|
_id: string;
|
|
27
26
|
businessId: string;
|
|
@@ -32,6 +31,7 @@ export declare const useRestaurantStore: () => {
|
|
|
32
31
|
};
|
|
33
32
|
managable: boolean;
|
|
34
33
|
}[];
|
|
34
|
+
isLoading: boolean;
|
|
35
35
|
} & import("pinia").PiniaCustomStateProperties<Pick<{
|
|
36
36
|
restaurants: import("vue").Ref<{
|
|
37
37
|
_id: string;
|
|
@@ -54,9 +54,8 @@ export declare const useRestaurantStore: () => {
|
|
|
54
54
|
}[]>;
|
|
55
55
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
56
56
|
readRestaurants: (force?: boolean) => Promise<void>;
|
|
57
|
-
}, "
|
|
57
|
+
}, "restaurants" | "isLoading">>;
|
|
58
58
|
$patch(partialState: import("pinia")._DeepPartial<{
|
|
59
|
-
isLoading: boolean;
|
|
60
59
|
restaurants: {
|
|
61
60
|
_id: string;
|
|
62
61
|
businessId: string;
|
|
@@ -67,9 +66,9 @@ export declare const useRestaurantStore: () => {
|
|
|
67
66
|
};
|
|
68
67
|
managable: boolean;
|
|
69
68
|
}[];
|
|
69
|
+
isLoading: boolean;
|
|
70
70
|
}>): void;
|
|
71
71
|
$patch<F extends (state: {
|
|
72
|
-
isLoading: boolean;
|
|
73
72
|
restaurants: {
|
|
74
73
|
_id: string;
|
|
75
74
|
businessId: string;
|
|
@@ -80,6 +79,7 @@ export declare const useRestaurantStore: () => {
|
|
|
80
79
|
};
|
|
81
80
|
managable: boolean;
|
|
82
81
|
}[];
|
|
82
|
+
isLoading: boolean;
|
|
83
83
|
}) => any>(stateMutator: ReturnType<F> extends Promise<any> ? never : F): void;
|
|
84
84
|
$reset(): void;
|
|
85
85
|
$subscribe(callback: import("pinia").SubscriptionCallback<Pick<{
|
|
@@ -104,7 +104,7 @@ export declare const useRestaurantStore: () => {
|
|
|
104
104
|
}[]>;
|
|
105
105
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
106
106
|
readRestaurants: (force?: boolean) => Promise<void>;
|
|
107
|
-
}, "
|
|
107
|
+
}, "restaurants" | "isLoading">>, options?: {
|
|
108
108
|
detached?: boolean;
|
|
109
109
|
} & import("vue").WatchOptions): () => void;
|
|
110
110
|
$onAction(callback: import("pinia").StoreOnActionListener<"restaurant", Pick<{
|
|
@@ -129,7 +129,7 @@ export declare const useRestaurantStore: () => {
|
|
|
129
129
|
}[]>;
|
|
130
130
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
131
131
|
readRestaurants: (force?: boolean) => Promise<void>;
|
|
132
|
-
}, "
|
|
132
|
+
}, "restaurants" | "isLoading">, Pick<{
|
|
133
133
|
restaurants: import("vue").Ref<{
|
|
134
134
|
_id: string;
|
|
135
135
|
businessId: string;
|