diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/pengajuan-tempo/component/PengajuanTempo.jsx | 10 | ||||
| -rw-r--r-- | src/lib/pengajuan-tempo/component/Pengiriman.jsx | 117 |
2 files changed, 122 insertions, 5 deletions
diff --git a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx index c577aa41..0db5b371 100644 --- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx +++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx @@ -67,6 +67,11 @@ const PengajuanTempo = () => { const [notValid, setNotValid] = useState(false); const [buttonSubmitClick, setButtonSubmitClick] = useState(false); const stepDivs = [ + <Pengiriman + key='pengiriman' + chekValid={notValid} + buttonSubmitClick={buttonSubmitClick} + />, <InformasiPerusahaan key='informasi-perusahaan' chekValid={notValid} @@ -77,11 +82,6 @@ const PengajuanTempo = () => { chekValid={notValid} buttonSubmitClick={buttonSubmitClick} />, - <Pengiriman - key='pengiriman' - chekValid={notValid} - buttonSubmitClick={buttonSubmitClick} - />, <Referensi key='referensi' chekValid={notValid} diff --git a/src/lib/pengajuan-tempo/component/Pengiriman.jsx b/src/lib/pengajuan-tempo/component/Pengiriman.jsx index 755cf45d..c78ee69c 100644 --- a/src/lib/pengajuan-tempo/component/Pengiriman.jsx +++ b/src/lib/pengajuan-tempo/component/Pengiriman.jsx @@ -311,7 +311,9 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { const districtPengirimanRef = useRef(null); const subDistrictPengirimanRef = useRef(null); const zipRef = useRef(null); + const PICBarangMobileRef = useRef(null); const invoicePicRef = useRef(null); + const invoicePicMobileRef = useRef(null); const streetInvoiceRef = useRef(null); const stateInvoiceRef = useRef(null); const cityInvoiceRef = useRef(null); @@ -366,10 +368,18 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { zipRef.current.scrollIntoView(options); return; } + if (errorsPengiriman.PICBarangMobile && PICBarangMobileRef.current) { + PICBarangMobileRef.current.scrollIntoView(options); + return; + } if (errorsPengiriman.invoicePic && invoicePicRef.current) { invoicePicRef.current.scrollIntoView(options); return; } + if (errorsPengiriman.invoicePicMobile && invoicePicMobileRef.current) { + invoicePicMobileRef.current.scrollIntoView(options); + return; + } if (errorsPengiriman.streetInvoice && streetInvoiceRef.current) { streetInvoiceRef.current.scrollIntoView(options); return; @@ -803,6 +813,38 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { <div className='flex flex-row justify-between items-start'> <div className='w-2/5'> <label className='form-label text-nowrap'> + No. HP PIC Penerimaan Barang + </label> + {!isKonfirmasi && ( + <span className='text-xs opacity-60'> + isi nomor PIC penerimaan barang yang bertanggung jawab di + perusahaan anda + </span> + )} + </div> + <div className='w-3/5'> + <input + id='PICBarangMobile' + name='PICBarangMobile' + ref={PICBarangMobileRef} + placeholder='Masukkan nomor PIC penerimaan barang' + value={formPengiriman.PICBarangMobile} + type='tel' + className='form-input' + aria-invalid={errorsPengiriman.PICBarangMobile} + onChange={handleInputChange} + /> + {chekValid && ( + <div className='text-caption-2 text-danger-500 mt-1'> + {errorsPengiriman.PICBarangMobile} + </div> + )} + </div> + </div> + + <div className='flex flex-row justify-between items-start'> + <div className='w-2/5'> + <label className='form-label text-nowrap'> Alamat Pengiriman Barang </label> {!isKonfirmasi && ( @@ -990,6 +1032,8 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { </div> </div> + + <div className='flex flex-row justify-between items-start'> <div className='w-2/5'> <label className='form-label text-nowrap'> @@ -1033,6 +1077,30 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { </div> </div> + <div className='flex flex-col gap-2 justify-between items-start'> + <label className='form-label text-nowrap'> + No. HP PIC Penerimaan Invoice + </label> + <div className='flex items-center border border-gray-300 rounded-md w-full'> + <input + id='invoicePicMobile' + name='invoicePicMobile' + ref={invoicePicMobileRef} + value={formPengiriman.invoicePicMobile} + placeholder='Masukkan nomor PIC Penerimaan Invoice' + type='tel' + className='form-input' + aria-invalid={errorsPengiriman.invoicePicMobile} + onChange={handleInputChange} + /> + </div> + {chekValid && ( + <div className='text-caption-2 text-danger-500 mt-1'> + {errorsPengiriman.invoicePicMobile} + </div> + )} + </div> + <div className='flex flex-row justify-between items-start'> <div className='w-2/5'> <label className='form-label text-nowrap'> @@ -1483,6 +1551,30 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { </div> <div className='flex flex-col gap-2 justify-between items-start'> + <label className='form-label text-nowrap'> + No. HP PIC Penerimaan Barang + </label> + <div className='flex items-center border border-gray-300 rounded-md w-full'> + <input + id='PICBarangMobile' + name='PICBarangMobile' + ref={PICBarangMobileRef} + value={formPengiriman.PICBarangMobile} + placeholder='Masukkan nomor PIC penerimaan barang' + type='tel' + className='form-input' + aria-invalid={errorsPengiriman.PICBarangMobile} + onChange={handleInputChange} + /> + </div> + {chekValid && ( + <div className='text-caption-2 text-danger-500 mt-1'> + {errorsPengiriman.PICBarangMobile} + </div> + )} + </div> + + <div className='flex flex-col gap-2 justify-between items-start'> <label className='form-label text-nowrap'> Alamat Pengiriman Barang </label> @@ -1661,6 +1753,7 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { </div> </div> + <div className='flex flex-col gap-2 justify-between items-start'> <label className='form-label text-nowrap'> Nama PIC Penerimaan Invoice @@ -1701,6 +1794,30 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { </div> <div className='flex flex-col gap-2 justify-between items-start'> + <label className='form-label text-nowrap'> + No. HP PIC Penerimaan Invoice + </label> + <div className='flex items-center border border-gray-300 rounded-md w-full'> + <input + id='invoicePicMobile' + name='invoicePicMobile' + ref={invoicePicMobileRef} + value={formPengiriman.invoicePicMobile} + placeholder='Masukkan nomor PIC Penerimaan Invoice' + type='tel' + className='form-input' + aria-invalid={errorsPengiriman.invoicePicMobile} + onChange={handleInputChange} + /> + </div> + {chekValid && ( + <div className='text-caption-2 text-danger-500 mt-1'> + {errorsPengiriman.PICBarangMobile} + </div> + )} + </div> + + <div className='flex flex-col gap-2 justify-between items-start'> <label className='form-label text-nowrap'> Alamat Pengiriman Invoice </label> |
