Added basic RBAC component BOD-232
This commit is contained in:
@@ -10,6 +10,7 @@ import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { setBreadcrumbs } from "../../redux/application/application.actions";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -131,13 +132,16 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs }) {
|
||||
|
||||
return (
|
||||
<JobCreateContext.Provider value={contextState}>
|
||||
<Form
|
||||
form={form}
|
||||
onFinish={handleFinish}
|
||||
layout='vertical'
|
||||
autoComplete={"off"}>
|
||||
<JobsCreateComponent form={form} />
|
||||
</Form>
|
||||
<RbacWrapper action="jobs:create">
|
||||
<Form
|
||||
form={form}
|
||||
onFinish={handleFinish}
|
||||
layout="vertical"
|
||||
autoComplete={"off"}
|
||||
>
|
||||
<JobsCreateComponent form={form} />
|
||||
</Form>
|
||||
</RbacWrapper>
|
||||
</JobCreateContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user