From 3550c262e5eeb1b861ae100cd26ae853c7f153fe Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 4 Nov 2024 14:25:02 +0700 Subject: update pengajuan tempo mobile 80% --- .../component/informasiPerusahaan.jsx | 176 +++++++++++++-------- 1 file changed, 112 insertions(+), 64 deletions(-) (limited to 'src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx') diff --git a/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx b/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx index 90454083..08dbbc8a 100644 --- a/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx +++ b/src/lib/pengajuan-tempo/component/informasiPerusahaan.jsx @@ -941,7 +941,7 @@ const InformasiPerusahaan = ({ )} {isMobile && ( -
+

)}

-
+
@@ -1239,40 +1240,61 @@ const InformasiPerusahaan = ({ {errors.tempoDuration}
)} - -
+
+
+ +
+ { + if (value === 'custom') { + setIsCustom(true); + updateForm('tempoLimit', tempoLimitValue); // Update dengan nilai input custom jika dipilih + } else { + setIsCustom(false); + onChangeTempoLimit(value); // Update dengan nilai radio button yang dipilih + } + }} + className='flex items-center justify-between' + value={isCustom ? 'custom' : form.tempoLimit} > - { - if (value === 'custom') { - setIsCustom(true); - updateForm('tempoLimit', tempoLimitValue); // Update dengan nilai input custom jika dipilih - } else { - setIsCustom(false); - onChangeTempoLimit(value); // Update dengan nilai radio button yang dipilih - } - }} - className='flex items-center justify-between' - value={isCustom ? 'custom' : form.tempoLimit} - > - - {/* Kolom 1 */} - - {radioOptions.slice(0, 4).map((option) => ( - - {option.label} - - ))} - + + {/* Kolom 1 */} + + {radioOptions.slice(0, 3).map((option) => ( + + {option.label} + + ))} + - {/* Kolom 2 */} - + { + const value = e.target.value; + const formattedValue = formatRupiah(value); + setTempoLimitValueEx(formattedValue); + updateForm( + 'tempoLimit', + formattedValue.replace(/^Rp\s*/, '') + ); // Mengupdate nilai di react-hook-form + }} + /> + + + {/* Kolom 2 */} + {/* {radioOptions.slice(4).map((option) => ( ))} -
- - - { - const value = e.target.value; - const formattedValue = formatRupiah(value); - setTempoLimitValueEx(formattedValue); - updateForm( - 'tempoLimit', - formattedValue.replace(/^Rp\s*/, '') - ); // Mengupdate nilai di react-hook-form - }} - /> -
-
-
-
- {chekValid && ( -
- {errors.tempoLimit} -
- )} -
+
+ */} + + + {chekValid && ( +
+ {errors.tempoLimit} +
+ )}
**Durasi & Limit dapat berbeda dengan verifikasi oleh tim indoteknik.com
-
+
@@ -1342,6 +1346,50 @@ const InformasiPerusahaan = ({
)}
+
+ +
+ +
+
+ {firstColumn.map((item) => ( + handleCheckboxChange(item.id)} + isChecked={isChecked(item.id)} + > + {item.name} + + ))} +
+
+ {secondColumn.map((item) => ( + handleCheckboxChange(item.id)} + > + {item.name} + + ))} +
+
+ {chekValid && ( +
+ {errors.categoryProduk} +
+ )} +
-- cgit v1.2.3