Implements the backend and frontend methods to get some scholarshipRequests and exemptionsRequest
Extends the inscription.vue so that it also list scholarship and exemptions requests (not only inscription) this vue should be renamed later. Also implements some filters and parameters to select the data displayed in the list.
This commit is contained in:
@ -2,6 +2,10 @@ package ovh.herisson.Clyde.Tables;
|
||||
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Entity
|
||||
public class ExemptionsRequest {
|
||||
@ -9,37 +13,44 @@ public class ExemptionsRequest {
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private int id;
|
||||
|
||||
private long userRegNo;
|
||||
private long courseId;
|
||||
@JoinColumn(name = "Users")
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
private User user;
|
||||
|
||||
@JoinColumn(name = "Course")
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
private Course course;
|
||||
private String justifDocument;
|
||||
|
||||
private RequestState state;
|
||||
|
||||
private Date date;
|
||||
|
||||
public ExemptionsRequest(Long userRegNo, long courseId, String justifDocument, RequestState state){
|
||||
this.userRegNo = userRegNo;
|
||||
this.courseId = courseId;
|
||||
public ExemptionsRequest(User user, Course course, String justifDocument, RequestState state, Date date){
|
||||
this.user = user;
|
||||
this.course = course;
|
||||
this.justifDocument = justifDocument;
|
||||
this.state = state;
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
|
||||
public ExemptionsRequest(){}
|
||||
|
||||
public Long getUserRegNo() {
|
||||
return userRegNo;
|
||||
public User getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUserRegNo(Long userRegNo) {
|
||||
this.userRegNo = userRegNo;
|
||||
public void setUser(User user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public long getCourseId() {
|
||||
return courseId;
|
||||
public Course getCourse() {
|
||||
return course;
|
||||
}
|
||||
|
||||
public void setCourseId(long courseId) {
|
||||
this.courseId = courseId;
|
||||
public void setCourse(Course course) {
|
||||
this.course = course;
|
||||
}
|
||||
|
||||
public String getJustifDocument() {
|
||||
@ -58,4 +69,12 @@ public class ExemptionsRequest {
|
||||
public void setState(RequestState state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package ovh.herisson.Clyde.Tables;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ -10,16 +12,17 @@ public class ScholarshipRequest {
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private long id;
|
||||
|
||||
private long userId;
|
||||
@JoinColumn(name="Users")
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
private User user;
|
||||
private RequestState state;
|
||||
private Date date;
|
||||
private int amount;
|
||||
|
||||
private String taxDocUrl;
|
||||
private String residencyDocUrl;
|
||||
|
||||
public ScholarshipRequest(long userId, RequestState state, int amount, Date date, String taxDocUrl, String residencyDocUrl){
|
||||
this.userId = userId;
|
||||
public ScholarshipRequest(User user, RequestState state, int amount, Date date, String taxDocUrl, String residencyDocUrl){
|
||||
this.user = user;
|
||||
this.state = state;
|
||||
this.amount = amount;
|
||||
this.date = date;
|
||||
@ -29,12 +32,12 @@ public class ScholarshipRequest {
|
||||
|
||||
public ScholarshipRequest(){}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
public User getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
public void setUser(User user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public RequestState getState() {
|
||||
|
Reference in New Issue
Block a user