Compare commits

..

7 Commits

Author SHA1 Message Date
59c82d7482 Merge branch 'master' into f
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m22s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 32s
2024-04-22 20:37:59 +02:00
672fcd099f Merge pull request 'Fixing stuffs' (#183) from e into master
Some checks failed
Build and test backend / Build-backend (push) Successful in 1m28s
deploy to production / deploy-frontend (push) Successful in 33s
deploy to production / deploy-backend (push) Failing after 43s
Build and test FrontEnd / Build-frontend (push) Successful in 31s
Reviewed-on: #183
2024-04-22 18:50:33 +02:00
3198a7ade0 Merge branch 'master' into e
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m24s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 32s
2024-04-22 18:27:51 +02:00
Wal
59b82abf71 Merge pull request 'Post mock when arrives on the app' (#182) from PostMockAndCorrections into master
All checks were successful
Build and test backend / Build-backend (push) Successful in 1m25s
deploy to production / deploy-frontend (push) Successful in 34s
deploy to production / deploy-backend (push) Successful in 57s
Build and test FrontEnd / Build-frontend (push) Successful in 31s
Reviewed-on: #182
2024-04-22 13:35:10 +02:00
cf0c465248 Merge remote-tracking branch 'origin/master' into PostMockAndCorrections
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m23s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 32s
2024-04-22 13:31:31 +02:00
2917d645fa post Mock and corrections 2024-04-22 13:29:59 +02:00
47eb98da57 Merge pull request 'Cleaning backend' (#181) from e into master
All checks were successful
Build and test backend / Build-backend (push) Successful in 1m22s
deploy to production / deploy-frontend (push) Successful in 33s
deploy to production / deploy-backend (push) Successful in 50s
Build and test FrontEnd / Build-frontend (push) Successful in 30s
Reviewed-on: #181
2024-04-22 13:08:35 +02:00
8 changed files with 21 additions and 12 deletions

View File

@ -42,6 +42,7 @@ public class MockController {
public final LessonRequestService lessonRequestService; public final LessonRequestService lessonRequestService;
ArrayList<User> mockUsers; ArrayList<User> mockUsers;
public static boolean isMocked = false;
public final ResearchesService researchesService; public final ResearchesService researchesService;
public final UserCurriculumRepository ucr; public final UserCurriculumRepository ucr;
public final MinervalRepository minervalRepository; public final MinervalRepository minervalRepository;
@ -78,7 +79,7 @@ public class MockController {
@PostMapping("/mock") @PostMapping("/mock")
public void postMock() { public void postMock() {
if(!isMocked){
// user part // user part
User herobrine = new User("brine","hero","admin@admin.com","behind","ShadowsLand",new Date(0), null,Role.Admin,"admin"); User herobrine = new User("brine","hero","admin@admin.com","behind","ShadowsLand",new Date(0), null,Role.Admin,"admin");
User joe = new User("Piplo","Joe","student@student.com","roundabout","England",new Date(0), null,Role.Student,"student"); User joe = new User("Piplo","Joe","student@student.com","roundabout","England",new Date(0), null,Role.Student,"student");
@ -230,6 +231,9 @@ public class MockController {
externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null, null); externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null, null);
externalCurriculumRepository.save(externalCurriculum); externalCurriculumRepository.save(externalCurriculum);
isMocked = true;
}
} }
} }

View File

@ -50,6 +50,7 @@ Delete=Delete
Modify=Modify Modify=Modify
Create=Créer Create=Créer
requestType=Request Type requestType=Request Type
lessonType=Course Type
day=Day day=Day
start=Start start=Start
end=End end=End

View File

@ -50,6 +50,7 @@ Delete=Supprimer
Modify=Modifier Modify=Modifier
Create=Créer Create=Créer
requestType=Type de Requête requestType=Type de Requête
lessonType=Type de cours
day=Jour day=Jour
start=Début start=Début
end=Fin end=Fin

View File

@ -1,14 +1,13 @@
<script setup> <script setup>
import { toast } from 'vue3-toastify';
import { ref } from 'vue' import { ref } from 'vue'
import i18n, { setLang } from './i18n.js' import i18n, { setLang } from './i18n.js'
import { isLogged, getSelf } from '@/rest/Users.js' import { isLogged, getSelf } from '@/rest/Users.js'
import { notifications, fetchNotifications, archiveNotification } from '@/rest/notifications.js' import { notifications, fetchNotifications, archiveNotification } from '@/rest/notifications.js'
import {postMock} from "@/rest/restConsumer.js";
import { appList, currentView } from '@/rest/apps.js' import { appList, currentView } from '@/rest/apps.js'
var prevURL; var prevURL;
var currentURL = window.location.hash; var currentURL = window.location.hash;
postMock()
window.onhashchange = function() { window.onhashchange = function() {
prevURL = currentURL; prevURL = currentURL;
currentURL = window.location.hash; currentURL = window.location.hash;

View File

@ -18,7 +18,7 @@ const AcceptMod = ref(false);
const moreInfosMod = ref(false); const moreInfosMod = ref(false);
const requestTypes = ["Create", "Modify", "Delete"] const requestTypes = ["Create", "Modify", "Delete"]
const editElementID = ref(''); const editElementID = ref('');
const chosenLocal = ref(""); const chosenLocal = ref();
const locals = ["A0B1","A1B1","A2B1","A0B2"]; const locals = ["A0B1","A1B1","A2B1","A0B2"];
const moreInfos = ref({}); const moreInfos = ref({});
@ -30,6 +30,7 @@ const moreInfos = ref({});
async function upPage(id,review){ async function upPage(id,review){
await changeRequestState(id, review) ; await changeRequestState(id, review) ;
requests.value = await getAllRequests(); requests.value = await getAllRequests();
chosenLocal.value = null;
} }
/* /*

View File

@ -168,11 +168,9 @@
</div> </div>
<div v-if="!createMod && !deleteMod" v-for="item in curriculum" :key="item.title" style="width:50%;margin-left:auto; margin-right:auto;"> <div v-if="!createMod && !deleteMod" v-for="item in curriculum" :key="item.title" style="width:50%;margin-left:auto; margin-right:auto;">
<div v-if="editElementID !== item.title && editAddCourse !== item.title" style ="padding:15px 15px 15px 15px;"> <div v-if="editElementID !== item.title && editAddCourse !== item.title" style="display:flex;">
<button @click="editElementID = item.title; editAddCourse = ''; setModify(item); "> <button @click="editElementID = item.title; editAddCourse = ''; setModify(item);">{{i18n("courses.modify")}}</button>
{{i18n("courses.modify")}} <button v-if="self.role !== 'Teacher'"@click="editAddCourse = item.title; editElementID ='';setAddToCurriculum(item)">{{i18n("courses.AddToCurriculum")}}</button>
</button>
<button v-if="self.role !== 'Teacher'"@click="editAddCourse = item.title; editElementID ='';setAddToCurriculum(item)">Add to a new Curriculum</button>
</div> </div>
<div v-if="editElementID == item.title"> <div v-if="editElementID == item.title">
<button @click="editElementID= '';patchCourse(item)"> {{i18n("courses.confirm")}} </button> <button @click="editElementID= '';patchCourse(item)"> {{i18n("courses.confirm")}} </button>

View File

@ -221,6 +221,8 @@ async function setCourses(){
lessonBuffer.value = Object.assign({}, pattern); lessonBuffer.value = Object.assign({}, pattern);
lessonFinder.value = null; lessonFinder.value = null;
lessonCreatorBuffer.value = Object.assign({},lessonCreator) lessonCreatorBuffer.value = Object.assign({},lessonCreator)
allSchedules.value = await getAllSchedule();
schedule.value = null;
trueSchedule.value = null; trueSchedule.value = null;
} }

View File

@ -27,6 +27,9 @@ export function restPatch(endPoint, data) {
return _rest(endPoint, {method: "PATCH", credentials: 'include', body: JSON.stringify(data)}); return _rest(endPoint, {method: "PATCH", credentials: 'include', body: JSON.stringify(data)});
} }
export function postMock(){
return restPost("/mock")
}
/** /**
* backbone for the request made by the frontend * backbone for the request made by the frontend
* *