Added ownr_co_nm to owner display fields. BOD-256

This commit is contained in:
Patrick Fic
2020-08-19 09:19:59 -07:00
parent 534e0a0398
commit 8488b07ca5
22 changed files with 141 additions and 99 deletions

View File

@@ -39,7 +39,7 @@ export function JobsList({ bodyshop }) {
const history = useHistory();
const [searchText, setSearchText] = useState("");
if (error) return <AlertComponent message={error.message} type='error' />;
if (error) return <AlertComponent message={error.message} type="error" />;
const jobs = data
? searchText === ""
@@ -50,6 +50,9 @@ export function JobsList({ bodyshop }) {
.toString()
.toLowerCase()
.includes(searchText.toLowerCase()) ||
(j.ownr_co_nm || "")
.toLowerCase()
.includes(searchText.toLowerCase()) ||
(j.ownr_fn || "")
.toLowerCase()
.includes(searchText.toLowerCase()) ||
@@ -122,10 +125,14 @@ export function JobsList({ bodyshop }) {
render: (text, record) => {
return record.owner ? (
<Link to={"/manage/owners/" + record.owner.id}>
{`${record.ownr_fn || ""} ${record.ownr_ln || ""}`}
{`${record.ownr_fn || ""} ${record.ownr_ln || ""} ${
record.ownr_co_nm || ""
}`}
</Link>
) : (
<span>{`${record.ownr_fn || ""} ${record.ownr_ln || ""}`}</span>
<span>{`${record.ownr_fn || ""} ${record.ownr_ln || ""} ${
record.ownr_co_nm || ""
}`}</span>
);
},
},
@@ -242,21 +249,21 @@ export function JobsList({ bodyshop }) {
return (
<Table
loading={loading}
size='small'
size="small"
pagination={false}
columns={columns}
rowKey='id'
rowKey="id"
dataSource={jobs}
style={{ height: "100%" }}
scroll={{ x: true }}
title={() => {
return (
<div className='imex-table-header'>
<div className="imex-table-header">
<Button onClick={() => refetch()}>
<SyncOutlined />
</Button>
<Input.Search
className='imex-table-header__search'
className="imex-table-header__search"
placeholder={t("general.labels.search")}
onChange={(e) => {
setSearchText(e.target.value);