From 608b6e4893600e8cabf3dedd6c78881bc1036d0c Mon Sep 17 00:00:00 2001
From: Bartha Maxime <231026@umons.ac.be>
Date: Sun, 21 Apr 2024 20:07:21 +0200
Subject: [PATCH] added reesearcher manager for secretary
---
.../ResearchesService.java | 8 +
.../ScientificPublications/Researcher.java | 3 +-
frontend/public/i18n/EN.txt | 10 +-
frontend/public/i18n/FR.txt | 6 +
frontend/src/Apps/AboutUser.vue | 207 ++++++++++++++++++
.../ManageResearcherProfile.vue | 6 +-
frontend/src/Apps/UsersList.vue | 20 +-
.../ResearcherProfile.js | 8 +
8 files changed, 258 insertions(+), 10 deletions(-)
create mode 100644 frontend/src/Apps/AboutUser.vue
diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/ScientificPublications/ResearchesService.java b/backend/src/main/java/ovh/herisson/Clyde/Services/ScientificPublications/ResearchesService.java
index e7bea68..445cf41 100644
--- a/backend/src/main/java/ovh/herisson/Clyde/Services/ScientificPublications/ResearchesService.java
+++ b/backend/src/main/java/ovh/herisson/Clyde/Services/ScientificPublications/ResearchesService.java
@@ -114,6 +114,14 @@ public class ResearchesService {
}
public void deleteResearcher(Researcher researcher) {
+ articleRepo.findAll();
+ for (Research r: articleRepo.findAll())
+ {
+ if (r.getCoAuthors().contains(researcher)){
+ r.getCoAuthors().remove(researcher);
+ articleRepo.save(r);
+ }
+ }
researcherRepo.delete(researcher);
}
diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Researcher.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Researcher.java
index 60f8328..259452b 100644
--- a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Researcher.java
+++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/ScientificPublications/Researcher.java
@@ -12,6 +12,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
+import org.hibernate.annotations.OnDelete;
import ovh.herisson.Clyde.Tables.User;
@@ -24,7 +25,7 @@ public class Researcher {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
- @OneToOne(cascade=CascadeType.REMOVE, optional=true)
+ @OneToOne
private User user;
private String orcidId;
private String site;
diff --git a/frontend/public/i18n/EN.txt b/frontend/public/i18n/EN.txt
index 030c814..7e49b71 100644
--- a/frontend/public/i18n/EN.txt
+++ b/frontend/public/i18n/EN.txt
@@ -114,4 +114,12 @@ Confirm.Publish=Confirm Publishing
Cancel.Publish=Cancel Publishing
Years=Years
Months=Months
-By=By
\ No newline at end of file
+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
diff --git a/frontend/public/i18n/FR.txt b/frontend/public/i18n/FR.txt
index 72404ce..732f41d 100644
--- a/frontend/public/i18n/FR.txt
+++ b/frontend/public/i18n/FR.txt
@@ -115,3 +115,9 @@ 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
diff --git a/frontend/src/Apps/AboutUser.vue b/frontend/src/Apps/AboutUser.vue
new file mode 100644
index 0000000..88e880f
--- /dev/null
+++ b/frontend/src/Apps/AboutUser.vue
@@ -0,0 +1,207 @@
+
+
+
+
+
+
+
+