Add the display for unregister requests
Rename all ocurrences of uninscription to unregister Rework the uninscriptionRequest so we have an history and it doesn't take an user so better security
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
import {ref} from 'vue'
|
||||
import {validateRegister, getAllRegisters } from '@/rest/ServiceInscription.js'
|
||||
import AboutRequest from "@/Apps/Inscription/AboutRequest.vue";
|
||||
import {getAllExemptionsRequest, getAllScholarShipsRequest} from "@/rest/requests.js";
|
||||
import {getAllExemptionsRequest, getAllScholarShipsRequest, getAllUnregisters} from "@/rest/requests.js";
|
||||
import AboutScholarship from "@/Apps/Inscription/AboutScholarship.vue";
|
||||
|
||||
const requests = ref(await getAllRegisters());
|
||||
@ -22,14 +22,18 @@
|
||||
}
|
||||
|
||||
async function loadRequests(){
|
||||
if (requestType.value === "inscription"){
|
||||
requests.value = await getAllRegisters();
|
||||
}
|
||||
if (requestType.value === "scholarship"){
|
||||
requests.value = await getAllScholarShipsRequest();
|
||||
}
|
||||
if(requestType.value === "exemption"){
|
||||
requests.value = await getAllExemptionsRequest();
|
||||
switch (requestType.value){
|
||||
case "inscription":
|
||||
requests.value = await getAllRegisters();
|
||||
break;
|
||||
case "scholarship":
|
||||
requests.value = await getAllScholarShipsRequest();
|
||||
break;
|
||||
case "exemption":
|
||||
requests.value = await getAllExemptionsRequest();
|
||||
break;
|
||||
case "unregister":
|
||||
requests.value = await getAllUnregisters();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -47,6 +51,7 @@
|
||||
<option>inscription</option>
|
||||
<option>scholarship</option>
|
||||
<option>exemption</option>
|
||||
<option>unregister</option>
|
||||
</select>
|
||||
<span style="margin-left: 5%">
|
||||
Filter :
|
||||
@ -90,6 +95,14 @@
|
||||
<div class="reqState">{{item.state}}</div>
|
||||
<div class="infos"><button>More infos</button></div>
|
||||
</div>
|
||||
<div class="container" v-if="requestType === 'unregister'" style="grid-template-columns:17% 15% 12% 15%;grid-template-areas:'date reqState regno studentfirstname studentlastname infos';">
|
||||
<div class="date" v-if="item.date != undefined">{{item.date.slice(0,10)}}</div>
|
||||
<div class="studentfirstname">{{item.firstName}}</div>
|
||||
<div class="studentlastname">{{item.lastName}}</div>
|
||||
<div class="regno">id : {{item.regNo}}</div>
|
||||
<div class="reqState">{{item.state}}</div>
|
||||
<div class="infos"><button>More infos</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -158,6 +171,10 @@
|
||||
align-self:center;
|
||||
}
|
||||
|
||||
.regno{
|
||||
grid-area: regno;
|
||||
align-self: center;
|
||||
}
|
||||
.state{
|
||||
grid-area:state;
|
||||
margin-left:40px;
|
||||
|
@ -21,7 +21,7 @@ export async function editEquivalenceState(id, newstate){
|
||||
}
|
||||
|
||||
export async function addUninscReq(userId, reason){
|
||||
return restPost("/uninscriptionreq", {"userId" : userId, "reason" : reason})
|
||||
return restPost("/unregister", {"userId" : userId, "reason" : reason})
|
||||
}
|
||||
|
||||
export async function editScholarshipReq(body){
|
||||
@ -30,4 +30,8 @@ export async function editScholarshipReq(body){
|
||||
|
||||
export async function getScholarshipReqById(id){
|
||||
return restGet("/scholarshipreq/"+id)
|
||||
}
|
||||
|
||||
export async function getAllUnregisters(){
|
||||
return restGet("/unregister")
|
||||
}
|
Reference in New Issue
Block a user