From fbb7b0373157e79d8f10a888eeb456e7e2ea6c6e Mon Sep 17 00:00:00 2001 From: Ricardo Lima Date: Mon, 13 Nov 2023 16:48:45 -0300 Subject: [PATCH 01/10] docs: altera autores do projeto --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 12881d7e..fab65b7c 100644 --- a/README.md +++ b/README.md @@ -77,13 +77,13 @@ Esse projeto é usado pela [SouJunior](https://github.com/SouJunior). ## Autor(es) 🙎🏻‍♂️ -- Filipe Reis | [GitHub](https://github.com/FilipeLeoni) - [LinkedIn](https://www.linkedin.com/in/filipe-leoni-5745551a8/) -- Igor Gonçalves | [GitHub](https://github.com/igords-goncalves) - [Linkedin](https://www.linkedin.com/in/igords-goncalves/) - Isabela S. Hyeda Buitoni | [GitHub](https://github.com/isabelahyeda) - [Linkedin](https://www.linkedin.com/in/isabelahyeda/) - Leonardo Dias Monteiro | [GitHub](https://github.com/Leodias2204) - [Linkedin](https://www.linkedin.com/in/leonardo-dias-monteiro-54642264/) ## Ex-Autor(es) 🙎🏻‍♂️ +- Filipe Reis | [GitHub](https://github.com/FilipeLeoni) - [LinkedIn](https://www.linkedin.com/in/filipe-leoni-5745551a8/) +- Igor Gonçalves | [GitHub](https://github.com/igords-goncalves) - [Linkedin](https://www.linkedin.com/in/igords-goncalves/) - João Vitor Kremer | [GitHub](https://github.com/JoaoKremerDev) - [LinkedIn](https://www.linkedin.com/in/joaokremer/) - Alberto Santos | [GitHub](https://github.com/allbertuu) - [LinkedIn](https://www.linkedin.com/in/albertov-albuquerque/) - [Portfólio](https://portfolio-allbertuu.vercel.app/) - Carlos Junior | [GitHub](https://github.com/CarlosJunioor) - [LinkedIn](https://www.linkedin.com/in/carlosjuniordev/) From a383425f2363d6248bd4262fdffe7989cb668ea0 Mon Sep 17 00:00:00 2001 From: Ricardo Lima Date: Mon, 13 Nov 2023 17:11:09 -0300 Subject: [PATCH 02/10] docs: altera autores do projeto --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fab65b7c..f6a6bb7d 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Esse projeto é usado pela [SouJunior](https://github.com/SouJunior). ## Autor(es) 🙎🏻‍♂️ +- Max Faria | [GitHub](https://github.com/max-faria) - [Linkedin](https://www.linkedin.com/in/maxfariaa/) - Isabela S. Hyeda Buitoni | [GitHub](https://github.com/isabelahyeda) - [Linkedin](https://www.linkedin.com/in/isabelahyeda/) - Leonardo Dias Monteiro | [GitHub](https://github.com/Leodias2204) - [Linkedin](https://www.linkedin.com/in/leonardo-dias-monteiro-54642264/) From b8aeeffefdc2d9499b4c9681d480c05f1eeed507 Mon Sep 17 00:00:00 2001 From: Bianca Andrade Date: Wed, 24 Jul 2024 22:46:06 -0300 Subject: [PATCH 03/10] =?UTF-8?q?Corre=C3=A7=C3=A3o=20de=20bugs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LoginCard/UserForms/index.tsx | 15 +++++++-------- .../ProfileModal/ChangePasswordModal/index.tsx | 11 +++++------ .../Portal/ProfileModal/PolicyModal/index.tsx | 9 +++++++++ .../Portal/ProfileModal/TermsModal/index.tsx | 9 +++++++++ src/pages/CandidatePortal.tsx | 5 ++--- 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/src/components/LoginCard/UserForms/index.tsx b/src/components/LoginCard/UserForms/index.tsx index b707268e..4c4550e5 100644 --- a/src/components/LoginCard/UserForms/index.tsx +++ b/src/components/LoginCard/UserForms/index.tsx @@ -72,10 +72,8 @@ export const UserForms = (props: any): JSX.Element => { const navigate = useNavigate(); const auth: any = useContext(AuthContext); - // Recebe o tipo do usuário const userType = props.type; - // Define qual formulário deverá ser validado const getFormValidation = isLogin === 'login' ? schemaUserLoginForm : schemaUserRegisterForm; @@ -89,12 +87,10 @@ export const UserForms = (props: any): JSX.Element => { resolver: yupResolver(getFormValidation), }); - // Realiza o login e maniopula dados async function handleFormOnSubmit() { setIsFormSubmitted(true); try { - // Recebe dados do contexto para verificação await auth.login(email, password, userType); navigate('/candidate-portal'); setPopUpAntiFraudOpen(true); @@ -271,6 +267,7 @@ export const UserForms = (props: any): JSX.Element => { placeholder="Digite seu nome completo" aria-label="Nome do candidato" maxLength={50} + pattern="[A-Za-z\s]+" > {errors.registerName && ( @@ -371,20 +368,22 @@ export const UserForms = (props: any): JSX.Element => { - {hasError && ( {errors.privacyTerms && ( <>{errors.privacyTerms.message} )} - )} {errorEmail && <>{errorEmail} } diff --git a/src/components/Portal/ProfileModal/ChangePasswordModal/index.tsx b/src/components/Portal/ProfileModal/ChangePasswordModal/index.tsx index 1eb9aad6..5652aa87 100644 --- a/src/components/Portal/ProfileModal/ChangePasswordModal/index.tsx +++ b/src/components/Portal/ProfileModal/ChangePasswordModal/index.tsx @@ -20,12 +20,11 @@ const ChangePasswordModal = ({ setChangePasswordModal }: ChangePasswordModalProp const modalRef = useRef(null); const handleClick = () => { - setChangePasswordModal (false); - auth.user.type === 'USER' ? - (navigate('/candidate-portal')) - : - (navigate('/company-portal')) - setTimeout(() => window.location.reload(), 0) + setChangePasswordModal(false); + navigate('/change-password'); + setTimeout(() => { + window.location.reload(); + }, 0); document.body.style.overflow = 'auto'; } diff --git a/src/components/Portal/ProfileModal/PolicyModal/index.tsx b/src/components/Portal/ProfileModal/PolicyModal/index.tsx index d4474e97..a8bc97d6 100644 --- a/src/components/Portal/ProfileModal/PolicyModal/index.tsx +++ b/src/components/Portal/ProfileModal/PolicyModal/index.tsx @@ -21,6 +21,15 @@ const PolicyModal: React.FC = ({ setPolicyModal }) => { setPolicyModal(false); }; + useEffect(() => { + const handleOutsideClick = (e: MouseEvent) => { + if (modalRef.current && e.target instanceof Node && !modalRef.current.contains(e.target)) { + setPolicyModal(false); + } + }; + document.addEventListener('mousedown', handleOutsideClick); + }, []); + return ( diff --git a/src/components/Portal/ProfileModal/TermsModal/index.tsx b/src/components/Portal/ProfileModal/TermsModal/index.tsx index d9d192fe..82c9bdca 100644 --- a/src/components/Portal/ProfileModal/TermsModal/index.tsx +++ b/src/components/Portal/ProfileModal/TermsModal/index.tsx @@ -21,6 +21,15 @@ const TermsModal: React.FC = ({ setTermsModal }) => { setTermsModal(false); }; + useEffect(() => { + const handleOutsideClick = (e: MouseEvent) => { + if (modalRef.current && e.target instanceof Node && !modalRef.current.contains(e.target)) { + setTermsModal(false); + } + }; + document.addEventListener('mousedown', handleOutsideClick); + }, []); + return ( diff --git a/src/pages/CandidatePortal.tsx b/src/pages/CandidatePortal.tsx index 7fe5a8fa..ad95e7fa 100644 --- a/src/pages/CandidatePortal.tsx +++ b/src/pages/CandidatePortal.tsx @@ -15,7 +15,6 @@ import { useContext } from 'react'; import Footer from '../components/Portal/Footer'; import PopUpAntiFraudMessage from '../components/LoginCard/PopUpAntiFraudMessage'; - const CandidatePortal = () => { const navigate = useNavigate(); const { popUpAntiFraudOpen } = useContext(AuthContext); @@ -26,15 +25,15 @@ const CandidatePortal = () => {
{popUpAntiFraudOpen && }
+ navigate('/candidate-settings')}>

Olá, {auth.user.name}

- {/* navigate('/candidate-settings')}>
currículo
Atualizar meu currículo
-
*/} +