summaryrefslogtreecommitdiff
path: root/src/lib/tempo
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-12-09 15:00:45 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-12-09 15:00:45 +0700
commitf2451beed670dc697aa2026b2df6ad1ad1e90da2 (patch)
treee25ff3230b6878ff037216b6cd1dad527440dfb8 /src/lib/tempo
parente9cd13307f0095dc4edc5048752675d80c551564 (diff)
<iman> update pengajuan tempo
Diffstat (limited to 'src/lib/tempo')
-rw-r--r--src/lib/tempo/components/Tempo.jsx12
1 files changed, 8 insertions, 4 deletions
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>