Compare commits
	
		
			13 Commits
		
	
	
		
			tonitch/fi
			...
			1f66ac5a4d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 1f66ac5a4d | |||
| 59b82abf71 | |||
| cf0c465248 | |||
| 2917d645fa | |||
| 730a72dba3 | |||
| 47eb98da57 | |||
| eafcf6b265 | |||
| 34e537ff02 | |||
| 364f39c4bc | |||
| f2675ed764 | |||
| 85c1282f48 | |||
| 4d6387ca8b | |||
| fa2deca1b9 | 
@ -42,6 +42,7 @@ public class MockController {
 | 
				
			|||||||
    public final LessonRequestService lessonRequestService;
 | 
					    public final LessonRequestService lessonRequestService;
 | 
				
			||||||
    ArrayList<User> mockUsers;
 | 
					    ArrayList<User> mockUsers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public static boolean isMocked = false;
 | 
				
			||||||
    public final ResearchesService researchesService;
 | 
					    public final ResearchesService researchesService;
 | 
				
			||||||
    public final UserCurriculumRepository ucr;
 | 
					    public final UserCurriculumRepository ucr;
 | 
				
			||||||
    public final MinervalRepository minervalRepository;
 | 
					    public final MinervalRepository minervalRepository;
 | 
				
			||||||
@ -78,7 +79,7 @@ public class MockController {
 | 
				
			|||||||
    @PostMapping("/mock")
 | 
					    @PostMapping("/mock")
 | 
				
			||||||
    public void postMock() {
 | 
					    public void postMock() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if(!isMocked){
 | 
				
			||||||
        // user part
 | 
					        // user part
 | 
				
			||||||
        User herobrine = new User("brine","hero","admin@admin.com","behind","ShadowsLand",new Date(0), null,Role.Admin,"admin");
 | 
					        User herobrine = new User("brine","hero","admin@admin.com","behind","ShadowsLand",new Date(0), null,Role.Admin,"admin");
 | 
				
			||||||
        User joe = new User("Piplo","Joe","student@student.com","roundabout","England",new Date(0), null,Role.Student,"student");
 | 
					        User joe = new User("Piplo","Joe","student@student.com","roundabout","England",new Date(0), null,Role.Student,"student");
 | 
				
			||||||
@ -230,6 +231,9 @@ public class MockController {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null, null);
 | 
					        externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null, null);
 | 
				
			||||||
        externalCurriculumRepository.save(externalCurriculum);
 | 
					        externalCurriculumRepository.save(externalCurriculum);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        isMocked = true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -15,33 +15,33 @@ import java.util.Map;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
public interface StatsRepository extends CrudRepository<Research,Long> {
 | 
					public interface StatsRepository extends CrudRepository<Research,Long> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Query("select new map(to_char(r.releaseDate, 'month') as label, sum(r.views) as y) from Research r group by to_char(r.releaseDate, 'month')")
 | 
					    @Query("select new map(to_char(r.releaseDate, 'month') as label, sum(r.views) as y) from Research r where r.author.id = ?1 group by to_char(r.releaseDate, 'month')")
 | 
				
			||||||
    Iterable<Map<String ,Integer>> viewsByMonths();
 | 
					    Iterable<Map<String ,Integer>> viewsByMonths(long researcherId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Query("select new map(to_char(r.releaseDate,'YYYY') as label, sum  (r.views) as y) from Research r group by to_char(r.releaseDate,'YYYY')")
 | 
					    @Query("select new map(to_char(r.releaseDate,'YYYY') as label, sum  (r.views) as y) from Research r group by to_char(r.releaseDate,'YYYY')")
 | 
				
			||||||
    Iterable<Map<String ,Integer>> viewsByYears();
 | 
					    Iterable<Map<String ,Integer>> viewsByYears(long researcherId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Query("select new map(r.domain as label, sum(r.views) as y) from Research r group by r.domain")
 | 
					    @Query("select new map(r.domain as label, sum(r.views) as y) from Research r where r.author.id = ?1 group by r.domain")
 | 
				
			||||||
    Iterable<Map<String ,Integer>> viewsByTopics();
 | 
					    Iterable<Map<String ,Integer>> viewsByTopics(long researcherId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Query("select new map(r.domain as label, count(distinct r.language) as y) from Research r group by r.domain")
 | 
					    @Query("select new map(r.domain as label, count(distinct r.language) as y) from Research r where r.author.id = ?1 group by r.domain")
 | 
				
			||||||
    Iterable<Map<String ,Integer>> languageByTopics();
 | 
					    Iterable<Map<String ,Integer>> languageByTopics(long researcherId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Query("select new map(to_char(r.releaseDate,'YYYY') as label,  count(distinct r.language) as y) from Research r group by to_char(r.releaseDate,'YYYY')")
 | 
					    @Query("select new map(to_char(r.releaseDate,'YYYY') as label,  count(distinct r.language) as y) from Research r where r.author.id = ?1 group by to_char(r.releaseDate,'YYYY')")
 | 
				
			||||||
    Iterable<Map<String ,Integer>> languageByYears();
 | 
					    Iterable<Map<String ,Integer>> languageByYears(long researcherId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Query("select new map(to_char(r.releaseDate, 'month') as label, count(distinct r.language) as y) from Research r group by to_char(r.releaseDate, 'month')")
 | 
					    @Query("select new map(to_char(r.releaseDate, 'month') as label, count(distinct r.language) as y) from Research r where r.author.id = ?1 group by to_char(r.releaseDate, 'month')")
 | 
				
			||||||
    Iterable<Map<String ,Integer>> languageByMonths();
 | 
					    Iterable<Map<String ,Integer>> languageByMonths(long researcherId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Query("select new map(to_char(r.releaseDate,'YYYY') as label, count(distinct r) as y) from Research r group by to_char(r.releaseDate,'YYYY')")
 | 
					    @Query("select new map(to_char(r.releaseDate,'YYYY') as label, count(distinct r) as y) from Research r where r.author.id = ?1 group by to_char(r.releaseDate,'YYYY')")
 | 
				
			||||||
    Iterable<Map<String ,Integer>> researchesByYears();
 | 
					    Iterable<Map<String ,Integer>> researchesByYears(long researcherId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Query("select new map(r.domain as label, count(distinct r) as y) from Research r group by r.domain")
 | 
					    @Query("select new map(r.domain as label, count(distinct r) as y) from Research r where r.author.id = ?1 group by r.domain")
 | 
				
			||||||
    Iterable<Map<String ,Integer>> researchesByTopics();
 | 
					    Iterable<Map<String ,Integer>> researchesByTopics(long researcherId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Query("select new map(to_char(r.releaseDate, 'month') as label, count(distinct r) as y) from Research r group by to_char(r.releaseDate, 'month')")
 | 
					    @Query("select new map(to_char(r.releaseDate, 'month') as label, count(distinct r) as y) from Research r where r.author.id = ?1 group by to_char(r.releaseDate, 'month')")
 | 
				
			||||||
    Iterable<Map<String ,Integer>> researchesByMonth();
 | 
					    Iterable<Map<String ,Integer>> researchesByMonth(long researcherId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -34,17 +34,17 @@ public class StatisticsService {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        ArrayList<Iterable<Map<String,Integer>>> toReturn = new ArrayList<>();
 | 
					        ArrayList<Iterable<Map<String,Integer>>> toReturn = new ArrayList<>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        toReturn.add(statsRepo.viewsByYears());
 | 
					        toReturn.add(statsRepo.viewsByYears(researcher.getId()));
 | 
				
			||||||
        toReturn.add(statsRepo.viewsByMonths());
 | 
					        toReturn.add(statsRepo.viewsByMonths(researcher.getId()));
 | 
				
			||||||
        toReturn.add(statsRepo.viewsByTopics());
 | 
					        toReturn.add(statsRepo.viewsByTopics(researcher.getId()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        toReturn.add(statsRepo.researchesByYears());
 | 
					        toReturn.add(statsRepo.researchesByYears(researcher.getId()));
 | 
				
			||||||
        toReturn.add(statsRepo.researchesByMonth());
 | 
					        toReturn.add(statsRepo.researchesByMonth(researcher.getId()));
 | 
				
			||||||
        toReturn.add(statsRepo.researchesByTopics());
 | 
					        toReturn.add(statsRepo.researchesByTopics(researcher.getId()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        toReturn.add(statsRepo.languageByYears());
 | 
					        toReturn.add(statsRepo.languageByYears(researcher.getId()));
 | 
				
			||||||
        toReturn.add(statsRepo.languageByMonths());
 | 
					        toReturn.add(statsRepo.languageByMonths(researcher.getId()));
 | 
				
			||||||
        toReturn.add(statsRepo.languageByTopics());
 | 
					        toReturn.add(statsRepo.languageByTopics(researcher.getId()));
 | 
				
			||||||
        return toReturn;
 | 
					        return toReturn;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -2,8 +2,6 @@ package ovh.herisson.Clyde.Tables.Inscription;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import jakarta.persistence.*;
 | 
					import jakarta.persistence.*;
 | 
				
			||||||
import org.hibernate.annotations.OnDelete;
 | 
					 | 
				
			||||||
import org.hibernate.annotations.OnDeleteAction;
 | 
					 | 
				
			||||||
import ovh.herisson.Clyde.Tables.Course;
 | 
					import ovh.herisson.Clyde.Tables.Course;
 | 
				
			||||||
import ovh.herisson.Clyde.Tables.RequestState;
 | 
					import ovh.herisson.Clyde.Tables.RequestState;
 | 
				
			||||||
import ovh.herisson.Clyde.Tables.User;
 | 
					import ovh.herisson.Clyde.Tables.User;
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,6 @@ import ovh.herisson.Clyde.Tables.RequestState;
 | 
				
			|||||||
import ovh.herisson.Clyde.Tables.User;
 | 
					import ovh.herisson.Clyde.Tables.User;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.Date;
 | 
					import java.util.Date;
 | 
				
			||||||
import java.util.Map;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Entity
 | 
					@Entity
 | 
				
			||||||
public class ScholarshipRequest {
 | 
					public class ScholarshipRequest {
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,6 @@ package ovh.herisson.Clyde.Tables.Inscription;
 | 
				
			|||||||
import jakarta.persistence.*;
 | 
					import jakarta.persistence.*;
 | 
				
			||||||
import ovh.herisson.Clyde.Tables.Curriculum;
 | 
					import ovh.herisson.Clyde.Tables.Curriculum;
 | 
				
			||||||
import ovh.herisson.Clyde.Tables.RequestState;
 | 
					import ovh.herisson.Clyde.Tables.RequestState;
 | 
				
			||||||
import ovh.herisson.Clyde.Tables.User;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.Date;
 | 
					import java.util.Date;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -50,6 +50,7 @@ Delete=Delete
 | 
				
			|||||||
Modify=Modify
 | 
					Modify=Modify
 | 
				
			||||||
Create=Créer
 | 
					Create=Créer
 | 
				
			||||||
requestType=Request Type
 | 
					requestType=Request Type
 | 
				
			||||||
 | 
					lessonType=Course Type
 | 
				
			||||||
day=Day
 | 
					day=Day
 | 
				
			||||||
start=Start
 | 
					start=Start
 | 
				
			||||||
end=End
 | 
					end=End
 | 
				
			||||||
 | 
				
			|||||||
@ -50,6 +50,7 @@ Delete=Supprimer
 | 
				
			|||||||
Modify=Modifier
 | 
					Modify=Modifier
 | 
				
			||||||
Create=Créer
 | 
					Create=Créer
 | 
				
			||||||
requestType=Type de Requête
 | 
					requestType=Type de Requête
 | 
				
			||||||
 | 
					lessonType=Type de cours
 | 
				
			||||||
day=Jour
 | 
					day=Jour
 | 
				
			||||||
start=Début
 | 
					start=Début
 | 
				
			||||||
end=Fin
 | 
					end=Fin
 | 
				
			||||||
 | 
				
			|||||||
@ -1,14 +1,13 @@
 | 
				
			|||||||
<script setup>
 | 
					<script setup>
 | 
				
			||||||
  import { toast } from 'vue3-toastify';
 | 
					 | 
				
			||||||
  import { ref } from 'vue'
 | 
					  import { ref } from 'vue'
 | 
				
			||||||
  import i18n, { setLang } from './i18n.js'
 | 
					  import i18n, { setLang } from './i18n.js'
 | 
				
			||||||
  import { isLogged, getSelf } from '@/rest/Users.js'
 | 
					  import { isLogged, getSelf } from '@/rest/Users.js'
 | 
				
			||||||
	import { notifications, fetchNotifications, archiveNotification } from '@/rest/notifications.js'
 | 
						import { notifications, fetchNotifications, archiveNotification } from '@/rest/notifications.js'
 | 
				
			||||||
 | 
					  import {postMock} from "@/rest/restConsumer.js";
 | 
				
			||||||
  import { appList, currentView } from '@/rest/apps.js'
 | 
					  import { appList, currentView } from '@/rest/apps.js'
 | 
				
			||||||
		var prevURL;
 | 
							var prevURL;
 | 
				
			||||||
		var currentURL = window.location.hash;
 | 
							var currentURL = window.location.hash;
 | 
				
			||||||
 | 
					postMock()
 | 
				
			||||||
window.onhashchange = function() {
 | 
					window.onhashchange = function() {
 | 
				
			||||||
    prevURL = currentURL;
 | 
					    prevURL = currentURL;
 | 
				
			||||||
    currentURL = window.location.hash;
 | 
					    currentURL = window.location.hash;
 | 
				
			||||||
 | 
				
			|||||||
@ -32,6 +32,7 @@ async function createResearcher(){
 | 
				
			|||||||
  toCreate.user = user.value
 | 
					  toCreate.user = user.value
 | 
				
			||||||
  await postResearcher(toCreate)
 | 
					  await postResearcher(toCreate)
 | 
				
			||||||
  creating.value = false
 | 
					  creating.value = false
 | 
				
			||||||
 | 
					  allResearcher.value = await fetchAllResearchers()
 | 
				
			||||||
  for (let i = 0; i < allResearcher.value.length; i++) {
 | 
					  for (let i = 0; i < allResearcher.value.length; i++) {
 | 
				
			||||||
    if (user.value.regNo === allResearcher.value[i].user.regNo){
 | 
					    if (user.value.regNo === allResearcher.value[i].user.regNo){
 | 
				
			||||||
      researcher.value = allResearcher.value[i]
 | 
					      researcher.value = allResearcher.value[i]
 | 
				
			||||||
@ -147,8 +148,7 @@ async function modify(){
 | 
				
			|||||||
  column-gap:2.7%;
 | 
					  column-gap:2.7%;
 | 
				
			||||||
  row-gap:45px;
 | 
					  row-gap:45px;
 | 
				
			||||||
  grid-template-areas:
 | 
					  grid-template-areas:
 | 
				
			||||||
  "profilPic globalInfos"
 | 
					  "profilPic globalInfos";
 | 
				
			||||||
  "minfos minfos";
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.profilPic{
 | 
					.profilPic{
 | 
				
			||||||
@ -167,7 +167,8 @@ async function modify(){
 | 
				
			|||||||
  display:flex;
 | 
					  display:flex;
 | 
				
			||||||
  align-items:center;
 | 
					  align-items:center;
 | 
				
			||||||
  justify-content:center;
 | 
					  justify-content:center;
 | 
				
			||||||
  margin-top:5%;
 | 
					  margin-right: auto;
 | 
				
			||||||
 | 
					  margin-left: auto;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.subContainer{
 | 
					.subContainer{
 | 
				
			||||||
 | 
				
			|||||||
@ -18,7 +18,7 @@ const AcceptMod = ref(false);
 | 
				
			|||||||
const moreInfosMod = ref(false);
 | 
					const moreInfosMod = ref(false);
 | 
				
			||||||
const requestTypes = ["Create", "Modify", "Delete"]
 | 
					const requestTypes = ["Create", "Modify", "Delete"]
 | 
				
			||||||
const editElementID = ref('');
 | 
					const editElementID = ref('');
 | 
				
			||||||
const chosenLocal = ref("");
 | 
					const chosenLocal = ref();
 | 
				
			||||||
const locals = ["A0B1","A1B1","A2B1","A0B2"];
 | 
					const locals = ["A0B1","A1B1","A2B1","A0B2"];
 | 
				
			||||||
const moreInfos = ref({});
 | 
					const moreInfos = ref({});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -30,6 +30,7 @@ const moreInfos = ref({});
 | 
				
			|||||||
async function upPage(id,review){
 | 
					async function upPage(id,review){
 | 
				
			||||||
  await changeRequestState(id, review) ;
 | 
					  await changeRequestState(id, review) ;
 | 
				
			||||||
  requests.value = await getAllRequests();
 | 
					  requests.value = await getAllRequests();
 | 
				
			||||||
 | 
					  chosenLocal.value = null;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 | 
				
			|||||||
@ -168,11 +168,9 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div v-if="!createMod && !deleteMod" v-for="item in curriculum" :key="item.title" style="width:50%;margin-left:auto; margin-right:auto;">
 | 
					    <div v-if="!createMod && !deleteMod" v-for="item in curriculum" :key="item.title" style="width:50%;margin-left:auto; margin-right:auto;">
 | 
				
			||||||
      <div  v-if="editElementID !== item.title && editAddCourse !== item.title" style ="padding:15px 15px 15px 15px;">
 | 
					      <div  v-if="editElementID !== item.title && editAddCourse !== item.title" style="display:flex;">
 | 
				
			||||||
        <button   @click="editElementID = item.title; editAddCourse = ''; setModify(item); ">
 | 
					        <button   @click="editElementID = item.title; editAddCourse = ''; setModify(item);">{{i18n("courses.modify")}}</button>
 | 
				
			||||||
        {{i18n("courses.modify")}}
 | 
					        <button v-if="self.role !== 'Teacher'"@click="editAddCourse = item.title; editElementID ='';setAddToCurriculum(item)">{{i18n("courses.AddToCurriculum")}}</button>
 | 
				
			||||||
        </button>
 | 
					 | 
				
			||||||
        <button v-if="self.role !== 'Teacher'"@click="editAddCourse = item.title; editElementID ='';setAddToCurriculum(item)">Add to a new Curriculum</button>
 | 
					 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div v-if="editElementID == item.title">
 | 
					      <div v-if="editElementID == item.title">
 | 
				
			||||||
        <button @click="editElementID= '';patchCourse(item)"> {{i18n("courses.confirm")}} </button>
 | 
					        <button @click="editElementID= '';patchCourse(item)"> {{i18n("courses.confirm")}} </button>
 | 
				
			||||||
 | 
				
			|||||||
@ -221,6 +221,8 @@ async function setCourses(){
 | 
				
			|||||||
    lessonBuffer.value = Object.assign({}, pattern);
 | 
					    lessonBuffer.value = Object.assign({}, pattern);
 | 
				
			||||||
    lessonFinder.value = null;
 | 
					    lessonFinder.value = null;
 | 
				
			||||||
    lessonCreatorBuffer.value = Object.assign({},lessonCreator)
 | 
					    lessonCreatorBuffer.value = Object.assign({},lessonCreator)
 | 
				
			||||||
 | 
					    allSchedules.value = await getAllSchedule();
 | 
				
			||||||
 | 
					    schedule.value = null; 
 | 
				
			||||||
    trueSchedule.value = null;
 | 
					    trueSchedule.value = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -93,12 +93,14 @@
 | 
				
			|||||||
  
 | 
					  
 | 
				
			||||||
  async function ChangeInfos(){
 | 
					  async function ChangeInfos(){
 | 
				
			||||||
    for (let element in toModify){
 | 
					    for (let element in toModify){
 | 
				
			||||||
 | 
					      console.log(element)
 | 
				
			||||||
 | 
					      console.log(toModify[element])
 | 
				
			||||||
         if (element ==="email" && (toModify[element] !== null)){
 | 
					         if (element ==="email" && (toModify[element] !== null)){
 | 
				
			||||||
          await  alterSelf(user.value.regNo,{email : toModify[element]});
 | 
					          await  alterSelf(user.value.regNo,{email : toModify[element]});
 | 
				
			||||||
        }      
 | 
					        }      
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (element ==="profilPictureUrl" && (toModify[element] !== null)){
 | 
					        if (element ==="profilePictureUrl" && (toModify[element] !== null)){
 | 
				
			||||||
          await  alterSelf(user.value.regNo,{ profilPictureUrl : toModify[element]});
 | 
					          await  alterSelf(user.value.regNo,{ profilePictureUrl : toModify[element]});
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else if(element === "address" && (toModify[element] !== null)){
 | 
					        else if(element === "address" && (toModify[element] !== null)){
 | 
				
			||||||
          await  alterSelf(user.value.regNo,{address : toModify[element]});
 | 
					          await  alterSelf(user.value.regNo,{address : toModify[element]});
 | 
				
			||||||
@ -116,7 +118,7 @@
 | 
				
			|||||||
     toModify.address = item.address;
 | 
					     toModify.address = item.address;
 | 
				
			||||||
     toModify.profilPictureUrl = item.profilPictureUrl;
 | 
					     toModify.profilPictureUrl = item.profilPictureUrl;
 | 
				
			||||||
     toModify.email= item.email;
 | 
					     toModify.email= item.email;
 | 
				
			||||||
     toModify.password= item.password;
 | 
					     toModify.password= item.password
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function getPP(){
 | 
					  function getPP(){
 | 
				
			||||||
@ -176,6 +178,13 @@
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  async function getProfilePic(data){
 | 
				
			||||||
 | 
					    const pp= await uploadProfilePicture(data)
 | 
				
			||||||
 | 
					    toModify.profilePictureUrl = pp.url
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@ -306,7 +315,7 @@
 | 
				
			|||||||
        <div v-else-if="windowState === 1" class="infosContainer">
 | 
					        <div v-else-if="windowState === 1" class="infosContainer">
 | 
				
			||||||
          <div>
 | 
					          <div>
 | 
				
			||||||
            {{i18n("profile.picture")}}:
 | 
					            {{i18n("profile.picture")}}:
 | 
				
			||||||
            <input type="file" @change="user.profilPicture = uploadProfilePicture($event.target.files);" accept="image/*">
 | 
					            <input type="file" @change="getProfilePic($event.target.files)" accept="image/*">
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <div>
 | 
					          <div>
 | 
				
			||||||
            {{ i18n("login.guest.email")}}
 | 
					            {{ i18n("login.guest.email")}}
 | 
				
			||||||
 | 
				
			|||||||
@ -136,8 +136,10 @@ const emit = defineEmits(["modified"]);
 | 
				
			|||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#researches{
 | 
					#researches{
 | 
				
			||||||
 | 
					  padding-top: 15px;
 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
  height: 100%;
 | 
					  height: 100%;
 | 
				
			||||||
 | 
					  overflow: scroll;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#search{
 | 
					#search{
 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
 | 
				
			|||||||
@ -51,7 +51,7 @@ function getPP(){
 | 
				
			|||||||
<template> <div class="body"><div id="main">
 | 
					<template> <div class="body"><div id="main">
 | 
				
			||||||
    <ResearchPostComponent :allResearcher="allResearcher" :researcher="researcher" :isOpen="isPostResearchOpened" @modal-close="isPostResearchOpened = false" @posted="modifiedResearch"></ResearchPostComponent>
 | 
					    <ResearchPostComponent :allResearcher="allResearcher" :researcher="researcher" :isOpen="isPostResearchOpened" @modal-close="isPostResearchOpened = false" @posted="modifiedResearch"></ResearchPostComponent>
 | 
				
			||||||
    <div id="profilePicture" >
 | 
					    <div id="profilePicture" >
 | 
				
			||||||
      <img :src=getPP() />
 | 
					      <img :src=getPP() style="border-radius: 20%"/>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div id="researcherInfos">
 | 
					    <div id="researcherInfos">
 | 
				
			||||||
      <div class="surrounded" v-if="!changing">{{researcher.user.lastName}} {{researcher.user.firstName}}</div>
 | 
					      <div class="surrounded" v-if="!changing">{{researcher.user.lastName}} {{researcher.user.firstName}}</div>
 | 
				
			||||||
@ -82,7 +82,7 @@ function getPP(){
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <ListResearches :allResearcher="allResearcher" :research-list="researchList" :manage="true" @modified="modifiedResearch"></ListResearches>
 | 
					    <div> <ListResearches :allResearcher="allResearcher" :research-list="researchList" :manage="true" @modified="modifiedResearch"></ListResearches> </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
				
			|||||||
@ -103,7 +103,7 @@ async function articleClicked(){
 | 
				
			|||||||
        </ul>
 | 
					        </ul>
 | 
				
			||||||
          <div id="downloads" v-if="article.pdfLocation !== null && !manage">
 | 
					          <div id="downloads" v-if="article.pdfLocation !== null && !manage">
 | 
				
			||||||
            <a :href=downloadPdf() @click.stop="articleClicked" target="_blank">{{i18n("See.Research")}}</a>
 | 
					            <a :href=downloadPdf() @click.stop="articleClicked" target="_blank">{{i18n("See.Research")}}</a>
 | 
				
			||||||
            <a v-if="article.bibTexLocation !== null" :href=downloadBibTex() @click.stop="emit('modal-close')"  target="_blank">{{i18n("See.BibTex")}}</a> </div>
 | 
					            <a v-if="article.bibTexLocation !== null" :href=downloadBibTex() @click.stop="emit('modal-close')"  target="_blank">{{i18n("SeeBibTex")}}</a> </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div v-if="manage" id="manage">
 | 
					        <div v-if="manage" id="manage">
 | 
				
			||||||
          <div>
 | 
					          <div>
 | 
				
			||||||
 | 
				
			|||||||
@ -78,7 +78,7 @@ function update(){
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div id="main">
 | 
					  <div id="main">
 | 
				
			||||||
    <div id="profilePicture">
 | 
					    <div id="profilePicture">
 | 
				
			||||||
      <img :src=getPP() />
 | 
					      <img :src=getPP() style="border-radius: 20%"/>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div id="researcherInfos">
 | 
					    <div id="researcherInfos">
 | 
				
			||||||
      <div class="surrounded">{{researcher.user.lastName}} {{researcher.user.firstName}}</div>
 | 
					      <div class="surrounded">{{researcher.user.lastName}} {{researcher.user.firstName}}</div>
 | 
				
			||||||
@ -111,7 +111,7 @@ function update(){
 | 
				
			|||||||
		  <CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
 | 
							  <CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div id="researches"><list-researches :researchList="researchList"></list-researches></div>
 | 
					    <div id="researches" style="margin-top: -15px"><list-researches :researchList="researchList"></list-researches></div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -27,6 +27,9 @@ export function restPatch(endPoint, data) {
 | 
				
			|||||||
	return _rest(endPoint, {method: "PATCH", credentials: 'include', body: JSON.stringify(data)});
 | 
						return _rest(endPoint, {method: "PATCH", credentials: 'include', body: JSON.stringify(data)});
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function postMock(){
 | 
				
			||||||
 | 
						return restPost("/mock")
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * backbone for the request made by the frontend
 | 
					 * backbone for the request made by the frontend
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user