Added basic RBAC component BOD-232
This commit is contained in:
@@ -7,6 +7,7 @@ import { createStructuredSelector } from "reselect";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import { CalculateJob } from "../../components/job-totals-table/job-totals.utility";
|
||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
import { QUERY_JOB_CLOSE_DETAILS } from "../../graphql/jobs.queries";
|
||||
import { setBreadcrumbs } from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
@@ -54,12 +55,14 @@ export function JobsCloseContainer({ setBreadcrumbs, bodyshop }) {
|
||||
|
||||
const jobTotals = CalculateJob(data.jobs_by_pk, bodyshop.shoprates);
|
||||
return (
|
||||
<div>
|
||||
<JobsCloseComponent
|
||||
job={data ? data.jobs_by_pk : {}}
|
||||
jobTotals={jobTotals}
|
||||
/>
|
||||
</div>
|
||||
<RbacWrapper action="jobs:close">
|
||||
<div>
|
||||
<JobsCloseComponent
|
||||
job={data ? data.jobs_by_pk : {}}
|
||||
jobTotals={jobTotals}
|
||||
/>
|
||||
</div>
|
||||
</RbacWrapper>
|
||||
);
|
||||
}
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobsCloseContainer);
|
||||
|
||||
Reference in New Issue
Block a user