From ae239956c4e50ad9e449aa5b7481db013c5ea223 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 13 Feb 2025 16:27:27 +0700
Subject: <iman> add disable daftar tempo button when loading

---
 src/lib/pengajuan-tempo/component/PengajuanTempo.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/lib/pengajuan-tempo/component/PengajuanTempo.jsx')

diff --git a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
index 9a554e42..c577aa41 100644
--- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
+++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
@@ -173,7 +173,7 @@ const PengajuanTempo = () => {
         }
         return data; // Jika bukan object atau array, kembalikan nilai aslinya
       };
-      const payment = auth.parentId ? auth.parentId : auth.partnerId
+      const payment = auth?.parentId ? auth?.parentId : auth?.partnerId;
       try {
         const dataPaymentTerm = await odooApi(
           'GET',
@@ -648,7 +648,7 @@ const PengajuanTempo = () => {
               <Button
                 colorScheme='red'
                 w={`${isMobile ? 'full' : '36'}`}
-                isDisabled={!isCheckedTNC}
+                isDisabled={!isCheckedTNC || isLoading}
                 onClick={handleDaftarTempo}
               >
                 Daftar Tempo {<ChevronRightIcon className='w-5' />}
-- 
cgit v1.2.3

