Add the exemptions gestion and improve the navigation between requests
This commit is contained in:
@ -17,10 +17,12 @@ const req = ref(await getChangeCurrReqById(props.reqId))
|
||||
|
||||
const user = await getSelf()
|
||||
//0 liste, 1 profil
|
||||
const windowstate = ref(0);
|
||||
const localwindowstate = ref(0);
|
||||
|
||||
const tag = req.value.user.regNo
|
||||
|
||||
const windowState = defineModel("windowState")
|
||||
|
||||
async function uploadandrefreshChangeRequest(state){
|
||||
await editChangeCurrReq(req.value.id, state);
|
||||
}
|
||||
@ -32,7 +34,7 @@ async function editChangeCurrReqTeacherApproval(state){
|
||||
|
||||
|
||||
<template>
|
||||
<div class="body" v-if="windowstate === 0">
|
||||
<div class="body" v-if="localwindowstate === 0">
|
||||
<div class="container">
|
||||
<div class="globalInfos">
|
||||
<div class="infosContainer">
|
||||
@ -50,7 +52,7 @@ async function editChangeCurrReqTeacherApproval(state){
|
||||
Wanted cursus : Bac {{req.destinationCurriculum.year}} {{req.destinationCurriculum.option}}
|
||||
</div>
|
||||
<div>
|
||||
<button @click="windowstate++"> See profile </button>
|
||||
<button @click="localwindowstate++"> See profile </button>
|
||||
</div>
|
||||
<div>
|
||||
<button v-if="req.state === 'Pending'" @click="req.state='Accepted';uploadandrefreshChangeRequest('Accepted')">Accept</button>
|
||||
@ -64,9 +66,12 @@ async function editChangeCurrReqTeacherApproval(state){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="windowstate === 1">
|
||||
<div v-if="localwindowstate === 0">
|
||||
<button @click="windowState = 0" style="margin-left: 10%">Back</button>
|
||||
</div>
|
||||
<div v-if="localwindowstate === 1">
|
||||
<AboutStudent :target="tag"></AboutStudent>
|
||||
<button @click="windowstate--;">Return to request</button>
|
||||
<button @click="localwindowstate--;">Back</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Reference in New Issue
Block a user