Fixing stuffs #183

Merged
LeoMoulin merged 2 commits from e into master 2024-04-22 18:50:33 +02:00
5 changed files with 12 additions and 12 deletions
Showing only changes of commit 5516f75346 - Show all commits

View File

@ -13,10 +13,7 @@ import ovh.herisson.Clyde.Services.AuthenticatorService;
import ovh.herisson.Clyde.Services.TokenService; import ovh.herisson.Clyde.Services.TokenService;
import ovh.herisson.Clyde.Services.UserService; import ovh.herisson.Clyde.Services.UserService;
import ovh.herisson.Clyde.Tables.*; import ovh.herisson.Clyde.Tables.*;
import ovh.herisson.Clyde.Tables.Inscription.ExemptionsRequest; import ovh.herisson.Clyde.Tables.Inscription.*;
import ovh.herisson.Clyde.Tables.Inscription.Minerval;
import ovh.herisson.Clyde.Tables.Inscription.ScholarshipRequest;
import ovh.herisson.Clyde.Tables.Inscription.UnregisterRequest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
@ -328,7 +325,7 @@ public class RequestsController {
return new ResponseEntity<>(HttpStatus.OK); return new ResponseEntity<>(HttpStatus.OK);
} }
toEdit.setState(newteacherstate); toEdit.setTeacherApprovalState(newteacherstate);
changeCurriculumRequestRepository.save(toEdit); changeCurriculumRequestRepository.save(toEdit);
if (newteacherstate == RequestState.Accepted && toEdit.getState() == RequestState.Accepted){ if (newteacherstate == RequestState.Accepted && toEdit.getState() == RequestState.Accepted){

View File

@ -1,7 +1,7 @@
package ovh.herisson.Clyde.Repositories.Inscription; package ovh.herisson.Clyde.Repositories.Inscription;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
import ovh.herisson.Clyde.Tables.ChangeCurriculumRequest; import ovh.herisson.Clyde.Tables.Inscription.ChangeCurriculumRequest;
public interface ChangeCurriculumRequestRepository extends CrudRepository<ChangeCurriculumRequest, Long> { public interface ChangeCurriculumRequestRepository extends CrudRepository<ChangeCurriculumRequest, Long> {
ChangeCurriculumRequest findById(long id); ChangeCurriculumRequest findById(long id);

View File

@ -1,6 +1,9 @@
package ovh.herisson.Clyde.Tables; package ovh.herisson.Clyde.Tables.Inscription;
import jakarta.persistence.*; import jakarta.persistence.*;
import ovh.herisson.Clyde.Tables.Curriculum;
import ovh.herisson.Clyde.Tables.RequestState;
import ovh.herisson.Clyde.Tables.User;
import java.util.Date; import java.util.Date;

View File

@ -51,12 +51,12 @@ async function editChangeCurrReqTeacherApproval(state){
<div> <div>
<button @click="localwindowstate++"> {{ i18n("seeprofile") }} </button> <button @click="localwindowstate++"> {{ i18n("seeprofile") }} </button>
</div> </div>
<div> <div v-if="user.role === 'InscriptionService' || user.role==='Admin'">
<button v-if="req.state === 'Pending'" @click="req.state='Accepted';uploadandrefreshChangeRequest('Accepted')">{{ i18n("request.accept") }}</button> <button v-if="req.state === 'Pending'" @click="req.state='Accepted';uploadandrefreshChangeRequest('Accepted')">{{ i18n("request.accept") }}</button>
<button v-if="req.state === 'Pending'" @click="req.state='Refused';uploadandrefreshChangeRequest('Refused')" style="margin-left: 2%;">{{i18n("request.refuse")}}</button> <button v-if="req.state === 'Pending'" @click="req.state='Refused';uploadandrefreshChangeRequest('Refused')" style="margin-left: 2%;">{{i18n("request.refuse")}}</button>
</div> </div>
<div v-if="user.role === 'Teacher' || user.role === 'Admin'"> <div v-if="user.role === 'Teacher' || user.role === 'Admin'">
<button v-if="req.teacherApprovalState === 'Pending'" @click="req.teacherApprovalState='Accepted';editChangeCurrReqTeacherApproval('Accepted')">{{i18n("acceptequiv")}}</button> <button v-if="req.teacherApprovalState === 'Pending'" @click="req.teacherApprovalState='Accepted';editChangeCurrReqTeacherApproval('Accepted')" style="margin-right: 2%">{{i18n("acceptequiv")}}</button>
<button v-if="req.teacherApprovalState === 'Pending'" @click="req.teacherApprovalState='Refused';editChangeCurrReqTeacherApproval('Refused')">{{i18n("refuseequiv")}}</button> <button v-if="req.teacherApprovalState === 'Pending'" @click="req.teacherApprovalState='Refused';editChangeCurrReqTeacherApproval('Refused')">{{i18n("refuseequiv")}}</button>
</div> </div>
</div> </div>

View File

@ -343,19 +343,19 @@
<select v-model="changecurrdata.actualcursus" style="margin-right: 3%"> <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> <option v-for="item in getActualCurriculumList()" style="font-size:20px;" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option>
</select> </select>
{{ i18n("newcurr") }} : {{ i18n("newcursus") }} :
<select v-model="changecurrdata.newcursus"> <select v-model="changecurrdata.newcursus">
<option v-for="item in curricula" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option> <option v-for="item in curricula" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option>
</select> </select>
</div> </div>
<div style="height:40px;" v-if="reRegState === 2"> <div style="height:40px;" v-if="reRegState === 2">
{{ i18n("newcurr") }} : {{ i18n("newcursus") }} :
<select v-model="changecurrdata.newcursus"> <select v-model="changecurrdata.newcursus">
<option v-for="item in curricula" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option> <option v-for="item in curricula" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option>
</select> </select>
</div> </div>
<div style="height:40px;" v-if="reRegState === 1"> <div style="height:40px;" v-if="reRegState === 1">
{{ i18n("newcurr") }} : {{ i18n("newcursus") }} :
<select v-model="changecurrdata.newcursus" @change="getActualCurr(changecurrdata.newcursus);"> <select v-model="changecurrdata.newcursus" @change="getActualCurr(changecurrdata.newcursus);">
<option v-for="item in getCurriculumsNextYear()" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option> <option v-for="item in getCurriculumsNextYear()" :value="item.curriculumId">Bac {{item.year}} {{item.option}}</option>
</select> </select>