2024-03-09 22:48:33 +01:00
|
|
|
<script setup>
|
2024-03-15 15:12:01 +01:00
|
|
|
import {reactive, ref } from 'vue'
|
2024-03-18 17:28:14 +01:00
|
|
|
import {getSelf,alterSelf,disconnect,deleteUser} from '../rest/Users.js'
|
2024-04-17 21:42:33 +02:00
|
|
|
import {getSelfCurriculum, getAllCurriculums, getSomeonesCurriculumList, getcurriculum} from '../rest/curriculum.js'
|
2024-03-18 17:28:14 +01:00
|
|
|
import {getCourses} from "../rest/courses.js"
|
2024-03-14 21:27:03 +01:00
|
|
|
import i18n from "@/i18n.js"
|
2024-04-09 15:58:10 +02:00
|
|
|
import {uploadFile, uploadProfilePicture} from '@/rest/uploads.js'
|
2024-04-11 21:06:57 +02:00
|
|
|
import CourseList from "@/Apps/Inscription/CourseList.vue";
|
2024-04-08 14:50:37 +02:00
|
|
|
import {editMinerval, getCurrentMinerval} from "@/rest/minerval.js";
|
|
|
|
import {postPayment} from "@/rest/payment.js";
|
2024-04-17 11:55:56 +02:00
|
|
|
import {addUninscReq, createScholarshipRequest, postChangeCurrReq} from "@/rest/requests.js";
|
2024-03-18 17:28:14 +01:00
|
|
|
|
2024-03-18 18:47:00 +01:00
|
|
|
const user = ref(await getSelf());
|
2024-03-18 17:28:14 +01:00
|
|
|
const UserCurriculum = ref("");
|
|
|
|
const curricula = ref (await getAllCurriculums());
|
2024-04-08 14:50:37 +02:00
|
|
|
const minerv = ref({});
|
2024-03-18 18:47:00 +01:00
|
|
|
if(user.value.role === "Student"){
|
2024-04-08 14:50:37 +02:00
|
|
|
minerv.value = ref(await getCurrentMinerval(user.value.regNo));
|
2024-04-06 16:12:11 +02:00
|
|
|
UserCurriculum.value = await getSomeonesCurriculumList(user.value.regNo);
|
2024-03-18 17:28:14 +01:00
|
|
|
}
|
2024-03-16 17:01:26 +01:00
|
|
|
|
2024-03-18 17:28:14 +01:00
|
|
|
if(user.role === "Teacher"){
|
|
|
|
UserCurriculum.value = await getCourses("Teacher");
|
|
|
|
}
|
2024-04-17 08:53:28 +02:00
|
|
|
|
2024-04-14 18:29:23 +02:00
|
|
|
const sure = ref(0);
|
|
|
|
|
2024-04-17 08:53:28 +02:00
|
|
|
//0 base, 1 modif, 2 curriculum, 3 register, 4 courselist, 5 minerval, 6 payment, 7 scholarship, 8 scholarshipinfos, 9 unregister, 10 sure, 11 aboutunregister
|
|
|
|
const windowState = ref(0);
|
|
|
|
|
2024-04-17 13:57:52 +02:00
|
|
|
const isChecked = ref(false);
|
2024-04-17 21:42:33 +02:00
|
|
|
const reRegState = ref(0);
|
2024-04-17 13:57:52 +02:00
|
|
|
|
2024-03-16 19:54:42 +01:00
|
|
|
const pattern = {
|
2024-03-16 17:01:26 +01:00
|
|
|
profilPictureUrl:null,
|
|
|
|
email:null,
|
2024-03-18 18:47:00 +01:00
|
|
|
address:null,
|
2024-03-16 17:01:26 +01:00
|
|
|
password:null,
|
|
|
|
};
|
2024-03-16 19:54:42 +01:00
|
|
|
|
|
|
|
const patternInfos ={
|
|
|
|
email: null,
|
|
|
|
password: null,
|
|
|
|
passwordConfirm:null,
|
|
|
|
id:null,
|
|
|
|
}
|
2024-03-09 22:48:33 +01:00
|
|
|
|
2024-04-08 14:50:37 +02:00
|
|
|
//Used to modelize a payment
|
|
|
|
const paymentData={
|
|
|
|
studentRegNo: user.value.regNo,
|
|
|
|
date:null,
|
|
|
|
card:null,
|
|
|
|
client:null,
|
|
|
|
expDate:null,
|
|
|
|
amount: null
|
|
|
|
}
|
2024-04-09 15:58:10 +02:00
|
|
|
|
|
|
|
//Used to modelize a scholarship request
|
|
|
|
const scholarshipData=reactive({
|
|
|
|
userId: user.value.regNo,
|
|
|
|
state:null,
|
|
|
|
date:null,
|
|
|
|
amount:0,
|
|
|
|
taxDocUrl : "",
|
|
|
|
residencyDocUrl : ""
|
|
|
|
})
|
|
|
|
|
2024-04-17 11:55:56 +02:00
|
|
|
const changecurrdata = reactive({
|
|
|
|
userId : user.value.regNo,
|
|
|
|
actualcursus:null,
|
|
|
|
newcursus:null
|
|
|
|
})
|
|
|
|
|
2024-04-14 18:29:23 +02:00
|
|
|
//Used to post a uninscription request
|
|
|
|
const uninscriptionData = reactive({
|
|
|
|
reason : null,
|
2024-04-17 13:57:52 +02:00
|
|
|
userId : user.value.regNo,
|
|
|
|
curriculumId:null
|
2024-04-14 18:29:23 +02:00
|
|
|
})
|
2024-04-08 14:50:37 +02:00
|
|
|
const paymentAmount = ref(0);
|
2024-03-16 19:54:42 +01:00
|
|
|
let toModify= Object.assign({}, pattern);
|
|
|
|
let personnalInfos = Object.assign({}, patternInfos);
|
|
|
|
|
|
|
|
function resetInputs(inputs,list){
|
|
|
|
inputs=Object.assign({},list);
|
|
|
|
}
|
|
|
|
|
2024-03-18 18:47:00 +01:00
|
|
|
async function ChangeInfos(){
|
|
|
|
for (let element in toModify){
|
2024-04-17 08:53:28 +02:00
|
|
|
if (element ==="email" && (toModify[element] !== null)){
|
2024-03-18 18:47:00 +01:00
|
|
|
await alterSelf(user.value.regNo,{email : toModify[element]});
|
|
|
|
}
|
|
|
|
|
2024-04-17 08:53:28 +02:00
|
|
|
if (element ==="profilPictureUrl" && (toModify[element] !== null)){
|
2024-03-18 18:47:00 +01:00
|
|
|
await alterSelf(user.value.regNo,{ profilPictureUrl : toModify[element]});
|
|
|
|
}
|
2024-04-17 08:53:28 +02:00
|
|
|
else if(element === "address" && (toModify[element] !== null)){
|
2024-03-18 18:47:00 +01:00
|
|
|
await alterSelf(user.value.regNo,{address : toModify[element]});
|
|
|
|
}
|
2024-04-17 08:53:28 +02:00
|
|
|
else if(element === "password" && (toModify[element] !== null)){
|
2024-03-18 18:47:00 +01:00
|
|
|
await alterSelf(user.value.regNo,{password : toModify[element]});
|
|
|
|
}
|
2024-03-16 17:01:26 +01:00
|
|
|
}
|
2024-03-18 18:47:00 +01:00
|
|
|
toModify= Object.assign({},pattern);
|
|
|
|
user.value = await getSelf()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function setModify(item){
|
|
|
|
toModify.address = item.address;
|
|
|
|
toModify.profilPictureUrl = item.profilPictureUrl;
|
|
|
|
toModify.email= item.email;
|
|
|
|
toModify.password= item.password;
|
2024-03-16 17:01:26 +01:00
|
|
|
}
|
2024-03-18 18:47:00 +01:00
|
|
|
|
2024-03-18 17:28:14 +01:00
|
|
|
|
|
|
|
async function unRegister(){
|
2024-03-18 18:47:00 +01:00
|
|
|
deleteUser(user.value.regNo);
|
|
|
|
disconnect()
|
2024-03-18 17:34:35 +01:00
|
|
|
setTimeout(() => {
|
|
|
|
window.location.href="#/home";
|
|
|
|
}, "500");
|
2024-03-18 17:28:14 +01:00
|
|
|
|
|
|
|
}
|
2024-03-16 17:01:26 +01:00
|
|
|
|
|
|
|
function getPP(){
|
2024-03-18 18:47:00 +01:00
|
|
|
if(user.value.profilePictureUrl === null){
|
2024-03-18 17:28:14 +01:00
|
|
|
return "/Clyde.png"
|
|
|
|
}
|
2024-03-16 17:01:26 +01:00
|
|
|
return user.profilePictureUrl
|
|
|
|
}
|
2024-04-06 16:12:11 +02:00
|
|
|
|
|
|
|
function getYear(){
|
|
|
|
let date = new Date();
|
|
|
|
if (date.getMonth() <= 6){
|
|
|
|
return date.getFullYear()-1
|
|
|
|
}
|
|
|
|
return date.getFullYear()
|
|
|
|
}
|
|
|
|
|
|
|
|
//This function travels through the student cursus array and extract the current cursus of the student
|
|
|
|
function getActualCurriculumList(){
|
|
|
|
let actualCurriculumList = [];
|
|
|
|
for (let i = 0; i < UserCurriculum.value.curriculumList.length; i++){
|
2024-04-17 11:55:56 +02:00
|
|
|
if (UserCurriculum.value.curriculumList[i].actual === true){
|
2024-04-06 16:12:11 +02:00
|
|
|
actualCurriculumList.push(UserCurriculum.value.curriculumList[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return actualCurriculumList
|
|
|
|
}
|
2024-04-09 15:58:10 +02:00
|
|
|
|
|
|
|
async function postScholarshipRequest(file1, type1, file2, type2){
|
|
|
|
const a = await uploadFile(file1, type1)
|
|
|
|
scholarshipData.taxDocUrl = a.url;
|
|
|
|
|
|
|
|
const b = await uploadFile(file2, type2)
|
|
|
|
scholarshipData.residencyDocUrl = b.url;
|
|
|
|
|
|
|
|
scholarshipData.date = Date.now();
|
|
|
|
|
|
|
|
await createScholarshipRequest(scholarshipData)
|
|
|
|
}
|
2024-04-17 21:42:33 +02:00
|
|
|
|
|
|
|
//1 = previous 0 = next
|
|
|
|
function getCurriculumsNextYear(){
|
|
|
|
const currlist = getActualCurriculumList()
|
|
|
|
let list = []
|
|
|
|
|
|
|
|
for (let i = 0; i < currlist.length; i++){
|
|
|
|
for (let j = 0; j < curricula.value.length; j++){
|
|
|
|
if (curricula.value[j].option === currlist[i].option && curricula.value[j].year === currlist[i].year + 1){
|
|
|
|
list.push(curricula.value[j])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return list
|
|
|
|
}
|
|
|
|
|
|
|
|
async function getActualCurr(curr){
|
|
|
|
const cursus = await getcurriculum(curr);
|
|
|
|
for (let i = 0; i < curricula.value.length; i++){
|
|
|
|
if (curricula.value[i].option === cursus.option && curricula.value[i].year === cursus.year - 1){
|
|
|
|
changecurrdata.actualcursus = curricula.value[i].curriculumId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-16 17:01:26 +01:00
|
|
|
</script>
|
|
|
|
|
2024-03-09 22:48:33 +01:00
|
|
|
<template>
|
|
|
|
<div class="body">
|
2024-04-17 08:53:28 +02:00
|
|
|
<div class="container" v-if="windowState!==4">
|
|
|
|
<div class="profilPic" v-if="windowState===0">
|
2024-03-15 15:12:01 +01:00
|
|
|
<img class="subContainter" :src=getPP()>
|
2024-03-09 22:48:33 +01:00
|
|
|
</div>
|
|
|
|
<div class="globalInfos">
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-if="windowState === 0" class="infosContainer">
|
2024-03-10 12:34:44 +01:00
|
|
|
<div>
|
2024-03-16 14:31:44 +01:00
|
|
|
{{user.firstName}} {{user.lastName}}
|
2024-03-09 22:48:33 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
2024-03-10 16:01:47 +01:00
|
|
|
E-mail: {{user.email}}
|
|
|
|
</div>
|
2024-03-16 15:06:21 +01:00
|
|
|
<div v-if="user.role==='Student'">
|
2024-03-18 17:28:14 +01:00
|
|
|
{{user.option}} {{i18n(user.role)}}
|
2024-03-10 16:01:47 +01:00
|
|
|
</div>
|
|
|
|
<div v-else>
|
2024-03-18 17:28:14 +01:00
|
|
|
Role: {{i18n((user.role))}}
|
2024-03-09 22:48:33 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState=1; setModify(user)"> {{i18n("profile.modify.data")}} </button>
|
2024-03-10 16:01:47 +01:00
|
|
|
</div>
|
2024-03-16 15:06:21 +01:00
|
|
|
<div v-if="(user.role==='Student')">
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState=3">{{i18n("profile.reRegister")}}</button>
|
|
|
|
<button @click="windowState=9" style="float:right;background-color:rgb(150,0,0);">{{i18n("profile.unRegister")}}</button>
|
2024-03-16 17:01:26 +01:00
|
|
|
</div>
|
|
|
|
<div v-if="(user.role==='Student')">
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState=2">{{i18n("profile.change.curriculum")}}</button>
|
2024-03-15 20:23:33 +01:00
|
|
|
</div>
|
2024-04-06 16:12:11 +02:00
|
|
|
<div v-if="(user.role==='Student')">
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState=4">Manage Courses</button>
|
|
|
|
<button @click="windowState=5" style="margin-left: 2%">Manage minerval</button>
|
2024-04-08 14:50:37 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-else-if="windowState === 9" class="infosContainer">
|
2024-04-17 13:57:52 +02:00
|
|
|
<div v-if="sure !== 2">Please enter the reason you leave</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<textarea v-if="sure !== 2" v-model="uninscriptionData.reason"></textarea>
|
2024-04-17 13:57:52 +02:00
|
|
|
<div v-if="sure !== 2">
|
|
|
|
I only want to unregister from a specific cursus
|
|
|
|
<input type="checkbox" v-model="isChecked">
|
|
|
|
</div>
|
|
|
|
<div v-if="sure !== 2 && isChecked">
|
|
|
|
Please select that cursus
|
|
|
|
<select v-model="uninscriptionData.curriculumId">
|
|
|
|
<option v-for="item in getActualCurriculumList()" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-if="sure !== 2">
|
2024-04-14 18:29:23 +02:00
|
|
|
<button @click="sure++">Submit</button>
|
|
|
|
</div>
|
|
|
|
<div v-if="sure==1">
|
|
|
|
Are you sure that you want to unregister ?
|
2024-04-17 13:57:52 +02:00
|
|
|
<button @click="addUninscReq(uninscriptionData.userId, uninscriptionData.reason, uninscriptionData.curriculumId);sure++">Yes</button>
|
2024-04-14 18:29:23 +02:00
|
|
|
<button @click="sure=0">No</button>
|
|
|
|
</div>
|
|
|
|
<p v-if="sure==2">You request has been send !</p>
|
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-else-if="windowState === 5" class="infosContainer">
|
|
|
|
<div v-if="minerv.value.toPay !== 0">
|
2024-04-08 14:50:37 +02:00
|
|
|
Payment : {{minerv.value.toPay}}€ left to pay
|
|
|
|
<div v-if="minerv.value.paidAmount <= 50">
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState=6; paymentAmount = 50">Pay deposit (50€)</button>
|
2024-04-08 14:50:37 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState=6; paymentAmount = minerv.value.toPay">Pay all the rest ({{minerv.value.toPay}}€)</button>
|
2024-04-08 14:50:37 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-else>
|
|
|
|
Payment : School fees have already been paid this year
|
|
|
|
</div>
|
2024-04-09 15:58:10 +02:00
|
|
|
<div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState=7">Ask for a scholarship</button>
|
2024-04-09 15:58:10 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-else-if="windowState === 7" class="infosContainer">
|
2024-04-09 15:58:10 +02:00
|
|
|
<p>Please upload the required documents</p>
|
|
|
|
<div>
|
|
|
|
Tax justification document :
|
|
|
|
<input type="file" @change="scholarshipData.taxDocUrl = $event.target.files">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
Residency justification document :
|
|
|
|
<input type="file" style="margin-top:2%" @change="scholarshipData.residencyDocUrl = $event.target.files">
|
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<button style="margin-top: 5%" @click="windowState=8;postScholarshipRequest(scholarshipData.taxDocUrl, 'JustificationDocument',scholarshipData.residencyDocUrl, 'JustificationDocument');">Submit scholarship request</button>
|
2024-04-09 15:58:10 +02:00
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-else-if="windowState === 8" class="infosContainer">
|
2024-04-09 15:58:10 +02:00
|
|
|
<div>
|
|
|
|
Your request has been sent to the inscription service you will get notified when
|
|
|
|
the request is reviewed.
|
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState = 0">
|
2024-04-09 15:58:10 +02:00
|
|
|
Go back to profile
|
|
|
|
</button>
|
2024-04-08 14:50:37 +02:00
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-else-if="windowState === 6" class="infosContainer">
|
2024-04-08 14:50:37 +02:00
|
|
|
Proceed to payment of {{paymentAmount}}€
|
|
|
|
<div style="margin-top: 1%">
|
|
|
|
Client:
|
|
|
|
<input type="text" v-model="paymentData.client">
|
|
|
|
</div>
|
|
|
|
<div style="margin-top: 1%">
|
|
|
|
Card:
|
|
|
|
<input type="text" v-model="paymentData.card">
|
|
|
|
</div>
|
|
|
|
<div style="margin-top: 1%">
|
|
|
|
ExpDate:
|
|
|
|
<input type="date" v-model="paymentData.expDate">
|
|
|
|
</div>
|
|
|
|
<div style="margin-top: 1%">
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState=5;paymentData.amount=paymentAmount;paymentData.date=new Date();postPayment(paymentData);minerv.value.toPay -= paymentAmount; minerv.value.paidAmount += paymentAmount; editMinerval(minerv.value)">Process Payment</button>
|
2024-04-08 14:50:37 +02:00
|
|
|
</div>
|
|
|
|
<div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState = 5">Back</button>
|
2024-04-06 16:12:11 +02:00
|
|
|
</div>
|
2024-03-09 22:48:33 +01:00
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-else-if="windowState === 1" class="infosContainer">
|
2024-03-11 21:24:40 +01:00
|
|
|
<div>
|
2024-03-14 21:27:03 +01:00
|
|
|
{{i18n("profile.picture")}}:
|
2024-03-15 15:12:01 +01:00
|
|
|
<input type="file" @change="user.profilPicture = uploadProfilePicture($event.target.files);" accept="image/*">
|
2024-03-11 21:24:40 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
E-mail:
|
2024-04-17 08:53:28 +02:00
|
|
|
<input type="email" v-model="toModify.email" />
|
2024-03-11 21:24:40 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
2024-03-14 21:27:03 +01:00
|
|
|
{{i18n("profile.address")}}:
|
2024-03-18 18:47:00 +01:00
|
|
|
<input type="text" v-model="toModify.id">
|
2024-03-11 21:24:40 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
2024-03-14 21:27:03 +01:00
|
|
|
{{i18n("login.password")}}:
|
2024-03-18 18:47:00 +01:00
|
|
|
<input type="password" v-model="toModify.password">
|
2024-03-11 21:24:40 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
2024-03-14 21:27:03 +01:00
|
|
|
{{i18n("login.cPassword")}}:
|
2024-03-18 18:47:00 +01:00
|
|
|
<input type="password" v-model="toModify.passwordConfirm">
|
2024-03-11 21:24:40 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
2024-04-17 11:55:56 +02:00
|
|
|
<button @click="windowState = 0; ChangeInfos();">{{i18n("courses.confirm")}}</button>
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState = 0; resetInputs(toModify,pattern);" style="float:right;">{{i18n("courses.back")}}</button>
|
2024-03-16 17:01:26 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-else-if="windowState === 2" class="infosContainer">
|
2024-04-17 21:42:33 +02:00
|
|
|
<div>
|
|
|
|
I would like to :
|
|
|
|
<select v-model="reRegState">
|
|
|
|
<option :value="1">Reregister in the next year of one of my cursus</option>
|
|
|
|
<option :value="2">Register for a supplementary cursus</option>
|
|
|
|
<option :value="3">Change from a cursus to another</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div style="height:40px;" v-if="reRegState === 3">
|
2024-04-17 11:55:56 +02:00
|
|
|
{{i18n("Curriculum")}}:
|
|
|
|
<select v-model="changecurrdata.actualcursus" style="margin-right: 3%">
|
|
|
|
<option v-for="item in getActualCurriculumList()" style="font-size:20px;" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option>
|
|
|
|
</select>
|
|
|
|
New Curriculum :
|
|
|
|
<select v-model="changecurrdata.newcursus">
|
|
|
|
<option v-for="item in curricula" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option>
|
2024-03-16 17:01:26 +01:00
|
|
|
</select>
|
|
|
|
</div>
|
2024-04-17 21:42:33 +02:00
|
|
|
<div style="height:40px;" v-if="reRegState === 2">
|
|
|
|
New Curriculum :
|
|
|
|
<select v-model="changecurrdata.newcursus">
|
|
|
|
<option v-for="item in curricula" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div style="height:40px;" v-if="reRegState === 1">
|
|
|
|
New Curriculum :
|
|
|
|
<select v-model="changecurrdata.newcursus" @change="getActualCurr(changecurrdata.newcursus);">
|
|
|
|
<option v-for="item in getCurriculumsNextYear()" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2024-03-16 17:01:26 +01:00
|
|
|
<div>
|
2024-04-17 21:42:33 +02:00
|
|
|
<button @click=" windowState = 0;postChangeCurrReq(changecurrdata);changecurrdata.actualcursus=null;changecurrdata.newcursus=null">{{i18n("courses.confirm")}}</button>
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click="windowState = 0; resetInputs(personnalInfos,patternInfos);" style="float:right;">{{i18n("courses.back")}}</button>
|
2024-03-16 17:01:26 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-else-if="windowState === 3" class="infosContainer">
|
2024-03-16 17:01:26 +01:00
|
|
|
<div>
|
|
|
|
E-mail:
|
2024-04-17 08:53:28 +02:00
|
|
|
<input type="email" v-model="toModify.email" />
|
2024-03-16 17:01:26 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
2024-03-16 19:54:42 +01:00
|
|
|
ID :
|
|
|
|
<input type="text" v-model="toModify.id">
|
2024-03-16 17:01:26 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{{i18n("login.password")}}:
|
|
|
|
<input type="password" v-model="toModify.password">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{{i18n("login.cPassword")}}:
|
|
|
|
<input type="password" id="confirm">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<button @click=" windowState=0;">{{i18n("courses.confirm")}}</button>
|
|
|
|
<button @click=" windowState=0; resetInputs(personnalInfos,patternInfos);" style="float:right;">{{i18n("courses.back")}}</button>
|
2024-03-16 17:01:26 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-09 22:48:33 +01:00
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-if="windowState === 0" class="moreInfos">
|
2024-04-10 14:40:41 +02:00
|
|
|
<div class = "oldcursus">
|
2024-04-06 16:12:11 +02:00
|
|
|
<div class="listTitle">
|
|
|
|
Anciens Cursus
|
|
|
|
</div>
|
|
|
|
<div class="listElement">
|
|
|
|
<div class=" containerElement" v-for="item in UserCurriculum.curriculumList">
|
2024-04-17 11:55:56 +02:00
|
|
|
<div class="year" v-if="item.actual === false">Bac {{item.year}}</div>
|
|
|
|
<div class="option" v-if="item.actual === false">{{item.option}}</div>
|
|
|
|
<div class="dateyear" v-if="item.actual === false">Année {{item.dateyear}}-{{item.dateyear+1}}</div>
|
2024-04-06 16:12:11 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-10 16:01:47 +01:00
|
|
|
</div>
|
2024-04-06 16:12:11 +02:00
|
|
|
<div class="actualcursus">
|
|
|
|
<div class="listTitle">
|
|
|
|
Cursus Actuel
|
|
|
|
</div>
|
|
|
|
<div class="listElement">
|
|
|
|
<div class=" containerElement" v-for="item in UserCurriculum.curriculumList" >
|
2024-04-17 11:55:56 +02:00
|
|
|
<div class="year" v-if="item.actual === true">Bac {{item.year}}</div>
|
|
|
|
<div class="option" v-if="item.actual === true">{{item.option}}</div>
|
|
|
|
<div class="dateyear" v-if="item.actual === true">Année {{item.dateyear}}-{{item.dateyear+1}}</div>
|
2024-04-06 16:12:11 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-10 12:34:44 +01:00
|
|
|
</div>
|
2024-03-09 22:48:33 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-17 08:53:28 +02:00
|
|
|
<div v-if="windowState===4" style="width: 80%">
|
2024-04-06 16:12:11 +02:00
|
|
|
<CourseList :cursuslist="getActualCurriculumList()"/>
|
2024-04-17 08:53:28 +02:00
|
|
|
<button style="width: 10%; margin-top: 5%" @click="windowState = 0">Return to profile</button>
|
2024-04-06 16:12:11 +02:00
|
|
|
</div>
|
2024-03-09 22:48:33 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
.container{
|
2024-03-23 23:56:24 +01:00
|
|
|
min-width:675px;
|
2024-03-09 22:48:33 +01:00
|
|
|
display:grid;
|
2024-03-23 23:56:24 +01:00
|
|
|
grid-template-columns:10vw 50vw;
|
2024-03-09 22:48:33 +01:00
|
|
|
grid-template-rows:200px auto;
|
2024-03-23 23:56:24 +01:00
|
|
|
column-gap:2.7%;
|
2024-03-15 20:23:33 +01:00
|
|
|
row-gap:45px;
|
2024-03-09 22:48:33 +01:00
|
|
|
grid-template-areas:
|
|
|
|
"profilPic globalInfos"
|
|
|
|
"minfos minfos";
|
|
|
|
}
|
|
|
|
|
|
|
|
.profilPic{
|
2024-03-23 23:56:24 +01:00
|
|
|
width:100%;
|
2024-03-09 22:48:33 +01:00
|
|
|
grid-area:profilPic;
|
|
|
|
}
|
|
|
|
|
|
|
|
.globalInfos {
|
|
|
|
grid-area:globalInfos;
|
|
|
|
align-self :center;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.subContainter{
|
|
|
|
width:100%;
|
|
|
|
background-color:rgb(50,50,50);
|
|
|
|
border-radius:20px;
|
|
|
|
border:4px solid black;
|
|
|
|
}
|
|
|
|
|
|
|
|
.moreInfos {
|
2024-04-06 16:12:11 +02:00
|
|
|
margin-top: 50%;
|
|
|
|
display:grid;
|
|
|
|
grid-template-rows:200px auto;
|
|
|
|
column-gap:50px;
|
|
|
|
row-gap:45px;
|
|
|
|
grid-template-areas:
|
|
|
|
"minfos minfos";
|
|
|
|
grid-template-columns:600px 600px;
|
|
|
|
align-items:center;
|
|
|
|
justify-content:center;
|
|
|
|
margin-left: 320%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.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;
|
2024-03-09 22:48:33 +01:00
|
|
|
}
|
|
|
|
.body {
|
2024-03-23 23:56:24 +01:00
|
|
|
min-width:960px;
|
2024-03-09 22:48:33 +01:00
|
|
|
width:100%;
|
2024-03-23 23:56:24 +01:00
|
|
|
display:flex;
|
|
|
|
align-items:center;
|
|
|
|
justify-content:center;
|
2024-04-14 18:29:23 +02:00
|
|
|
margin-top:7%;
|
2024-03-09 22:48:33 +01:00
|
|
|
}
|
2024-04-06 16:12:11 +02:00
|
|
|
.containerElement{
|
2024-03-10 16:01:47 +01:00
|
|
|
justify-content:center;
|
2024-04-06 16:12:11 +02:00
|
|
|
display:grid;
|
|
|
|
grid-template-columns:100px 100px 300px;
|
|
|
|
grid-template-areas:
|
|
|
|
"year option dateyear";
|
|
|
|
column-gap:40px;
|
|
|
|
padding-left: 25px;
|
2024-03-10 16:01:47 +01:00
|
|
|
|
|
|
|
}
|
2024-04-06 16:12:11 +02:00
|
|
|
|
2024-03-09 22:48:33 +01:00
|
|
|
|
2024-03-10 16:01:47 +01:00
|
|
|
.listElement{
|
|
|
|
border:2px solid black;
|
|
|
|
font-size:25px;
|
|
|
|
color:white;
|
|
|
|
padding:20px;
|
|
|
|
background-color:rgb(50,50,50);
|
|
|
|
border-radius:20px;
|
|
|
|
margin-bottom:10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.infosContainer {
|
2024-03-23 23:56:24 +01:00
|
|
|
min-width:350px;
|
2024-03-10 16:01:47 +01:00
|
|
|
padding-bottom:50px;
|
|
|
|
border:2px solid black;
|
|
|
|
font-size:25px;
|
|
|
|
color:white;
|
|
|
|
padding:20px;
|
|
|
|
background-color:rgb(50,50,50);
|
|
|
|
border-radius:20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
button{
|
|
|
|
border:none;
|
|
|
|
background-color:rgb(239, 60, 168);
|
|
|
|
border-radius:10px;
|
|
|
|
height:35px;
|
|
|
|
margin-top:10px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
button:hover{
|
|
|
|
opacity:0.8;
|
|
|
|
}
|
2024-03-09 22:48:33 +01:00
|
|
|
</style>
|