Added basic RBAC component BOD-232

This commit is contained in:
Patrick Fic
2020-08-10 16:07:30 -07:00
parent 0df61a2701
commit 83c83ac06e
52 changed files with 670 additions and 288 deletions

View File

@@ -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>
);
}