diff options
Diffstat (limited to 'src/lib/quotation/components/Quotationheader.jsx')
| -rw-r--r-- | src/lib/quotation/components/Quotationheader.jsx | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/lib/quotation/components/Quotationheader.jsx b/src/lib/quotation/components/Quotationheader.jsx index d94a55de..a035edc7 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 ( <div className='relative group'> <div> <Link - href='/my/quotations' + href='/my/transactions' target='_blank' rel='noreferrer' className='flex items-center gap-x-2 !text-gray_r-12/80' @@ -138,7 +139,7 @@ const Quotationheader = (quotationCount) => { <span> List <br /> - Quotation + Transactions </span> </Link> </div> @@ -168,7 +169,7 @@ const Quotationheader = (quotationCount) => { > <div className='p-2 flex justify-between items-center'> <h5 className='text-base font-semibold leading-none'> - Daftar Quotation + Daftar Transaksi </h5> </div> <hr className='mt-3 mb-3 border border-gray-100' /> @@ -183,7 +184,7 @@ const Quotationheader = (quotationCount) => { > Login </Link>{' '} - Untuk Melihat Daftar Quotation Anda + Untuk Melihat Daftar Transaksi Anda </p> </div> )} @@ -209,7 +210,7 @@ const Quotationheader = (quotationCount) => { {auth && qotation.length === 0 && !isLoading && ( <div className='justify-center p-4'> <p className='text-gray-500 text-center '> - Tidak Ada Quotation + Tidak Ada Transaksi </p> </div> )} @@ -225,7 +226,7 @@ const Quotationheader = (quotationCount) => { <li className='py-1 sm:py-2'> <div className='flex justify-between border p-2 flex-col gap-y-2 hover:border-red-500'> <Link - href={`/my/quotations/${product?.id}`} + href={`/my/transactions/${product?.id}`} className='hover:border-red-500' > <div className='flex justify-between mb-2'> @@ -241,8 +242,8 @@ const Quotationheader = (quotationCount) => { <p className='text-xs opacity-80 mr-[2px]'> Status : </p> - <p className='badge-red h-fit text-xs whitespace-nowrap'> - Pending Quotation + <p className='badge-yellow h-fit text-xs whitespace-nowrap'> + Pesanan Diproses </p> </div> </div> |
