From 6a07321d503534e84df478ebd00ed8b3e8921b1a Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Sat, 8 Mar 2025 16:16:25 +0330 Subject: [PATCH] fixed bug null --- .../RowActions/ReferList/ReferListContent.jsx | 15 ++++++++------- .../roadItems/supervisor/SupervisorList.jsx | 8 ++++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/components/dashboard/fastReact/complaintList/RowActions/ReferList/ReferListContent.jsx b/src/components/dashboard/fastReact/complaintList/RowActions/ReferList/ReferListContent.jsx index 31a1e4c..aa8ba3d 100644 --- a/src/components/dashboard/fastReact/complaintList/RowActions/ReferList/ReferListContent.jsx +++ b/src/components/dashboard/fastReact/complaintList/RowActions/ReferList/ReferListContent.jsx @@ -46,21 +46,22 @@ const ReferListContent = ({ rowId }) => { کاربر از اداره - از اداره + به اداره تاریخ توضیحات {data.map((refer, index) => { + const formatLocation = (province, edareh) => + province ? `${province} | ${edareh}` : edareh; return ( - + {refer.user} - {`${refer.from_province} | ${refer.from_edareh}`} - {`${refer.to_province} | ${refer.to_edareh}`} + + {formatLocation(refer.from_province, refer.from_edareh)} + + {formatLocation(refer.to_province, refer.to_edareh)} {moment(refer.created_at).locale("fa").format("HH:mm | yyyy/MM/DD")} diff --git a/src/components/dashboard/roadItems/supervisor/SupervisorList.jsx b/src/components/dashboard/roadItems/supervisor/SupervisorList.jsx index 0e72417..a8fc3be 100644 --- a/src/components/dashboard/roadItems/supervisor/SupervisorList.jsx +++ b/src/components/dashboard/roadItems/supervisor/SupervisorList.jsx @@ -125,8 +125,8 @@ const SupervisorList = () => { props.dependencyFieldValue?.value === "" ? "empty" : loadingEdaratList - ? "loading" - : props.filterParameters.value + ? "loading" + : props.filterParameters.value } columnSelectOption={getColumnSelectOptions} /> @@ -225,8 +225,8 @@ const SupervisorList = () => { props.dependencyFieldValue.value === "" ? "empty" : loadingSubItemsList - ? "loading" - : props.filterParameters.value + ? "loading" + : props.filterParameters.value } columnSelectOption={getColumnSelectOptions} />