MAJOR CHANGE: Renamed invoices to bills BOD-410
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { Col, Row } from "antd";
|
||||
import React from "react";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import InvoicesListTableComponent from "../invoices-list-table/invoices-list-table.component";
|
||||
import JobInvoicesTotalsComponent from "../job-invoices-total/job-invoices-total.component";
|
||||
import BillsListTable from "../bills-list-table/bills-list-table.component";
|
||||
import JobBillsTotal from "../job-bills-total/job-bills-total.component";
|
||||
import PartsOrderModal from "../parts-order-modal/parts-order-modal.container";
|
||||
import PartsOrderListTableComponent from "../parts-order-list-table/parts-order-list-table.component";
|
||||
const tableCol = {
|
||||
@@ -25,37 +25,33 @@ const totalsCol = {
|
||||
|
||||
export default function JobsDetailPliComponent({
|
||||
job,
|
||||
invoicesQuery,
|
||||
handleInvoiceOnRowClick,
|
||||
billsQuery,
|
||||
handleBillOnRowClick,
|
||||
handlePartsOrderOnRowClick,
|
||||
selectedInvoice,
|
||||
}) {
|
||||
return (
|
||||
<div>
|
||||
<PartsOrderModal />
|
||||
{invoicesQuery.error ? (
|
||||
<AlertComponent message={invoicesQuery.error.message} type="error" />
|
||||
{billsQuery.error ? (
|
||||
<AlertComponent message={billsQuery.error.message} type="error" />
|
||||
) : null}
|
||||
<Row>
|
||||
<Col {...tableCol}>
|
||||
<PartsOrderListTableComponent
|
||||
job={job}
|
||||
loading={invoicesQuery.loading}
|
||||
handleOnRowClick={handlePartsOrderOnRowClick}
|
||||
selectedInvoice={selectedInvoice}
|
||||
invoicesQuery={invoicesQuery}
|
||||
billsQuery={billsQuery}
|
||||
/>
|
||||
<InvoicesListTableComponent
|
||||
<BillsListTable
|
||||
job={job}
|
||||
loading={invoicesQuery.loading}
|
||||
handleOnRowClick={handleInvoiceOnRowClick}
|
||||
invoicesQuery={invoicesQuery}
|
||||
handleOnRowClick={handleBillOnRowClick}
|
||||
billsQuery={billsQuery}
|
||||
/>
|
||||
</Col>
|
||||
<Col {...totalsCol}>
|
||||
<JobInvoicesTotalsComponent
|
||||
invoices={invoicesQuery.data ? invoicesQuery.data.invoices : []}
|
||||
loading={invoicesQuery.loading}
|
||||
<JobBillsTotal
|
||||
bills={billsQuery.data ? billsQuery.data.bills : []}
|
||||
loading={billsQuery.loading}
|
||||
jobTotals={job.job_totals}
|
||||
/>
|
||||
</Col>
|
||||
|
||||
Reference in New Issue
Block a user