IO-1272 Improve reconciliation table UI
This commit is contained in:
@@ -21,7 +21,8 @@ export default function JobReconciliationBillsTable({
|
|||||||
title: t("billlines.fields.line_desc"),
|
title: t("billlines.fields.line_desc"),
|
||||||
dataIndex: "line_desc",
|
dataIndex: "line_desc",
|
||||||
key: "line_desc",
|
key: "line_desc",
|
||||||
width: "35%",
|
ellipsis: true,
|
||||||
|
minWidth: "65rem",
|
||||||
sorter: (a, b) => alphaSort(a.line_desc, b.line_desc),
|
sorter: (a, b) => alphaSort(a.line_desc, b.line_desc),
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "line_desc" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "line_desc" && state.sortedInfo.order,
|
||||||
@@ -30,7 +31,7 @@ export default function JobReconciliationBillsTable({
|
|||||||
title: t("billlines.labels.from"),
|
title: t("billlines.labels.from"),
|
||||||
dataIndex: "from",
|
dataIndex: "from",
|
||||||
key: "from",
|
key: "from",
|
||||||
width: "20%",
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (text, record) =>
|
render: (text, record) =>
|
||||||
`${record.bill.vendor && record.bill.vendor.name} / ${
|
`${record.bill.vendor && record.bill.vendor.name} / ${
|
||||||
@@ -42,6 +43,7 @@ export default function JobReconciliationBillsTable({
|
|||||||
dataIndex: "actual_price",
|
dataIndex: "actual_price",
|
||||||
key: "actual_price",
|
key: "actual_price",
|
||||||
sorter: (a, b) => a.actual_price - b.actual_price,
|
sorter: (a, b) => a.actual_price - b.actual_price,
|
||||||
|
width: "7rem",
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "actual_price" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "actual_price" && state.sortedInfo.order,
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
@@ -53,6 +55,7 @@ export default function JobReconciliationBillsTable({
|
|||||||
dataIndex: "actual_cost",
|
dataIndex: "actual_cost",
|
||||||
key: "actual_cost",
|
key: "actual_cost",
|
||||||
sorter: (a, b) => a.actual_cost - b.actual_cost,
|
sorter: (a, b) => a.actual_cost - b.actual_cost,
|
||||||
|
width: "7rem",
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "actual_cost" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "actual_cost" && state.sortedInfo.order,
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
@@ -64,6 +67,7 @@ export default function JobReconciliationBillsTable({
|
|||||||
dataIndex: "quantity",
|
dataIndex: "quantity",
|
||||||
key: "quantity",
|
key: "quantity",
|
||||||
sorter: (a, b) => a.quantity - b.quantity,
|
sorter: (a, b) => a.quantity - b.quantity,
|
||||||
|
width: "4rem",
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "quantity" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "quantity" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
@@ -72,9 +76,11 @@ export default function JobReconciliationBillsTable({
|
|||||||
dataIndex: "is_credit_memo",
|
dataIndex: "is_credit_memo",
|
||||||
key: "is_credit_memo",
|
key: "is_credit_memo",
|
||||||
sorter: (a, b) => a.bill.is_credit_memo - b.bill.is_credit_memo,
|
sorter: (a, b) => a.bill.is_credit_memo - b.bill.is_credit_memo,
|
||||||
|
width: "8rem",
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "is_credit_memo" &&
|
state.sortedInfo.columnKey === "is_credit_memo" &&
|
||||||
state.sortedInfo.order,
|
state.sortedInfo.order,
|
||||||
|
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Checkbox disabled checked={record.bill.is_credit_memo} />
|
<Checkbox disabled checked={record.bill.is_credit_memo} />
|
||||||
),
|
),
|
||||||
@@ -94,7 +100,7 @@ export default function JobReconciliationBillsTable({
|
|||||||
<Table
|
<Table
|
||||||
pagination={false}
|
pagination={false}
|
||||||
size="small"
|
size="small"
|
||||||
scroll={{ y: "80vh", x: true }}
|
scroll={{ y: "60vh" }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={invoiceLineData}
|
dataSource={invoiceLineData}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
.imex-reconciliation-modal {
|
.imex-reconciliation-modal {
|
||||||
top: 20px;
|
top: 20px;
|
||||||
.ant-modal-content {
|
// .ant-modal-content {
|
||||||
height: 95vh;
|
// height: 95vh;
|
||||||
display: flex;
|
// display: flex;
|
||||||
flex-direction: column;
|
// flex-direction: column;
|
||||||
.ant-modal-body {
|
// .ant-modal-body {
|
||||||
display: flex;
|
// display: flex;
|
||||||
flex: 1;
|
// flex: 1;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export default function JobReconcilitionPartsTable({
|
|||||||
dataIndex: "line_desc",
|
dataIndex: "line_desc",
|
||||||
key: "line_desc",
|
key: "line_desc",
|
||||||
sorter: (a, b) => alphaSort(a.line_desc, b.line_desc),
|
sorter: (a, b) => alphaSort(a.line_desc, b.line_desc),
|
||||||
|
ellipses: true,
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "line_desc" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "line_desc" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
@@ -57,6 +58,7 @@ export default function JobReconcilitionPartsTable({
|
|||||||
dataIndex: "act_price",
|
dataIndex: "act_price",
|
||||||
key: "act_price",
|
key: "act_price",
|
||||||
sorter: (a, b) => a.act_price - b.act_price,
|
sorter: (a, b) => a.act_price - b.act_price,
|
||||||
|
width: "7rem",
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "act_price" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "act_price" && state.sortedInfo.order,
|
||||||
|
|
||||||
@@ -68,10 +70,12 @@ export default function JobReconcilitionPartsTable({
|
|||||||
title: t("joblines.fields.part_qty"),
|
title: t("joblines.fields.part_qty"),
|
||||||
dataIndex: "part_qty",
|
dataIndex: "part_qty",
|
||||||
key: "part_qty",
|
key: "part_qty",
|
||||||
|
width: "4rem",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("joblines.fields.total"),
|
title: t("joblines.fields.total"),
|
||||||
dataIndex: "total",
|
dataIndex: "total",
|
||||||
|
width: "7rem",
|
||||||
key: "total",
|
key: "total",
|
||||||
sorter: (a, b) => a.act_price * a.part_qty - b.act_price * b.part_qty,
|
sorter: (a, b) => a.act_price * a.part_qty - b.act_price * b.part_qty,
|
||||||
sortOrder:
|
sortOrder:
|
||||||
@@ -89,6 +93,7 @@ export default function JobReconcilitionPartsTable({
|
|||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
key: "status",
|
key: "status",
|
||||||
sorter: (a, b) => alphaSort(a.status, b.status),
|
sorter: (a, b) => alphaSort(a.status, b.status),
|
||||||
|
width: "6rem",
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "status" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "status" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
@@ -108,7 +113,7 @@ export default function JobReconcilitionPartsTable({
|
|||||||
pagination={false}
|
pagination={false}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
size="small"
|
size="small"
|
||||||
scroll={{ y: "80vh", x: true }}
|
scroll={{ y: "60vh" }}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={jobLineData}
|
dataSource={jobLineData}
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
|
|||||||
Reference in New Issue
Block a user