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

View File

@@ -125,8 +125,8 @@ const SupervisorList = () => {
props.dependencyFieldValue?.value === "" props.dependencyFieldValue?.value === ""
? "empty" ? "empty"
: loadingEdaratList : loadingEdaratList
? "loading" ? "loading"
: props.filterParameters.value : props.filterParameters.value
} }
columnSelectOption={getColumnSelectOptions} columnSelectOption={getColumnSelectOptions}
/> />
@@ -225,8 +225,8 @@ const SupervisorList = () => {
props.dependencyFieldValue.value === "" props.dependencyFieldValue.value === ""
? "empty" ? "empty"
: loadingSubItemsList : loadingSubItemsList
? "loading" ? "loading"
: props.filterParameters.value : props.filterParameters.value
} }
columnSelectOption={getColumnSelectOptions} columnSelectOption={getColumnSelectOptions}
/> />