From 7f92d22feb841e1405e56505c742f90cbd365ffc Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 30 Dec 2024 15:49:18 +0700
Subject: <iman> update pengajuan tempo

---
 .../pengajuan-tempo/component/PengajuanTempo.jsx   | 40 ++++++++++++----------
 1 file changed, 22 insertions(+), 18 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 dbf2c606..be994171 100644
--- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
+++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx
@@ -1,5 +1,6 @@
 import React from 'react';
 import { useMemo, useState, useEffect, useRef } from 'react';
+import Image from '~/components/ui/image';
 import Stepper from './Stepper';
 import InformasiPerusahaan from './informasiPerusahaan';
 import KontakPerusahaan from './KontakPerusahaan';
@@ -40,6 +41,7 @@ const PengajuanTempo = () => {
   const { control, watch, setValue } = useForm();
   const auth = useAuth();
   const router = useRouter();
+  const [BannerTempo, setBannerTempo] = useState();
   const { formDokumen, errorsDokumen, validateDokumen, updateFormDokumen } =
     usePengajuanTempoStoreDokumen();
   const {
@@ -521,21 +523,6 @@ const PengajuanTempo = () => {
     }
   };
 
-  const goToPreviousStep = () => {
-    setCurrentStep((prev) => (prev <= 0 ? prev : prev - 1));
-  };
-
-  const saveToLocalStorage = (key, form) => {
-    localStorage.setItem(key, JSON.stringify(form));
-  };
-
-  const getFromLocalStorage = (key) => {
-    const itemStr = localStorage.getItem(key);
-    if (!itemStr) return null;
-
-    const item = JSON.parse(itemStr);
-    return item;
-  };
   const removeFromLocalStorage = () => {
     for (const key of stepLabels) {
       localStorage.removeItem(key);
@@ -547,12 +534,29 @@ const PengajuanTempo = () => {
   const handleCheckChange = (checked) => {
     setIsCheckedTNC(checked);
   };
-  // if (isLoading && !bigData) {
-  //   return;
-  // }
+
+  useEffect(() => {
+    const getBanner = async () => {
+      const get = await odooApi('GET', '/api/v1/banner?type=banner-form-tempo');
+      // setBannerTempo(get[0].image);
+      setBannerTempo(
+        'http://192.168.23.244:8069/api/image/x_banner.banner/x_banner_image/479'
+      );
+    };
+    getBanner();
+  }, []);
   return (
     <>
       <div className='container flex flex-col items-center '>
+        {BannerTempo && (
+          <Image
+            src={BannerTempo}
+            alt='FORM Tempo'
+            width={500}
+            height={160}
+            className='w-full mt-6'
+          />
+        )}
         <h1 className=' font-semibold text-center mb-6'>
           Form Pengajuan Tempo
         </h1>
-- 
cgit v1.2.3

