Commit 18ae5a94 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

show proile image in admin order

parent 49cb2cf8
...@@ -121,11 +121,20 @@ export default function Order() { ...@@ -121,11 +121,20 @@ export default function Order() {
</Link> </Link>
</TableCell> </TableCell>
<TableCell> <TableCell>
{userAll.length {(() => {
let usr = userAll.length
? userAll?.filter( ? userAll?.filter(
(usr) => usr.id === order.user_id (usr) => usr.id === order.user_id
)[0].name ?? "undifined" )[0] ?? false
: "undifined"} : false;
console.log(usr);
if(!usr) return <>ไม่พบข้อมูล</>
return <Box sx={{display: "flex",alignItems: "center"}}>
<img className="object-cover px-1 rounded" width={30} height={30} src={usr.photo} alt="profile image" />
{usr.name}
</Box>
})()}
{}
</TableCell> </TableCell>
<TableCell> <TableCell>
<Box color="orangered"> <Box color="orangered">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment