From 12a925c67801d22830faf9b605ee8cceb7b0262c Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 30 Jul 2020 08:36:09 -0700 Subject: [PATCH] Split op code and part number on jobline list BOD-207 --- client/src/App/App.styles.scss | 5 ++++ .../job-detail-lines/job-lines.component.jsx | 23 +++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/client/src/App/App.styles.scss b/client/src/App/App.styles.scss index f3f6f2a5c..e4e62f8d0 100644 --- a/client/src/App/App.styles.scss +++ b/client/src/App/App.styles.scss @@ -65,3 +65,8 @@ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); background-color: #188fff; } + +.ant-table-cell { + // background-color: red; + padding: 0.2rem !important; +} diff --git a/client/src/components/job-detail-lines/job-lines.component.jsx b/client/src/components/job-detail-lines/job-lines.component.jsx index 1bf80838b..01d9e3333 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -67,19 +67,21 @@ export function JobLinesComponent({ title: t("joblines.fields.oem_partno"), dataIndex: "oem_partno", key: "oem_partno", - sorter: (a, b) => - alphaSort( - a.oem_partno ? a.oem_partno : a.op_code_desc, - b.oem_partno ? b.oem_partno : b.op_code_desc - ), + sorter: (a, b) => alphaSort(a.oem_partno, b.oem_partno), sortOrder: state.sortedInfo.columnKey === "oem_partno" && state.sortedInfo.order, ellipsis: true, - render: (text, record) => ( - - {record.oem_partno ? record.oem_partno : record.op_code_desc} - - ), + render: (text, record) => record.oem_partno, + }, + { + title: t("joblines.fields.op_code_desc"), + dataIndex: "op_code_desc", + key: "op_code_desc", + sorter: (a, b) => alphaSort(a.op_code_desc, b.op_code_desc), + sortOrder: + state.sortedInfo.columnKey === "op_code_desc" && state.sortedInfo.order, + ellipsis: true, + render: (text, record) => record.op_code_desc, }, { title: t("joblines.fields.part_type"), @@ -348,6 +350,7 @@ export function JobLinesComponent({ ))} )} + rowClassName="table-small-margin" rowSelection={{ selectedRowKeys: selectedLines.map((item) => item.id), onSelectAll: (selected, selectedRows, changeRows) => {