Added basic RBAC component BOD-232
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
import { Col, Row } from "antd";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
import ShopTemplateEditor from "../../components/shop-template-editor/shop-template-editor.container";
|
||||
import ShopTemplatesListContainer from "../../components/shop-templates-list/shop-templates-list.container";
|
||||
import { setBreadcrumbs } from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import ShopTemplatesListContainer from "../../components/shop-templates-list/shop-templates-list.container";
|
||||
import ShopTemplateEditor from "../../components/shop-template-editor/shop-template-editor.container";
|
||||
import { Row, Col } from "antd";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
@@ -28,16 +30,18 @@ export function ShopTemplatesContainer({ setBreadcrumbs, bodyshop }) {
|
||||
}, [t, setBreadcrumbs, bodyshop.shopname]);
|
||||
|
||||
return (
|
||||
<Row>
|
||||
<Col span={6}>
|
||||
<ShopTemplatesListContainer />
|
||||
</Col>
|
||||
<Col span={18}>
|
||||
<div>
|
||||
<ShopTemplateEditor />
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<RbacWrapper action="shop:templates">
|
||||
<Row>
|
||||
<Col span={6}>
|
||||
<ShopTemplatesListContainer />
|
||||
</Col>
|
||||
<Col span={18}>
|
||||
<div>
|
||||
<ShopTemplateEditor />
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</RbacWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user