From 902366a41c554ad23ef709b9659cf19c7ca076bc Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 18 Nov 2024 13:43:26 +0700 Subject: add pengajuan tempo detail --- src/lib/tempo/components/Tempo.jsx | 157 ++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 80 deletions(-) (limited to 'src/lib') diff --git a/src/lib/tempo/components/Tempo.jsx b/src/lib/tempo/components/Tempo.jsx index 8fb55147..71dd0f64 100644 --- a/src/lib/tempo/components/Tempo.jsx +++ b/src/lib/tempo/components/Tempo.jsx @@ -41,7 +41,6 @@ const Tempo = () => { limit: limitNew, }; const { invoices } = useInvoices({ query }); - console.log('invoices', invoices); const [isLoading, setIsLoading] = useState(true); const [tempo, setTempo] = useState([]); const [inputQuery, setInputQuery] = useState(q); @@ -49,11 +48,8 @@ const Tempo = () => { const pageCount = Math.ceil(invoices?.data?.invoiceTotal / limitNew); let pageQuery = _.omit(query, ['limitNew', 'offset']); - console.log('pageQuery1', pageQuery); pageQuery = _.pickBy(pageQuery, _.identity); - console.log('pageQuery2', pageQuery); pageQuery = toQuery(pageQuery); - console.log('pageQuery3', pageQuery); const handleSubmit = (e) => { e.preventDefault(); router.push(`/my/tempo?q=${inputQuery}`); @@ -74,7 +70,6 @@ const Tempo = () => { parseInt(tempo.amountDue + tempo.remainingLimit) ); const amountDue = Math.round(parseInt(tempo.amountDue)); - console.log('tempo', tempo); const getLabel = () => { if (Math.round((amountDue / limitTempo) * 100) >= 100) return 'Limit Tempo mencapai batas'; @@ -292,72 +287,74 @@ const Tempo = () => { -
-
-

- Jenis Tempo Pembayaran Anda adalah{' '} - - {' '} - {tempo.paymentTerm} - -

-
-
-
-

Limit Tempo Terpakai

- - {currencyFormat(amountDue)} - +
+
+
+

+ Jenis Tempo Pembayaran Anda adalah{' '} + + {' '} + {tempo.paymentTerm} + +

-
-

Sisa Kredit Limit

- - {currencyFormat(Math.round(parseInt(limitTempo - amountDue)))} - +
+
+

Limit Tempo Terpakai

+ + {currencyFormat(amountDue)} + +
+
+

Sisa Kredit Limit

+ + {currencyFormat(Math.round(parseInt(limitTempo - amountDue)))} + +
+
+

Limit Tempo

+ + {currencyFormat(limitTempo)} + +
-
-

Limit Tempo

- - {currencyFormat(limitTempo)} - +
+ + + {getLabel()} +
-
- - - {getLabel()} - -
@@ -391,7 +388,7 @@ const Tempo = () => { key={index} >
- + No. Transaksi @@ -399,7 +396,7 @@ const Tempo = () => { {invoice.salesOrder} -
+
{invoice.amountResidual > 0 ? (
{new Date() > getDueDate(invoice.invoiceDateDue) @@ -409,13 +406,13 @@ const Tempo = () => { ) : (
Lunas
)} - setToOthers(invoice)} - /> + /> */}
- +

{formatTanggal(invoice.invoiceDate)} @@ -428,23 +425,23 @@ const Tempo = () => {

- No. Purchase Order + No. Invoice -

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

+ {invoice.name || '-'}

- - Total Invoice + + Total Belanja -

+

{currencyFormat(invoice.amountTotal)}

- {invoice.efaktur ? ( + {/* {invoice.efaktur ? (
Faktur Pajak @@ -454,7 +451,7 @@ const Tempo = () => { Faktur Pajak
- )} + )} */}
))} -- cgit v1.2.3