diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-07 16:49:38 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-07 16:49:38 +0700 |
| commit | f80551e64e7b4fa1463ecd47d744f7f2846abfda (patch) | |
| tree | 19564a0f2972de5f5140c9cce50e0c666c6f8455 /src/lib/transaction | |
| parent | 2d99c50da37c2e68ed33a4bc20e9b2ff06578bbe (diff) | |
<iman> update quotation
Diffstat (limited to 'src/lib/transaction')
| -rw-r--r-- | src/lib/transaction/api/checkoutPoApi.js | 19 | ||||
| -rw-r--r-- | src/lib/transaction/components/Transaction.jsx | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/transaction/api/checkoutPoApi.js b/src/lib/transaction/api/checkoutPoApi.js index 04421368..3376e773 100644 --- a/src/lib/transaction/api/checkoutPoApi.js +++ b/src/lib/transaction/api/checkoutPoApi.js @@ -1,13 +1,14 @@ -import odooApi from '@/core/api/odooApi' -import { getAuth } from '@/core/utils/auth' +import odooApi from '@/core/api/odooApi'; +import { getAuth } from '@/core/utils/auth'; -const checkoutPoApi = async ({ id }) => { - const auth = getAuth() +const checkoutPoApi = async ({ id, status }) => { + const auth = getAuth(); const dataCheckout = await odooApi( 'POST', - `/api/v1/partner/${auth?.partnerId}/sale_order/${id}/checkout` - ) - return dataCheckout -} + `/api/v1/partner/${auth?.partnerId}/sale_order/${id}/checkout`, + { status } + ); + return dataCheckout; +}; -export default checkoutPoApi +export default checkoutPoApi; diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx index f64945f5..d9edb670 100644 --- a/src/lib/transaction/components/Transaction.jsx +++ b/src/lib/transaction/components/Transaction.jsx @@ -123,7 +123,7 @@ const Transaction = ({ id }) => { // toast.error('Mohon upload dokumen PO anda sebelum melanjutkan pesanan'); // return; // } - await checkoutPoApi({ id }); + await checkoutPoApi({ id, status: true }); toast.success('Berhasil melanjutkan pesanan'); transaction.refetch(); }; |
