Skip to content

Commit

Permalink
feat: 新增收入報表功能、收入統計功能、修正訂單顯示價格錯誤
Browse files Browse the repository at this point in the history
  • Loading branch information
Shih-Hsuan committed Jan 8, 2024
1 parent 54ea9c6 commit 25e2852
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 270 deletions.
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default function RootLayout({
];

const SELLER_CENTER_LINKS = [
//{ text: "賣家中心", href: user ? "/dashbord" : "/sign-in", icon: StorefrontIcon },
{ text: "賣家中心", href: user ? "/dashbord" : "/sign-in", icon: StorefrontIcon },
{ text: "商品管理", href: user ? "/seller-product" : "/sign-in", icon: SellIcon },
{ text: "訂單管理", href: user ? "/order" : "/sign-in", icon: ContentPasteIcon },
{ text: "上架商品", href: user ? "/add-product" : "/sign-in", icon: AddIcon },
Expand Down
10 changes: 5 additions & 5 deletions src/app/my-order/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export default function Orders() {
</TableCell>
<TableCell>
{order.productAddAmountList.map((productItem, index) => (
<div key={index}>{productItem.product.currentPrice}</div>
<div key={index}>{productItem.product.currentPrice * productItem.amount}</div>
))}
</TableCell>
<TableCell>
Expand Down Expand Up @@ -351,7 +351,7 @@ export default function Orders() {
</TableCell>
<TableCell>
{order.productAddAmountList.map((productItem, index) => (
<div key={index}>{productItem.product.currentPrice}</div>
<div key={index}>{productItem.product.currentPrice * productItem.amount}</div>
))}
</TableCell>
<TableCell>
Expand Down Expand Up @@ -396,7 +396,7 @@ export default function Orders() {
</TableCell>
<TableCell>
{order.productAddAmountList.map((productItem, index) => (
<div key={index}>{productItem.product.currentPrice}</div>
<div key={index}>{productItem.product.currentPrice * productItem.amount}</div>
))}
</TableCell>
<TableCell>
Expand Down Expand Up @@ -442,7 +442,7 @@ export default function Orders() {
</TableCell>
<TableCell>
{order.productAddAmountList.map((productItem, index) => (
<div key={index}>{productItem.product.currentPrice}</div>
<div key={index}>{productItem.product.currentPrice * productItem.amount}</div>
))}
</TableCell>
<TableCell>
Expand Down Expand Up @@ -490,7 +490,7 @@ export default function Orders() {
</TableCell>
<TableCell>
{order.productAddAmountList.map((productItem, index) => (
<div key={index}>{productItem.product.currentPrice}</div>
<div key={index}>{productItem.product.currentPrice * productItem.amount}</div>
))}
</TableCell>
<TableCell>
Expand Down
10 changes: 5 additions & 5 deletions src/app/order/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export default function Orders() {
</TableCell>
<TableCell>
{order.productAddAmountList.map((productItem, index) => (
<div key={index}>{productItem.product.currentPrice}</div>
<div key={index}>{productItem.product.currentPrice * productItem.amount}</div>
))}
</TableCell>
<TableCell>
Expand Down Expand Up @@ -381,7 +381,7 @@ export default function Orders() {
</TableCell>
<TableCell>
{order.productAddAmountList.map((productItem, index) => (
<div key={index}>{productItem.product.currentPrice}</div>
<div key={index}>{productItem.product.currentPrice * productItem.amount}</div>
))}
</TableCell>
<TableCell>
Expand Down Expand Up @@ -424,7 +424,7 @@ export default function Orders() {
</TableCell>
<TableCell>
{order.productAddAmountList.map((productItem, index) => (
<div key={index}>{productItem.product.currentPrice}</div>
<div key={index}>{productItem.product.currentPrice * productItem.amount}</div>
))}
</TableCell>
<TableCell>
Expand Down Expand Up @@ -468,7 +468,7 @@ export default function Orders() {
</TableCell>
<TableCell>
{order.productAddAmountList.map((productItem, index) => (
<div key={index}>{productItem.product.currentPrice}</div>
<div key={index}>{productItem.product.currentPrice * productItem.amount}</div>
))}
</TableCell>
<TableCell>
Expand Down Expand Up @@ -520,7 +520,7 @@ export default function Orders() {
</TableCell>
<TableCell>
{order.productAddAmountList.map((productItem, index) => (
<div key={index}>{productItem.product.currentPrice}</div>
<div key={index}>{productItem.product.currentPrice * productItem.amount}</div>
))}
</TableCell>
<TableCell>
Expand Down
Loading

0 comments on commit 25e2852

Please sign in to comment.