Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angel #243

Merged
merged 5 commits into from
Nov 11, 2023
Merged

Angel #243

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions uniEmpleos/src/pages/Login/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ const LogIn = () => {
} else if (role === "admin") {
navigate("/profileadmin")
}
} else if (datos.status === 403){
setTypePopUp(1)
setError("Cuenta deshabilitada. Contacte al administrador")
setWarning(true)
} else {
setTypePopUp(1)
setError("Credenciales incorrectas. Inténtelo de nuevo")
Expand Down
18 changes: 17 additions & 1 deletion uniEmpleos/src/pages/PublicProfile/PublicProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { BsPhone } from "react-icons/bs"
import { PiBooksLight } from "react-icons/pi"
import { LiaUniversitySolid, LiaBirthdayCakeSolid } from "react-icons/lia"
import { AiTwotoneCalendar } from "react-icons/ai"
import { HiOutlineMailOpen } from "react-icons/hi"
import { HiOutlineMailOpen, HiOutlineDocumentDownload } from "react-icons/hi"
import { LuFileSpreadsheet } from "react-icons/lu"
import useApi from "../../Hooks/useApi"
import Popup from "../../components/Popup/Popup"
import { navigate } from "../../store"
Expand Down Expand Up @@ -44,6 +45,7 @@ const PublicProfile = ({ params }) => {
setEdad(edadActual)
}

console.log("-->", usuario)
const obtenerPostulante = async () => {
const datos = await api.handleRequest("POST", "/users/details", {
correo,
Expand All @@ -64,6 +66,10 @@ const PublicProfile = ({ params }) => {
}
}

const showCV = (cv) => {
window.open(`${API_URL}/api/cv/${cv}`)
}

useEffect(() => {
obtenerPostulante()
}, [])
Expand Down Expand Up @@ -154,6 +160,16 @@ const PublicProfile = ({ params }) => {
</span>
</div>
)}
{usuario.cv && (
<div className={style.profileli}>
<HiOutlineDocumentDownload
size={30}
onClick={() => showCV(usuario.cv)}
style={{ cursor: "pointer" }}
/>
<span className={style.profileSpan}>CV</span>
</div>
)}
</div>
</div>
</div>
Expand Down
28 changes: 14 additions & 14 deletions uniEmpleos/src/pages/PublicProfile/PublicProfile.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
gap: 20px;
padding: 25px;
}
.title{

.title {
font-size: 30px;
font-weight: 700;
color: #333333;
Expand All @@ -25,12 +26,12 @@
height: 50%;
}

.tipoContainer{
.tipoContainer {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
gap:10%;
gap: 10%;
}

.pfp {
Expand All @@ -39,17 +40,16 @@
height: 60%;
border-radius: 10%;
box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;

}

.profileSpan{
.profileSpan {
font-size: 20px;
color: #333333;
text-align: center;
text-transform: capitalize;
}

.correo{
.correo {
font-size: 20px;
color: #333333;
text-align: center;
Expand All @@ -64,21 +64,21 @@
align-items: start;
}

.profileli{
.profileli {
justify-content: center;
align-items: center;
display: flex;
}

.subInfoContainer > * {
.subInfoContainer>* {
display: flex;
align-items: center;
justify-content: center;
gap:10px;
gap: 10px;
}


@media screen and (max-width: 768px){
@media screen and (max-width: 768px) {
.pfpContainer {
width: 100%;
height: 100%;
Expand All @@ -91,21 +91,21 @@
height: 100%;
}

.profileSpan{
.profileSpan {
font-size: 16px;
color: #333333;
text-align: center;
text-transform: capitalize;
}

.correo{
.correo {
font-size: 16px;
color: #333333;
text-align: center;
}


.tipoContainer{
.tipoContainer {
flex-direction: column;
gap: 10%;
}
Expand All @@ -117,7 +117,7 @@
margin-top: 10%;
}

.subInfoContainer > * {
.subInfoContainer>* {
gap: 10px;
}
}
Loading
Loading