diff --git a/frontend/src/Apps/Login.vue b/frontend/src/Apps/Login.vue index a5043e8..73b4f81 100644 --- a/frontend/src/Apps/Login.vue +++ b/frontend/src/Apps/Login.vue @@ -16,7 +16,7 @@ const email=ref("") const address=ref("") const country=ref("") - const cursus=ref("") + const curriculum=ref("") const imageSaved = ref(false) const ppData = ref(false) @@ -49,7 +49,7 @@
-
+

{{i18n("login.guest.welcome")}}

@@ -103,7 +103,7 @@

{{i18n("curriculum").toUpperCase()}}

- diff --git a/frontend/src/Apps/ManageCourses.vue b/frontend/src/Apps/ManageCourses.vue index 5827e52..0a3fe27 100644 --- a/frontend/src/Apps/ManageCourses.vue +++ b/frontend/src/Apps/ManageCourses.vue @@ -1,7 +1,7 @@ @@ -130,7 +130,7 @@ const cursus=[
{{i18n("courses.toDelete")}} :
@@ -147,7 +147,7 @@ const cursus=[
-
+
+ v-for="item in user.curriculum">
{{item.name}}
{{item.teacher}}
diff --git a/frontend/src/Apps/Request.vue b/frontend/src/Apps/Request.vue index 4d63464..3e0eec4 100644 --- a/frontend/src/Apps/Request.vue +++ b/frontend/src/Apps/Request.vue @@ -8,7 +8,7 @@ address: String, country: String, birthDate: String, - cursus:String, + curriculum:String, degree:String,}); diff --git a/frontend/src/rest/ServiceInscription.js b/frontend/src/rest/ServiceInscription.js index 5068217..1f75123 100644 --- a/frontend/src/rest/ServiceInscription.js +++ b/frontend/src/rest/ServiceInscription.js @@ -24,7 +24,7 @@ export async function createRegister(){ * - country * - birthdate * - email - * - cursus + * - curriculum * - degree */ export async function getRegisters(id){ diff --git a/frontend/src/rest/Users.js b/frontend/src/rest/Users.js index b786f0d..17420b5 100644 --- a/frontend/src/rest/Users.js +++ b/frontend/src/rest/Users.js @@ -14,10 +14,10 @@ export async function login(user, pass, exp){ * @param mail * @param address * @param country - * @param cursus + * @param curriculum * @param imageId id of the image in database returned when uploaded */ -export async function register(firstname, lastname, birthDate, password, email, address, country, cursus, imageId){ +export async function register(firstname, lastname, birthDate, password, email, address, country, curriculum, imageId){ return restPost("/register", { firstname: firstname, lastname: lastname, @@ -26,7 +26,7 @@ export async function register(firstname, lastname, birthDate, password, email, email: email, address: address, country: country, - cursus: cursus + curriculum: curriculum }); } diff --git a/frontend/src/rest/curriculum.js b/frontend/src/rest/curriculum.js new file mode 100644 index 0000000..4aa6d8f --- /dev/null +++ b/frontend/src/rest/curriculum.js @@ -0,0 +1,41 @@ +/** + * curriculum API + */ + +import { restGet, restPostn, restDelete, restPatch } from './restConsumer.js' + +/** + * Create a new curriculum (bundle of courses) + * @param courses list of courses + */ +export async function createcurriculum(courses){ + return restPost("/curriculum", {courses: courses} ); +} + +/** + * Delete the specified curriculum + */ +export async function deletecurriculum(id){ + return restDelete("/curriculum/" + id); +} + +/** + * Get informations on a particular curriculum + * + * @param id identification of the curriculum + * + * @return list of courses + */ +export async function getcurriculum(id){ + return restGet("/curriculum/" + id); +} + +/** + * Modify the courses of a curriculum + * + * @param id the id of the curriculum + * @param courses list of new courses + */ +export async function altercurriculum(id, courses){ + return restPatch("/curriculum/" + id, courses); +} diff --git a/frontend/src/rest/cursus.js b/frontend/src/rest/cursus.js deleted file mode 100644 index 5aad5be..0000000 --- a/frontend/src/rest/cursus.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * cursus API - */ - -import { restGet, restPostn, restDelete, restPatch } from './restConsumer.js' - -/** - * Create a new cursus (bundle of courses) - * @param courses list of courses - */ -export async function createCursus(courses){ - return restPost("/cursus", {courses: courses} ); -} - -/** - * Delete the specified cursus - */ -export async function deleteCursus(id){ - return restDelete("/cursus/" + id); -} - -/** - * Get informations on a particular cursus - * - * @param id identification of the cursus - * - * @return list of courses - */ -export async function getCursus(id){ - return restGet("/cursus/" + id); -} - -/** - * Modify the courses of a cursus - * - * @param id the id of the cursus - * @param courses list of new courses - */ -export async function alterCursus(id, courses){ - return restPatch("/cursus/" + id, courses); -}