Request and changes
This commit is contained in:
@ -14,7 +14,6 @@ import i18n from '@/i18n.js'
|
||||
const allSchedules = ref(await getAllSchedule());
|
||||
const filter = ref("null");
|
||||
const subFilter = ref("null");
|
||||
const lesson = ref();
|
||||
const filters = ["Type","Teacher","Course"];
|
||||
const types = ["TP","TD","Course","Exam"];
|
||||
const locals = ["A0B1","A1B1","A2B1","A0B2"]
|
||||
@ -29,9 +28,6 @@ const currentDate = new Date();
|
||||
|
||||
const editElementID = ref()
|
||||
|
||||
function editItem(id){
|
||||
editElementID.value = id;
|
||||
}
|
||||
|
||||
function invertedFormatDate(date) {
|
||||
var d = new Date(date),
|
||||
@ -94,8 +90,8 @@ const toModify = ref(Object.assign({}, pattern));
|
||||
toModify.value.day = invertedFormatDate(new Date(lesson.lessonStart));
|
||||
toModify.value.lessonStart = getHoursMinutes(lesson.lessonStart);
|
||||
toModify.value.lessonEnd = getHoursMinutes(lesson.lessonEnd);
|
||||
toModify.value.local = lesson.local
|
||||
toModify.value.lessonType = lesson.lessonType
|
||||
toModify.value.local = lesson.local;
|
||||
toModify.value.lessonType = lesson.lessonType;
|
||||
}
|
||||
|
||||
function inFuture(lesson){
|
||||
@ -171,15 +167,7 @@ async function setCourses(){
|
||||
subFilter.value = "null"
|
||||
}
|
||||
|
||||
function findCreatedLesson(){
|
||||
for(let element in lessonFinder.value){
|
||||
if((lessonFinder.value[element].course.courseId ==lessonBuffer.value.course.courseId) && (lessonFinder.value[element].local == lessonBuffer.value.local) ){
|
||||
return lessonFinder.value[element];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
async function newLesson(){
|
||||
let isnull = false;
|
||||
if (lessonBuffer.value.lessonType != null){
|
||||
@ -205,12 +193,8 @@ async function setCourses(){
|
||||
await createLesson(lessonCreatorBuffer.value);
|
||||
|
||||
lessonFinder.value = await getLessons();
|
||||
lesson.value = findCreatedLesson();
|
||||
|
||||
trueSchedule.value = await getCurriculumSchedule(curriculum.value.curriculumId)
|
||||
await addLessonToSchedule(trueSchedule.value.scheduleId,lesson.value.lessonID)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
lessonBuffer.value = Object.assign({}, pattern);
|
||||
lessonFinder.value = null;
|
||||
@ -410,18 +394,6 @@ async function patchLesson(lesson){
|
||||
margin-top:3.5%;
|
||||
}
|
||||
|
||||
.infosContainer {
|
||||
min-width:350px;
|
||||
width:70%;
|
||||
padding-bottom:50px;
|
||||
border:2px solid black;
|
||||
font-size:25px;
|
||||
color:white;
|
||||
padding:20px;
|
||||
background-color:rgb(50,50,50);
|
||||
border-radius:20px;
|
||||
}
|
||||
|
||||
.listElement{
|
||||
min-width:625px;
|
||||
border:2px solid black;
|
||||
@ -434,15 +406,6 @@ async function patchLesson(lesson){
|
||||
|
||||
}
|
||||
|
||||
.modify{
|
||||
font-size:25px;
|
||||
padding:10px 10px 10px 10px;
|
||||
background-color: rgb(239,60,168);
|
||||
cursor: pointer;
|
||||
border:none;
|
||||
border-radius:15px;
|
||||
}
|
||||
|
||||
input, select{
|
||||
padding:10px 10px 10px 10px;
|
||||
font-size:25px;
|
||||
|
Reference in New Issue
Block a user