diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 794631f..9b1bde6 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -27,7 +27,7 @@ dependencies { implementation("com.kohlschutter.junixsocket:junixsocket-core:2.9.0") // implementation("org.springframework.session:spring-session-jdbc") developmentOnly("org.springframework.boot:spring-boot-devtools") - developmentOnly("org.springframework.boot:spring-boot-docker-compose") + //developmentOnly("org.springframework.boot:spring-boot-docker-compose") runtimeOnly("org.postgresql:postgresql") testImplementation("org.springframework.boot:spring-boot-starter-test") testImplementation("org.springframework.boot:spring-boot-testcontainers") diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java.orig b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java.orig deleted file mode 100644 index b8d293f..0000000 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java.orig +++ /dev/null @@ -1,101 +0,0 @@ -package ovh.herisson.Clyde.EndPoints; - -import lombok.AllArgsConstructor; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RestController; -import ovh.herisson.Clyde.Services.AuthenticatorService; -import ovh.herisson.Clyde.Services.ScientificPublications.ResearchesService; -import ovh.herisson.Clyde.Tables.Applications; -import ovh.herisson.Clyde.Tables.Role; -import ovh.herisson.Clyde.Tables.User; - -import java.util.ArrayList; - -@RestController -@CrossOrigin(originPatterns = "*", allowCredentials = "true") -public class ApplicationsController { - - AuthenticatorService authServ; - - ResearchesService researchesServ; - - public ApplicationsController(AuthenticatorService authServ, ResearchesService researchesServ){ - this.researchesServ = researchesServ; - this.authServ = authServ; - } - - - /** return a list of authorized applications. - * depends on the token - */ - @GetMapping("/apps") - public ResponseEntity> getAuthorizedApps(@RequestHeader("Authorization") String token){ - return new ResponseEntity<>(getAuthorizedApplications(token), HttpStatus.OK); - } - - @GetMapping("/apps/{identifier}") - public ResponseEntity getAppAuthorization(@PathVariable Applications identifier, @RequestHeader("Authorization") String token){ - - if (getAuthorizedApplications(token).contains(identifier)){ - return new ResponseEntity<>(true, HttpStatus.OK); - } - return new ResponseEntity<>(false, HttpStatus.OK); - } - - public ArrayList getAuthorizedApplications(String token){ - ArrayList authorizedApps = new ArrayList<>(); - - //if unAuthed - authorizedApps.add(Applications.Login); -<<<<<<< HEAD - authorizedApps.add(Applications.ListResearches); -======= - authorizedApps.add(Applications.Schedule); ->>>>>>> origin/master - - User user = authServ.getUserFromToken(token); - if(user == null) - return authorizedApps; - // if authed - authorizedApps.add(Applications.Profile); - - if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Student,Role.Admin},token)) { - authorizedApps.add(Applications.Msg); - authorizedApps.add(Applications.Forum); - authorizedApps.add(Applications.Rdv); - } - - if(!authServ.isNotIn(new Role[]{Role.Teacher,Role.Admin},token)) - authorizedApps.add(Applications.ManageOwnedLessons); - //if Teacher or Secretary or Admin add ManageCourses App - if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Secretary,Role.Admin},token)) - authorizedApps.add(Applications.ManageCourses); - - if (!authServ.isNotIn(new Role[]{Role.InscriptionService,Role.Admin, Role.Teacher},token)){ - authorizedApps.add(Applications.Requests); - authorizedApps.add(Applications.StudentsList);} - -<<<<<<< HEAD - if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin},token)){ - authorizedApps.add(Applications.CreateUser); - authorizedApps.add(Applications.UsersList);} - - if (researchesServ.getResearcherByUser(user) != null) - authorizedApps.add(Applications.ManageResearcherProfile); -======= - if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin},token)){ - authorizedApps.add(Applications.UsersList); - authorizedApps.add(Applications.ManageSchedules); - authorizedApps.add(Applications.LessonRequests);} - - if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin, Role.InscriptionService},token)){ - authorizedApps.add(Applications.Payments);} ->>>>>>> origin/master - return authorizedApps; - } -} diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_BACKUP_12704.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_BACKUP_12704.java deleted file mode 100644 index b8d293f..0000000 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_BACKUP_12704.java +++ /dev/null @@ -1,101 +0,0 @@ -package ovh.herisson.Clyde.EndPoints; - -import lombok.AllArgsConstructor; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RestController; -import ovh.herisson.Clyde.Services.AuthenticatorService; -import ovh.herisson.Clyde.Services.ScientificPublications.ResearchesService; -import ovh.herisson.Clyde.Tables.Applications; -import ovh.herisson.Clyde.Tables.Role; -import ovh.herisson.Clyde.Tables.User; - -import java.util.ArrayList; - -@RestController -@CrossOrigin(originPatterns = "*", allowCredentials = "true") -public class ApplicationsController { - - AuthenticatorService authServ; - - ResearchesService researchesServ; - - public ApplicationsController(AuthenticatorService authServ, ResearchesService researchesServ){ - this.researchesServ = researchesServ; - this.authServ = authServ; - } - - - /** return a list of authorized applications. - * depends on the token - */ - @GetMapping("/apps") - public ResponseEntity> getAuthorizedApps(@RequestHeader("Authorization") String token){ - return new ResponseEntity<>(getAuthorizedApplications(token), HttpStatus.OK); - } - - @GetMapping("/apps/{identifier}") - public ResponseEntity getAppAuthorization(@PathVariable Applications identifier, @RequestHeader("Authorization") String token){ - - if (getAuthorizedApplications(token).contains(identifier)){ - return new ResponseEntity<>(true, HttpStatus.OK); - } - return new ResponseEntity<>(false, HttpStatus.OK); - } - - public ArrayList getAuthorizedApplications(String token){ - ArrayList authorizedApps = new ArrayList<>(); - - //if unAuthed - authorizedApps.add(Applications.Login); -<<<<<<< HEAD - authorizedApps.add(Applications.ListResearches); -======= - authorizedApps.add(Applications.Schedule); ->>>>>>> origin/master - - User user = authServ.getUserFromToken(token); - if(user == null) - return authorizedApps; - // if authed - authorizedApps.add(Applications.Profile); - - if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Student,Role.Admin},token)) { - authorizedApps.add(Applications.Msg); - authorizedApps.add(Applications.Forum); - authorizedApps.add(Applications.Rdv); - } - - if(!authServ.isNotIn(new Role[]{Role.Teacher,Role.Admin},token)) - authorizedApps.add(Applications.ManageOwnedLessons); - //if Teacher or Secretary or Admin add ManageCourses App - if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Secretary,Role.Admin},token)) - authorizedApps.add(Applications.ManageCourses); - - if (!authServ.isNotIn(new Role[]{Role.InscriptionService,Role.Admin, Role.Teacher},token)){ - authorizedApps.add(Applications.Requests); - authorizedApps.add(Applications.StudentsList);} - -<<<<<<< HEAD - if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin},token)){ - authorizedApps.add(Applications.CreateUser); - authorizedApps.add(Applications.UsersList);} - - if (researchesServ.getResearcherByUser(user) != null) - authorizedApps.add(Applications.ManageResearcherProfile); -======= - if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin},token)){ - authorizedApps.add(Applications.UsersList); - authorizedApps.add(Applications.ManageSchedules); - authorizedApps.add(Applications.LessonRequests);} - - if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin, Role.InscriptionService},token)){ - authorizedApps.add(Applications.Payments);} ->>>>>>> origin/master - return authorizedApps; - } -} diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_BASE_12704.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_BASE_12704.java deleted file mode 100644 index d4fdaa0..0000000 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_BASE_12704.java +++ /dev/null @@ -1,75 +0,0 @@ -package ovh.herisson.Clyde.EndPoints; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RestController; -import ovh.herisson.Clyde.Services.AuthenticatorService; -import ovh.herisson.Clyde.Tables.Applications; -import ovh.herisson.Clyde.Tables.Role; -import ovh.herisson.Clyde.Tables.User; - -import java.util.ArrayList; - -@RestController -@CrossOrigin(originPatterns = "*", allowCredentials = "true") -public class ApplicationsController { - - AuthenticatorService authServ; - - public ApplicationsController(AuthenticatorService authServ){ - this.authServ = authServ; - } - - - /** return a list of authorized applications. - * depends on the token - */ - @GetMapping("/apps") - public ResponseEntity> getAuthorizedApps(@RequestHeader("Authorization") String token){ - return new ResponseEntity<>(getAuthorizedApplications(token), HttpStatus.OK); - } - - @GetMapping("/apps/{identifier}") - public ResponseEntity getAppAuthorization(@PathVariable Applications identifier, @RequestHeader("Authorization") String token){ - - if (getAuthorizedApplications(token).contains(identifier)){ - return new ResponseEntity<>(true, HttpStatus.OK); - } - return new ResponseEntity<>(false, HttpStatus.OK); - } - - public ArrayList getAuthorizedApplications(String token){ - ArrayList authorizedApps = new ArrayList<>(); - - //if unAuthed - authorizedApps.add(Applications.Login); - - User user = authServ.getUserFromToken(token); - if(user == null) - return authorizedApps; - // if authed - authorizedApps.add(Applications.Profile); - - if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Student,Role.Admin},token)) { - authorizedApps.add(Applications.Msg); - authorizedApps.add(Applications.Forum); - authorizedApps.add(Applications.Rdv); - } - - //if Teacher or Secretary or Admin add ManageCourses App - if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Secretary,Role.Admin},token)) - authorizedApps.add(Applications.ManageCourses); - - if (!authServ.isNotIn(new Role[]{Role.InscriptionService,Role.Admin, Role.Teacher},token)){ - authorizedApps.add(Applications.Requests); - authorizedApps.add(Applications.StudentsList);} - - if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin},token)){ - authorizedApps.add(Applications.UsersList);} - return authorizedApps; - } -} diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_LOCAL_12704.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_LOCAL_12704.java deleted file mode 100644 index 36c485e..0000000 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_LOCAL_12704.java +++ /dev/null @@ -1,85 +0,0 @@ -package ovh.herisson.Clyde.EndPoints; - -import lombok.AllArgsConstructor; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RestController; -import ovh.herisson.Clyde.Services.AuthenticatorService; -import ovh.herisson.Clyde.Services.ScientificPublications.ResearchesService; -import ovh.herisson.Clyde.Tables.Applications; -import ovh.herisson.Clyde.Tables.Role; -import ovh.herisson.Clyde.Tables.User; - -import java.util.ArrayList; - -@RestController -@CrossOrigin(originPatterns = "*", allowCredentials = "true") -public class ApplicationsController { - - AuthenticatorService authServ; - - ResearchesService researchesServ; - - public ApplicationsController(AuthenticatorService authServ, ResearchesService researchesServ){ - this.researchesServ = researchesServ; - this.authServ = authServ; - } - - - /** return a list of authorized applications. - * depends on the token - */ - @GetMapping("/apps") - public ResponseEntity> getAuthorizedApps(@RequestHeader("Authorization") String token){ - return new ResponseEntity<>(getAuthorizedApplications(token), HttpStatus.OK); - } - - @GetMapping("/apps/{identifier}") - public ResponseEntity getAppAuthorization(@PathVariable Applications identifier, @RequestHeader("Authorization") String token){ - - if (getAuthorizedApplications(token).contains(identifier)){ - return new ResponseEntity<>(true, HttpStatus.OK); - } - return new ResponseEntity<>(false, HttpStatus.OK); - } - - public ArrayList getAuthorizedApplications(String token){ - ArrayList authorizedApps = new ArrayList<>(); - - //if unAuthed - authorizedApps.add(Applications.Login); - authorizedApps.add(Applications.ListResearches); - - User user = authServ.getUserFromToken(token); - if(user == null) - return authorizedApps; - // if authed - authorizedApps.add(Applications.Profile); - - if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Student,Role.Admin},token)) { - authorizedApps.add(Applications.Msg); - authorizedApps.add(Applications.Forum); - authorizedApps.add(Applications.Rdv); - } - - //if Teacher or Secretary or Admin add ManageCourses App - if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Secretary,Role.Admin},token)) - authorizedApps.add(Applications.ManageCourses); - - if (!authServ.isNotIn(new Role[]{Role.InscriptionService,Role.Admin, Role.Teacher},token)){ - authorizedApps.add(Applications.Requests); - authorizedApps.add(Applications.StudentsList);} - - if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin},token)){ - authorizedApps.add(Applications.CreateUser); - authorizedApps.add(Applications.UsersList);} - - if (researchesServ.getResearcherByUser(user) != null) - authorizedApps.add(Applications.ManageResearcherProfile); - return authorizedApps; - } -} diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_REMOTE_12704.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_REMOTE_12704.java deleted file mode 100644 index 74f76fa..0000000 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController_REMOTE_12704.java +++ /dev/null @@ -1,83 +0,0 @@ -package ovh.herisson.Clyde.EndPoints; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RestController; -import ovh.herisson.Clyde.Services.AuthenticatorService; -import ovh.herisson.Clyde.Tables.Applications; -import ovh.herisson.Clyde.Tables.Role; -import ovh.herisson.Clyde.Tables.User; - -import java.util.ArrayList; - -@RestController -@CrossOrigin(originPatterns = "*", allowCredentials = "true") -public class ApplicationsController { - - AuthenticatorService authServ; - - public ApplicationsController(AuthenticatorService authServ){ - this.authServ = authServ; - } - - - /** return a list of authorized applications. - * depends on the token - */ - @GetMapping("/apps") - public ResponseEntity> getAuthorizedApps(@RequestHeader("Authorization") String token){ - return new ResponseEntity<>(getAuthorizedApplications(token), HttpStatus.OK); - } - - @GetMapping("/apps/{identifier}") - public ResponseEntity getAppAuthorization(@PathVariable Applications identifier, @RequestHeader("Authorization") String token){ - - if (getAuthorizedApplications(token).contains(identifier)){ - return new ResponseEntity<>(true, HttpStatus.OK); - } - return new ResponseEntity<>(false, HttpStatus.OK); - } - - public ArrayList getAuthorizedApplications(String token){ - ArrayList authorizedApps = new ArrayList<>(); - - //if unAuthed - authorizedApps.add(Applications.Login); - authorizedApps.add(Applications.Schedule); - - User user = authServ.getUserFromToken(token); - if(user == null) - return authorizedApps; - // if authed - authorizedApps.add(Applications.Profile); - - if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Student,Role.Admin},token)) { - authorizedApps.add(Applications.Msg); - authorizedApps.add(Applications.Forum); - authorizedApps.add(Applications.Rdv); - } - - if(!authServ.isNotIn(new Role[]{Role.Teacher,Role.Admin},token)) - authorizedApps.add(Applications.ManageOwnedLessons); - //if Teacher or Secretary or Admin add ManageCourses App - if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Secretary,Role.Admin},token)) - authorizedApps.add(Applications.ManageCourses); - - if (!authServ.isNotIn(new Role[]{Role.InscriptionService,Role.Admin, Role.Teacher},token)){ - authorizedApps.add(Applications.Requests); - authorizedApps.add(Applications.StudentsList);} - - if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin},token)){ - authorizedApps.add(Applications.UsersList); - authorizedApps.add(Applications.ManageSchedules); - authorizedApps.add(Applications.LessonRequests);} - - if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin, Role.InscriptionService},token)){ - authorizedApps.add(Applications.Payments);} - return authorizedApps; - } -} diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java index d71e159..10634d3 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java @@ -151,8 +151,6 @@ public class MockController { InscriptionRequest inscriptionRequest = new InscriptionRequest("helen","prenom","non","helen@gmail.com","america",new Date(),(long) 4,RequestState.Pending,"yes.png","password", null, new Date(), RequestState.Pending, null); inscriptionService.save(inscriptionRequest); - ExternalCurriculum externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null, null); - externalCurriculumRepository.save(externalCurriculum); /////////////////////////// // extension Publications Scientifiques diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java.orig b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java.orig deleted file mode 100644 index e1faa8c..0000000 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java.orig +++ /dev/null @@ -1,307 +0,0 @@ -package ovh.herisson.Clyde.EndPoints; - -import org.springframework.web.bind.annotation.*; -import ovh.herisson.Clyde.Repositories.*; -import ovh.herisson.Clyde.Repositories.Inscription.ExternalCurriculumRepository; -import ovh.herisson.Clyde.Repositories.Inscription.MinervalRepository; -import ovh.herisson.Clyde.Repositories.Inscription.ScholarshipRequestRepository; -import ovh.herisson.Clyde.Repositories.Inscription.UnregisterRequestRepository; -import ovh.herisson.Clyde.Services.*; -import ovh.herisson.Clyde.Services.ScientificPublications.ResearchesService; -import ovh.herisson.Clyde.Tables.*; -<<<<<<< HEAD -import ovh.herisson.Clyde.Tables.ScientificPublications.Access; -import ovh.herisson.Clyde.Tables.ScientificPublications.PaperType; -import ovh.herisson.Clyde.Tables.ScientificPublications.Research; -import ovh.herisson.Clyde.Tables.ScientificPublications.Researcher; -import ovh.herisson.Clyde.Services.Inscription.InscriptionService; -import ovh.herisson.Clyde.Tables.Inscription.ExternalCurriculum; -import ovh.herisson.Clyde.Tables.Inscription.InscriptionRequest; -import ovh.herisson.Clyde.Tables.Inscription.Minerval; -import ovh.herisson.Clyde.Tables.Inscription.ScholarshipRequest; -======= -import ovh.herisson.Clyde.Tables.Inscription.*; ->>>>>>> origin/master - -import java.util.*; - -@RestController -@CrossOrigin(originPatterns = "*", allowCredentials = "true") -public class MockController { - public final UserService userService; - public final UserRepository userRepo; - public final TokenRepository tokenRepo; - public final TokenService tokenService; - public final CurriculumCourseService CurriculumCourseService; - public final CurriculumService curriculumService; - public final CourseService courseService; - public final ExternalCurriculumRepository externalCurriculumRepository; - public final InscriptionService inscriptionService; -<<<<<<< HEAD -======= - - public final LessonService lessonService; - public final ScheduleService scheduleService; - public final ScheduleLessonService scheduleLessonService; - - public final LessonRequestService lessonRequestService; - ArrayList mockUsers; ->>>>>>> origin/master - - public final ResearchesService researchesService; - public final UserCurriculumRepository ucr; - public final MinervalRepository minervalRepository; - public final ScholarshipRequestRepository scholarshipRequestRepository; - -<<<<<<< HEAD - ArrayList mockUsers; - public MockController(UserRepository userRepo, TokenRepository tokenRepo, TokenService tokenService, CurriculumCourseService CurriculumCourseService, CurriculumService curriculumService, CourseService courseService, ExternalCurriculumRepository externalCurriculumRepository, ResearchesService researchesService, InscriptionService inscriptionService, UserCurriculumRepository ucr, MinervalRepository minervalRepository, ScholarshipRequestRepository scholarshipRequestRepository){ -======= - public final UnregisterRequestRepository uninscriptionRequestRepository; - public MockController(UserService userService, UserRepository userRepo, TokenRepository tokenRepo, TokenService tokenService, CurriculumCourseService CurriculumCourseService, CurriculumService curriculumService, CourseService courseService, ExternalCurriculumRepository externalCurriculumRepository, InscriptionService inscriptionService, UserCurriculumRepository ucr, MinervalRepository minervalRepository, ScholarshipRequestRepository scholarshipRequestRepository, UnregisterRequestRepository unregisterRequestRepository, LessonService lessonService, ScheduleService scheduleService, ScheduleLessonService scheduleLessonService, LessonRequestService lessonRequestService){ - this.userService = userService; ->>>>>>> origin/master - this.tokenRepo = tokenRepo; - this.userRepo = userRepo; - this.tokenService = tokenService; - this.CurriculumCourseService = CurriculumCourseService; - this.curriculumService = curriculumService; - this.courseService = courseService; - this.externalCurriculumRepository = externalCurriculumRepository; - this.inscriptionService = inscriptionService; -<<<<<<< HEAD - this.researchesService = researchesService; -======= - this.lessonService = lessonService; - this.scheduleService = scheduleService; - this.scheduleLessonService = scheduleLessonService; - this.lessonRequestService = lessonRequestService; ->>>>>>> origin/master - this.ucr = ucr; - this.minervalRepository = minervalRepository; - this.scholarshipRequestRepository = scholarshipRequestRepository; - this.uninscriptionRequestRepository = unregisterRequestRepository; - } - - /** Saves an example of each user type by : - * email : FooRole@FooRole.com, password : FooRole and token : FooRole - * For example the admin as "admin@admin.com" as email and "admin" as both password and token - * They all have silly names - */ - - @PostMapping("/mock") - public void postMock() { - -<<<<<<< HEAD - // user part - User herobrine = new User("brine", "hero", "admin@admin.com", "behind", "ShadowsLand", new Date(0), null, Role.Admin, passwordEncoder.encode("admin")); - User joe = new User("Mama", "Joe", "student@student.com", "roundabout", "England", new Date(0), null, Role.Student, passwordEncoder.encode("student")); - User meh = new User("Polo", "Marco", "secretary@secretary.com", "a Box", "Monaco", new Date(0), null, Role.Secretary, passwordEncoder.encode("secretary")); - User joke = new User("Gaillard", "Corentin", "teacher@teacher.com", "lab", "faculty", new Date(0), null, Role.Teacher, passwordEncoder.encode("teacher")); - User jojo = new User("Bridoux", "Justin", "teacher2@teacher2.com", "lab", "faculty", new Date(0), null, Role.Teacher, passwordEncoder.encode("teacher")); - User lena = new User("Louille", "Lena", "inscriptionService@InscriptionService.com", "no", "yes", new Date(0), null, Role.InscriptionService, passwordEncoder.encode("inscriptionService")); - User popo = new User("Smith", "Paul", "paulsmith@gmail.com", "306 rue du poulet", "belgique", new Date(0), null, Role.Student, passwordEncoder.encode("jesuispaulleroi")); - mockUsers = new ArrayList<>(Arrays.asList(herobrine, joe, meh, joke, lena, jojo, popo)); - - userRepo.saveAll(mockUsers); -======= - // user part - User herobrine = new User("brine","hero","admin@admin.com","behind","ShadowsLand",new Date(0), null,Role.Admin,"admin"); - User joe = new User("Mama","Joe","student@student.com","roundabout","England",new Date(0), null,Role.Student,"student"); - User meh = new User("Polo","Marco","secretary@secretary.com","a Box","Monaco",new Date(0), null,Role.Secretary,"secretary"); - User joke = new User("Gaillard","Corentin","teacher@teacher.com","lab","faculty",new Date(0), null,Role.Teacher,"teacher"); - User jojo = new User("Bridoux","Justin","teacher2@teacher2.com","lab","faculty",new Date(0), null,Role.Teacher,"teacher"); - User lena = new User("Louille","Lena","inscriptionService@InscriptionService.com","no","yes",new Date(0), null,Role.InscriptionService,"inscriptionService"); - User popo = new User("Smith", "Paul", "paulsmith@gmail.com", "306 rue du poulet", "belgique", new Date(0), null, Role.Student, "jesuispaulleroi"); - mockUsers = new ArrayList<>(Arrays.asList(herobrine,joe,meh,joke,lena,jojo, popo)); - - userService.saveAll(mockUsers); - - ExternalCurriculum externalCurriculum = new ExternalCurriculum(null, "HEH", "Bachelier en ingénieur", "completed", 2015, 2017, null, joe); - externalCurriculumRepository.save(externalCurriculum); ->>>>>>> origin/master - - Minerval minerval = new Minerval(joe.getRegNo(), 0, 852, 2023); - minervalRepository.save(minerval); - // Course / Curriculum part - -<<<<<<< HEAD - Curriculum infoBab1 = new Curriculum(1, "info"); - Curriculum chemistryBab1 = new Curriculum(1, "chemistry"); - Curriculum psychologyBab1 = new Curriculum(1, "psychology"); - Curriculum infoBab2 = new Curriculum(2, "info"); - Curriculum masterinfo1 = new Curriculum(4, "info"); - Curriculum masterinfo2 = new Curriculum(5, "info"); - - curriculumService.save(infoBab1); - curriculumService.save(chemistryBab1); - curriculumService.save(psychologyBab1); - curriculumService.save(infoBab2); - curriculumService.save(masterinfo1); - curriculumService.save(masterinfo2); - - ucr.save(new UserCurriculum(joe, infoBab1, 2022)); - ucr.save(new UserCurriculum(joe, chemistryBab1, 2023)); - ucr.save(new UserCurriculum(joe, infoBab1, 2023)); - ucr.save(new UserCurriculum(joe, psychologyBab1, 2020)); - ucr.save(new UserCurriculum(popo, infoBab1, 2022)); - ucr.save(new UserCurriculum(popo, infoBab2, 2023)); - - Course progra1 = new Course(5, "Programmation et algorithmique 1", joke); - Course chemistry1 = new Course(12, "Thermochimie", joke); - Course psycho1 = new Course(21, "Neuroreaction of isolated brain cells", joke); - Course commun = new Course(2, "cours commun", joke); -======= - Curriculum infoBab1 = new Curriculum(1,"info", false); - Curriculum chemistryBab1 = new Curriculum(1,"chemistry", false); - Curriculum psychologyBab1 = new Curriculum(1,"psychology", false); - Curriculum infoBab2 = new Curriculum(2,"info", false); - Curriculum masterinfo1 = new Curriculum(4, "info", false); - Curriculum masterinfo2 = new Curriculum(5, "info", false); - Curriculum chemistryBab2 = new Curriculum(2, "chemistry", false); - Curriculum ingebab1 = new Curriculum(1, "ingénieur", true); - - curriculumService.save(infoBab1); - curriculumService.save(chemistryBab1); - curriculumService.save(psychologyBab1); - curriculumService.save(infoBab2); - curriculumService.save(masterinfo1); - curriculumService.save(masterinfo2); - curriculumService.save(chemistryBab2); - curriculumService.save(ingebab1); - - ucr.save(new UserCurriculum(joe, infoBab1, 2022, false)); - ucr.save(new UserCurriculum(joe, chemistryBab1, 2023, true)); - ucr.save(new UserCurriculum(joe, infoBab1, 2023, true)); - ucr.save(new UserCurriculum(joe, psychologyBab1, 2020, false)); - ucr.save(new UserCurriculum(popo, infoBab1, 2022, false)); - ucr.save(new UserCurriculum(popo, infoBab2, 2023, true)); - - Course progra1 = new Course(5,"Programmation et algorithmique 1",joke); - Course chemistry1 = new Course(12, "Thermochimie",jojo); - Course psycho1 = new Course(21, "Neuroreaction of isolated brain cells",joke); - Course commun = new Course(2, "cours commun",joke); ->>>>>>> origin/master - - courseService.save(progra1); - courseService.save(chemistry1); - courseService.save(psycho1); - courseService.save(commun); - - ScholarshipRequest ssr1 = new ScholarshipRequest(joe, RequestState.Pending, 0, new Date(), "test", "test"); - scholarshipRequestRepository.save(ssr1); - -<<<<<<< HEAD - CurriculumCourseService.save(new CurriculumCourse(infoBab1, progra1)); - CurriculumCourseService.save(new CurriculumCourse(infoBab1, commun)); - CurriculumCourseService.save(new CurriculumCourse(infoBab1, psycho1)); - CurriculumCourseService.save(new CurriculumCourse(psychologyBab1, psycho1)); - CurriculumCourseService.save(new CurriculumCourse(psychologyBab1, commun)); - -======= - CurriculumCourseService.save(new CurriculumCourse(infoBab1,progra1)); - CurriculumCourseService.save(new CurriculumCourse(infoBab1,commun)); - CurriculumCourseService.save(new CurriculumCourse(infoBab1, psycho1)); - CurriculumCourseService.save(new CurriculumCourse(psychologyBab1,psycho1)); - CurriculumCourseService.save(new CurriculumCourse(psychologyBab1,commun)); - CurriculumCourseService.save(new CurriculumCourse(chemistryBab1, chemistry1)); ->>>>>>> origin/master - - CurriculumCourseService.save(new CurriculumCourse(chemistryBab1, commun)); - CurriculumCourseService.save(new CurriculumCourse(chemistryBab1, chemistry1)); - -<<<<<<< HEAD - - InscriptionRequest inscriptionRequest = new InscriptionRequest("helen", "prenom", "non", "helen@gmail.com", "america", new Date(), (long) 4, RequestState.Pending, "yes.png", "password", null, new Date(), RequestState.Pending); -======= - InscriptionRequest inscriptionRequest = new InscriptionRequest("helen","prenom","non","helen@gmail.com","america",new Date(),(long) 4,RequestState.Pending,"yes.png","password", null, new Date(), RequestState.Pending, null); ->>>>>>> origin/master - - inscriptionService.save(inscriptionRequest); - ExternalCurriculum externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null, null); - externalCurriculumRepository.save(externalCurriculum); - - /////////////////////////// - // extension Publications Scientifiques - Researcher jojoResearcherAccount = new Researcher(jojo, "3363-22555-AB33-T", null, "IT"); - - Researcher joResearchAccount = new Researcher(joe,"N555-321213-BED-DD",null, "Physics"); - - - Researcher output = researchesService.saveResearcher(jojoResearcherAccount); - Researcher joOutput = researchesService.saveResearcher(joResearchAccount); - - Set coAuthor = new HashSet<>(); - coAuthor.add(joOutput); - - Research jojoResearch = new Research("Graphs : Advanced Search Algorithms", output, new Date(0), - PaperType.Article, "test.pdf", null, "english", - Access.OpenSource, "IT", "This Article's title speaks for itself \n We'll discuss about advanced Graph search Algorithms",coAuthor); - Research restrictedResearch = new Research("just another Name", output, new Date(1111111111), - PaperType.Article, "restricted", null, "english", - Access.Restricted, "Restricted", "This Article's title speaks for itself\n We'll discuss about advanced Graph search Algorithms", new HashSet<>()); - - Research privateResearch = new Research("the great Potato War", output, new Date(), - PaperType.Article, "private", null, "english", - Access.Private, "private", "This Article's title speaks for itself\n We'll discuss about advanced Graph search Algorithms",null); - - - researchesService.saveResearch(restrictedResearch); - researchesService.saveResearch(privateResearch); - researchesService.saveResearch(jojoResearch); - -<<<<<<< HEAD -======= - - //Schedule part - - Lesson lesson_0_progra1 = new Lesson(progra1, "Mon Apr 22 2024 08:15", "Mon Apr 22 2024 10:15","rgb(0,50,100)","A0B2","Course"); - Lesson lesson_0_chemistry1 = new Lesson(chemistry1, "Wed Mar 27 2024 08:15", "Wed Mar 27 2024 09:15","rgb(100,50,0)","A0B2","TP"); - Lesson lesson_0_psycho1 = new Lesson(psycho1, "Sun Mar 24 2024 10:30 ","Sun Mar 24 2024 12:30 ","rgb(100,50,100)", "A0B2","TD"); - Lesson lesson_1_progra1 = new Lesson(progra1, "Mon Apr 02 2024 13:30", "Mon Apr 02 2024 15:30","rgb(0,50,100)","A0B2","TP"); - Lesson lesson_0_commun = new Lesson(commun, "Mon Apr 01 2024 10:30", "Mon Apr 01 2024 12:30","rgb(0,50,100)","A0B2","Course"); - - LessonChangesRequest request1 = new LessonChangesRequest(joke,RequestState.Pending,null,null,null,null,2,null,1); - LessonChangesRequest request2 = new LessonChangesRequest(joke,RequestState.Pending,"Fri Apr 19 2024 10:30 ","Fri Apr 19 2024 12:30 ",null,null,1,null,2); - LessonChangesRequest request3 = new LessonChangesRequest(joke,RequestState.Pending,"Fri Apr 19 2024 13:30 ","Fri Apr 19 2024 15:30 ","Course",progra1,0,"rgb(27,49,100)",4); - - - Schedule infoBab1Schedule = new Schedule(infoBab1); - Schedule chemistryBab1Schedule = new Schedule(chemistryBab1); - Schedule psychoBab1Schedule = new Schedule(psychologyBab1); - - - scheduleService.save(infoBab1Schedule); - scheduleService.save(chemistryBab1Schedule); - scheduleService.save(psychoBab1Schedule); - - lessonService.save(lesson_0_progra1); - lessonService.save(lesson_0_chemistry1); - lessonService.save(lesson_0_commun); - lessonService.save(lesson_0_psycho1); - lessonService.save(lesson_1_progra1); - - scheduleLessonService.save(new ScheduleLesson(infoBab1Schedule,lesson_0_progra1)); - scheduleLessonService.save(new ScheduleLesson(infoBab1Schedule,lesson_1_progra1)); - scheduleLessonService.save(new ScheduleLesson(infoBab1Schedule,lesson_0_commun)); - - scheduleLessonService.save(new ScheduleLesson(chemistryBab1Schedule,lesson_0_chemistry1)); - scheduleLessonService.save(new ScheduleLesson(chemistryBab1Schedule,lesson_0_commun)); - - scheduleLessonService.save(new ScheduleLesson(psychoBab1Schedule,lesson_0_psycho1)); - scheduleLessonService.save(new ScheduleLesson(psychoBab1Schedule,lesson_0_commun)); - - - lessonRequestService.save(request1); - lessonRequestService.save(request2); - lessonRequestService.save(request3); - - UnregisterRequest unregisterRequest = new UnregisterRequest(RequestState.Pending, "je veux partir", new Date(), joe.getRegNo(), joe.getFirstName(), joe.getLastName(), joe.getEmail(), null); - uninscriptionRequestRepository.save(unregisterRequest); - - externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null, null); - externalCurriculumRepository.save(externalCurriculum); ->>>>>>> origin/master - } -} - diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/UserService.java.orig b/backend/src/main/java/ovh/herisson/Clyde/Services/UserService.java.orig deleted file mode 100644 index e1db7b3..0000000 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/UserService.java.orig +++ /dev/null @@ -1,193 +0,0 @@ -package ovh.herisson.Clyde.Services; - -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.stereotype.Service; -import ovh.herisson.Clyde.Tables.RegNoGenerator; -import ovh.herisson.Clyde.Repositories.UserRepository; -import ovh.herisson.Clyde.Tables.Notification; -import ovh.herisson.Clyde.Tables.Role; -import ovh.herisson.Clyde.Tables.User; -import java.util.*; - -@Service -public class UserService { - private final UserRepository userRepo; - private final BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); - - public UserService(UserRepository userRepo){ - this.userRepo = userRepo; - } - - - /** return the user identified by th identifier - * - * @param identifier can be an email or the RegNo - * @return the identified user - */ - public User getUser(String identifier){ - if (identifier == null) - return null; - - try { - int id = Integer.parseInt(identifier); - return userRepo.findById(id); - } - catch (NumberFormatException nfe){ - return userRepo.findByEmail(identifier); - } - } - - /** modify the target data - * verify the permission of modifying from the poster - * - * @param poster the user wanting to modify target's data - * @param updates the changes to be made - * @param targetId the id of the user to update - * @return if the changes were done or not - */ - public User modifyData(long targetId, Map updates, User poster){ - - User target = userRepo.findById(targetId); - if (target == null) - return null; - - if (!target.getRegNo().equals(poster.getRegNo()) && !(poster.getRole() == Role.Secretary) && - !(poster.getRole() == Role.Admin)) - return null; - -<<<<<<< HEAD - for (Map.Entry entry : updates.entrySet()){ - System.out.println(entry.getValue()); - switch (entry.getKey()){ - case "firstName": - target.setFirstName((String) entry.getValue()); - break; - case "lastName": - target.setLastName((String) entry.getValue()); - break; - case "email": - target.setEmail((String) entry.getValue()); - break; - case "address": - target.setAddress((String) entry.getValue()); - break; - case "country": - target.setCountry((String) entry.getValue()); - break; - case "birthDate": - target.setBirthDate((Date) entry.getValue()); - break; - case "profilePictureUrl": - target.setProfilePictureUrl((String) entry.getValue()); - break; - case "password": - target.setPassword((String) entry.getValue()); - break; - case "role": - //a user can't change his own role - if (poster.getRole()==Role.Secretary || poster.getRole() == Role.Admin){ - Role wanted = Role.valueOf((String) entry.getValue()); - if (wanted == Role.Admin && poster.getRole() != Role.Admin) - return null; - target.setRole(wanted); - } -======= - switch (entry.getKey()){ - case "firstName": - target.setFirstName((String) entry.getValue()); - break; - case "lastName": - target.setLastName((String) entry.getValue()); - break; - case "email": - target.setEmail((String) entry.getValue()); - break; - case "address": - target.setAddress((String) entry.getValue()); - break; - case "country": - target.setCountry((String) entry.getValue()); - break; - case "birthDate": - target.setBirthDate((Date) entry.getValue()); - break; - case "profilePictureUrl": - target.setProfilePictureUrl((String) entry.getValue()); - break; - case "password": - target.setPassword((String) entry.getValue()); - break; - } - } - userRepo.save(target); - return true; - } - // the secretary can change roles (for example if a student becomes a teacher) - else if (poster.getRole() == Role.Secretary) - { - for (Map.Entry entry : updates.entrySet()){ - - if ( entry.getKey().equals("role")) { - - if (entry.getValue() == Role.Admin) {return false;} - - target.setRole((Role) entry.getValue()); - userRepo.save(target); - return true; - } ->>>>>>> origin/master - } - } - userRepo.save(target); - return target; - } - - - public boolean checkPassword(User user, String tryingPassword){ - return passwordEncoder.matches(tryingPassword, user.getPassword()); - } - -<<<<<<< HEAD - public User save(User user){ - user.setPassword(passwordEncoder.encode(user.getPassword())); -======= - public User save(User user){ - RegNoGenerator.resetCount(); ->>>>>>> origin/master - return userRepo.save(user); - } - - public void saveAll(ArrayList list){ - //S'assure que le compteur est bien a 0 - RegNoGenerator.resetCount(); - userRepo.saveAll(list); - } - - public Iterable getAll(){ - return userRepo.findAll(); - } - - public Iterable getAllExceptAdmins(){ - return userRepo.findAllExceptAdmins(); - } - - - public Iterable getAllTeachers (){return userRepo.findAllTeachers();} - - public Iterable getAllStudents(){return userRepo.findAllStudents();} - - - public User getUserById(long id) { - return userRepo.findById(id); - } - - public void delete(User user) { - userRepo.delete(user); - } - - public void Notify(User u, Notification n){ - n.setUser(u); - u.getNotifications().add(n); - userRepo.save(u); - } -} diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java.orig b/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java.orig deleted file mode 100644 index 1876f00..0000000 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java.orig +++ /dev/null @@ -1,40 +0,0 @@ -package ovh.herisson.Clyde.Tables; - -public enum Applications { - // without any token - Login, - Schedule, - - // with any token - Profile, - - // Students and higher authorization - Msg, - Forum, - Rdv, - // teachers authorization - - ManageOwnedLessons, - - // teachers and Secretary authorization - ManageCourses, - UsersList, - - //Secretary authorization - ManageSchedules, - LessonRequests, - - // InscriptionService authorization - Requests, -<<<<<<< HEAD - // profile of a researcher - ResearcherProfile, - ManageResearcherProfile, - - //the list of all researches (filterable) - ListResearches, CreateUser, StudentsList -======= - StudentsList, - Payments ->>>>>>> origin/master -} diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/FileType.java.orig b/backend/src/main/java/ovh/herisson/Clyde/Tables/FileType.java.orig deleted file mode 100644 index f827bc0..0000000 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/FileType.java.orig +++ /dev/null @@ -1,15 +0,0 @@ -package ovh.herisson.Clyde.Tables; - -public enum FileType { - ProfilePicture, - EducationCertificate, -<<<<<<< HEAD - Research, - - ResearchBibTex, - JustificationDocument -======= - JustificationDocument, - IdentityCard, ->>>>>>> origin/master -} diff --git a/frontend/public/i18n/EN.txt.orig b/frontend/public/i18n/EN.txt.orig deleted file mode 100644 index 724d8b3..0000000 --- a/frontend/public/i18n/EN.txt.orig +++ /dev/null @@ -1,295 +0,0 @@ -login.guest.signin=Sign in -login.guest.register=Register -login.guest.alregister=Already Registered -login.guest.welcome=WELCOME TO THE UNIVERSITY -login.guest.email=E-MAIL -login.guest.firstname=FIRSTNAME -login.guest.surname=SURNAME -login.guest.country=COUNTRY -login.guest.address=ADDRESS -login.guest.password=PASSWORD -login.guest.nextpage=Next Page -login.guest.lastpage=Last Page -login.guest.submit=Submit -login.guest.birthday=BIRTHDAY -login.guest.confirm=CONFIRM -login.guest.browse=Browse... -login.guest.disclaimer=If you are already registered please connect to your account and use the change cursus/reregister function if not continue here. -login.guest.identityCard=Identity Card : -login.guest.attestationdisclaimer=This curriculum requires an entrance exam attestation -login.guest.formationdisclaimer=Please add your old formations with the associated degree/attestation,your case will be check by a member of the inscription service. -login.guest.managecareer=Manage your external formations -login.guest.sendRegReq=Send register request -login.cPassword=Confirm Password -login.password=Password -app.home=Home -app.login=Login -app.notifications=Notifications -app.settings=Settings -app.messages=Messages -app.forum=Forum -app.schedules=Schedules -app.manageSchedules=Manage Schedules -app.inscription.requests=Inscription Requests -app.manage.courses=Manage Courses -app.language=Language -app.manage.profile=Manage profile -app.studentList=Students List -app.users=Users -<<<<<<< HEAD -app.manage.researcherProfile=Manage researcher profile -app.list.researches=List researches -app.Create.User=Create User -======= -app.manageOwnLessons=Manage Owned Courses Schedule -app.lessonRequests=Schedule Requests -app.payments=Payments ->>>>>>> origin/master -request.moreInfos=More Infos -request.accept=Accept -request.refuse=Refuse -Pending=Pending -Delete=Delete -Modify=Modify -Create=Créer -requestType=Request Type -day=Day -start=Start -end=End -monday=Monday -tuesday=Tuesday -wednesday=Wednesday -thursday=Thursday -friday=Friday -saturday=Saturday -sunday=Sunday -january=January -february=February -march=March -april=April -may=May -june=June -july=July -august=August -september=September -october=October -november=November -december=December -Grid=Grid -Week=Week -Month=Month -List=List -Type=Type -Teacher=Teacher -Course=Course -TP=TP -TD=TD -Exam=Exam -OwnSchedule=Own Schedule -SwitchToJSON=Switch to JSON FILE -schedule.previous=Previous -schedule.next=Next -schedule.current=Current -schedule.settings=Settings -schedule.courses=Courses -schedule.teachers=Teacher(s) -schedule.askChanges=Ask Changes -schedule.askCreate=Ask to create course -schedule.askDeletion=Ask Deletion -schedule.createSchedule=Create Schedule -schedule.createLesson=Create course -schedule.deleteMod=Unable deletion -schedule.noDeleteMod=Disable deletion -schedule=Schedule -old_day=Precedent day -old_start=Precedent start -old_end=Precedent end -old_type=Precedent type -courses.createCourse=Create course -courses.deleteCourse=Delete course -courses.modify=Modify -courses.toDelete=Course to Delete -courses.confirm=Confirm -courses.back=Back -courses.AddToCurriculum=Add to a new Curriculum -profile.modify.data=Modify personnal data -profile.reRegister=Re-register -profile.unRegister=Unregister -profile.course.list=Courses list -profile.address=Address -profile.picture=Profile picture -profile.change.curriculum=Change curriculum -name=Name -Teacher=Teacher -Student=Student -Secretary=Secretary -Curriculum=curriculum -Credits=Credits -InscriptionService=I.S. -faculty=Faculty -<<<<<<< HEAD -Year=Year -Access=Access -Access.Restricted=Restricted -Access.OpenSource=OpenSource -Access.Private=Private -Language=Language -Month=Month -Month.01=january -Month.02=february -Month.03=march -Month.04=april -Month.05=may -Month.06=june -Month.07=july -Month.08=august -Month.09=september -Month.10=october -Month.11=november -Month.12=december -Domain=Domain -PaperType=PaperType -Submit=Submit -Search.Researches=Search For Researches -Search.Researchers=Search For Researchers -Filters=Filters -Toggle.Researcher=Toggle Researcher Search -Untoggle.Researcher=Toggle Research Search -MoreInfo=More Info -Modify.Research=Modify Research -To.Change.In.Options=To change in regular account options -Modify.Data=Modify Data -Confirm.Changes=Confirm Changes -Cancel.Changes=Cancel Changes -Post.Research=Post a new Research -Summary=Summary -Title=Title -Views=Number of Views -See.Research=See Research -SeeBibTex=See BibTex -Author=Author -CoAuthors=Co-Authors -ReleaseDate=ReleaseDate -Article.Id=Article Id -Delete.Research=Delete Research -Here=Here -Stat.Type=Stat Type -Researches=Researches -Please.Select.Option=Please Select an Option -Class.By=Class By -PaperType.Article=Article -PaperType.Book=Book -PaperType.Book.Chapter=Book Chapter -PaperType.Paper=Paper -Research.Pdf=Research Pdf -BibTex.Pdf=BibTex Pdf -CoAuthors.List=Co-Author List -Confirm.Publish=Confirm Publishing -Cancel.Publish=Cancel Publishing -Years=Years -Months=Months -By=By -RegNo=RegNo -Address=Address -Country=Country -BirthDate=Birth Date -Researcher.Delete=Delete Researcher Profile -Researcher.Add=Create Researcher Profile -Confirm=Confirm -Cancel=Cancel -LastName=Last Name -FirstName=First Name -Profile.Picture=Profile Picture -Role=Role -Password=Password -Create.User=Create User -======= -msg.notification.new=You have a new message -forum.create=Create forum -forum.create.name=New forum's name -forum.post.create.name=New post's title -firstname/name=Firstname/Name -regNo=regNo -From=From -To=To -WantedCursus=Wanted Cursus -seeprofile=See profile -acceptequiv=Accept equivalence -refuseequiv=Refuse equivalence -course=course -state=state -dljustifdoc=Download justification document -backtoreq=Back to request -dlidentitycard=Download identity card -dladmissiondoc=Download admission document -seeextcur=See external curriculums -dltaxdoc=Download tax justification document -dlresidency=Download residency justification document -enteramount=Please enter the amount to provide : -oldcursus=Old curriculums -newcursus=New curriculums -year=Year -reason=Reason : -selectedcursus=Selected curriculum : -askexemp=Ask exemption -exemp=Exempted -uploadjustifdoc=Please upload the justification document -subexemreq=Submit exemption request -addextcurr=Add external curriculum -dldoc=Download document -edit=Edit -delete=Delete -school=School -checkifnotcompleted=Check the box if you didn't complete the formation -wichyearstop=In which year did you stop (ex: 3rd year) ? -startyear=Start year -endyear=End year -giveextcurdoc=Please upload a document that proves this formation -uploadcurr=Upload curriculum -editcurr=Edit curriculum -reqtype=Request type : -inscription=register -scholarship=scholarship -exemption=exemption -unregister=unregister -curriculumch=curriculum change -filter=Filter : -approval=Approval : -teacherapproval=Teacher approval : -surreq=Are you sure that you want to accept this request ? -validate=Validate -amount=Amount -role=Role -manageextcur=Manage external curriculum -managecourse=Manage courses -manageminerval=Manage school fees -enterreason=Please enter the reason you leave -onlycursus=I only want to unregister from a specific cursus -plsselectcurs=Please select that cursus -sureunreg=Are you sure that you want to unregister ? -no=No -yes=Yes -reqsend=Your request has been send ! -payment=Payment -lefttopay=left to pay -paydeposit=Pay deposit -payrest=Pay all the rest -alreadypaid=Payment : School fees have already been paid this year -askscholarship=Ask scholarship -uploaddocs=Please upload the required documents -taxjustdoc=Tax justification document : -residencydoc=Residency justification document : -reqsent=Your request has been sent to the inscription service. -backprofile=Go back to profile -procpayment=Proceed to payment of -procpaybutton=Process payment -rereg=Reregister in the next year of one of my cursus -reregsup=Register in a supplementary cursus -chcur=Change from a cursus to another -iwouldlike=I would like to : -newcurr=New curriculum -cursusprereq=The cursus you selected has some prerequisites ensure that your external curriculum data is updated in your profile -imposecurriculum=Impose a curriculum -impose=Impose -gotimposed=The selected curriculum has been imposed ->>>>>>> origin/master diff --git a/frontend/public/i18n/FR.txt.orig b/frontend/public/i18n/FR.txt.orig deleted file mode 100644 index 01b9b8d..0000000 --- a/frontend/public/i18n/FR.txt.orig +++ /dev/null @@ -1,293 +0,0 @@ -login.guest.signin=SE CONNECTER -login.guest.register=S'enregistrer -login.guest.alregister=Déjà Enregistré -login.guest.welcome=BIENVENUE A L'UNIVERSITE -login.guest.email=E-MAIL -login.guest.firstname=PRENOM -login.guest.surname=NOM -login.guest.country=PAYS -login.guest.address=ADRESSE -login.guest.password=MOT DE PASSE -login.guest.nextpage=Prochaine Page -login.guest.lastpage=Derniere Page -login.guest.submit=Envoyer -login.guest.birthday=DATE DE NAISSANCE -login.guest.confirm=CONFIRMER -login.guest.browse=Parcourir... -login.guest.disclaimer=Si vous êtes déja inscrits dans cette université veuillez vous connecter a votre compte et utilisez les fonctions changer de cursus/réinscription sinon continuez ici. -login.guest.identityCard=Carte d'identité : -login.guest.attestationdisclaimer=Ce cursus requiert une attestation de réussite d'un examen d'entrée -login.guest.formationdisclaimer=Veuillez ajouter vos formations antérieures en y joignant les attestations/diplomes, votre dossier sera vérifié par un membre du service d'inscription. -login.guest.managecareer=Gèrer mon parcours extérieur -login.guest.sendRegReq=Envoyer la demande d'inscription -login.cPassword=Confirmer mot de passe -login.password=Mot de passe -app.home=Home -app.login=Se connecter -app.notifications=Notifications -app.settings=Options -app.messages=Messages -app.forum=Forum -app.schedules=Horaires -app.manageSchedules=Gérer les horaires -app.inscription.requests=Demandes d'Inscription -app.manage.courses=Gérer les cours -app.language=Langue -app.manage.profile=Gérer le profil -app.studentList=Liste des étudiants -app.users=Utilisateurs -<<<<<<< HEAD -app.manage.researcherProfile= gérer son profil de chercheur -app.list.researches=Lister les recherches -app.Create.User=créer un utilisateur -======= -app.manageOwnLessons=Gérer ses horaires de cours -app.lessonRequests=Requêtes d'horaire -app.payments=Payements ->>>>>>> origin/master -request.moreInfos=Plus d'Infos -request.accept=Accepter -request.refuse=Refuser -Pending=En attente -Delete=Supprimer -Modify=Modifier -Create=Créer -requestType=Type de Requête -day=Jour -start=Début -end=Fin -monday=Lundi -tuesday=Mardi -wednesday=Mercredi -thursday=Jeudi -friday=Vendredi -saturday=Samedi -sunday=Dimanche -january=Janvier -february=Février -march=Mars -april=Avril -may=Mai -june=Juin -july=Juillet -august=Août -september=Septembre -october=Octobre -november=Novembre -december=Decembre -Grid=Grille -Week=Semaine -Month=Mois -List=Liste -Type=Type -Teacher=Professeur -Course=Cours -TP=TP -TD=TD -Exam=Exam -OwnSchedule=Mon Horaire -SwitchToJSON=Afficher le JSON -schedule.previous=Précédent -schedule.next=Prochain -schedule.current=Actuel -schedule.settings=Options -schedule.courses=Cours -schedule.teachers=Professeurs(s) -schedule.askChanges=Demander Changement -schedule.askCreate=Demander de créer un cours -schedule.askDeletion=Demander suppression -schedule.createSchedule=Créer Horaire -schedule.createLesson=Créer cours -schedule.deleteMod=Activer suppression -schedule.noDeleteMod=Désactiver suppression -schedule=Horaire -old_day=Ancien Jour -old_start=Ancien Début -old_end=Ancienne Fin -old_type=Ancien Type -courses.createCourse=Créer un cours -courses.deleteCourse=Supprimer un cours -courses.modify=Modifier -courses.toDelete=Cours à supprimer -courses.confirm=Confirmer -courses.back=Retour -courses.AddToCurriculum=Ajouter à un cursus -profile.modify.data=Modifier données personnelles -profile.reRegister=Réinsciption -profile.unRegister=Désinscription -profile.course.list=Liste des cours -profile.address=Adresse -profile.picture=Photo de profil -profile.change.curriculum=Changer cursus -name=Nom -Teacher=Enseignant -Student=Etudiant -Secretary=Secrétaire -Curriculum=Cursus -Credits=Credits -InscriptionService=S.I. -faculty=Faculté -<<<<<<< HEAD -Year=Année -Access=Accès -Access.Restricted=Restreint -Access.OpenSource=Libre -Access.Private=Privé -Language=Langue -Month=Mois -Month.01=janvier -Month.02=fevrier -Month.03=mars -Month.04=avril -Month.05=mai -Month.06=juin -Month.07=juillet -Month.08=août -Month.09=septembre -Month.10=octobre -Month.11=novembre -Month.12=decembre -Domain=Domaine -PaperType=Type de recherche -Submit=Envoyer -Search.Researches=Chercher Par Recherche -Search.Researchers=Chercher Par Chercheur -Filters=Filtres -Toggle.Researcher=Activer la recherche par chercheur -Untoggle.Researcher=Désactiver la recherche par chercheur -MoreInfo=Plus d'info -Modify.Research=Modifer l'article -To.Change.In.Options=À changer dans les options -Modify.Data=Modifier -Confirm.Changes=Confirmer les Changements -Cancel.Changes=Abandonner les Changements -Post.Research=Poster un nouvel article -Summary=Résumé -Title=Titre -Views=Nombre de Vues -See.Research=Ouvrir l'article -SeeBibTex=Ouvrir le BibTex -Author=Autheur -CoAuthors=Co-Autheurs -ReleaseDate=Date de Parution -Article.Id=Id de l'article -Delete.Research=Supprimer l'article -Here=Ici -Stat.Type=Type de Stat -Researches=Recherches -Please.Select.Option=Selectionnez des Options -Class.By=Classifer Par -PaperType.Article=Article -PaperType.Book=Livre -PaperType.Book.Chapter=Chapitre de Livre -PaperType.Paper=Papier -Research.Pdf=Pdf de la Recherche -BibTex.Pdf=BibTex de la Recherche -CoAuthors.List=Liste des Co-Autheurs -Confirm.Publish=Confirmer la Publication -Cancel.Publish=Annuler la Publication -Years=Années -Months=Mois -By=par -RegNo=Matricule -Address=Adresse -Country=Pays -BirthDate=Date de Naissance -Confirm=Confirmer -Cancel=Annuler -LastName=Nom de Famille -FirstName=Prénom -Profile.Picture=Photo de Profil -Role=Role -Password=Mot de Passe -Create.User=Créer l'utilisateur -======= -msg.notification.new=Vous avez un nouveau message! -forum.create=Créer un forum -forum.create.name=Nom du forum -forum.post.create.name=Titre du post -firstname/name=Prénom/Nom -regNo=Matricule -From=De -To=A -WantedCursus=Cursus voulu -seeprofile=Voir le profil -acceptequiv=Accepter l'équivalence -refuseequiv=Refuser l'équivalence -course=cours -state=état -dljustifdoc=Télécharger le justificatif -backtoreq=Retour a la requête -dlidentitycard=Télécharger la carte d'identité -dladmissiondoc=Télécharger le certificat d'admission -seeextcur=Voir le parcours extérieur -dltaxdoc=Télécharger le justificatif d'impot -dlresidency=Télécharger le justificatif de résidence -enteramount=Veuillez entrer le montant alloué : -oldcursus=Anciens cursus -newcursus=Nouveaux cursus -year=Année -reason=Raison : -selectedcursus=Cursus selectionné : -askexemp=Demander une dispense -exemp=Dispensé -uploadjustifdoc=Veuillez soumettre le justificatif -subexemreq=Envoyer la demande de dispense -addextcurr=Ajouter une formation -dldoc=Télécharger le document -edit=Modifier -delete=Supprimer -school=Ecole -checkifnotcompleted=Cochez la case si vous n'avez terminé cette formation -wichyearstop=En quelle année de la formation vous êtes vous arrété (exemple: 3ème) ? -startyear=Année de début -endyear=Année de fin -giveextcurdoc=Veuillez soumettre un document attestant de ce parcours -uploadcurr=Ajouter la formation -editcurr=Modifier la formation -reqtype=Type de requête : -inscription=inscription -scholarship=bourse -exemption=dispense -unregister=désinscription -curriculumch=changement de cursus -filer=Filtre : -approval=Approbation : -teacherapproval=Approbation d'un prof : -surreq=Etes vous sur de vouloir accepter cette demande ? -validate=Valider -amount=Montant -role=Role -manageextcur=Gérer les formations -managecourse=Gérer les cours -manageminerval=Gérer le minerval -enterreason=Veuillez entrer la raison de votre départ -onlycursus=Je veux uniquement me désinscrire d'un seul cursus -plsselectcurs=Veuillez sélectionner ce cursus -sureunreg=Etes-vous sur de vouloir vous désinscrire ? -no=Non -yes=Oui -reqsend=Votre requête a été envoyée ! -payment=Payement -lefttopay=restants a payer -paydeposit=Payer l'acompte -payrest=Payer le reste -alreadypaid=Payement : les frais ont déja été payés cette année -askscholarship=Demander une bourse -uploaddocs=Veuillez soumettre les documents requis -taxjustdoc=Justificatif d'impôts : -residencydoc=Justificatif de résidence : -reqsent=Votre requête a été envoyée au service d'inscription. -backprofile=Retour au profil -procpayment=Procéder au payement de -procpaybutton=Procéder au payement -rereg=Me réinscrire dans l'année supérieure -reregsup=M'inscrire dans un cursus supplémentaire -chcur=Changer d'un cursus vers un autre -iwouldlike=Je voudrais : -newcurr=Nouveau cursus -cursusprereq=Le cursus que vous avez selectionné a des prérequis assurez vous que votre dossier de parcours est a jour dans votre profil -imposecurriculum=Imposer un cursusgotimposed -impose=Imposer -gotimposed=Le cursus selectionné a été imposé ->>>>>>> origin/master diff --git a/frontend/src/rest/apps.js b/frontend/src/rest/apps.js index f0b11ed..f02da12 100644 --- a/frontend/src/rest/apps.js +++ b/frontend/src/rest/apps.js @@ -31,10 +31,9 @@ const apps = { '/users-list' : Users, '/students-list' : Students, '/manage-researcher-profile' : ManageResearcherProfile, - '/msg' : Msg, '/researches' : ListResearches, '/researcher-profile': ResearcherProfile, - '/create-user': CreateUser + '/create-user': CreateUser, '/manage-owned-lessons': ManageOwnedLessons, '/manage-schedule-requests' : LessonRequests, '/msg' : Msg, @@ -53,7 +52,7 @@ const appsList = { 'StudentsList':{ path: '#/students-list',icon: 'fa-users',text: i18n("app.studentList")}, 'UsersList':{ path: '#/users-list',icon: 'fa-users',text: i18n("app.users")}, 'ManageResearcherProfile':{path:'#/manage-researcher-profile',icon:'fa-book-bookmark',text:i18n("app.manage.researcherProfile")}, - 'CreateUser':{path:'#/create-user',icon:'fa-plus', text:i18n("app.Create.User")} + 'CreateUser':{path:'#/create-user',icon:'fa-plus', text:i18n("app.Create.User")}, '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")}, 'Requests': { path: '#/requests', icon: 'fa-users', text: "Requests" }, diff --git a/frontend/src/rest/apps.js.orig b/frontend/src/rest/apps.js.orig deleted file mode 100644 index af6744c..0000000 --- a/frontend/src/rest/apps.js.orig +++ /dev/null @@ -1,103 +0,0 @@ -import { restGet } from './restConsumer.js' -import { ref, computed } from 'vue' -import i18n from '@/i18n.js' - -// Liste des apps -import LoginPage from '@/Apps/Login.vue' -import Profil from "@/Apps/Profil.vue" -import Courses from "@/Apps/ManageCourses.vue" -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"; -import Msg from "@/Apps/Msg.vue" -import Forums from '@/Apps/Forums.vue' -import Payments from "@/Apps/Inscription/PaymentInfo.vue"; -import ManageRequests from "@/Apps/Inscription/ManageRequests.vue"; -import ManageResearcherProfile from "@/Apps/ScientificPublications/ManageResearcherProfile.vue"; -import ListResearches from "@/Apps/ScientificPublications/ListResearches.vue"; -import ResearcherProfile from "@/Apps/ScientificPublications/ResearcherProfile.vue"; -import CreateUser from "@/Apps/CreateUser.vue"; - -const apps = { - '/schedule': Schedule, - '/manage-schedule': ManageSchedule, - '/login': LoginPage, - '/requests': ManageRequests, - '/profil': Profil, - '/manage-courses' : Courses, - '/users-list' : Users, - '/students-list' : Students, -<<<<<<< HEAD - '/manage-researcher-profile' : ManageResearcherProfile, - '/msg' : Msg, - '/researches' : ListResearches, - '/researcher-profile': ResearcherProfile, - '/create-user': CreateUser -======= - '/manage-owned-lessons': ManageOwnedLessons, - '/manage-schedule-requests' : LessonRequests, - '/msg' : Msg, - '/forums': Forums, - '/payments': Payments ->>>>>>> origin/master -} - -const appsList = { - 'ListResearches': {path:'#/researches', icon:'fa-book-bookmark',text:i18n("app.list.researches")}, - 'Msg': { path: '#/msg', icon: 'fa-comment', text: i18n("app.messages") }, - 'Notification': { path: '#/notifs', icon: 'fa-bell', text: i18n("app.notifications") }, - 'Forum': { path: '#/forums', icon: 'fa-envelope', text: i18n("app.forum") }, - 'Schedule': { path: '#/schedule', icon: 'fa-calendar-days', text: i18n("app.schedules") }, - 'ManageSchedules': { path: '#/manage-schedule', icon: 'fa-calendar-days', text: i18n("app.manageSchedules")}, - '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")}, -<<<<<<< HEAD - 'ManageResearcherProfile':{path:'#/manage-researcher-profile',icon:'fa-book-bookmark',text:i18n("app.manage.researcherProfile")}, - 'CreateUser':{path:'#/create-user',icon:'fa-plus', text:i18n("app.Create.User")} - -======= - '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")}, - 'Requests': { path: '#/requests', icon: 'fa-users', text: "Requests" }, - 'Payments':{path: '#/payments', icon:'fa-users', text:i18n("app.payments")} ->>>>>>> origin/master -} - -const currentPath = ref(window.location.hash) - -export const currentView = computed(() => { - return apps[currentPath.value.split("?")[0].slice(1) || '/'] -}) - -/** - * Return the list of app accesible by a logged (or not) - * user. - */ -export async function appList(){ - let ret = []; - let userAppList = await restGet("/apps"); - for (let userapp in userAppList) { - if(appsList[userAppList[userapp]] != null){ - ret.push(appsList[userAppList[userapp]]) - } - } - return ret; -} - -/** - * Check if the specified page is authorized for the - * user - */ -export async function checkPage(page){ - return restGet("/apps/" + page) -} - -window.addEventListener('hashchange', () => { - currentPath.value = window.location.hash -}) - -// vim:set noet sts=0 sw=4 ts=2 tw=2: diff --git a/frontend/src/rest/courses.js.orig b/frontend/src/rest/courses.js.orig deleted file mode 100644 index 5826f42..0000000 --- a/frontend/src/rest/courses.js.orig +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Courses API - */ - -import { restGet, restPost, restDelete, restPatch } from './restConsumer.js' - -/** - * Create a new course - */ -<<<<<<< HEAD -export async function createCourse(name, credits, owner){ - - return restPost("/course", {title: name, credits: credits, owner} ) -======= -export async function createCourse(id,name, credits, owner){ - return restPost("/course/curriculum/" + id, {title: name, credits: credits, owner} ) ->>>>>>> origin/master -} - -/** - * Delete the specified course - */ -export async function deleteCourse(id){ - return restDelete("/course/" + id); -} - -/** - * Get information on a particular course - * - * @param id identification of the course - * - * @return all atribute of the specified course - * - name - * - credits - * - faculty - * - teacher - * - assistants : list - */ -export async function getCourse(id){ - return restGet("/course/" + id); -} - -/** - * Get the list of courses to display on secretary's option - * - * @return list of courses of the form - * - id - * - name - * - credits - * - facutly - * - teacher - * - Assistants - */ -export async function getCourses(role){ - if(role==="Teacher"){ - return restGet("/courses/owned") - } - return restGet("/courses") -} - - -/** - * Change the options of a course - * - * @param id the id of the course - * @param changes Object with value to changes - * - * The changes object can contain: - * - name - * - credits - * - faculty - * - teacher - * - assistants: should be a list and will replace all assistants - */ -export async function alterCourse(id, changes){ - return restPatch("/course/" + id, changes); -} - -/** - * Return a list containing all the actual courses of a user - */ - -export async function getUserActualCourses(){ - return restGet("/usercourses") -}