Add the gestion of scholarshipRequest (accept and refuse and select the amount)

This commit is contained in:
2024-04-15 16:17:27 +02:00
parent 05bff0fa77
commit a89d1b192c
8 changed files with 165 additions and 28 deletions

View File

@ -4,6 +4,7 @@
import {validateRegister, getAllRegisters } from '@/rest/ServiceInscription.js'
import AboutRequest from "@/Apps/Inscription/AboutRequest.vue";
import {getAllExemptionsRequest, getAllScholarShipsRequest} from "@/rest/requests.js";
import AboutScholarship from "@/Apps/Inscription/AboutScholarship.vue";
const requests = ref(await getAllRegisters());
let targetId = "";
@ -11,7 +12,7 @@
const requestType = ref("inscription");
const filterType = ref("None");
//0 = liste, 1 = détails, 2 = sure?
//0 = liste, 1 = détails, 2 = sure?, 3 = manage scholarship
let windowsState = ref(0);
async function upPage(id,review){
@ -79,7 +80,7 @@
<div class="studentfirstname">{{item.user.firstName}}</div>
<div class="studentlastname">{{item.user.lastName}}</div>
<div class="reqState">{{item.state}}</div>
<div class="infos"><button>More infos</button></div>
<div class="infos" @click="windowsState = 3; targetId=item.id;"><button>More infos</button></div>
</div>
<div class="container" style="grid-template-columns:17% 15% 12% 15% 25%;grid-template-areas:'date reqState studentfirstname studentlastname course infos';"v-if="requestType === 'exemption'">
<div class="date" v-if="item.date != undefined">{{item.date.slice(0,10)}}</div>
@ -97,6 +98,12 @@
<button style="background-color:rgb(105,05,105);" @click="upPage(targetId,'Accepted');windowsState=0;">Valider</button>
<button style="background-color:rgb(105,05,105);" @click="windowsState=0;">Retour</button>
</div>
<div v-if="windowsState == 3">
<AboutScholarship :req-id="targetId"></AboutScholarship>
<div>
<button style="margin-left: 30%" @click="loadRequests();windowsState=0">Back</button>
</div>
</div>
</template>
<style scoped>