Commit 69826254 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

update: show order;

parent baaac0df
...@@ -42,9 +42,9 @@ export default function Orders() { ...@@ -42,9 +42,9 @@ export default function Orders() {
<TableRow> <TableRow>
{[ {[
"id", "id",
"ราคาทั้งหมด",
"วันที่", "วันที่",
"ผู้ซื้อ", "ผู้ซื้อ",
"ราคาทั้งหมด",
"ค่าส่ง", "ค่าส่ง",
"ชำระเงิน", "ชำระเงิน",
].map((label, idx) => ( ].map((label, idx) => (
...@@ -58,11 +58,6 @@ export default function Orders() { ...@@ -58,11 +58,6 @@ export default function Orders() {
order && ( order && (
<TableRow key={idx}> <TableRow key={idx}>
<TableCell>{order.id}</TableCell> <TableCell>{order.id}</TableCell>
<TableCell>
<Box color="orangered">
${Number(order.total_price).toLocaleString()}
</Box>
</TableCell>
<TableCell> <TableCell>
<Link href={"/admin/order/" + order.id}> <Link href={"/admin/order/" + order.id}>
{new Date(order.date).toLocaleString()} {new Date(order.date).toLocaleString()}
...@@ -74,6 +69,12 @@ export default function Orders() { ...@@ -74,6 +69,12 @@ export default function Orders() {
.name ?? "undifined" .name ?? "undifined"
: "undifined"} : "undifined"}
</TableCell> </TableCell>
<TableCell>
<Box color="orangered">
${Number(order.total_price).toLocaleString()}
</Box>
</TableCell>
<TableCell>${order.shipping_price}</TableCell> <TableCell>${order.shipping_price}</TableCell>
<TableCell> <TableCell>
<Box color={order.pay_status ? "green" : "red"}> <Box color={order.pay_status ? "green" : "red"}>
......
...@@ -78,9 +78,9 @@ export default function Order() { ...@@ -78,9 +78,9 @@ export default function Order() {
<TableRow> <TableRow>
{[ {[
"id", "id",
"ราคาทั้งหมด",
"วันที่", "วันที่",
"ผู้ซื้อ", "ผู้ซื้อ",
"ราคาทั้งหมด",
"ค่าส่ง", "ค่าส่ง",
"ชำระเงิน", "ชำระเงิน",
"ที่อยู่", "ที่อยู่",
...@@ -96,11 +96,6 @@ export default function Order() { ...@@ -96,11 +96,6 @@ export default function Order() {
order && ( order && (
<TableRow key={idx}> <TableRow key={idx}>
<TableCell>{order.id}</TableCell> <TableCell>{order.id}</TableCell>
<TableCell>
<Box color="orangered">
${Number(order.total_price).toLocaleString()}
</Box>
</TableCell>
<TableCell> <TableCell>
<Link <Link
title="คลิกเพื่อดูรายละเอียด" title="คลิกเพื่อดูรายละเอียด"
...@@ -116,6 +111,12 @@ export default function Order() { ...@@ -116,6 +111,12 @@ export default function Order() {
)[0].name ?? "undifined" )[0].name ?? "undifined"
: "undifined"} : "undifined"}
</TableCell> </TableCell>
<TableCell>
<Box color="orangered">
${Number(order.total_price).toLocaleString()}
</Box>
</TableCell>
<TableCell> <TableCell>
<Box color="black">${order.shipping_price}</Box> <Box color="black">${order.shipping_price}</Box>
</TableCell> </TableCell>
......
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