fixed bug null
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user