Added basic RBAC component BOD-232
This commit is contained in:
@@ -9,6 +9,8 @@ import ContractsPageComponent from "./contracts.page.component";
|
||||
import queryString from "query-string";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import moment from "moment";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||
});
|
||||
@@ -53,14 +55,16 @@ export function ContractsPageContainer({ setBreadcrumbs }) {
|
||||
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
return (
|
||||
<div>
|
||||
<ContractsPageComponent
|
||||
loading={loading}
|
||||
refetch={refetch}
|
||||
data={data ? data.cccontracts : []}
|
||||
total={data ? data.cccontracts_aggregate.aggregate.count : 0}
|
||||
/>
|
||||
</div>
|
||||
<RbacWrapper action="contracts:list">
|
||||
<div>
|
||||
<ContractsPageComponent
|
||||
loading={loading}
|
||||
refetch={refetch}
|
||||
data={data ? data.cccontracts : []}
|
||||
total={data ? data.cccontracts_aggregate.aggregate.count : 0}
|
||||
/>
|
||||
</div>
|
||||
</RbacWrapper>
|
||||
);
|
||||
}
|
||||
export default connect(null, mapDispatchToProps)(ContractsPageContainer);
|
||||
|
||||
Reference in New Issue
Block a user