diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-08 13:55:44 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-08 13:55:44 +0700 |
| commit | 88198c83806b69ce6ab7815cee5c139536849c9f (patch) | |
| tree | 5a6da519dd9069fc9f1a8435392a0ab835a366fd /src/lib/transaction/components/Transaction.jsx | |
| parent | f80551e64e7b4fa1463ecd47d744f7f2846abfda (diff) | |
<iman> update quotation website
Diffstat (limited to 'src/lib/transaction/components/Transaction.jsx')
| -rw-r--r-- | src/lib/transaction/components/Transaction.jsx | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx index d9edb670..6277e3e0 100644 --- a/src/lib/transaction/components/Transaction.jsx +++ b/src/lib/transaction/components/Transaction.jsx @@ -90,16 +90,20 @@ const Transaction = ({ id }) => { const [continueTransaction, setContinueTransaction] = useState(false); const openCancelTransaction = () => setCancelTransaction(true); const openContinueTransaction = () => { - if (!transaction.data?.purchaseOrderFile) { - setContinueTransaction(true); - } else { + if (auth.partnerTempo) { checkout(); + } else { + if (!transaction.data?.purchaseOrderFile) { + setContinueTransaction(true); + } else { + checkoutNoPO(); + } } }; - const ContinueTransaction = () => { - setContinueNoPo(true); - checkoutNoPO(); - }; + // const ContinueTransaction = () => { + // setContinueNoPo(true); + // checkoutNoPO(); + // }; const closeCancelTransaction = () => setCancelTransaction(false); const closeContinueTransaction = () => setContinueTransaction(false); @@ -119,10 +123,10 @@ const Transaction = ({ id }) => { }; console.log('transaction', transaction); const checkout = async () => { - // if (!transaction.data?.purchaseOrderFile) { - // toast.error('Mohon upload dokumen PO anda sebelum melanjutkan pesanan'); - // return; - // } + if (!transaction.data?.purchaseOrderFile) { + toast.error('Mohon upload dokumen PO anda sebelum melanjutkan pesanan'); + return; + } await checkoutPoApi({ id, status: true }); toast.success('Berhasil melanjutkan pesanan'); transaction.refetch(); |
