From c9b63be29f49012d0d61db443cae3fdcf6b5523f Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 22 Apr 2024 08:43:41 -0700 Subject: [PATCH 1/2] Hardcore generic template for ProManager. --- client/src/utils/RenderTemplate.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/utils/RenderTemplate.js b/client/src/utils/RenderTemplate.js index 8fb1480cb..1deb8e76d 100644 --- a/client/src/utils/RenderTemplate.js +++ b/client/src/utils/RenderTemplate.js @@ -10,6 +10,7 @@ import client from "../utils/GraphQLClient"; import cleanAxios from "./CleanAxios"; import { TemplateList } from "./TemplateConstants"; import { generateTemplate } from "./graphQLmodifier"; +import InstanceRenderManager from "./instanceRenderMgr"; const server = import.meta.env.VITE_APP_REPORTS_SERVER_URL; jsreport.serverUrl = server; @@ -71,8 +72,8 @@ export default async function RenderTemplate( ...contextData, ...templateObject.variables, ...templateObject.context, - headerpath: `/${bodyshop.imexshopid}/header.html`, - footerpath: `/${bodyshop.imexshopid}/footer.html`, + headerpath: `/${InstanceRenderManager({ imex: bodyshop.imexshopid, rome: bodyshop.imexshopid, promanager: "GENERIC" })}/header.html`, + footerpath: `/${InstanceRenderManager({ imex: bodyshop.imexshopid, rome: bodyshop.imexshopid, promanager: "GENERIC" })}/footer.html`, bodyshop: bodyshop, filters: templateObject?.filters, sorters: templateObject?.sorters, From 33db67122cac95a1ef51613124a6fdd5ca3e27aa Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 10 May 2024 15:35:26 -0700 Subject: [PATCH 2/2] Fix RBAC spread. --- .../shop-info/shop-info.rbac.component.jsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/client/src/components/shop-info/shop-info.rbac.component.jsx b/client/src/components/shop-info/shop-info.rbac.component.jsx index 050449097..8291c9c4f 100644 --- a/client/src/components/shop-info/shop-info.rbac.component.jsx +++ b/client/src/components/shop-info/shop-info.rbac.component.jsx @@ -30,7 +30,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) { return ( - {...HasFeatureAccess({ featureName: "export", bodyshop }) && [ + {...HasFeatureAccess({ featureName: "export", bodyshop }) ? [ - ]} - {...HasFeatureAccess({ featureName: "bills", bodyshop }) && [ + ]:[]} + {...HasFeatureAccess({ featureName: "bills", bodyshop }) ? [ - ]} + ]:[]} - {...HasFeatureAccess({ featureName: "courtesycars", bodyshop }) && [ + {...HasFeatureAccess({ featureName: "courtesycars", bodyshop }) ? [ - ]} - {...HasFeatureAccess({ featureName: "csi", bodyshop }) && [ + ]:[]} + {...HasFeatureAccess({ featureName: "csi", bodyshop }) ? [ - ]} + ]:[]} )} - {...HasFeatureAccess({ featureName: "timetickets", bodyshop }) && [ + {...HasFeatureAccess({ featureName: "timetickets", bodyshop }) ? [ - ]} + ]:[]}