From 3692f937130e18cf396f5871d8a15bdd258bdd2b Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 13 Jan 2025 16:37:28 +0700
Subject: <iman> update merchant

---
 .../merchant/components/InformasiPerusahaan.jsx    | 41 ++++++++++++----------
 1 file changed, 22 insertions(+), 19 deletions(-)

(limited to 'src/lib/merchant/components/InformasiPerusahaan.jsx')

diff --git a/src/lib/merchant/components/InformasiPerusahaan.jsx b/src/lib/merchant/components/InformasiPerusahaan.jsx
index bf968aad..60e61e2e 100644
--- a/src/lib/merchant/components/InformasiPerusahaan.jsx
+++ b/src/lib/merchant/components/InformasiPerusahaan.jsx
@@ -19,7 +19,7 @@ import { EyeIcon } from '@heroicons/react/24/outline';
 import BottomPopup from '@/core/components/elements/Popup/BottomPopup';
 import Image from 'next/image';
 import ImageBanner from '~/components/ui/image';
-import { ChevronRightIcon } from '@heroicons/react/24/outline';
+import { ChevronRightIcon, ChevronLeftIcon } from '@heroicons/react/24/outline';
 import MobileView from '@/core/components/views/MobileView';
 import DesktopView from '@/core/components/views/DesktopView';
 import getFileBase64 from '@/core/utils/getFileBase64';
@@ -297,21 +297,19 @@ const CreateMerchant = ({ handleIsError }) => {
         ' \r\n No Hp : ' +
         values.mobile,
     };
-    isError(true);
-    toast.dismiss(toastId);
-    toast.success('Berhasil menambahkan data');
-    // const formData = new FormData();
-    // formData.append('npwp', values.npwp[0]);
-    // const create_leads = await createMerchantApi({ data });
-    // if (create_leads) {
-    //   toast.dismiss(toastId);
-    //   toast.success('Berhasil menambahkan data');
-    //   reset();
-    //   router.push('/');
-    // } else {
-    //   toast.dismiss(toastId);
-    //   toast.error('Gagal menambahkan data');
-    // }
+    // isError(true);
+    // toast.dismiss(toastId);
+    // toast.success('Berhasil menambahkan data');
+    const create_leads = await createMerchantApi({ data });
+    if (create_leads) {
+      toast.dismiss(toastId);
+      toast.success('Berhasil menambahkan data');
+      reset();
+      router.push('/');
+    } else {
+      toast.dismiss(toastId);
+      toast.error('Gagal menambahkan data');
+    }
   };
 
   // const DownLoadSurat = () => {
@@ -834,7 +832,7 @@ const CreateMerchant = ({ handleIsError }) => {
                   />
                 </div> */}
               </div>
-              <div className='flex justify-start'>
+              <div className='flex justify-end'>
                 {/* <Button
                   colorScheme='red'
                   className='w-full md:w-fit'
@@ -843,12 +841,17 @@ const CreateMerchant = ({ handleIsError }) => {
                   Daftar Merchant{' '}
                   {<ChevronRightIcon className='w-5' color='white' />}
                 </Button> */}
+
                 <div>
+                  <span className='text-xs opacity-60'>
+                    *Pastikan data yang anda masukan sudah benar dan sesuai
+                  </span>
                   <button
                     type='submit'
-                    className='btn-light bg-red-500 rounded-lg text-white w-full md:w-fit mt-6 ml-0 md:ml-auto flex justify-between hover:bg-red-400'
+                    className='btn-light bg-red-500 rounded-lg text-white w-fit py-2 px-4 md:w-fit mt-2 ml-0 md:ml-auto flex justify-between hover:bg-red-400'
                   >
-                    <span>Daftar Merchant </span>
+                    <span className={` `}>Langkah Selanjutnya</span>
+                    {<ChevronRightIcon className='w-5' />}
                   </button>
                 </div>
               </div>
-- 
cgit v1.2.3

