2024-03-23 14:08:03 +01:00
|
|
|
<script setup>
|
2024-03-23 18:04:36 +01:00
|
|
|
import i18n from "@/i18n.js"
|
2024-03-25 09:57:35 +01:00
|
|
|
import {getUser} from '../rest/Users.js'
|
|
|
|
import {getSomeonesCurriculumList} from "@/rest/curriculum.js";
|
2024-03-23 18:04:36 +01:00
|
|
|
|
2024-03-25 09:57:35 +01:00
|
|
|
const props = defineProps(['target']);
|
|
|
|
let user = await getUser(props.target);
|
|
|
|
let UserCurriculum = await getSomeonesCurriculumList(props.target);
|
2024-03-23 18:04:36 +01:00
|
|
|
|
|
|
|
function getPP(){
|
2024-03-25 09:57:35 +01:00
|
|
|
if(user.profilePictureUrl === null){
|
2024-03-23 18:04:36 +01:00
|
|
|
return "/Clyde.png"
|
|
|
|
}
|
|
|
|
return user.profilePictureUrl
|
|
|
|
}
|
2024-03-25 09:57:35 +01:00
|
|
|
|
|
|
|
//Cette function renvoie l'année académique concernée si on est dans l'année 2023-2024 elle renvoie 2023
|
|
|
|
//car dans la db l'année scolaire 2023-2024 est representée juste par 2023 (le même système s'applique pour chaque années on prend la borne inférieure
|
|
|
|
function getYear(){
|
|
|
|
let date = new Date();
|
|
|
|
if (date.getMonth() <= 6){
|
|
|
|
return date.getFullYear()-1
|
|
|
|
}
|
|
|
|
return date.getFullYear()
|
|
|
|
}
|
|
|
|
|
2024-03-23 14:08:03 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2024-03-23 18:04:36 +01:00
|
|
|
<div class="body">
|
|
|
|
<div class="container">
|
|
|
|
<div class="profilPic">
|
|
|
|
<img class="subContainter" :src=getPP()>
|
|
|
|
</div>
|
|
|
|
<div class = "globalInfos">
|
|
|
|
<div class="infosContainer">
|
|
|
|
<div>
|
2024-03-25 09:57:35 +01:00
|
|
|
FirstName/Name : {{user.firstName}} {{user.lastName}}
|
2024-03-23 18:04:36 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
E-mail: {{user.email}}
|
|
|
|
</div>
|
2024-03-25 09:57:35 +01:00
|
|
|
<div>
|
|
|
|
Adresse : {{user.address}}
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
Pays : {{user.country}}
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
Date de naissance : {{user.birthDate}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="moreInfos">
|
|
|
|
<div class = "oldcursus">
|
|
|
|
<div class="listTitle">
|
|
|
|
Anciens Cursus
|
|
|
|
</div>
|
|
|
|
<div class="listElement">
|
|
|
|
<div class=" containerElement" v-for="item in UserCurriculum.curriculumList">
|
|
|
|
<div class="year" v-if="parseInt(item.dateyear) !== getYear()">Bac {{item.year}}</div>
|
|
|
|
<div class="option" v-if="parseInt(item.dateyear) !== getYear()">{{item.option}}</div>
|
|
|
|
<div class="dateyear" v-if="parseInt(item.dateyear) !== getYear()">Année {{item.dateyear}}-{{item.dateyear+1}}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="newcursus" >
|
|
|
|
<div class="listTitle">
|
|
|
|
Cursus Actuel
|
|
|
|
</div>
|
|
|
|
<div class="listElement">
|
|
|
|
<div class=" containerElement" v-for="item in UserCurriculum.curriculumList" >
|
|
|
|
<div class="year" v-if="parseInt(item.dateyear) === getYear()">Bac {{item.year}}</div>
|
|
|
|
<div class="option" v-if="parseInt(item.dateyear) === getYear()">{{item.option}}</div>
|
|
|
|
<div class="dateyear" v-if="parseInt(item.dateyear) === getYear()">Année {{item.dateyear}}-{{item.dateyear+1}}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-23 18:04:36 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-23 14:08:03 +01:00
|
|
|
</div>
|
2024-03-23 18:04:36 +01:00
|
|
|
|
2024-03-23 14:08:03 +01:00
|
|
|
</template>
|
|
|
|
|
2024-03-23 18:04:36 +01:00
|
|
|
|
2024-03-25 09:57:35 +01:00
|
|
|
<style scoped>
|
2024-03-23 18:04:36 +01:00
|
|
|
.container{
|
|
|
|
display:grid;
|
|
|
|
grid-template-columns:200px 900px;
|
|
|
|
grid-template-rows:200px auto;
|
|
|
|
column-gap:30px;
|
|
|
|
row-gap:45px;
|
|
|
|
grid-template-areas:
|
|
|
|
"profilPic globalInfos"
|
|
|
|
"minfos minfos";
|
|
|
|
}
|
|
|
|
|
|
|
|
.profilPic{
|
|
|
|
grid-area:profilPic;
|
|
|
|
}
|
|
|
|
|
|
|
|
.globalInfos {
|
|
|
|
grid-area:globalInfos;
|
|
|
|
align-self :center;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.body {
|
|
|
|
width:100%;
|
|
|
|
margin-bottom:10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.subContainter{
|
|
|
|
width:100%;
|
|
|
|
background-color:rgb(50,50,50);
|
|
|
|
border-radius:20px;
|
|
|
|
border:4px solid black;
|
2024-03-23 14:08:03 +01:00
|
|
|
}
|
|
|
|
|
2024-03-23 18:04:36 +01:00
|
|
|
.infosContainer {
|
|
|
|
padding-bottom:50px;
|
|
|
|
border:2px solid black;
|
|
|
|
font-size:25px;
|
|
|
|
color:white;
|
|
|
|
padding:20px;
|
|
|
|
background-color:rgb(50,50,50);
|
|
|
|
border-radius:20px;
|
2024-03-23 14:08:03 +01:00
|
|
|
}
|
2024-03-25 09:57:35 +01:00
|
|
|
|
|
|
|
.moreInfos {
|
|
|
|
display:grid;
|
|
|
|
grid-template-rows:200px auto;
|
|
|
|
column-gap:50px;
|
|
|
|
row-gap:45px;
|
|
|
|
grid-template-areas:
|
|
|
|
"minfos minfos";
|
|
|
|
grid-template-columns:600px 600px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.listTitle{
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
width:250px;
|
|
|
|
margin-left:auto;
|
|
|
|
margin-right:auto;
|
|
|
|
border:2px solid black;
|
|
|
|
font-size:25px;
|
|
|
|
color:white;
|
|
|
|
padding:20px;
|
|
|
|
background-color:rgb(50,50,50);
|
|
|
|
border-radius:20px;margin-bottom:10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.listElement{
|
|
|
|
border:2px solid black;
|
|
|
|
font-size:25px;
|
|
|
|
color:white;
|
|
|
|
padding:20px;
|
|
|
|
background-color:rgb(50,50,50);
|
|
|
|
border-radius:20px;
|
|
|
|
margin-bottom:10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.containerElement{
|
|
|
|
justify-content:center;
|
|
|
|
display:grid;
|
|
|
|
grid-template-columns:100px 100px 300px;
|
|
|
|
grid-template-areas:
|
|
|
|
"year option dateyear";
|
|
|
|
column-gap:40px;
|
|
|
|
padding-left: 25px;
|
|
|
|
}
|
2024-03-23 14:08:03 +01:00
|
|
|
</style>
|