From e6d1e36b84cf3a063fa323a2dce53923d89d2b9e Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Thu, 6 May 2021 14:21:28 -0700 Subject: [PATCH] IO-993 CSI undefined for owner name. --- .../csi-response-form.container.jsx | 19 +++++---- .../csi-response-list-paginated.component.jsx | 39 +++++++------------ .../shop-csi/shop-csi.container.page.jsx | 4 +- 3 files changed, 27 insertions(+), 35 deletions(-) diff --git a/client/src/components/csi-response-form/csi-response-form.container.jsx b/client/src/components/csi-response-form/csi-response-form.container.jsx index 52ccb8277..53858e2c0 100644 --- a/client/src/components/csi-response-form/csi-response-form.container.jsx +++ b/client/src/components/csi-response-form/csi-response-form.container.jsx @@ -1,13 +1,13 @@ import { useQuery } from "@apollo/client"; -import { Form } from "antd"; +import { Card, Form, Result } from "antd"; import queryString from "query-string"; import React, { useEffect } from "react"; +import { useTranslation } from "react-i18next"; import { useLocation } from "react-router-dom"; import { QUERY_CSI_RESPONSE_BY_PK } from "../../graphql/csi.queries"; -import ConfigFormComponents from "../config-form-components/config-form-components.component"; -import { useTranslation } from "react-i18next"; -import LoadingSpinner from "../loading-spinner/loading-spinner.component"; import AlertComponent from "../alert/alert.component"; +import ConfigFormComponents from "../config-form-components/config-form-components.component"; +import LoadingSpinner from "../loading-spinner/loading-spinner.component"; export default function CsiResponseFormContainer() { const { t } = useTranslation(); @@ -25,19 +25,24 @@ export default function CsiResponseFormContainer() { form.resetFields(); }, [data, form]); - if (!!!responseid) return
{t("csi.labels.noneselected")}
; + if (!!!responseid) + return ( + + + + ); if (loading) return ; if (error) return ; return ( -
+
-
+ ); } diff --git a/client/src/components/csi-response-list-paginated/csi-response-list-paginated.component.jsx b/client/src/components/csi-response-list-paginated/csi-response-list-paginated.component.jsx index c2a2066ba..9e522bc52 100644 --- a/client/src/components/csi-response-list-paginated/csi-response-list-paginated.component.jsx +++ b/client/src/components/csi-response-list-paginated/csi-response-list-paginated.component.jsx @@ -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 ? ( - + return record.job.owner ? ( + {`${record.job.ownr_fn || ""} ${record.job.ownr_ln || ""} ${ - record.job.ownr_co_nm + record.job.ownr_co_nm || "" }`} ) : ( {`${record.job.ownr_fn || ""} ${record.job.ownr_ln || ""} ${ - record.job.ownr_co_nm + record.job.ownr_co_nm || "" }`} ); }, @@ -96,28 +96,15 @@ export default function CsiResponseListPaginated({ }; return ( -
+ refetch()}> + + + } + > { - return ( -
- - { - // { - // search.search = value; - // history.push({ search: queryString.stringify(search) }); - // }} - // enterButton - // /> - } -
- ); - }} pagination={{ position: "top", pageSize: 25, @@ -143,6 +130,6 @@ export default function CsiResponseListPaginated({ }; }} /> - + ); } diff --git a/client/src/pages/shop-csi/shop-csi.container.page.jsx b/client/src/pages/shop-csi/shop-csi.container.page.jsx index e6473a622..01476dab0 100644 --- a/client/src/pages/shop-csi/shop-csi.container.page.jsx +++ b/client/src/pages/shop-csi/shop-csi.container.page.jsx @@ -76,7 +76,7 @@ export function ShopCsiContainer({ // // } > - + - +