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

