Added ownr_co_nm to owner display fields. BOD-256
This commit is contained in:
@@ -7,7 +7,7 @@ export default function OwnerFindModalComponent({
|
||||
selectedOwner,
|
||||
setSelectedOwner,
|
||||
ownersListLoading,
|
||||
ownersList
|
||||
ownersList,
|
||||
}) {
|
||||
//setSelectedOwner is used to set the record id of the owner to use for adding the job.
|
||||
const { t } = useTranslation();
|
||||
@@ -16,27 +16,32 @@ export default function OwnerFindModalComponent({
|
||||
{
|
||||
title: t("owners.fields.ownr_ln"),
|
||||
dataIndex: "ownr_ln",
|
||||
key: "ownr_ln"
|
||||
key: "ownr_ln",
|
||||
},
|
||||
{
|
||||
title: t("owners.fields.ownr_fn"),
|
||||
dataIndex: "ownr_fn",
|
||||
key: "ownr_fn"
|
||||
key: "ownr_fn",
|
||||
},
|
||||
{
|
||||
title: t("owners.fields.ownr_co_nm"),
|
||||
dataIndex: "ownr_co_nm",
|
||||
key: "ownr_co_nm",
|
||||
},
|
||||
{
|
||||
title: t("owners.fields.ownr_addr1"),
|
||||
dataIndex: "ownr_addr1",
|
||||
key: "ownr_addr1"
|
||||
key: "ownr_addr1",
|
||||
},
|
||||
{
|
||||
title: t("owners.fields.ownr_city"),
|
||||
dataIndex: "ownr_city",
|
||||
key: "ownr_city"
|
||||
key: "ownr_city",
|
||||
},
|
||||
{
|
||||
title: t("owners.fields.ownr_ea"),
|
||||
dataIndex: "ownr_ea",
|
||||
key: "ownr_ea"
|
||||
key: "ownr_ea",
|
||||
},
|
||||
{
|
||||
title: t("owners.fields.ownr_ph1"),
|
||||
@@ -44,11 +49,11 @@ export default function OwnerFindModalComponent({
|
||||
key: "ownr_ph1",
|
||||
render: (text, record) => (
|
||||
<PhoneFormatter>{record.ownr_ph1}</PhoneFormatter>
|
||||
)
|
||||
}
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const handleOnRowClick = record => {
|
||||
const handleOnRowClick = (record) => {
|
||||
if (record) {
|
||||
if (record.id) {
|
||||
setSelectedOwner(record.id);
|
||||
@@ -64,22 +69,22 @@ export default function OwnerFindModalComponent({
|
||||
title={() => t("owners.labels.existing_owners")}
|
||||
size="small"
|
||||
pagination={{ position: "bottom" }}
|
||||
columns={columns.map(item => ({ ...item }))}
|
||||
columns={columns.map((item) => ({ ...item }))}
|
||||
rowKey="id"
|
||||
loading={ownersListLoading}
|
||||
dataSource={ownersList}
|
||||
rowSelection={{
|
||||
onSelect: props => {
|
||||
onSelect: (props) => {
|
||||
setSelectedOwner(props.id);
|
||||
},
|
||||
type: "radio",
|
||||
selectedRowKeys: [selectedOwner]
|
||||
selectedRowKeys: [selectedOwner],
|
||||
}}
|
||||
onRow={(record, rowIndex) => {
|
||||
return {
|
||||
onClick: event => {
|
||||
onClick: (event) => {
|
||||
handleOnRowClick(record);
|
||||
}
|
||||
},
|
||||
};
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user