Compare commits
No commits in common. "59b82abf71202710ca65f547bb2b21b67afa383d" and "47eb98da5734f8e697d519c0d809dfd634fb4d9e" have entirely different histories.
59b82abf71
...
47eb98da57
@ -42,7 +42,6 @@ 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;
|
||||||
@ -79,7 +78,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");
|
||||||
@ -231,9 +230,6 @@ 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@ 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
|
||||||
|
@ -50,7 +50,6 @@ 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
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
<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;
|
||||||
|
@ -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,7 +30,6 @@ 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -168,9 +168,11 @@
|
|||||||
</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="display:flex;">
|
<div v-if="editElementID !== item.title && editAddCourse !== item.title" style ="padding:15px 15px 15px 15px;">
|
||||||
<button @click="editElementID = item.title; editAddCourse = ''; setModify(item);">{{i18n("courses.modify")}}</button>
|
<button @click="editElementID = item.title; editAddCourse = ''; setModify(item); ">
|
||||||
<button v-if="self.role !== 'Teacher'"@click="editAddCourse = item.title; editElementID ='';setAddToCurriculum(item)">{{i18n("courses.AddToCurriculum")}}</button>
|
{{i18n("courses.modify")}}
|
||||||
|
</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>
|
||||||
|
@ -221,8 +221,6 @@ 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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,9 +27,6 @@ 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
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user