From 50d7157be3871f671ddfabc699a21733fa74a1b8 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Sat, 21 Jan 2023 13:06:19 +0700 Subject: Detail transaction page --- src/pages/my/transactions/index.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/pages/my/transactions/index.js') diff --git a/src/pages/my/transactions/index.js b/src/pages/my/transactions/index.js index eb5f99a1..7792c647 100644 --- a/src/pages/my/transactions/index.js +++ b/src/pages/my/transactions/index.js @@ -8,6 +8,7 @@ import { useAuth } from "../../../helpers/auth"; import apiOdoo from "../../../helpers/apiOdoo"; import currencyFormat from "../../../helpers/currencyFormat"; import { EllipsisVerticalIcon } from "@heroicons/react/24/outline"; +import Link from "../../../components/Link"; export default function Transactions() { const [ auth ] = useAuth(); @@ -19,7 +20,7 @@ export default function Transactions() { useEffect(() => { const loadTransactions = async () => { if (auth) { - const dataTransactions = await apiOdoo('GET', `/api/v1/sale_order?partner_id=${auth?.partner_id}`); + const dataTransactions = await apiOdoo('GET', `/api/v1/partner/${auth.partner_id}/sale_order`); setTransactions(dataTransactions); }; } @@ -29,31 +30,31 @@ export default function Transactions() { return ( - +
{ transactions?.sale_orders?.map((transaction, index) => (
-
-
+
+ No. Transaksi

{ transaction.name }

-
-
+ +
Pending
setActivePopupId(transaction.id)} />
-
+
Dilayani Oleh -

{ transaction.sales }

+

{ transaction.sales }

Total Harga -

{ currencyFormat(transaction.amount_total) }

+

{ currencyFormat(transaction.amount_total) }

-
+
)) }
-- cgit v1.2.3