1
0
forked from PGL/Clyde

Huge commit

- Rework the inscription requests system so that it considers the equivalence systems and the impact of the teacher in the inscription procedure.
This commit is contained in:
2024-04-11 16:45:48 +02:00
parent 34c0a2bfe8
commit 4199663d64
18 changed files with 253 additions and 192 deletions

View File

@ -16,9 +16,7 @@
async function upPage(id,review){
await validateRegister(id,review);
if (review == "Accepted"){
}
requests.value = await getAllRegisters();
}
@ -40,7 +38,7 @@
<template>
<div v-if="windowsState === 1">
<AboutRequest :target="targetId"></AboutRequest>
<button style="background-color:rgb(105,05,105);margin-left: 30%" @click="windowsState=0;">Retour</button>
<button style="background-color:rgb(105,05,105);margin-left: 30%; margin-top: 5%" @click="windowsState=0;loadRequests()">Retour</button>
</div>
<div v-if="windowsState === 0">
<div style="margin-top: 2%;margin-left: 2%">
@ -61,15 +59,16 @@
</span>
</div>
<div style='display:flex; justify-content:center; min-width:1140px;' v-for="item of requests">
<div class="bodu" v-if="filterType == 'None' || filterType == item.state">
<div class="container" style="grid-template-columns:15% 15% 10% 14.2% 14.2% 14.2% 14.2%;grid-template-areas:'date state surname firstname accept refuse infos';" v-if="requestType === 'inscription'">
<div class="bodu" style="width: 95%" v-if="filterType == 'None' || filterType == item.state">
<div class="container" style="grid-template-columns:11% 15% 20% 10% 10% 9% 9%;grid-template-areas:'date state equivalencestate surname firstname accept refuse infos';" v-if="requestType === 'inscription'">
<!--
The condition below avoids an error occuring because loadRequests() finishes after the vue refresh
then submissionDate is undefined an it triggers an error in the console despite the fact that it is working
properly at the end.
-->
<div class="date" v-if="item.submissionDate !== undefined">{{item.submissionDate.slice(0, 10)}}</div>
<div class="state">{{item.state}}</div>
<div class="state" style="font-size: 80%">Approval : {{item.state}}</div>
<div class="equivalencestate" style="font-size: 80%">Teacher approval : {{item.equivalenceState}}</div>
<div class="surname">{{item.lastName}}</div>
<div class="firstname">{{item.firstName}}</div>
<div class="accept" v-if="item.state === 'Pending'"><button @click="windowsState=2;targetId=item.id;" style="background-color:rgb(0,105,50);">{{i18n("request.accept")}}</button></div>
@ -110,6 +109,10 @@
column-gap:10px;
}
.equivalencestate{
grid-area: equivalencestate;
align-self: center;
}
.studentfirstname{
grid-area: studentfirstname;
align-self: center;