From d4d4227dfb2fefa56ded8ff5897469459f56b069 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Thu, 2 Feb 2023 17:13:12 +0700 Subject: no message --- src/pages/my/address/index.js | 12 ++++++++---- src/pages/my/invoice/[id].js | 19 +++++++++++++++++-- src/pages/my/invoices.js | 17 ++++++++++++++--- src/pages/my/transactions.js | 1 - 4 files changed, 39 insertions(+), 10 deletions(-) (limited to 'src/pages/my') diff --git a/src/pages/my/address/index.js b/src/pages/my/address/index.js index 54e721b6..7026d5ea 100644 --- a/src/pages/my/address/index.js +++ b/src/pages/my/address/index.js @@ -56,7 +56,7 @@ export default function Address() { return (
changeSelectedAddress(address.id)}>
@@ -65,9 +65,13 @@ export default function Address() {
Utama
) }
-

{ address.name }

-

{ address.mobile }

-

{ address.street } { address.street2 }

+

{ address.name }

+ { address.mobile && ( +

{ address.mobile }

+ ) } +

+ { address.street } +

Ubah Alamat
diff --git a/src/pages/my/invoice/[id].js b/src/pages/my/invoice/[id].js index c1cacfc6..d13cf7a6 100644 --- a/src/pages/my/invoice/[id].js +++ b/src/pages/my/invoice/[id].js @@ -46,6 +46,10 @@ export default function DetailInvoice() { ); }; + const downloadTaxInvoice = () => { + window.open(`${process.env.ODOO_HOST}/api/v1/download/tax-invoice/${invoice.id}/${invoice.efaktur_token}`, '_blank') + } + return ( @@ -59,9 +63,9 @@ export default function DetailInvoice() { { invoice?.amount_residual > 0 ? ( - Belum Lunas + Belum Lunas ) : ( - Lunas + Lunas ) } @@ -81,6 +85,17 @@ export default function DetailInvoice() { { invoice?.invoice_date } +
+

Faktur Pajak

+ +
diff --git a/src/pages/my/invoices.js b/src/pages/my/invoices.js index a3107bfd..d54f9487 100644 --- a/src/pages/my/invoices.js +++ b/src/pages/my/invoices.js @@ -6,7 +6,7 @@ import Layout from "@/components/layouts/Layout"; import apiOdoo from "@/core/utils/apiOdoo"; import { useAuth } from "@/core/utils/auth"; import currencyFormat from "@/core/utils/currencyFormat"; -import { EllipsisVerticalIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; +import { CheckIcon, ClockIcon, EllipsisVerticalIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline"; import { useRouter } from "next/router"; import { useEffect, useRef, useState } from "react"; @@ -87,9 +87,9 @@ export default function Invoices() {
{ invoice.amount_residual > 0 ? ( -
Belum Lunas
+
Belum Lunas
) : ( -
Lunas
+
Lunas
) } {}} />
@@ -115,6 +115,17 @@ export default function Invoices() { + { invoice.efaktur_token ? ( +
+ + Faktur Pajak +
+ ) : ( +
+ + Faktur Pajak +
+ ) } )) } diff --git a/src/pages/my/transactions.js b/src/pages/my/transactions.js index 221859f9..a03ff007 100644 --- a/src/pages/my/transactions.js +++ b/src/pages/my/transactions.js @@ -41,7 +41,6 @@ export default function Transactions() { const dataTransactions = await apiOdoo('GET', `/api/v1/partner/${auth.partner_id}/sale_order${queryParams}`); setTransactions(dataTransactions); - console.log(dataTransactions); setPageCount(Math.ceil(dataTransactions?.sale_order_total / limit)); setIsLoading(false); }; -- cgit v1.2.3