IO-993 CSI undefined for owner name.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { SyncOutlined } from "@ant-design/icons";
|
||||
import { Button, Table } from "antd";
|
||||
import { Button, Card, Table } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -46,15 +46,15 @@ export default function CsiResponseListPaginated({
|
||||
width: "25%",
|
||||
sortOrder: sortcolumn === "owner" && sortorder,
|
||||
render: (text, record) => {
|
||||
return record.owner ? (
|
||||
<Link to={"/manage/owners/" + record.owner.id}>
|
||||
return record.job.owner ? (
|
||||
<Link to={"/manage/owners/" + record.job.owner.id}>
|
||||
{`${record.job.ownr_fn || ""} ${record.job.ownr_ln || ""} ${
|
||||
record.job.ownr_co_nm
|
||||
record.job.ownr_co_nm || ""
|
||||
}`}
|
||||
</Link>
|
||||
) : (
|
||||
<span>{`${record.job.ownr_fn || ""} ${record.job.ownr_ln || ""} ${
|
||||
record.job.ownr_co_nm
|
||||
record.job.ownr_co_nm || ""
|
||||
}`}</span>
|
||||
);
|
||||
},
|
||||
@@ -96,28 +96,15 @@ export default function CsiResponseListPaginated({
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Card
|
||||
extra={
|
||||
<Button onClick={() => refetch()}>
|
||||
<SyncOutlined />
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
<Table
|
||||
loading={loading}
|
||||
title={() => {
|
||||
return (
|
||||
<div style={{ display: "flex" }}>
|
||||
<Button onClick={() => refetch()}>
|
||||
<SyncOutlined />
|
||||
</Button>
|
||||
{
|
||||
// <Input.Search
|
||||
// placeholder={t("general.labels.search")}
|
||||
// onSearch={(value) => {
|
||||
// search.search = value;
|
||||
// history.push({ search: queryString.stringify(search) });
|
||||
// }}
|
||||
// enterButton
|
||||
// />
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
pagination={{
|
||||
position: "top",
|
||||
pageSize: 25,
|
||||
@@ -143,6 +130,6 @@ export default function CsiResponseListPaginated({
|
||||
};
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user