Compare commits
	
		
			1 Commits
		
	
	
		
			Leo/Inscri
			...
			972d08a54d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 972d08a54d | 
@ -25,7 +25,7 @@ dependencies {
 | 
				
			|||||||
	implementation("com.kohlschutter.junixsocket:junixsocket-core:2.9.0")
 | 
						implementation("com.kohlschutter.junixsocket:junixsocket-core:2.9.0")
 | 
				
			||||||
	// implementation("org.springframework.session:spring-session-jdbc")
 | 
						// implementation("org.springframework.session:spring-session-jdbc")
 | 
				
			||||||
	developmentOnly("org.springframework.boot:spring-boot-devtools")
 | 
						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")
 | 
						runtimeOnly("org.postgresql:postgresql")
 | 
				
			||||||
	testImplementation("org.springframework.boot:spring-boot-starter-test")
 | 
						testImplementation("org.springframework.boot:spring-boot-starter-test")
 | 
				
			||||||
	testImplementation("org.springframework.boot:spring-boot-testcontainers")
 | 
						testImplementation("org.springframework.boot:spring-boot-testcontainers")
 | 
				
			||||||
 | 
				
			|||||||
@ -81,7 +81,7 @@ public class InscriptionService {
 | 
				
			|||||||
            );
 | 
					            );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            userRepo.save(userFromRequest);
 | 
					            userRepo.save(userFromRequest);
 | 
				
			||||||
            userCurriculumRepo.save(new UserCurriculum(userFromRequest, curriculumRepo.findById(inscrRequest.getCurriculumId()),0));
 | 
					            userCurriculumRepo.save(new UserCurriculum(userFromRequest, curriculumRepo.findById(inscrRequest.getCurriculumId())));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        inscrRequest.setState(requestState);
 | 
					        inscrRequest.setState(requestState);
 | 
				
			||||||
        save(inscrRequest);
 | 
					        save(inscrRequest);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,66 +0,0 @@
 | 
				
			|||||||
package ovh.herisson.Clyde.Tables;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import jakarta.persistence.*;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@Entity
 | 
					 | 
				
			||||||
public class ExemptionsRequest {
 | 
					 | 
				
			||||||
    @Id
 | 
					 | 
				
			||||||
    @GeneratedValue(strategy = GenerationType.AUTO)
 | 
					 | 
				
			||||||
    private int id;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @ManyToOne
 | 
					 | 
				
			||||||
    @JoinColumn(name = "Users")
 | 
					 | 
				
			||||||
    private User user;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @ManyToOne
 | 
					 | 
				
			||||||
    @JoinColumn(name = "Course")
 | 
					 | 
				
			||||||
    private Course course;
 | 
					 | 
				
