From 0178a1f88d7d34824562e1413be073c0795a47cf Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 16 Dec 2024 17:42:31 +0700 Subject: update code --- .../component/KonfirmasiDokumen.jsx | 13 +- .../pengajuan-tempo/component/KontakPerusahaan.jsx | 14 +- .../pengajuan-tempo/component/PengajuanTempo.jsx | 95 +++++-- src/lib/pengajuan-tempo/component/Pengiriman.jsx | 5 +- src/lib/pengajuan-tempo/component/Referensi.jsx | 6 +- .../component/informasiPerusahaan.jsx | 310 +++++++++++++-------- src/lib/tempo/components/Tempo.jsx | 134 ++++----- src/pages/my/menu.jsx | 4 +- src/pages/my/tempo/index.jsx | 21 +- 9 files changed, 375 insertions(+), 227 deletions(-) (limited to 'src') diff --git a/src/lib/pengajuan-tempo/component/KonfirmasiDokumen.jsx b/src/lib/pengajuan-tempo/component/KonfirmasiDokumen.jsx index ca571167..a6f25d5e 100644 --- a/src/lib/pengajuan-tempo/component/KonfirmasiDokumen.jsx +++ b/src/lib/pengajuan-tempo/component/KonfirmasiDokumen.jsx @@ -32,7 +32,7 @@ const KonfirmasiDokumen = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { setFormat(`application/${format}`); } else if (format == undefined) { setFormat(null); - setUrl(`http://192.168.23.244:8069` + base64); + setUrl(`${process.env.NEXT_PUBLIC_ODOO_API_HOST}` + base64); } else { setFormat(`image/${format}`); } @@ -1562,7 +1562,7 @@ const KonfirmasiDokumen = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { close={() => setIsExample(false)} >
- + > */} +
)} diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx index 1ea2223e..b3d5bce7 100644 --- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx +++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx @@ -143,11 +143,6 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { No. HP Direktur{' '} (Opsional) - {!isKonfirmasi && ( - - isi nomor telpon direktur di perusahaan kamu - - )}
{ - {!isKonfirmasi && ( - - isi email Direktur yang sesuai - - )}
{ {!isKonfirmasi && ( - isi nomor purchasing yang bertanggung jawab di perusahaan + isi email purchasing yang bertanggung jawab diperusahaan anda )} @@ -394,7 +384,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { {!isKonfirmasi && ( - isi email finance dengan benar + isi email finance yang bertanggung jawab diperusahaan anda )}
diff --git a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx index b4f4ac9b..f5cad812 100644 --- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx +++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx @@ -253,6 +253,29 @@ const PengajuanTempo = () => { setCurrentStep((prev) => (prev === NUMBER_OF_STEPS - 1 ? prev : prev + 1)); }; + const goPrevStep = () => { + // if (!isFormValid) { + // setNotValid(true); + // setButtonSubmitClick(!buttonSubmitClick); + // return; + // } else { + // // saveToLocalStorage(stepLabels[currentStep], stepDivsForm[currentStep]); + // if (currentStep == 3) { + // handleDaftarTempoSupplier(); + // } else if (currentStep == 4) { + // handleDaftarTempoDokumen(); + // } else { + // handleDaftarTempoPerPage( + // stepLabels[currentStep], + // stepDivsForm[currentStep] + // ); + // } + // setButtonSubmitClick(!buttonSubmitClick); + // setNotValid(false); + // } + setCurrentStep((prev) => (prev === NUMBER_OF_STEPS - 1 ? prev : prev - 1)); + }; + const handleDaftarTempoPerPage = async ( label, formData, @@ -558,30 +581,57 @@ const PengajuanTempo = () => { *Pastikan data yang anda masukan sudah benar dan sesuai - {currentStep < 5 && ( - <> - 0 && currentStep < 5 + ? 'justify-between' + : 'justify-end' + } items-center w-full ${isMobile ? 'gap-x-4 ' : ''}`} + > + {currentStep < 5 && currentStep > 0 && ( + + )} + {currentStep < 5 && ( + <> + - Langkah Selanjutnya {} - - - - )} + + + + )} + {currentStep == 5 && ( -
+