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% --- .../pengajuan-tempo/component/KontakPerusahaan.jsx | 735 ++++++---- .../pengajuan-tempo/component/PengajuanTempo.jsx | 17 +- src/lib/pengajuan-tempo/component/Pengiriman.jsx | 1486 ++++++++++++++------ src/lib/pengajuan-tempo/component/Referensi.jsx | 557 +++++--- .../component/informasiPerusahaan.jsx | 176 ++- 5 files changed, 2012 insertions(+), 959 deletions(-) (limited to 'src/lib') diff --git a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx index 1281e387..091873a7 100644 --- a/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx +++ b/src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx @@ -1,5 +1,6 @@ import React, { useEffect, useMemo, useRef } from 'react'; import { usePengajuanTempoStoreKontakPerson } from '../../../../src-migrate/modules/register/stores/usePengajuanTempoStore'; +import useDevice from '@/core/hooks/useDevice'; const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { const { formKontakPerson, @@ -7,7 +8,7 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { validateKontakPerson, updateFormKontakPerson, } = usePengajuanTempoStoreKontakPerson(); - + const { isDesktop, isMobile } = useDevice(); const handleInputChange = (event) => { const { name, value } = event.target; updateFormKontakPerson(name, value); @@ -84,279 +85,501 @@ const KontakPerusahaan = ({ chekValid, buttonSubmitClick, isKonfirmasi }) => { validateKontakPerson(); }, [buttonSubmitClick]); return ( -
-

- Kontak Person -

-
-
-
-
- -
-
- - {chekValid && ( -
- {errorsKontakPerson.direkturName} + <> + {isDesktop && ( +
+

+ Kontak Person +

+ +
+
+
+
- )} -
-
+
+ + {chekValid && ( +
+ {errorsKontakPerson.direkturName} +
+ )} +
+
-
-
- - {!isKonfirmasi && ( - - isi nomor telpon direktur di perusahaan kamu - - )} -
-
- - {chekValid && ( -
- {errorsKontakPerson.direkturMobile} +
+
+ + {!isKonfirmasi && ( + + isi nomor telpon direktur di perusahaan kamu + + )}
- )} -
-
+
+ + {chekValid && ( +
+ {errorsKontakPerson.direkturMobile} +
+ )} +
+
-
-
- - {!isKonfirmasi && ( - - isi email Direktur yang sesuai - - )} -
-
- - {chekValid && ( -
- {errorsKontakPerson.direkturEmail} +
+
+ + {!isKonfirmasi && ( + + isi email Direktur yang sesuai + + )}
- )} -
-
+
+ + {chekValid && ( +
+ {errorsKontakPerson.direkturEmail} +
+ )} +
+
-
-
- - {!isKonfirmasi && ( - - isi nama purchasing yang bertanggung jawab di perusahaan anda - - )} -
-
- - {chekValid && ( -
- {errorsKontakPerson.purchasingName} +
+
+ + {!isKonfirmasi && ( + + isi nama purchasing yang bertanggung jawab di perusahaan + anda + + )}
- )} -
-
+
+ + {chekValid && ( +
+ {errorsKontakPerson.purchasingName} +
+ )} +
+
-
-
- - {!isKonfirmasi && ( - - isi nomor purchasing yang bertanggung jawab di perusahaan anda - - )} -
-
- - {chekValid && ( -
- {errorsKontakPerson.purchasingMobile} +
+
+ + {!isKonfirmasi && ( + + isi nomor purchasing yang bertanggung jawab di perusahaan + anda + + )}
- )} -
-
+
+ + {chekValid && ( +
+ {errorsKontakPerson.purchasingMobile} +
+ )} +
+
-
-
- - {!isKonfirmasi && ( - - isi email purchasing dengan benar - - )} -
-
- - {chekValid && ( -
- {errorsKontakPerson.purchasingEmail} +
+
+ + {!isKonfirmasi && ( + + isi email purchasing dengan benar + + )}
- )} -
-
+
+ + {chekValid && ( +
+ {errorsKontakPerson.purchasingEmail} +
+ )} +
+
-
-
- - {!isKonfirmasi && ( - - isi nama finance yang bertanggung jawab di perusahaan anda - - )} -
-
- - {chekValid && ( -
- {errorsKontakPerson.financeName} +
+
+ + {!isKonfirmasi && ( + + isi nama finance yang bertanggung jawab di perusahaan anda + + )}
- )} -
-
-
-
- - {!isKonfirmasi && ( - - isi nomor finance yang bertanggung jawab di perusahaan anda - - )} -
-
- - {chekValid && ( -
- {errorsKontakPerson.financeMobile} +
+ + {chekValid && ( +
+ {errorsKontakPerson.financeName} +
+ )}
- )} -
-
+
+
+
+ + {!isKonfirmasi && ( + + isi nomor finance yang bertanggung jawab di perusahaan + anda + + )} +
+
+ + {chekValid && ( +
+ {errorsKontakPerson.financeMobile} +
+ )} +
+
-
-
- - {!isKonfirmasi && ( - - isi email finance dengan benar - - )} -
-
- - {chekValid && ( -
- {errorsKontakPerson.financeEmail} +
+
+ + {!isKonfirmasi && ( + + isi email finance dengan benar + + )} +
+
+ + {chekValid && ( +
+ {errorsKontakPerson.financeEmail} +
+ )}
- )} +
+
+ +
+ )} + {isMobile && ( +
+

+ Kontak Person +

+
+
+
+ + + {chekValid && ( +
+ {errorsKontakPerson.direkturName} +
+ )} +
+ +
+ + + {chekValid && ( +
+ {errorsKontakPerson.direkturMobile} +
+ )} +
+ +
+ + + {chekValid && ( +
+ {errorsKontakPerson.direkturEmail} +
+ )} +
+ +
+ + + {chekValid && ( +
+ {errorsKontakPerson.purchasingName} +
+ )} +
+ +
+ + + {chekValid && ( +
+ {errorsKontakPerson.purchasingMobile} +
+ )} +
+ +
+ + + {chekValid && ( +
+ {errorsKontakPerson.purchasingEmail} +
+ )} +
+ +
+ + + {chekValid && ( +
+ {errorsKontakPerson.financeName} +
+ )} +
+
+ + + {chekValid && ( +
+ {errorsKontakPerson.financeMobile} +
+ )} +
+ +
+ + + {chekValid && ( +
+ {errorsKontakPerson.financeEmail} +
+ )} +
-
+
- -
+ )} + ); }; diff --git a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx index 04797c5f..7ed208db 100644 --- a/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx +++ b/src/lib/pengajuan-tempo/component/PengajuanTempo.jsx @@ -22,7 +22,9 @@ import createPengajuanTempoApi from '../api/createPengajuanTempoApi'; import { Button, Checkbox, Spinner, Tooltip } from '@chakra-ui/react'; import clsxm from '~/libs/clsxm'; import { toast } from 'react-hot-toast'; +import useDevice from '@/core/hooks/useDevice'; const PengajuanTempo = () => { + const { isDesktop, isMobile } = useDevice(); const [currentStep, setCurrentStep] = React.useState(0); const NUMBER_OF_STEPS = 6; const [isLoading, setIsLoading] = useState(false); @@ -298,8 +300,17 @@ const PengajuanTempo = () => {
{stepDivs[currentStep]}
-
-
+ {isDesktop &&
} + {isMobile && ( +
+ )} +
*Pastikan data yang anda masukan sudah benar dan sesuai @@ -312,7 +323,7 @@ const PengajuanTempo = () => { >