1
0
forked from PGL/Clyde

2 Commits

Author SHA1 Message Date
436ba59af1 Adding appointment table 2024-04-02 19:50:45 +02:00
82b4e24d03 Meetings page creation 2024-04-02 11:42:15 +02:00
11 changed files with 55 additions and 97 deletions

View File

@ -16,8 +16,6 @@ repositories {
} }
dependencies { dependencies {
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
implementation("org.springframework.boot:spring-boot-starter-jdbc") implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-data-jpa") implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-mail") implementation("org.springframework.boot:spring-boot-starter-mail")

View File

@ -1,10 +1,6 @@
package ovh.herisson.Clyde.Tables; package ovh.herisson.Clyde.Tables;
import jakarta.persistence.*; import jakarta.persistence.*;
import ovh.herisson.Clyde.Tables.Msg.Forum;
import java.util.List;
import org.hibernate.annotations.OnDelete; import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction; import org.hibernate.annotations.OnDeleteAction;
@ -21,11 +17,6 @@ public class Course {
@JoinColumn(name = "Users") @JoinColumn(name = "Users")
private User owner; private User owner;
//// Extension Messagerie /////
@OneToMany
private List<Forum> forums;
///////////////////////////////
public Course(int credits, String title, User owner){ public Course(int credits, String title, User owner){
this.credits = credits; this.credits = credits;
this.title = title; this.title = title;

View File

@ -1,32 +0,0 @@
package ovh.herisson.Clyde.Tables.Msg;
import java.util.Date;
import org.hibernate.annotations.CreationTimestamp;
import jakarta.persistence.*;
import lombok.Data;
import ovh.herisson.Clyde.Tables.User;
@Entity
@Data
public class Answers {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@CreationTimestamp
private Date creation;
@ManyToOne
private Topic topic;
private String content;
@OneToOne
private User author;
private boolean anonymous;
}

View File

@ -0,0 +1,9 @@
package ovh.herisson.Clyde.Tables.Msg;
public enum AppointmentStatus {
WAITING_TEACHER,
WAITING_STUDENT,
CONFIRMED,
REFUSED
}

View File

@ -0,0 +1,30 @@
package ovh.herisson.Clyde.Tables.Msg;
import java.util.Date;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import ovh.herisson.Clyde.Tables.User;
@Entity
public class Appointments {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@ManyToOne
private User teacher, student;
private Date planned;
@Enumerated(EnumType.STRING)
private AppointmentStatus status;
}

View File

@ -1,28 +0,0 @@
package ovh.herisson.Clyde.Tables.Msg;
import java.util.List;
import jakarta.persistence.*;
import lombok.Data;
import ovh.herisson.Clyde.Tables.Course;
import ovh.herisson.Clyde.Tables.User;
@Entity
@Data
public class Forum {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@ManyToOne(cascade = CascadeType.ALL)
private Course course;
private String name;
@OneToMany
private List<User> writers; // User who are authorized to create a post
@OneToMany
private List<User> register;
}

View File

@ -1,26 +0,0 @@
package ovh.herisson.Clyde.Tables.Msg;
import java.util.List;
import jakarta.persistence.*;
import lombok.Data;
import ovh.herisson.Clyde.Tables.User;
@Entity
@Data
public class Topic {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
private String subject, content;
@OneToOne
private User author;
@OneToMany(mappedBy = "topic", cascade = CascadeType.ALL)
private List<Answers> answers;
private boolean locked; // true if new messages can be posted
}

View File

@ -20,6 +20,7 @@ app.login=Login
app.notifications=Notifications app.notifications=Notifications
app.settings=Settings app.settings=Settings
app.messages=Messages app.messages=Messages
app.meetings=Meetings
app.forum=Forum app.forum=Forum
app.schedules=Schedules app.schedules=Schedules
app.inscription.requests=Inscription Requests app.inscription.requests=Inscription Requests

View File

@ -20,6 +20,7 @@ app.login=Se connecter
app.notifications=Notifications app.notifications=Notifications
app.settings=Options app.settings=Options
app.messages=Messages app.messages=Messages
app.meetings=Rendez-vous
app.forum=Forum app.forum=Forum
app.schedules=Horaires app.schedules=Horaires
app.inscription.requests=Demandes d'Inscription app.inscription.requests=Demandes d'Inscription

View File

@ -0,0 +1,11 @@
<template>
</template>
<script setup>
alert("Meetings page WIP")
</script>
<style scoped>
</style>

View File

@ -9,6 +9,7 @@ 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 Meetings from "@/Apps/Meetings.vue"
const apps = { const apps = {
'/login': LoginPage, '/login': LoginPage,
@ -17,10 +18,12 @@ const apps = {
'/manage-courses' : Courses, '/manage-courses' : Courses,
'/users-list' : Users, '/users-list' : Users,
'/students-list' : Students, '/students-list' : Students,
'/meetings' : Meetings,
} }
const appsList = { const appsList = {
'Msg': { path: '#/msg', icon: 'fa-comment', text: i18n("app.messages") }, 'Msg': { path: '#/msg', icon: 'fa-comment', text: i18n("app.messages") },
'Meetings': { path: '#/meetings', icon: 'fa-handshake', text: i18n("app.meetings") },
'Notification': { path: '#/notifs', icon: 'fa-bell', text: i18n("app.notifications") }, 'Notification': { path: '#/notifs', icon: 'fa-bell', text: i18n("app.notifications") },
'Forum': { path: '#/forum', icon: 'fa-envelope', text: i18n("app.forum") }, 'Forum': { path: '#/forum', icon: 'fa-envelope', text: i18n("app.forum") },
'Schedule': { path: '#/schedule', icon: 'fa-calendar-days', text: i18n("app.schedules") }, 'Schedule': { path: '#/schedule', icon: 'fa-calendar-days', text: i18n("app.schedules") },