diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-09-08 14:58:30 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-09-08 14:58:30 +0700 |
| commit | 57ace93dc3090a54d65d3b84ae50e8a9249eb314 (patch) | |
| tree | 327af109c1be6b4b3fc367fac9ebea3bb952c289 /src/lib/transaction/components/Transaction.jsx | |
| parent | c4a16600cd75afea1ca56cfa38d0db4088ad203f (diff) | |
<Miqdad> Sip
Diffstat (limited to 'src/lib/transaction/components/Transaction.jsx')
| -rw-r--r-- | src/lib/transaction/components/Transaction.jsx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx index 5ee56972..96c89aec 100644 --- a/src/lib/transaction/components/Transaction.jsx +++ b/src/lib/transaction/components/Transaction.jsx @@ -502,36 +502,40 @@ const Transaction = ({ id }) => { active={toOthers} close={() => setToOthers(null)} > - <div className='flex flex-col gap-y-4 mt-2'> + {transaction.data?.status === 'draft' && ( + <> <button className='text-left disabled:opacity-60' - disabled={!toOthers?.purchaseOrderFile} + disabled={toOthers?.status != 'draft'} onClick={() => { - downloadPurchaseOrder(toOthers); + downloadQuotation(toOthers); setToOthers(null); }} > - Download PO + Download Quotation </button> <button className='text-left disabled:opacity-60' - disabled={toOthers?.status != 'draft'} + disabled={toOthers?.status != 'waiting'} onClick={() => { - downloadQuotation(toOthers); + setToCancel(toOthers); setToOthers(null); }} > - Download Quotation + Batalkan Transaksi </button> + </> + )} + <div className='flex flex-col gap-y-4 mt-2'> <button className='text-left disabled:opacity-60' - disabled={toOthers?.status != 'waiting'} + disabled={!toOthers?.purchaseOrderFile} onClick={() => { - setToCancel(toOthers); + downloadPurchaseOrder(toOthers); setToOthers(null); }} > - Batalkan Transaksi + Download PO </button> </div> </BottomPopup> |
