diff --git a/frontend/app/invoice/[invoiceId]/detail-layout.tsx b/frontend/app/invoice/[invoiceId]/detail-layout.tsx index 976b168..8f80b73 100644 --- a/frontend/app/invoice/[invoiceId]/detail-layout.tsx +++ b/frontend/app/invoice/[invoiceId]/detail-layout.tsx @@ -43,31 +43,59 @@ const DetailLayout = (responseData: any) => { width={36} height={36} > -

{shop.name}

+

+ {shop.name} +

{shop.address && shop.address !== "" ? ( - + Địa chỉ: {shop.address} ) : null} {shop.phone && shop.phone !== "" ? ( - + Số điện thoại: {shop.phone} ) : null} {shop.wifiPass && shop.wifiPass !== "" ? ( - + Wifi: {shop.wifiPass} ) : null}
-
+
- Mã hóa đơn: + Mã hóa đơn: {responseData.invoice.id}
+ {responseData.invoice.customer && ( + <> +
+ + Khách hàng: + +
+ {responseData.invoice.customer.name} + + ({responseData.invoice.customer.phone}) + +
+
+
+ + Điểm: + +
+ +{" "} + {responseData.invoice.pointReceive.toLocaleString( + "vi-VN" + )} +
+
+ + )}
@@ -90,19 +118,21 @@ const DetailLayout = (responseData: any) => {
-
- Tổng tiền: - - {toVND(responseData.invoice.totalPrice)} - -
{responseData.invoice.amountPriceUsePoint !== 0 ? ( -
- Giảm: - - - {toVND(responseData.invoice.amountPriceUsePoint)} - -
+ <> +
+ Tổng tiền: + + {toVND(responseData.invoice.totalPrice)} + +
+
+ Giảm: + + - {toVND(responseData.invoice.amountPriceUsePoint)} + +
+ ) : null}
Thành tiền: diff --git a/frontend/app/sale/page-layout.tsx b/frontend/app/sale/page-layout.tsx index 4e632d7..6781b68 100644 --- a/frontend/app/sale/page-layout.tsx +++ b/frontend/app/sale/page-layout.tsx @@ -123,6 +123,7 @@ const SaleScreen = () => { details: [], }); mutate(`${endPoint}/v1/customers/all`); + mutate(`${endPoint}/v1/books/all`); router.refresh(); } }; diff --git a/frontend/app/setting/detail-layout.tsx b/frontend/app/setting/detail-layout.tsx index a6d9184..aa28cf5 100644 --- a/frontend/app/setting/detail-layout.tsx +++ b/frontend/app/setting/detail-layout.tsx @@ -1,6 +1,5 @@ "use client"; import ConfirmDialog from "@/components/confirm-dialog"; -import Loading from "@/components/loading"; import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; @@ -255,6 +254,20 @@ const DetailLayout = () => { )}
+
+ + + {errors.address && ( + + {errors.address.message} + + )} +