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 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/Apps/ScientificPublications/ManageResearcherProfile.vue b/frontend/src/Apps/ScientificPublications/ManageResearcherProfile.vue index 82e2d03..7f0490e 100644 --- a/frontend/src/Apps/ScientificPublications/ManageResearcherProfile.vue +++ b/frontend/src/Apps/ScientificPublications/ManageResearcherProfile.vue @@ -58,7 +58,7 @@ function getPP(){
{{i18n("To.Change.In.Options")}}
Orcid : {{researcher.orcidId}}
-
Orcid :
+
Orcid :
Email : {{researcher.user.email}}
{{i18n("To.Change.In.Options")}}
@@ -66,10 +66,10 @@ function getPP(){
Site : {{researcher.site}}
-
Site :
+
Site :
{{i18n("Domain")}} : {{researcher.domain}}
-
Domain :
+
Domain :
diff --git a/frontend/src/Apps/UsersList.vue b/frontend/src/Apps/UsersList.vue index 59e60c4..a000495 100644 --- a/frontend/src/Apps/UsersList.vue +++ b/frontend/src/Apps/UsersList.vue @@ -1,20 +1,30 @@