Added invoice totals + high level reconciliation on PLI jobs tab. BOD-26
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
export default function InvoiceDetailPageComponent() {
|
||||
return <div>Invoice Detail Page Component</div>;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import React from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
import InvoiceDetailPageComponent from "./invoice-detail.page.component";
|
||||
import { useQuery } from "@apollo/react-hooks";
|
||||
import { QUERY_INVOICE_BY_PK } from "../../graphql/invoices.queries";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import { Form } from "antd";
|
||||
|
||||
export default function InvoiceDetailPageContainer() {
|
||||
const { invoiceId } = useParams();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const { loading, error, data } = useQuery(QUERY_INVOICE_BY_PK, {
|
||||
variables: { invoiceid: invoiceId },
|
||||
skip: !!!invoiceId,
|
||||
});
|
||||
|
||||
if (loading) return <LoadingSpinner />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
return (
|
||||
<Form form={form} initialValues={data ? data.invoices_by_pk : {}}>
|
||||
<InvoiceDetailPageComponent />
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
@@ -1,28 +1,16 @@
|
||||
import Icon, {
|
||||
BarsOutlined,
|
||||
CalendarFilled,
|
||||
DollarCircleOutlined,
|
||||
FileImageFilled,
|
||||
ToolFilled,
|
||||
} from "@ant-design/icons";
|
||||
import Icon, { BarsOutlined, CalendarFilled, DollarCircleOutlined, FileImageFilled, ToolFilled } from "@ant-design/icons";
|
||||
import { Form, notification, Tabs } from "antd";
|
||||
import moment from "moment";
|
||||
import queryString from "query-string";
|
||||
import React, { lazy, Suspense } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
FaHardHat,
|
||||
FaHistory,
|
||||
FaInfo,
|
||||
FaRegStickyNote,
|
||||
FaShieldAlt,
|
||||
} from "react-icons/fa";
|
||||
import { useHistory, useLocation } from "react-router-dom";
|
||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import queryString from "query-string";
|
||||
import { FaHardHat, FaHistory, FaInfo, FaRegStickyNote, FaShieldAlt } from "react-icons/fa";
|
||||
import { connect } from "react-redux";
|
||||
import { useHistory, useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { CalculateJob } from "../../components/job-totals-table/job-totals.utility";
|
||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
|
||||
const JobsLinesContainer = lazy(() =>
|
||||
import("../../components/job-detail-lines/job-lines.container")
|
||||
@@ -127,14 +115,6 @@ export function JobsDetailPage({
|
||||
fallback={<LoadingSpinner message={t("general.labels.loadingapp")} />}>
|
||||
<ScheduleJobModalContainer />
|
||||
<JobLineUpsertModalContainer />
|
||||
|
||||
<button
|
||||
onClick={() => {
|
||||
let r = CalculateJob(job, bodyshop.shoprates);
|
||||
console.log("r", r);
|
||||
}}>
|
||||
Calculate
|
||||
</button>
|
||||
<Form
|
||||
form={form}
|
||||
//onFieldsChange={(a, b) => console.log("a,b", a, b)}
|
||||
|
||||
@@ -67,9 +67,7 @@ const ContractsList = lazy(() =>
|
||||
const InvoicesListPage = lazy(() =>
|
||||
import("../invoices/invoices.page.container")
|
||||
);
|
||||
const InvoiceDetailPage = lazy(() =>
|
||||
import("../invoice-detail/invoice-detail.page.container")
|
||||
);
|
||||
|
||||
const EnterInvoiceModalContainer = lazy(() =>
|
||||
import("../../components/invoice-enter-modal/invoice-enter-modal.container")
|
||||
);
|
||||
@@ -201,11 +199,6 @@ export default function Manage({ match }) {
|
||||
path={`${match.path}/invoices`}
|
||||
component={InvoicesListPage}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/invoices/:invoiceId`}
|
||||
component={InvoiceDetailPage}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/owners`}
|
||||
|
||||
Reference in New Issue
Block a user