Request and changes
This commit is contained in:
23
frontend/src/rest/LessonRequests.js
Normal file
23
frontend/src/rest/LessonRequests.js
Normal file
@ -0,0 +1,23 @@
|
||||
import { restGet, restPost, restDelete, restPatch } from './restConsumer.js'
|
||||
|
||||
export async function getLessonRequest(id){
|
||||
return restGet('/requests/lessonRequest/' + id);
|
||||
}
|
||||
|
||||
export async function getAllRequests(){
|
||||
return restGet("/requests/lessonRequests");
|
||||
}
|
||||
export async function getOwnedRequests(){
|
||||
return restGet("/requests/lessonRequests/owned");
|
||||
}
|
||||
export async function createRequest(request){
|
||||
return restPost("/requests/lessonRequest", request);
|
||||
}
|
||||
|
||||
export async function changeRequestState(id, infos){
|
||||
return restPatch("/requests/lessonRequest/" + id, infos);
|
||||
}
|
||||
|
||||
export async function deleteRequest(id){
|
||||
return restDelete("/requests/lessonRequest/"+id);
|
||||
}
|
@ -11,6 +11,8 @@ import Users from "@/Apps/UsersList.vue"
|
||||
import Students from "@/Apps/StudentsList.vue"
|
||||
import Schedule from "@/Apps/Schedule.vue"
|
||||
import ManageSchedule from "@/Apps/ManageSchedule.vue"
|
||||
import ManageOwnedLessons from "@/Apps/ManageOwnLessons.vue";
|
||||
import LessonRequests from "@/Apps/LessonRequests.vue";
|
||||
|
||||
const apps = {
|
||||
'/schedule': Schedule,
|
||||
@ -21,6 +23,8 @@ const apps = {
|
||||
'/manage-courses' : Courses,
|
||||
'/users-list' : Users,
|
||||
'/students-list' : Students,
|
||||
'/manage-owned-lessons': ManageOwnedLessons,
|
||||
'/manage-schedule-requests' : LessonRequests,
|
||||
}
|
||||
|
||||
const appsList = {
|
||||
@ -33,6 +37,8 @@ const appsList = {
|
||||
'ManageCourses': { path: '#/manage-courses', icon: 'fa-book', text: i18n("app.manage.courses") },
|
||||
'StudentsList':{ path: '#/students-list',icon: 'fa-users',text: i18n("app.studentList")},
|
||||
'UsersList':{ path: '#/users-list',icon: 'fa-users',text: i18n("app.users")},
|
||||
'ManageOwnedLessons':{path: '#/manage-owned-lessons',icon:'fa-calendar-days',text: i18n("app.manageOwnLessons")},
|
||||
'LessonRequests':{path: '#/manage-schedule-requests', icon:'fa-book', text: i18n("app.lessonRequests")},
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user