From 3692f937130e18cf396f5871d8a15bdd258bdd2b Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 13 Jan 2025 16:37:28 +0700 Subject: 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 }) => { /> */} -
+
{/* */} +
+ + *Pastikan data yang anda masukan sudah benar dan sesuai +
-- cgit v1.2.3