Theme change & layout updates. Removed template editor.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Elements } from "@stripe/react-stripe-js";
|
||||
import { loadStripe } from "@stripe/stripe-js";
|
||||
import { BackTop, Layout } from "antd";
|
||||
import preval from "preval.macro";
|
||||
import React, { lazy, Suspense, useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -11,7 +12,6 @@ import ChatAffixContainer from "../../components/chat-affix/chat-affix.container
|
||||
import ConflictComponent from "../../components/conflict/conflict.component";
|
||||
import ErrorBoundary from "../../components/error-boundary/error-boundary.component";
|
||||
import FcmNotification from "../../components/fcm-notification/fcm-notification.component";
|
||||
import preval from "preval.macro";
|
||||
//import FooterComponent from "../../components/footer/footer.component";
|
||||
//Component Imports
|
||||
import HeaderContainer from "../../components/header/header.container";
|
||||
@@ -100,9 +100,9 @@ const ProductionListPage = lazy(() =>
|
||||
const ProductionBoardPage = lazy(() =>
|
||||
import("../production-board/production-board.container")
|
||||
);
|
||||
const ShopTemplates = lazy(() =>
|
||||
import("../shop-templates/shop-templates.container")
|
||||
);
|
||||
// const ShopTemplates = lazy(() =>
|
||||
// import("../shop-templates/shop-templates.container")
|
||||
// );
|
||||
const JobIntake = lazy(() =>
|
||||
import("../jobs-intake/jobs-intake.page.container")
|
||||
);
|
||||
@@ -177,7 +177,7 @@ export function Manage({ match, conflict }) {
|
||||
|
||||
return (
|
||||
<Layout className="layout-container">
|
||||
<Header>
|
||||
<Header style={{ backgroundColor: "#fff" }}>
|
||||
<HeaderContainer />
|
||||
</Header>
|
||||
<Content className="content-container">
|
||||
@@ -342,11 +342,15 @@ export function Manage({ match, conflict }) {
|
||||
component={JobsAvailablePage}
|
||||
/>
|
||||
<Route exact path={`${match.path}/shop/`} component={ShopPage} />
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/shop/templates`}
|
||||
component={ShopTemplates}
|
||||
/>
|
||||
|
||||
{
|
||||
// <Route
|
||||
// exact
|
||||
// path={`${match.path}/shop/templates`}
|
||||
// component={ShopTemplates}
|
||||
// />
|
||||
}
|
||||
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/shop/vendors`}
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
import { Button } from "antd";
|
||||
import React, { useEffect, useState } 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,
|
||||
setSelectedHeader,
|
||||
} from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
// import { Button } from "antd";
|
||||
// import React, { useEffect, useState } 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,
|
||||
// setSelectedHeader,
|
||||
// } from "../../redux/application/application.actions";
|
||||
// import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||
setSelectedHeader: (key) => dispatch(setSelectedHeader(key)),
|
||||
});
|
||||
// const mapStateToProps = createStructuredSelector({
|
||||
// bodyshop: selectBodyshop,
|
||||
// });
|
||||
// const mapDispatchToProps = (dispatch) => ({
|
||||
// setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||
// setSelectedHeader: (key) => dispatch(setSelectedHeader(key)),
|
||||
// });
|
||||
|
||||
export function ShopTemplatesContainer({
|
||||
setBreadcrumbs,
|
||||
bodyshop,
|
||||
setSelectedHeader,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const drawerVisibility = useState(false);
|
||||
useEffect(() => {
|
||||
document.title = t("titles.shop-templates");
|
||||
setSelectedHeader("shop-templates");
|
||||
setBreadcrumbs([
|
||||
{
|
||||
link: "/manage/shop",
|
||||
label: t("titles.bc.shop", { shopname: bodyshop.shopname }),
|
||||
},
|
||||
{ link: "/manage/shop/templates", label: t("titles.bc.shop-templates") },
|
||||
]);
|
||||
}, [t, setBreadcrumbs, bodyshop.shopname, setSelectedHeader]);
|
||||
// export function ShopTemplatesContainer({
|
||||
// setBreadcrumbs,
|
||||
// bodyshop,
|
||||
// setSelectedHeader,
|
||||
// }) {
|
||||
// const { t } = useTranslation();
|
||||
// const drawerVisibility = useState(false);
|
||||
// useEffect(() => {
|
||||
// document.title = t("titles.shop-templates");
|
||||
// setSelectedHeader("shop-templates");
|
||||
// setBreadcrumbs([
|
||||
// {
|
||||
// link: "/manage/shop",
|
||||
// label: t("titles.bc.shop", { shopname: bodyshop.shopname }),
|
||||
// },
|
||||
// { link: "/manage/shop/templates", label: t("titles.bc.shop-templates") },
|
||||
// ]);
|
||||
// }, [t, setBreadcrumbs, bodyshop.shopname, setSelectedHeader]);
|
||||
|
||||
return (
|
||||
<RbacWrapper action="shop:templates">
|
||||
<div>
|
||||
<ShopTemplatesListContainer visibleState={drawerVisibility} />
|
||||
<Button onClick={() => drawerVisibility[1](true)}>Show List</Button>
|
||||
<ShopTemplateEditor />
|
||||
</div>
|
||||
</RbacWrapper>
|
||||
);
|
||||
}
|
||||
// return (
|
||||
// <RbacWrapper action="shop:templates">
|
||||
// <div>
|
||||
// <ShopTemplatesListContainer visibleState={drawerVisibility} />
|
||||
// <Button onClick={() => drawerVisibility[1](true)}>Show List</Button>
|
||||
// <ShopTemplateEditor />
|
||||
// </div>
|
||||
// </RbacWrapper>
|
||||
// );
|
||||
// }
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(ShopTemplatesContainer);
|
||||
// export default connect(
|
||||
// mapStateToProps,
|
||||
// mapDispatchToProps
|
||||
// )(ShopTemplatesContainer);
|
||||
|
||||
Reference in New Issue
Block a user