IO-256 QBO Authorization Flow.
This commit is contained in:
47
client/src/pages/accounting-qbo/accounting-qbo.page.jsx
Normal file
47
client/src/pages/accounting-qbo/accounting-qbo.page.jsx
Normal file
@@ -0,0 +1,47 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import QboAuthorizeComponent from "../../components/qbo-authorize/qbo-authorize.component";
|
||||
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)),
|
||||
});
|
||||
export function AccountingReceivablesContainer({
|
||||
bodyshop,
|
||||
setBreadcrumbs,
|
||||
setSelectedHeader,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
document.title = t("titles.accounting-qbo");
|
||||
setSelectedHeader("qbo");
|
||||
setBreadcrumbs([
|
||||
{
|
||||
link: "/manage/accounting/qbo",
|
||||
label: t("titles.bc.accounting-qbo"),
|
||||
},
|
||||
]);
|
||||
}, [t, setBreadcrumbs, setSelectedHeader]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<QboAuthorizeComponent />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(AccountingReceivablesContainer);
|
||||
@@ -116,6 +116,9 @@ const JobChecklistView = lazy(() =>
|
||||
const JobDeliver = lazy(() =>
|
||||
import("../jobs-deliver/jobs-delivery.page.container")
|
||||
);
|
||||
const AccountingQboCallback = lazy(() =>
|
||||
import("../accounting-qbo/accounting-qbo.page")
|
||||
);
|
||||
const AccountingReceivables = lazy(() =>
|
||||
import("../accounting-receivables/accounting-receivables.container")
|
||||
);
|
||||
@@ -333,6 +336,13 @@ export function Manage({ match, conflict, bodyshop }) {
|
||||
path={`${match.path}/shop/csi`}
|
||||
component={ShopCsiPageContainer}
|
||||
/>
|
||||
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/accounting/qbo`}
|
||||
component={AccountingQboCallback}
|
||||
/>
|
||||
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/accounting/receivables`}
|
||||
|
||||
Reference in New Issue
Block a user