From bc04e721d51e149709ab3cfaf5e77ef034511860 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 27 Mar 2023 10:17:49 +0700 Subject: invoice, invoice detail, address, create address, edit address, wishlist --- src/lib/invoice/components/Invoices.jsx | 313 ++++++++++++++++++++------------ 1 file changed, 192 insertions(+), 121 deletions(-) (limited to 'src/lib/invoice/components/Invoices.jsx') diff --git a/src/lib/invoice/components/Invoices.jsx b/src/lib/invoice/components/Invoices.jsx index ab318a3c..51041316 100644 --- a/src/lib/invoice/components/Invoices.jsx +++ b/src/lib/invoice/components/Invoices.jsx @@ -16,6 +16,9 @@ import Link from '@/core/components/elements/Link/Link' import currencyFormat from '@/core/utils/currencyFormat' import BottomPopup from '@/core/components/elements/Popup/BottomPopup' import { downloadInvoice, downloadTaxInvoice } from '../utils/invoices' +import MobileView from '@/core/components/views/MobileView' +import DesktopView from '@/core/components/views/DesktopView' +import Menu from '@/lib/auth/components/Menu' const Invoices = () => { const router = useRouter() @@ -44,133 +47,201 @@ const Invoices = () => { } return ( -
-
- setInputQuery(e.target.value)} - /> - -
- - {invoices.isLoading && ( -
- -
- )} - - {!invoices.isLoading && invoices.data?.invoices?.length === 0 && ( - - Tidak ada data invoice - - )} - - {invoices.data?.invoices?.map((invoice, index) => ( -
-
- - No. Invoice -

{invoice.name}

- -
- {invoice.amountResidual > 0 ? ( -
Belum Lunas
- ) : ( -
Lunas
- )} - setToOthers(invoice)} - /> -
-
- -
-

{invoice.invoiceDate}

-

{invoice.paymentTerm}

+ <> + +
+
+ setInputQuery(e.target.value)} + /> + +
+ + {invoices.isLoading && ( +
+
-
-
-
- No. Purchase Order -

- {invoice.purchaseOrderName || '-'} -

-
-
- Total Invoice -

- {currencyFormat(invoice.amountTotal)} -

+ )} + + {!invoices.isLoading && invoices.data?.invoices?.length === 0 && ( + + Tidak ada data invoice + + )} + + {invoices.data?.invoices?.map((invoice, index) => ( +
+
+ + No. Invoice +

{invoice.name}

+ +
+ {invoice.amountResidual > 0 ? ( +
Belum Lunas
+ ) : ( +
Lunas
+ )} + setToOthers(invoice)} /> +
+ +
+

{invoice.invoiceDate}

+

{invoice.paymentTerm}

+
+
+
+
+ No. Purchase Order +

+ {invoice.purchaseOrderName || '-'} +

+
+
+ Total Invoice +

+ {currencyFormat(invoice.amountTotal)} +

+
+
+ + {invoice.efaktur ? ( +
+ + Faktur Pajak +
+ ) : ( +
+ + Faktur Pajak +
+ )}
- - {invoice.efaktur ? ( -
- - Faktur Pajak -
- ) : ( -
- - Faktur Pajak + ))} + + + + setToOthers(null)}> +
+ +
- )} +
- ))} - - - - setToOthers(null)} - > -
- - + + + +
+
+ +
+
+
+

+ Invoice & Faktur Pajak{' '} + {invoices?.data?.invoices ? `(${invoices?.data?.invoices.length})` : ''} +

+
+ setInputQuery(e.target.value)} + /> + +
+
+ + + + + + + + + + + + + + {invoices.isLoading && ( + + + + )} + {!invoices.isLoading && + (!invoices?.data?.invoices || invoices?.data?.invoices?.length == 0) && ( + + + + )} + {invoices.data?.invoices?.map((invoice) => ( + + + + + + + + + ))} + +
No. InvoiceNo. POTanggalSalespersonStatusTotal
+
+ +
+
Tidak ada data invoice
+ {invoice.name} + {invoice.purchaseOrderName || '-'}{invoice.invoiceDate}{invoice.sales} + {invoice.amountResidual > 0 ? ( +
Belum Lunas
+ ) : ( +
Lunas
+ )} +
{currencyFormat(invoice.amountTotal)}
+ + +
- -
+ + ) } -- cgit v1.2.3