From 51d1f926c225bcbf6d1d8bab17ad153937da03e6 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Fri, 10 May 2024 08:29:52 -0700 Subject: [PATCH] Improve spread for feature wrapped RBAC items. --- .../jobs-list/jobs-list.component.jsx | 2 - .../shop-info/shop-info.rbac.component.jsx | 678 +++++++++--------- 2 files changed, 334 insertions(+), 346 deletions(-) diff --git a/client/src/components/jobs-list/jobs-list.component.jsx b/client/src/components/jobs-list/jobs-list.component.jsx index 81273a7e5..e82961cdf 100644 --- a/client/src/components/jobs-list/jobs-list.component.jsx +++ b/client/src/components/jobs-list/jobs-list.component.jsx @@ -18,8 +18,6 @@ import ChatOpenButton from "../chat-open-button/chat-open-button.component"; import OwnerNameDisplay from "../owner-name-display/owner-name-display.component"; import { setJoyRideSteps } from "../../redux/application/application.actions"; import { OwnerNameDisplayFunction } from "./../owner-name-display/owner-name-display.component"; -import InstanceRenderManager from "../../utils/instanceRenderMgr"; - const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); 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 8be57a559..050449097 100644 --- a/client/src/components/shop-info/shop-info.rbac.component.jsx +++ b/client/src/components/shop-info/shop-info.rbac.component.jsx @@ -30,227 +30,219 @@ export function ShopInfoRbacComponent({ form, bodyshop }) { return ( - {HasFeatureAccess({ featureName: "export", bodyshop }) && ( - <> - - - - - - - - - - - - - - )} - {HasFeatureAccess({ featureName: "bills", bodyshop }) && ( - <> - - - - - - - - - - - - - - - - - )} + {...HasFeatureAccess({ featureName: "export", bodyshop }) && [ + + + , + + + , + + + , + + + + ]} + {...HasFeatureAccess({ featureName: "bills", bodyshop }) && [ + + + , + + + , + + + , + + + , + + + + ]} - {HasFeatureAccess({ featureName: "courtesycars", bodyshop }) && ( - <> - - - - - - - - - - - - - - - - - - - - )} - {HasFeatureAccess({ featureName: "csi", bodyshop }) && ( - <> - - - - - - - - )} + {...HasFeatureAccess({ featureName: "courtesycars", bodyshop }) && [ + + + , + + + , + + + , + + + , + + + , + + + + ]} + {...HasFeatureAccess({ featureName: "csi", bodyshop }) && [ + + + , + + + + ]} )} - {HasFeatureAccess({ featureName: "timetickets", bodyshop }) && ( - <> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - )} + {...HasFeatureAccess({ featureName: "timetickets", bodyshop }) && [ + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + + ]}