FIrst round of changes for Instance Manger & Pro Manager

This commit is contained in:
Patrick Fic
2024-02-16 14:01:39 -07:00
parent 3e44458f5c
commit af7ff2d8b5
36 changed files with 1068 additions and 885 deletions

View File

@@ -10,6 +10,7 @@ import {QUERY_ACTIVE_CONTRACTS_PAGINATED} from "../../graphql/cccontracts.querie
import {setBreadcrumbs, setSelectedHeader,} from "../../redux/application/application.actions";
import ContractsPageComponent from "./contracts.page.component";
import {pageLimit} from "../../utils/config";
import FeatureWrapperComponent from "../../components/feature-wrapper/feature-wrapper.component";
const mapDispatchToProps = (dispatch) => ({
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
@@ -56,14 +57,16 @@ export function ContractsPageContainer({setBreadcrumbs, setSelectedHeader}) {
if (error) return <AlertComponent message={error.message} type="error"/>;
return (
<FeatureWrapperComponent featureName="courtesycars">
<RbacWrapper action="contracts:list">
<ContractsPageComponent
loading={loading}
refetch={refetch}
data={data ? data.search_cccontracts : []}
total={data ? data.search_cccontracts_aggregate.aggregate.count : 0}
/>
<ContractsPageComponent
loading={loading}
refetch={refetch}
data={data ? data.search_cccontracts : []}
total={data ? data.search_cccontracts_aggregate.aggregate.count : 0}
/>
</RbacWrapper>
</FeatureWrapperComponent>
);
}