Skip to content

Commit

Permalink
Merge pull request #256 from markalbrand56/front_searchbar
Browse files Browse the repository at this point in the history
translations and css
  • Loading branch information
angelcast2002 authored Nov 17, 2023
2 parents 8dfb31f + 538a35f commit 5858c70
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 59 deletions.
6 changes: 2 additions & 4 deletions uniEmpleos/src/components/Chat/Chat.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@
}

.pfp img {
width: 100%;
height: 100%;
max-width: 60px;
max-height: 60px;
width: 60px;
height: 60px;
min-width: 30px;
min-height: 30px;
border-radius: 50%;
Expand Down
4 changes: 2 additions & 2 deletions uniEmpleos/src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export const Header = () => {
navigate("/profile")
break
case "enterprise":
navigate("/profilecompany")
navigate("/postulacionempresa")
break
case "admin":
navigate("/profile")
navigate("/profileadmin")
break
default:
navigate("/jobs")
Expand Down
3 changes: 2 additions & 1 deletion uniEmpleos/src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@
"career": "Career",
"university": "University",
"semester": "Semester",
"register": "Register"
"register": "Register",
"age": "Age"
}
},
"editProfileEnterprise": {
Expand Down
3 changes: 2 additions & 1 deletion uniEmpleos/src/locales/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
"career": "Carrera",
"university": "Universidad",
"semester": "Semestre",
"register": "Registrarse"
"register": "Registrarse",
"age": "Edad"
}
},
"editProfileEnterprise": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,12 @@ const EditProfileEmpresa = () => {
</div>
</div>
<div className={style.buttonContainer}>
<Button label={t("editProfileEnterprise.page.save")} onClick={handleButton} />
<Button
label={t("editProfileEnterprise.page.save")}
onClick={handleButton}
backgroundColor="#a08ae5"
noborder
/>
</div>
</div>
</div>
Expand Down
50 changes: 26 additions & 24 deletions uniEmpleos/src/pages/PostulantesPage/PostulantesPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,32 @@ const PostulantesPage = ({ id }) => {
close={() => setWarning(false)}
/>
<h1>Postulantes</h1>
{loading ? (
<Loader size={100} />
) : (
<div className={style.infoStudentContainer}>
{response.data ? (
response.data.map((postulante) => (
<InfoStudent
key={postulante.id_estudiante}
nombre={postulante.nombre}
apellido={postulante.apellido}
universidad={postulante.universidad}
pfp={
postulante.foto === ""
? fotoPFP
: `${API_URL}/api/uploads/${postulante.foto}`
}
onClick={() => handleClickUsuario(postulante.id_estudiante)}
/>
))
) : (
<span className={style.sinPostulantes}>No hay postulantes</span>
)}
</div>
)}
<div className={style.containerPostulants}>
{loading ? (
<Loader size={100} />
) : (
<div className={style.infoStudentContainer}>
{response.data ? (
response.data.map((postulante) => (
<InfoStudent
key={postulante.id_estudiante}
nombre={postulante.nombre}
apellido={postulante.apellido}
universidad={postulante.universidad}
pfp={
postulante.foto === ""
? fotoPFP
: `${API_URL}/api/uploads/${postulante.foto}`
}
onClick={() => handleClickUsuario(postulante.id_estudiante)}
/>
))
) : (
<span className={style.sinPostulantes}>No hay postulantes</span>
)}
</div>
)}
</div>
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
font-weight: 700;
margin-bottom: 20px;
color: #333333;
text-align: left;
text-align: center;
padding: 20px;
}

.infoStudentContainer {
display: flex;
flex-wrap: wrap;
justify-content: start;
justify-content: center;
gap: 30px;
margin-top: 20px;
padding: 10px;
Expand Down
40 changes: 22 additions & 18 deletions uniEmpleos/src/pages/PublicProfile/PublicProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ import { PiBooksLight } from "react-icons/pi"
import { LiaUniversitySolid, LiaBirthdayCakeSolid } from "react-icons/lia"
import { AiTwotoneCalendar } from "react-icons/ai"
import { HiOutlineMailOpen, HiOutlineDocumentDownload } from "react-icons/hi"
import { LuFileSpreadsheet } from "react-icons/lu"
import { useTranslation } from "react-i18next"
import useApi from "../../Hooks/useApi"
import Popup from "../../components/Popup/Popup"
import { navigate } from "../../store"
import style from "./PublicProfile.module.css"
import API_URL from "../../api"
import Loader from "../../components/Loader/Loader"

const PublicProfile = ({ params }) => {
const { t } = useTranslation()
const correo = params.split("-")[0]
const idOferta = params.split("-")[1]
const api = useApi()
Expand All @@ -25,6 +27,7 @@ const PublicProfile = ({ params }) => {
const [usuario, setUsuario] = useState([])
const [carrera, setCarrera] = useState("")
const [edad, setEdad] = useState("")
const [loading, setLoading] = useState(false)

const obtenerCarrera = async () => {
const datos = await carreraApi.handleRequest("GET", "/careers")
Expand All @@ -45,8 +48,8 @@ const PublicProfile = ({ params }) => {
setEdad(edadActual)
}

console.log("-->", usuario)
const obtenerPostulante = async () => {
setLoading(true)
const datos = await api.handleRequest("POST", "/users/details", {
correo,
})
Expand All @@ -56,6 +59,7 @@ const PublicProfile = ({ params }) => {
} else {
setUsuario(datos.data.company)
}
setLoading(false)
} else {
setTypeError(1)
setError("Ups, algo salio mal al obtener el perfil")
Expand Down Expand Up @@ -100,10 +104,12 @@ const PublicProfile = ({ params }) => {
}}
onClick={() => navigate(`/postulantes/${idOferta}`)}
/>
{usuario ? (
{loading ? (
<Loader size={100} />
) : (
<div className={style.infoContainer}>
<h1 className={style.title}>
Perfil de {usuario.nombre} {usuario.apellido}
{usuario.nombre} {usuario.apellido}
</h1>
<div className={style.tipoContainer}>
{usuario.foto && (
Expand All @@ -116,47 +122,47 @@ const PublicProfile = ({ params }) => {
</div>
)}
<div className={style.subInfoContainer}>
<div className={style.profileli}>
<BiUser size={30} />
<span className={style.profileSpan}>
Nombre: {`${usuario.nombre} ${usuario.apellido}`}
</span>
</div>
<div className={style.profileli}>
<HiOutlineMailOpen size={30} />
<span className={style.correo}>Correo: {usuario.correo}</span>
<span className={style.correo}>
{t("signUpStudent.page.email")}: {usuario.correo}
</span>
</div>
<div className={style.profileli}>
<BsPhone size={30} />
<span className={style.profileSpan}>
Telefono: {usuario.telefono}
{t("signUpStudent.page.phone")}: {usuario.telefono}
</span>
</div>
{usuario.universidad && (
<div className={style.profileli}>
<LiaUniversitySolid size={30} />
<span className={style.profileSpan}>
Universidad: {usuario.universidad}
{t("signUpStudent.page.university")}: {usuario.universidad}
</span>
</div>
)}
{usuario.carrera && (
<div className={style.profileli}>
<PiBooksLight size={30} />
<span className={style.profileSpan}>Carrera: {carrera}</span>
<span className={style.profileSpan}>
{t("signUpStudent.page.career")}: {carrera}
</span>
</div>
)}
{usuario.nacimiento && (
<div className={style.profileli}>
<LiaBirthdayCakeSolid size={30} />
<span className={style.profileSpan}>Edad: {edad}</span>
<span className={style.profileSpan}>
{t("signUpStudent.page.age")}: {edad}
</span>
</div>
)}
{usuario.semestre && (
<div className={style.profileli}>
<AiTwotoneCalendar size={30} />
<span className={style.profileSpan}>
Semestre: {usuario.semestre}
{t("signUpStudent.page.semester")}: {usuario.semestre}
</span>
</div>
)}
Expand All @@ -173,8 +179,6 @@ const PublicProfile = ({ params }) => {
</div>
</div>
</div>
) : (
<div>Cargando</div>
)}
</div>
)
Expand Down
27 changes: 21 additions & 6 deletions uniEmpleos/src/pages/PublicProfile/PublicProfile.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
justify-content: end;
align-items: end;
width: 50%;
height: 50%;
}

.tipoContainer {
Expand All @@ -36,8 +35,9 @@

.pfp {
display: flex;
width: 60%;
height: 60%;
width: 400px;
height: 400px;
object-fit: cover;
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;
}
Expand Down Expand Up @@ -77,6 +77,15 @@
gap: 10px;
}

.mainContainer {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}


@media screen and (max-width: 768px) {
.pfpContainer {
Expand All @@ -87,8 +96,8 @@
}

.pfp {
width: 100%;
height: 100%;
width: 300px;
height: 300px;
}

.profileSpan {
Expand All @@ -114,10 +123,16 @@
width: 100%;
gap: 0;
align-items: start;
margin-top: 10%;
margin-top: 5%;
gap: 10px;
}

.subInfoContainer>* {
gap: 10px;
}

.mainContainer{
justify-content: center;
}

}

0 comments on commit 5858c70

Please sign in to comment.