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 ++++++++++++++------- 1 file changed, 479 insertions(+), 256 deletions(-) (limited to 'src/lib/pengajuan-tempo/component/KontakPerusahaan.jsx') 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} +
+ )} +
-
+
- -
+ )} + ); }; -- cgit v1.2.3