@feedmepos/mf-report 5.22.14-beta.2 → 5.22.15-beta.0
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/{App-Cwppqefm.js → App-BQhR0gXI.js} +5 -5
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CcKWqqNP.js → BaseDialog.vue_vue_type_script_setup_true_lang-CoJrINGt.js} +1890 -1838
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CryPHoYr.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-HVO_Z_aB.js} +7 -7
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DU3zkEF1.js → Default.vue_vue_type_script_setup_true_lang-B0td3xNS.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-CyW-5xr4.js → FilterSelector.vue_vue_type_script_setup_true_lang-DB7d9t3_.js} +6 -6
- package/dist/{InsightView-DAnaBH3D.js → InsightView-CitbD8mF.js} +6 -6
- package/dist/{Integration-DiNs52W5.js → Integration-DjnNmveS.js} +6 -7
- package/dist/{Integrations-BvgLRF5N.js → Integrations-BKYeENnK.js} +6 -7
- package/dist/{Layout-BAYV4nCo.js → Layout-5TdGrp8j.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BZphMQGv.js → MenuTab.vue_vue_type_script_setup_true_lang-DkiUvM56.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DSTG-gQ3.js → NavigationTab.vue_vue_type_script_setup_true_lang-CifNNsqR.js} +3120 -3095
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-zS79GrjC.js → NoData.vue_vue_type_script_setup_true_lang-Uei_Jstp.js} +1 -1
- package/dist/{OverviewView-CvRMdLbB.js → OverviewView-DZoL2KUz.js} +5 -5
- package/dist/{Report-C6445626.js → Report-D_9Db2Pa.js} +216 -187
- package/dist/{ReportEditor-Cy8f2WFu.js → ReportEditor-VGOkYidh.js} +65 -65
- package/dist/{ReportView-D-T3b10U.js → ReportView-B9PQlaFs.js} +22 -22
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-CYDZzbCU.js → SelectComponent.vue_vue_type_script_setup_true_lang-UhEjUKRz.js} +1 -1
- package/dist/{Setting-DBzyuCx-.js → Setting-BpStivU1.js} +5 -5
- package/dist/{TileEditor-CWYE5X71.js → TileEditor-CYwZNqhl.js} +110 -110
- package/dist/{TransitionFade-DwQjFIYA.js → TransitionFade-Cmxee7D0.js} +6 -6
- package/dist/{app-BRv3iLF1.js → app-BXEgzj0c.js} +11 -11
- package/dist/app.js +1 -1
- package/dist/style.css +1 -1
- package/dist/useReportPermission-B_CqU5GP.js +63 -0
- package/dist/useRestaurantPermission-DIlTzfKA.js +64 -0
- package/dist/{vue-i18n-ComGWqEb.js → vue-i18n-mTXrqqL9.js} +4477 -3241
- package/package.json +2 -2
- package/dist/access-Dw5cDt65-C2c0R9q4.js +0 -1238
- package/dist/useReportPermission-CDWkdi6R.js +0 -60
- package/dist/useRestaurantPermission-CjG_t7dK.js +0 -65
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { computed as i } from "vue";
|
|
2
|
-
import { y as r, g as m } from "./access-Dw5cDt65-C2c0R9q4.js";
|
|
3
|
-
import { useCoreStore as b } from "@feedmepos/mf-common";
|
|
4
|
-
import { c as R, h as y } from "./vue-i18n-ComGWqEb.js";
|
|
5
|
-
function F(n) {
|
|
6
|
-
const s = n.permissionKey || n.id;
|
|
7
|
-
return s ? `business::report::reports::${s}` : null;
|
|
8
|
-
}
|
|
9
|
-
function P() {
|
|
10
|
-
const { sessionUser: n } = b(), s = R(), c = i(() => {
|
|
11
|
-
const e = s.flags.find(
|
|
12
|
-
(t) => t.key === y.report_portal_permission
|
|
13
|
-
);
|
|
14
|
-
return (e == null ? void 0 : e.value) === !0;
|
|
15
|
-
}), u = i(
|
|
16
|
-
() => {
|
|
17
|
-
var e, t;
|
|
18
|
-
return Array.isArray((e = n.value) == null ? void 0 : e.permissions) ? (t = n.value) == null ? void 0 : t.permissions : [];
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
function o(e, t) {
|
|
22
|
-
if (!c.value) return !0;
|
|
23
|
-
const a = F(e);
|
|
24
|
-
return !a || !u.value.length ? !1 : t.some((l) => m([{
|
|
25
|
-
action: l,
|
|
26
|
-
// Report subjects are custom strings; cast to satisfy CaslPermission type
|
|
27
|
-
subject: a
|
|
28
|
-
}], u.value).granted);
|
|
29
|
-
}
|
|
30
|
-
function p(e) {
|
|
31
|
-
return o(e, [r.update, r.manage]);
|
|
32
|
-
}
|
|
33
|
-
function f(e) {
|
|
34
|
-
return o(e, [r.delete, r.manage]);
|
|
35
|
-
}
|
|
36
|
-
function d(e) {
|
|
37
|
-
return o(e, [r.manage]);
|
|
38
|
-
}
|
|
39
|
-
function g(e) {
|
|
40
|
-
return o(e, [r.create, r.manage]);
|
|
41
|
-
}
|
|
42
|
-
const v = i(() => {
|
|
43
|
-
if (!c.value) return !0;
|
|
44
|
-
const e = "business::report::createReport";
|
|
45
|
-
return u.value.length ? [r.create, r.manage].some((t) => m([{
|
|
46
|
-
action: t,
|
|
47
|
-
subject: e
|
|
48
|
-
}], u.value).granted) : !1;
|
|
49
|
-
});
|
|
50
|
-
return {
|
|
51
|
-
canUpdate: p,
|
|
52
|
-
canDelete: f,
|
|
53
|
-
canManage: d,
|
|
54
|
-
canDuplicate: g,
|
|
55
|
-
canCreateReport: v
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export {
|
|
59
|
-
P as u
|
|
60
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { computed as u } from "vue";
|
|
2
|
-
import { u as c } from "./vue-i18n-ComGWqEb.js";
|
|
3
|
-
import { useSnackbar as f } from "@feedmepos/ui-library";
|
|
4
|
-
import { useCoreStore as d } from "@feedmepos/mf-common";
|
|
5
|
-
import { l, g as i } from "./access-Dw5cDt65-C2c0R9q4.js";
|
|
6
|
-
function g(t) {
|
|
7
|
-
return Array.isArray(t) ? t : [];
|
|
8
|
-
}
|
|
9
|
-
function m(t) {
|
|
10
|
-
const { rules: r, action: a, restaurantId: e } = t;
|
|
11
|
-
if (!r.length) return !1;
|
|
12
|
-
const s = {
|
|
13
|
-
action: a,
|
|
14
|
-
subject: l.restaurant
|
|
15
|
-
};
|
|
16
|
-
return e ? i(s, r, { restaurantId: e }).granted : i([s], r).granted;
|
|
17
|
-
}
|
|
18
|
-
function R(t) {
|
|
19
|
-
const { integrationRestaurantIds: r, rules: a, action: e } = t;
|
|
20
|
-
if (!Array.isArray(r) || r.length === 0)
|
|
21
|
-
return [];
|
|
22
|
-
const s = [];
|
|
23
|
-
for (const o of r)
|
|
24
|
-
typeof o == "string" && (m({ rules: a, action: e, restaurantId: o }) || s.push(o));
|
|
25
|
-
return s;
|
|
26
|
-
}
|
|
27
|
-
function p(t) {
|
|
28
|
-
return R({
|
|
29
|
-
integrationRestaurantIds: t.integrationRestaurantIds,
|
|
30
|
-
rules: t.rules,
|
|
31
|
-
action: t.action
|
|
32
|
-
}).length > 0;
|
|
33
|
-
}
|
|
34
|
-
function U() {
|
|
35
|
-
const t = f(), { t: r } = c(), { sessionUser: a } = d(), e = u(
|
|
36
|
-
() => {
|
|
37
|
-
var n;
|
|
38
|
-
return g((n = a.value) == null ? void 0 : n.permissions);
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
function s(n) {
|
|
42
|
-
t.open({
|
|
43
|
-
type: "error",
|
|
44
|
-
message: r("report.integration.error.containsUnauthorizedRestaurant", {
|
|
45
|
-
action: r(`report.integration.permissionAction.${n}`)
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function o(n) {
|
|
50
|
-
return p({
|
|
51
|
-
integrationRestaurantIds: n.integrationRestaurantIds,
|
|
52
|
-
rules: e.value,
|
|
53
|
-
action: n.action
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
rules: e,
|
|
58
|
-
notifyUnauthorized: s,
|
|
59
|
-
isRestricted: o
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
export {
|
|
63
|
-
p as h,
|
|
64
|
-
U as u
|
|
65
|
-
};
|