From f66b12fd1d0b83af0d7230d7b1565fbe00afbe3c Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 22 Feb 2023 11:03:34 +0700 Subject: prettier --- src/lib/invoice/components/Invoice.jsx | 165 +++++++++++++++------------------ 1 file changed, 73 insertions(+), 92 deletions(-) (limited to 'src/lib/invoice/components/Invoice.jsx') diff --git a/src/lib/invoice/components/Invoice.jsx b/src/lib/invoice/components/Invoice.jsx index aee4a498..eaf7b7e0 100644 --- a/src/lib/invoice/components/Invoice.jsx +++ b/src/lib/invoice/components/Invoice.jsx @@ -1,17 +1,17 @@ -import Spinner from "@/core/components/elements/Spinner/Spinner" -import useInvoice from "../hooks/useInvoice" -import { downloadInvoice, downloadTaxInvoice } from "../utils/invoices" -import Divider from "@/core/components/elements/Divider/Divider" -import VariantGroupCard from "@/lib/variant/components/VariantGroupCard" -import currencyFormat from "@/core/utils/currencyFormat" +import Spinner from '@/core/components/elements/Spinner/Spinner' +import useInvoice from '../hooks/useInvoice' +import { downloadInvoice, downloadTaxInvoice } from '../utils/invoices' +import Divider from '@/core/components/elements/Divider/Divider' +import VariantGroupCard from '@/lib/variant/components/VariantGroupCard' +import currencyFormat from '@/core/utils/currencyFormat' const Invoice = ({ id }) => { const { invoice } = useInvoice({ id }) if (invoice.isLoading) { return ( -
- +
+
) } @@ -24,103 +24,84 @@ const Invoice = ({ id }) => { if (address?.city?.name) fullAddress.push(address.city.name) fullAddress = fullAddress.join(', ') - return invoice.data?.name && ( - <> -
- - { invoice.data?.name } - - - { invoice.data?.amountResidual > 0 ? ( - Belum Lunas + return ( + invoice.data?.name && ( + <> +
+ {invoice.data?.name} + + {invoice.data?.amountResidual > 0 ? ( + Belum Lunas ) : ( - Lunas - ) } - - - { invoice.data?.purchaseOrderName || '-' } - - - { invoice.data?.paymentTerm } - - { invoice.data?.amountResidual > 0 && invoice.invoiceDate != invoice.invoiceDateDue && ( - - { invoice.data?.invoiceDateDue } + Lunas + )} - ) } - - { invoice.data?.sales } - - - { invoice.data?.invoiceDate } - -
-

Invoice

- -
-
-

Faktur Pajak

- + + {invoice.data?.purchaseOrderName || '-'} + + {invoice.data?.paymentTerm} + {invoice.data?.amountResidual > 0 && invoice.invoiceDate != invoice.invoiceDateDue && ( + + {invoice.data?.invoiceDateDue} + + )} + {invoice.data?.sales} + {invoice.data?.invoiceDate} +
+

Invoice

+ +
+
+

Faktur Pajak

+ +
-
- + -
- Detail Penagihan -
- -
- - { address?.name } - - - { address?.email || '-' } - - - { address?.mobile || '-' } - - - { fullAddress } - -
+
Detail Penagihan
- +
+ {address?.name} + {address?.email || '-'} + {address?.mobile || '-'} + {fullAddress} +
+ + -
Detail Produk
+
Detail Produk
-
- -
-

Total Belanja

-

{ currencyFormat(invoice.data?.amountTotal) }

+
+ +
+

Total Belanja

+

{currencyFormat(invoice.data?.amountTotal)}

+
-
- + + ) ) } const DescriptionRow = ({ children, label }) => ( -
- { label } - { children } +
+ {label} + {children}
) -export default Invoice \ No newline at end of file +export default Invoice -- cgit v1.2.3