			||||||
    private String justifDocument;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private RequestState state;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public ExemptionsRequest(User user, Course course, String justifDocument, RequestState state){
 | 
					 | 
				
			||||||
        this.user = user;
 | 
					 | 
				
			||||||
        this.course = course;
 | 
					 | 
				
			||||||
        this.justifDocument = justifDocument;
 | 
					 | 
				
			||||||
        this.state = state;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public ExemptionsRequest(){}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public User getUser() {
 | 
					 | 
				
			||||||
        return user;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setUser(User user) {
 | 
					 | 
				
			||||||
        this.user = user;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public Course getCourse() {
 | 
					 | 
				
			||||||
        return course;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setCourse(Course course) {
 | 
					 | 
				
			||||||
        this.course = course;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public String getJustifDocument() {
 | 
					 | 
				
			||||||
        return justifDocument;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setJustifDocument(String justifDocument) {
 | 
					 | 
				
			||||||
        this.justifDocument = justifDocument;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public RequestState getState() {
 | 
					 | 
				
			||||||
        return state;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setState(RequestState state) {
 | 
					 | 
				
			||||||
        this.state = state;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,59 +0,0 @@
 | 
				
			|||||||
package ovh.herisson.Clyde.Tables;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import jakarta.persistence.*;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@Entity
 | 
					 | 
				
			||||||
public class ScholarshipRequest {
 | 
					 | 
				
			||||||
    @Id
 | 
					 | 
				
			||||||
    @GeneratedValue(strategy = GenerationType.AUTO)
 | 
					 | 
				
			||||||
    private int id;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @ManyToOne
 | 
					 | 
				
			||||||
    @JoinColumn(name = "Users")
 | 
					 | 
				
			||||||
    private User user;
 | 
					 | 
				
			||||||
    private RequestState state;
 | 
					 | 
				
			||||||
    private String requestForm;
 | 
					 | 
				
			||||||
    private int amount;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public ScholarshipRequest(User user, RequestState state, String requestForm, int amount){
 | 
					 | 
				
			||||||
        this.user = user;
 | 
					 | 
				
			||||||
        this.state = state;
 | 
					 | 
				
			||||||
        this.requestForm = requestForm;
 | 
					 | 
				
			||||||
        this.amount = amount;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public ScholarshipRequest(){}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public User getUser() {
 | 
					 | 
				
			||||||
        return user;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setUser(User user) {
 | 
					 | 
				
			||||||
        this.user = user;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public RequestState getState() {
 | 
					 | 
				
			||||||
        return state;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setState(RequestState state) {
 | 
					 | 
				
			||||||
        this.state = state;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public String getRequestForm() {
 | 
					 | 
				
			||||||
        return requestForm;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setRequestForm(String requestForm) {
 | 
					 | 
				
			||||||
        this.requestForm = requestForm;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public int getAmount() {
 | 
					 | 
				
			||||||
        return amount;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setAmount(int amount) {
 | 
					 | 
				
			||||||
        this.amount = amount;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,28 +0,0 @@
 | 
				
			|||||||
package ovh.herisson.Clyde.Tables;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import jakarta.persistence.Entity;
 | 
					 | 
				
			||||||
import jakarta.persistence.GeneratedValue;
 | 
					 | 
				
			||||||
import jakarta.persistence.GenerationType;
 | 
					 | 
				
			||||||
import jakarta.persistence.Id;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@Entity
 | 
					 | 
				
			||||||
public class UninscriptionRequest {
 | 
					 | 
				
			||||||
    @Id
 | 
					 | 
				
			||||||
    @GeneratedValue(strategy = GenerationType.AUTO)
 | 
					 | 
				
			||||||
    private int id;
 | 
					 | 
				
			||||||
    private RequestState state;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public UninscriptionRequest(RequestState state){
 | 
					 | 
				
			||||||
        this.state = state;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public UninscriptionRequest(){}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public RequestState getState() {
 | 
					 | 
				
			||||||
        return state;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setState(RequestState state) {
 | 
					 | 
				
			||||||
        this.state = state;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -21,12 +21,9 @@ public class UserCurriculum {
 | 
				
			|||||||
    @OnDelete(action = OnDeleteAction.CASCADE)
 | 
					    @OnDelete(action = OnDeleteAction.CASCADE)
 | 
				
			||||||
    private Curriculum curriculum;
 | 
					    private Curriculum curriculum;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private int year;
 | 
					    public UserCurriculum(User user, Curriculum curriculum){
 | 
				
			||||||
 | 
					 | 
				
			||||||
    public UserCurriculum(User user, Curriculum curriculum, int year){
 | 
					 | 
				
			||||||
        this.user = user;
 | 
					        this.user = user;
 | 
				
			||||||
        this.curriculum = curriculum;
 | 
					        this.curriculum = curriculum;
 | 
				
			||||||
        this.year = year;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public UserCurriculum() {}
 | 
					    public UserCurriculum() {}
 | 
				
			||||||
@ -50,12 +47,4 @@ public class UserCurriculum {
 | 
				
			|||||||
    public void setCurriculum(Curriculum curriculum) {
 | 
					    public void setCurriculum(Curriculum curriculum) {
 | 
				
			||||||
        this.curriculum = curriculum;
 | 
					        this.curriculum = curriculum;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    public int getYear() {
 | 
					 | 
				
			||||||
        return year;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public void setYear(int year) {
 | 
					 | 
				
			||||||
        this.year = year;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,82 +0,0 @@
 | 
				
			|||||||
<script setup>
 | 
					 | 
				
			||||||
  import i18n from "@/i18n.js"
 | 
					 | 
				
			||||||
  import {getSelf, getUser} from '../rest/Users.js'
 | 
					 | 
				
			||||||
  import {ref} from "vue";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const user = await getSelf();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  function getPP(){
 | 
					 | 
				
			||||||
    if(user.value.profilePictureUrl === null){
 | 
					 | 
				
			||||||
      return "/Clyde.png"
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    return user.profilePictureUrl
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<template>
 | 
					 | 
				
			||||||
  <div class="body">
 | 
					 | 
				
			||||||
    <div class="container">
 | 
					 | 
				
			||||||
      <div class="profilPic">
 | 
					 | 
				
			||||||
        <img class="subContainter" :src=getPP()>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class = "globalInfos">
 | 
					 | 
				
			||||||
        <div class="infosContainer">
 | 
					 | 
				
			||||||
          <div>
 | 
					 | 
				
			||||||
            {{user.firstName}} {{user.lastName}}
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div>
 | 
					 | 
				
			||||||
            E-mail: {{user.email}}
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<style>
 | 
					 | 
				
			||||||
.container{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  display:grid;
 | 
					 | 
				
			||||||
  grid-template-columns:200px 900px;
 | 
					 | 
				
			||||||
  grid-template-rows:200px auto;
 | 
					 | 
				
			||||||
  column-gap:30px;
 | 
					 | 
				
			||||||
  row-gap:45px;
 | 
					 | 
				
			||||||
  grid-template-areas:
 | 
					 | 
				
			||||||
  "profilPic globalInfos"
 | 
					 | 
				
			||||||
  "minfos minfos";
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.profilPic{
 | 
					 | 
				
			||||||
  grid-area:profilPic;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.globalInfos {
 | 
					 | 
				
			||||||
  grid-area:globalInfos;
 | 
					 | 
				
			||||||
  align-self :center;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.body {
 | 
					 | 
				
			||||||
  width:100%;
 | 
					 | 
				
			||||||
  margin-bottom:10px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.subContainter{
 | 
					 | 
				
			||||||
  width:100%;
 | 
					 | 
				
			||||||
  background-color:rgb(50,50,50);
 | 
					 | 
				
			||||||
  border-radius:20px;
 | 
					 | 
				
			||||||
  border:4px solid black;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.infosContainer {
 | 
					 | 
				
			||||||
  padding-bottom:50px;
 | 
					 | 
				
			||||||
  border:2px solid black;
 | 
					 | 
				
			||||||
  font-size:25px;
 | 
					 | 
				
			||||||
  color:white;
 | 
					 | 
				
			||||||
  padding:20px;
 | 
					 | 
				
			||||||
  background-color:rgb(50,50,50);
 | 
					 | 
				
			||||||
  border-radius:20px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
@ -9,7 +9,6 @@ import Profil from "@/Apps/Profil.vue"
 | 
				
			|||||||
import Courses from "@/Apps/ManageCourses.vue"
 | 
					import Courses from "@/Apps/ManageCourses.vue"
 | 
				
			||||||
import Users from "@/Apps/UsersList.vue"
 | 
					import Users from "@/Apps/UsersList.vue"
 | 
				
			||||||
import Students from "@/Apps/StudentsList.vue"
 | 
					import Students from "@/Apps/StudentsList.vue"
 | 
				
			||||||
import AboutStudent from "@/Apps/AboutStudent.vue";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
const apps = {
 | 
					const apps = {
 | 
				
			||||||
		'/login': LoginPage,
 | 
							'/login': LoginPage,
 | 
				
			||||||
@ -18,7 +17,6 @@ const apps = {
 | 
				
			|||||||
		'/manage-courses' : Courses,
 | 
							'/manage-courses' : Courses,
 | 
				
			||||||
		'/users-list' : Users,
 | 
							'/users-list' : Users,
 | 
				
			||||||
		'/students-list' : Students,
 | 
							'/students-list' : Students,
 | 
				
			||||||
		'/about-students': AboutStudent
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const appsList = {
 | 
					const appsList = {
 | 
				
			||||||
@ -30,7 +28,6 @@ const appsList = {
 | 
				
			|||||||
		'ManageCourses': { path: '#/manage-courses', icon: 'fa-book', text: i18n("app.manage.courses") },
 | 
							'ManageCourses': { path: '#/manage-courses', icon: 'fa-book', text: i18n("app.manage.courses") },
 | 
				
			||||||
		'StudentsList':{ path: '#/students-list',icon: 'fa-users',text: i18n("app.studentList")},
 | 
							'StudentsList':{ path: '#/students-list',icon: 'fa-users',text: i18n("app.studentList")},
 | 
				
			||||||
		'UsersList':{ path: '#/users-list',icon: 'fa-users',text: i18n("app.users")},
 | 
							'UsersList':{ path: '#/users-list',icon: 'fa-users',text: i18n("app.users")},
 | 
				
			||||||
		'AboutStudent':{ path: '#/about-users', icon: 'fa-users', text:i18n("app.aboutStudent")}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const currentPath = ref(window.location.hash)
 | 
					const currentPath = ref(window.location.hash)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user