From 0d28dc8ff5fb8c5399e356ed6ecae4fce2019ca6 Mon Sep 17 00:00:00 2001
From: it-fixcomart
Date: Sat, 31 May 2025 08:55:43 +0700
Subject: fix repeat-order
---
src/lib/quotation/components/Quotationheader.jsx | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
(limited to 'src/lib/quotation/components/Quotationheader.jsx')
diff --git a/src/lib/quotation/components/Quotationheader.jsx b/src/lib/quotation/components/Quotationheader.jsx
index d94a55de..6551296a 100644
--- a/src/lib/quotation/components/Quotationheader.jsx
+++ b/src/lib/quotation/components/Quotationheader.jsx
@@ -53,7 +53,7 @@ const Quotationheader = (quotationCount) => {
};
const getCart = () => {
- if (!productQuotation && auth) {
+ if ((productQuotation?.length === 0) && auth) {
refreshCartf();
}
};
@@ -62,7 +62,7 @@ const Quotationheader = (quotationCount) => {
const refreshCartf = useCallback(async () => {
setIsloading(true);
let pendingTransactions = transactions?.data?.saleOrders.filter(
- (transaction) => transaction.status === 'draft'
+ (transaction) => transaction.status === 'waiting'
);
setProductQuotation(pendingTransactions);
setCountQuotation(
@@ -107,20 +107,21 @@ const Quotationheader = (quotationCount) => {
};
}, []);
+
const handleCheckout = async () => {
SetButtonTerapkan(true);
let checkoutAll = await odooApi(
'POST',
`/api/v1/user/${auth.id}/cart/select-all`
);
- router.push('/my/quotations');
+ router.push('/my/transactions');
};
return (
{
List
- Quotation
+ Transactions
@@ -168,7 +169,7 @@ const Quotationheader = (quotationCount) => {
>
- Daftar Quotation
+ Daftar Transaksi
@@ -183,7 +184,7 @@ const Quotationheader = (quotationCount) => {
>
Login
{' '}
- Untuk Melihat Daftar Quotation Anda
+ Untuk Melihat Daftar Transaksi Anda
)}
@@ -209,7 +210,7 @@ const Quotationheader = (quotationCount) => {
{auth && qotation.length === 0 && !isLoading && (
- Tidak Ada Quotation
+ Tidak Ada Transaksi
)}
@@ -225,7 +226,7 @@ const Quotationheader = (quotationCount) => {
@@ -241,8 +242,8 @@ const Quotationheader = (quotationCount) => {
Status :
-
- Pending Quotation
+
+ Pesanan Diterima
--
cgit v1.2.3
From 04961a55929017f77ee6801d2b7ada4c05689821 Mon Sep 17 00:00:00 2001
From: it-fixcomart
Date: Thu, 31 Jul 2025 15:55:05 +0700
Subject: fix repeat order
---
src/lib/quotation/components/Quotationheader.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/lib/quotation/components/Quotationheader.jsx')
diff --git a/src/lib/quotation/components/Quotationheader.jsx b/src/lib/quotation/components/Quotationheader.jsx
index 6551296a..a035edc7 100644
--- a/src/lib/quotation/components/Quotationheader.jsx
+++ b/src/lib/quotation/components/Quotationheader.jsx
@@ -243,7 +243,7 @@ const Quotationheader = (quotationCount) => {
Status :
- Pesanan Diterima
+ Pesanan Diproses
--
cgit v1.2.3