From f2451beed670dc697aa2026b2df6ad1ad1e90da2 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 9 Dec 2024 15:00:45 +0700
Subject: <iman> update pengajuan tempo

---
 src/lib/tempo/components/Tempo.jsx | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'src/lib/tempo/components/Tempo.jsx')

diff --git a/src/lib/tempo/components/Tempo.jsx b/src/lib/tempo/components/Tempo.jsx
index 95eb461f..33c5bae6 100644
--- a/src/lib/tempo/components/Tempo.jsx
+++ b/src/lib/tempo/components/Tempo.jsx
@@ -61,7 +61,7 @@ const Tempo = () => {
       setIsLoading(true);
       const dataTempo = await odooApi(
         'GET',
-        `/api/v1/check/${auth.parentId}/tempo`
+        `/api/v1/check/${auth.partnerId}/tempo`
       );
       setTempo(dataTempo);
       setIsLoading(false);
@@ -329,7 +329,7 @@ const Tempo = () => {
                   // w={16}
                   className='font-semibold text-base'
                 >
-                  {currencyFormat(amountDue)}
+                  {amountDue ? currencyFormat(amountDue) : '-'}
                 </Skeleton>
               </div>
               <div className='w-[30%] flex  flex-col gap-2'>
@@ -340,7 +340,11 @@ const Tempo = () => {
                   // w={16}
                   className='font-semibold text-base'
                 >
-                  {currencyFormat(Math.round(parseInt(limitTempo - amountDue)))}
+                  {limitTempo && amountDue
+                    ? currencyFormat(
+                        Math.round(parseInt(limitTempo - amountDue))
+                      )
+                    : '-'}
                 </Skeleton>
               </div>
               <div className=' w-[30%] flex flex-col gap-2'>
@@ -351,7 +355,7 @@ const Tempo = () => {
                   // w={16}
                   className=' font-semibold text-base'
                 >
-                  {currencyFormat(limitTempo)}
+                  {limitTempo ? currencyFormat(limitTempo) : '-'}
                 </Skeleton>
               </div>
             </div>
-- 
cgit v1.2.3

