From 9b22da67a1a397ca43ff80abb8ef4bbefef9b448 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 5 Mar 2025 10:35:33 +0700
Subject: <iman> CR renca telepon tempo

---
 src/lib/pengajuan-tempo/component/PengajuanTempo.jsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 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 c577aa41..0db5b371 100644
--- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
+++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
@@ -67,6 +67,11 @@ const PengajuanTempo = () => {
   const [notValid, setNotValid] = useState(false);
   const [buttonSubmitClick, setButtonSubmitClick] = useState(false);
   const stepDivs = [
+    <Pengiriman
+      key='pengiriman'
+      chekValid={notValid}
+      buttonSubmitClick={buttonSubmitClick}
+    />,
     <InformasiPerusahaan
       key='informasi-perusahaan'
       chekValid={notValid}
@@ -77,11 +82,6 @@ const PengajuanTempo = () => {
       chekValid={notValid}
       buttonSubmitClick={buttonSubmitClick}
     />,
-    <Pengiriman
-      key='pengiriman'
-      chekValid={notValid}
-      buttonSubmitClick={buttonSubmitClick}
-    />,
     <Referensi
       key='referensi'
       chekValid={notValid}
-- 
cgit v1.2.3


From dc7fcad0885e4cde8ba510817a69b759607524c7 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 6 Mar 2025 11:30:26 +0700
Subject: <iman> update code

---
 src/lib/pengajuan-tempo/component/PengajuanTempo.jsx | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 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 0db5b371..ba184057 100644
--- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
+++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
@@ -67,11 +67,6 @@ const PengajuanTempo = () => {
   const [notValid, setNotValid] = useState(false);
   const [buttonSubmitClick, setButtonSubmitClick] = useState(false);
   const stepDivs = [
-    <Pengiriman
-      key='pengiriman'
-      chekValid={notValid}
-      buttonSubmitClick={buttonSubmitClick}
-    />,
     <InformasiPerusahaan
       key='informasi-perusahaan'
       chekValid={notValid}
@@ -82,6 +77,11 @@ const PengajuanTempo = () => {
       chekValid={notValid}
       buttonSubmitClick={buttonSubmitClick}
     />,
+    <Pengiriman
+      key='pengiriman'
+      chekValid={notValid}
+      buttonSubmitClick={buttonSubmitClick}
+    />,
     <Referensi
       key='referensi'
       chekValid={notValid}
@@ -191,7 +191,7 @@ const PengajuanTempo = () => {
 
   useEffect(() => {
     const cachedData = bigData;
-
+    console.log('cachedData', cachedData);
     const loadBigData = async () => {
       if (cachedData) {
         // Ambil kunci-kunci yang relevan berdasarkan currentStep dari stepDivsForm
@@ -298,6 +298,7 @@ const PengajuanTempo = () => {
         section: label,
         tempo_request: tempoRequest,
         ...formData,
+        formDokumenProsedur: formData.dokumenProsedur ? JSON.stringify(formData.dokumenProsedur) : false,
       });
       if (address.id) {
         setIdTempo(address.id);
@@ -466,6 +467,7 @@ const PengajuanTempo = () => {
             user_id: address2.userId,
             tempo_request: false,
             ...formPengiriman,
+            formDocs: JSON.stringify(formPengiriman.dokumenProsedur),
           });
           if (address3.id && formattedDokumen.length > 0) {
             // Kirim dokumen yang sudah difilter
-- 
cgit v1.2.3


From 2a761d20af5c0e6f40ed3e17f00a7cda95350978 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 6 Mar 2025 14:37:20 +0700
Subject: <iman> update

---
 src/lib/pengajuan-tempo/component/PengajuanTempo.jsx | 13 +++++++++++--
 1 file changed, 11 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 ba184057..ffc25463 100644
--- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
+++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
@@ -218,6 +218,11 @@ const PengajuanTempo = () => {
                   : String(bigData[key]); // Untuk tipe primitif
               // Kirim data yang sudah diubah ke string ke stepDivsUpdateForm
               stepDivsUpdateForm[currentStep](key, stringData);
+              if (key == 'dokumenProsedur') {
+                const stringData = bigData[key]; 
+                console.log("stringData",stringData)
+                stepDivsUpdateForm[currentStep](key, stringData);
+              }
             }
           });
         }
@@ -298,7 +303,9 @@ const PengajuanTempo = () => {
         section: label,
         tempo_request: tempoRequest,
         ...formData,
-        formDokumenProsedur: formData.dokumenProsedur ? JSON.stringify(formData.dokumenProsedur) : false,
+        formDokumenProsedur: formData.dokumenProsedur
+          ? JSON.stringify(formData.dokumenProsedur)
+          : false,
       });
       if (address.id) {
         setIdTempo(address.id);
@@ -467,7 +474,9 @@ const PengajuanTempo = () => {
             user_id: address2.userId,
             tempo_request: false,
             ...formPengiriman,
-            formDocs: JSON.stringify(formPengiriman.dokumenProsedur),
+            formDokumenProsedur: formData.dokumenProsedur
+              ? JSON.stringify(formData.dokumenProsedur)
+              : false,
           });
           if (address3.id && formattedDokumen.length > 0) {
             // Kirim dokumen yang sudah difilter
-- 
cgit v1.2.3


From 91e98f591c65499d543e49188deb156e77fbd494 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 6 Mar 2025 16:12:12 +0700
Subject: <iman> fix code

---
 src/lib/pengajuan-tempo/component/PengajuanTempo.jsx | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 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 ffc25463..7cf201b7 100644
--- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
+++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
@@ -191,7 +191,6 @@ const PengajuanTempo = () => {
 
   useEffect(() => {
     const cachedData = bigData;
-    console.log('cachedData', cachedData);
     const loadBigData = async () => {
       if (cachedData) {
         // Ambil kunci-kunci yang relevan berdasarkan currentStep dari stepDivsForm
@@ -219,8 +218,7 @@ const PengajuanTempo = () => {
               // Kirim data yang sudah diubah ke string ke stepDivsUpdateForm
               stepDivsUpdateForm[currentStep](key, stringData);
               if (key == 'dokumenProsedur') {
-                const stringData = bigData[key]; 
-                console.log("stringData",stringData)
+                const stringData = bigData[key];
                 stepDivsUpdateForm[currentStep](key, stringData);
               }
             }
@@ -474,9 +472,9 @@ const PengajuanTempo = () => {
             user_id: address2.userId,
             tempo_request: false,
             ...formPengiriman,
-            formDokumenProsedur: formData.dokumenProsedur
-              ? JSON.stringify(formData.dokumenProsedur)
-              : false,
+            formDokumenProsedur: formPengiriman.dokumenProsedur
+            ? JSON.stringify(formPengiriman.dokumenProsedur)
+            : false,
           });
           if (address3.id && formattedDokumen.length > 0) {
             // Kirim dokumen yang sudah difilter
@@ -529,7 +527,7 @@ const PengajuanTempo = () => {
       toast.dismiss(toastId);
       setIsLoading(false);
 
-      toast.error('Terjadi kesalahan dalam pengiriman formulir');
+      toast.error('Terjadi kesalahan dalam pengiriman formulir hehehehe');
       console.error(error);
     }
   };
@@ -658,11 +656,14 @@ const PengajuanTempo = () => {
               <TempoTermCondition onCheckChange={handleCheckChange} />
               <Button
                 colorScheme='red'
-                w={`${isMobile ? 'full' : '36'}`}
+                w={`${isMobile ? 'full' : '48'}`}
                 isDisabled={!isCheckedTNC || isLoading}
                 onClick={handleDaftarTempo}
               >
-                Daftar Tempo {<ChevronRightIcon className='w-5' />}
+                {isLoading
+                  ? 'Loading...'
+                  : 'Daftar Tempo'}
+                  {!isLoading && <ChevronRightIcon className='w-5' />}
               </Button>
             </div>
           )}
-- 
cgit v1.2.3

