IO-1751 Add parts order data to repair data screen.

This commit is contained in:
Patrick Fic
2022-04-07 10:56:02 -07:00
parent b48d7512a2
commit b738fc9007
7 changed files with 118 additions and 18 deletions

View File

@@ -4,6 +4,8 @@ import {
SyncOutlined,
WarningFilled,
EditFilled,
PlusCircleTwoTone,
MinusCircleTwoTone,
} from "@ant-design/icons";
import { useMutation } from "@apollo/client";
import {
@@ -38,6 +40,7 @@ import JobLinesBillRefernece from "../job-lines-bill-reference/job-lines-bill-re
import PartsOrderModalContainer from "../parts-order-modal/parts-order-modal.container";
import _ from "lodash";
import JobCreateIOU from "../job-create-iou/job-create-iou.component";
import JobLinesExpander from "./job-lines-expander.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
@@ -449,6 +452,19 @@ export function JobLinesComponent({
scroll={{
x: true,
}}
expandable={{
expandedRowRender: (record) => (
<JobLinesExpander jobline={record} jobid={job.id} />
),
rowExpandable: (record) => true,
expandRowByClick: true,
expandIcon: ({ expanded, onExpand, record }) =>
expanded ? (
<MinusCircleTwoTone onClick={(e) => onExpand(record, e)} />
) : (
<PlusCircleTwoTone onClick={(e) => onExpand(record, e)} />
),
}}
onRow={(record, rowIndex) => {
return {
onDoubleClick: (event) => {