From 9b22da67a1a397ca43ff80abb8ef4bbefef9b448 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 5 Mar 2025 10:35:33 +0700 Subject: CR renca telepon tempo --- src/lib/pengajuan-tempo/component/Pengiriman.jsx | 117 +++++++++++++++++++++++ 1 file changed, 117 insertions(+) (limited to 'src/lib/pengajuan-tempo/component/Pengiriman.jsx') 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; @@ -800,6 +810,38 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { +
+
+ + {!isKonfirmasi && ( + + isi nomor PIC penerimaan barang yang bertanggung jawab di + perusahaan anda + + )} +
+
+ + {chekValid && ( +
+ {errorsPengiriman.PICBarangMobile} +
+ )} +
+
+
+ +
+
+ +
+ +
+ {chekValid && ( +
+ {errorsPengiriman.invoicePicMobile} +
+ )} +
+
+
+ +
+ +
+ {chekValid && ( +
+ {errorsPengiriman.PICBarangMobile} +
+ )} +
+
+
+
+ +
+ +
+ {chekValid && ( +
+ {errorsPengiriman.PICBarangMobile} +
+ )} +
+
- -
-
- -
+
+
+ + {!isKonfirmasi && ( + + isi nomor PIC penerimaan invoice yang bertanggung jawab di + perusahaan anda + + )} +
+
+ {chekValid && ( +
+ {errorsPengiriman.invoicePicMobile} +
+ )}
- {chekValid && ( -
- {errorsPengiriman.invoicePicMobile} -
- )}
@@ -1497,6 +1560,47 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { )}
+
+
+ + + Format: pdf, jpeg, jpg, png. max file size 2MB + +
+
+
+ + + + {formPengiriman?.dokumenProsedur?.name} + +
+ {chekValid && ( +
+ {errorsPengiriman.dokumenProsedur} +
+ )} +
+
@@ -1753,7 +1857,6 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { -
+ +
+
+ +
+
+
+ + + + {formPengiriman?.dokumenProsedur?.name} + +
+ {chekValid && ( +
+ {errorsPengiriman.dokumenProsedur} +
+ )} + + Format: pdf, jpeg, jpg, png. max file size 2MB + +
+
-- cgit v1.2.3 From 2a761d20af5c0e6f40ed3e17f00a7cda95350978 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 6 Mar 2025 14:37:20 +0700 Subject: update --- src/lib/pengajuan-tempo/component/Pengiriman.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/pengajuan-tempo/component/Pengiriman.jsx') diff --git a/src/lib/pengajuan-tempo/component/Pengiriman.jsx b/src/lib/pengajuan-tempo/component/Pengiriman.jsx index 097f82a3..ae8b1c78 100644 --- a/src/lib/pengajuan-tempo/component/Pengiriman.jsx +++ b/src/lib/pengajuan-tempo/component/Pengiriman.jsx @@ -1590,7 +1590,7 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { onChange={handleInputChangeFile} accept='.pdf,.png,.jpg,.jpeg' /> - + {formPengiriman?.dokumenProsedur?.name} -- cgit v1.2.3 From f0914e957be3dd73b69388e028505c7ce1361e9e Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Fri, 7 Mar 2025 16:31:30 +0700 Subject: update code --- src/lib/pengajuan-tempo/component/Pengiriman.jsx | 169 ++++++++++++----------- 1 file changed, 86 insertions(+), 83 deletions(-) (limited to 'src/lib/pengajuan-tempo/component/Pengiriman.jsx') diff --git a/src/lib/pengajuan-tempo/component/Pengiriman.jsx b/src/lib/pengajuan-tempo/component/Pengiriman.jsx index ae8b1c78..52376f61 100644 --- a/src/lib/pengajuan-tempo/component/Pengiriman.jsx +++ b/src/lib/pengajuan-tempo/component/Pengiriman.jsx @@ -355,7 +355,6 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { validatePengiriman(); } }; - console.log('formPengiriman', formPengiriman); const isFormValid = useMemo( () => Object.keys(errorsPengiriman).length === 0, [errorsPengiriman] @@ -1411,6 +1410,48 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { +
+
+ + + Format: pdf, jpeg, jpg, png. max file size 2MB + +
+
+
+ + + + {formPengiriman?.dokumenProsedur?.name} + +
+ {chekValid && ( +
+ {errorsPengiriman.dokumenProsedur} +
+ )} +
+
+
-
-
- - - Format: pdf, jpeg, jpg, png. max file size 2MB - -
-
-
- - - - {formPengiriman?.dokumenProsedur?.name} - -
- {chekValid && ( -
- {errorsPengiriman.dokumenProsedur} -
- )} -
-
+ @@ -2140,6 +2141,48 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { +
+
+ +
+
+
+ + + + {formPengiriman?.dokumenProsedur?.name} + +
+ {chekValid && ( +
+ {errorsPengiriman.dokumenProsedur} +
+ )} + + Format: pdf, jpeg, jpg, png. max file size 2MB + +
+
+
-
-
- -
-
-
- - - - {formPengiriman?.dokumenProsedur?.name} - -
- {chekValid && ( -
- {errorsPengiriman.dokumenProsedur} -
- )} - - Format: pdf, jpeg, jpg, png. max file size 2MB - -
-
+ -- cgit v1.2.3 From 842bd5348263dabbfb5579ba823fd32ae40ca781 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 10 Mar 2025 08:41:27 +0700 Subject: change not mandatory subDistrict --- src/lib/pengajuan-tempo/component/Pengiriman.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/pengajuan-tempo/component/Pengiriman.jsx') diff --git a/src/lib/pengajuan-tempo/component/Pengiriman.jsx b/src/lib/pengajuan-tempo/component/Pengiriman.jsx index 755cf45d..7ec68bfa 100644 --- a/src/lib/pengajuan-tempo/component/Pengiriman.jsx +++ b/src/lib/pengajuan-tempo/component/Pengiriman.jsx @@ -955,7 +955,7 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { {...props} options={zips} disabled={ - !watchsubDistrict || sameAddressStreet + sameAddressStreet } placeholder='Zip' /> @@ -968,7 +968,7 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { placeholder='Kode Pos' type='number' disabled={ - !watchsubDistrict || sameAddressStreet + sameAddressStreet } value={formPengiriman.zipPengiriman} className='form-input' @@ -1193,7 +1193,7 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { {...props} options={zipsInvoice} disabled={ - !watchsubDistrictInvoice || sameAddress + sameAddress } placeholder='Zip' /> @@ -1205,7 +1205,7 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { placeholder='Kode Pos' type='number' disabled={ - !watchsubDistrictInvoice || sameAddress + sameAddress } value={formPengiriman.zipInvoice} className='form-input' -- cgit v1.2.3 From f7dc0ddd0a90e9be93b68fe5f92aeabf0b2ed11d Mon Sep 17 00:00:00 2001 From: Linc2427 Date: Tue, 15 Apr 2025 17:27:17 +0700 Subject: change invoice input to required --- src/lib/pengajuan-tempo/component/Pengiriman.jsx | 39 ++++++++++++------------ 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'src/lib/pengajuan-tempo/component/Pengiriman.jsx') diff --git a/src/lib/pengajuan-tempo/component/Pengiriman.jsx b/src/lib/pengajuan-tempo/component/Pengiriman.jsx index fcfa7e1e..bbf22345 100644 --- a/src/lib/pengajuan-tempo/component/Pengiriman.jsx +++ b/src/lib/pengajuan-tempo/component/Pengiriman.jsx @@ -1052,9 +1052,7 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { ) : ( @@ -1065,9 +1063,7 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { ref={zipRef} placeholder='Kode Pos' type='number' - disabled={ - sameAddressStreet - } + disabled={sameAddressStreet} value={formPengiriman.zipPengiriman} className='form-input' onChange={handleInputChange} @@ -1322,9 +1318,7 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { ) : ( @@ -1334,9 +1328,7 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { ref={zipInvoiceRef} placeholder='Kode Pos' type='number' - disabled={ - sameAddress - } + disabled={sameAddress} value={formPengiriman.zipInvoice} className='form-input' onChange={handleInputChange} @@ -1361,11 +1353,11 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
{!isKonfirmasi && ( - isi jika perusahaan anda memiliki jadwal penukaran invoice + isi jadwal penukaran invoice )}
@@ -1380,7 +1372,13 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { rows={4} cols={40} onChange={handleInputChange} + required /> + {chekValid && ( +
+ {errorsPengiriman.tukarInvoiceInput} +
+ )} @@ -1388,11 +1386,11 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
{!isKonfirmasi && ( - isi jika perusahaan anda memiliki jadwal pembayaran + isi jadwal pembayaran )}
@@ -1406,7 +1404,13 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { rows={4} cols={40} onChange={handleInputChange} + required /> + {chekValid && ( +
+ {errorsPengiriman.tukarInvoiceInputPembayaran} +
+ )} @@ -1601,7 +1605,6 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { )} - @@ -2330,8 +2333,6 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
- - -- cgit v1.2.3 From ee135f9d54e92350c5e639d64f1948ca41f47509 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Wed, 16 Apr 2025 14:40:48 +0700 Subject: make scroll to the error field --- src/lib/pengajuan-tempo/component/Pengiriman.jsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/lib/pengajuan-tempo/component/Pengiriman.jsx') diff --git a/src/lib/pengajuan-tempo/component/Pengiriman.jsx b/src/lib/pengajuan-tempo/component/Pengiriman.jsx index bbf22345..a8e7fd22 100644 --- a/src/lib/pengajuan-tempo/component/Pengiriman.jsx +++ b/src/lib/pengajuan-tempo/component/Pengiriman.jsx @@ -360,6 +360,8 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { [errorsPengiriman] ); + const tukarInvoiceInputRef = useRef(null); + const tukarInvoiceInputPembayaranRef = useRef(null); const PICNameRef = useRef(null); const streetPengirimanRef = useRef(null); const statePengirimanRef = useRef(null); @@ -390,6 +392,14 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { behavior: 'smooth', block: 'center', }; + if (errorsPengiriman.tukarInvoiceInput && tukarInvoiceInputRef.current) { + tukarInvoiceInputRef.current.scrollIntoView(options); + return; + } + if (errorsPengiriman.tukarInvoiceInputPembayaran && tukarInvoiceInputPembayaranRef.current) { + tukarInvoiceInputPembayaranRef.current.scrollIntoView(options); + return; + } if (errorsPengiriman.PICName && PICNameRef.current) { PICNameRef.current.scrollIntoView(options); return; @@ -1353,7 +1363,6 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
{!isKonfirmasi && ( @@ -1370,6 +1379,8 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { value={formPengiriman.tukarInvoiceInput} className='form-input' rows={4} + aria-invalid={errorsPengiriman.tukarInvoiceInput} + ref={tukarInvoiceInputRef} cols={40} onChange={handleInputChange} required @@ -1386,7 +1397,6 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => {
{!isKonfirmasi && ( @@ -1401,6 +1411,8 @@ const Pengiriman = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { placeholder='Masukkan jadwal pembayaran' value={formPengiriman.tukarInvoiceInputPembayaran} className='form-input' + aria-invalid={errorsPengiriman.tukarInvoiceInputPembayaran} + ref={tukarInvoiceInputPembayaranRef} rows={4} cols={40} onChange={handleInputChange} -- cgit v1.2.3