fixed bug null

This commit is contained in:
AmirHossein Mahmoodi
2025-03-08 16:16:25 +03:30
parent cac9b243b9
commit 6a07321d50
2 changed files with 12 additions and 11 deletions

View File

@@ -46,21 +46,22 @@ const ReferListContent = ({ rowId }) => {
<TableRow>
<TableCell>کاربر</TableCell>
<TableCell>از اداره</TableCell>
<TableCell>از اداره</TableCell>
<TableCell>به اداره</TableCell>
<TableCell>تاریخ</TableCell>
<TableCell>توضیحات</TableCell>
</TableRow>
</TableHead>
<TableBody>
{data.map((refer, index) => {
const formatLocation = (province, edareh) =>
province ? `${province} | ${edareh}` : edareh;
return (
<TableRow
key={index}
sx={{ "&:last-child td, &:last-child th": { border: 0 } }}
>
<TableRow key={refer.id || index}>
<TableCell>{refer.user}</TableCell>
<TableCell>{`${refer.from_province} | ${refer.from_edareh}`}</TableCell>
<TableCell>{`${refer.to_province} | ${refer.to_edareh}`}</TableCell>
<TableCell>
{formatLocation(refer.from_province, refer.from_edareh)}
</TableCell>
<TableCell>{formatLocation(refer.to_province, refer.to_edareh)}</TableCell>
<TableCell>
{moment(refer.created_at).locale("fa").format("HH:mm | yyyy/MM/DD")}
</TableCell>

View File

@@ -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}
/>