Compare commits
	
		
			8 Commits
		
	
	
		
			3b63896439
			...
			tonitch/fi
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						d21655c535
	
				 | 
					
					
						|||
| 490bf403f0 | |||
| c61a092809 | |||
| 
						
						
							
						
						2cffe28720
	
				 | 
					
					
						|||
| 
						
						
							
						
						060526c20d
	
				 | 
					
					
						|||
| af8bc8872d | |||
| 12ff43e970 | |||
| 
						
						
							
						
						82cf7cbfaf
	
				 | 
					
					
						
@ -81,7 +81,7 @@ public class MockController {
 | 
			
		||||
 | 
			
		||||
        // user part
 | 
			
		||||
        User herobrine = new User("brine","hero","admin@admin.com","behind","ShadowsLand",new Date(0), null,Role.Admin,"admin");
 | 
			
		||||
        User joe = new User("Mama","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");
 | 
			
		||||
        User meh = new User("Polo","Marco","secretary@secretary.com","a Box","Monaco",new Date(0), null,Role.Secretary,"secretary");
 | 
			
		||||
        User joke = new User("Gaillard","Corentin","teacher@teacher.com","lab","faculty",new Date(0), null,Role.Teacher,"teacher");
 | 
			
		||||
        User jojo = new User("Bridoux","Justin","teacher2@teacher2.com","lab","faculty",new Date(0), null,Role.Teacher,"teacher");
 | 
			
		||||
@ -168,13 +168,13 @@ public class MockController {
 | 
			
		||||
            Research jojoResearch = new Research("Graphs : Advanced Search Algorithms", output, new Date(0),
 | 
			
		||||
                    PaperType.Article, "test.pdf", null, "english",
 | 
			
		||||
                    Access.OpenSource, "IT", "This Article's title speaks for itself \n We'll discuss about advanced Graph search Algorithms",coAuthor);
 | 
			
		||||
            Research restrictedResearch = new Research("just another Name", output, new Date(1111111111),
 | 
			
		||||
                    PaperType.Article, "restricted", null, "english",
 | 
			
		||||
                    Access.Restricted, "Restricted", "This Article's title speaks for itself\n We'll discuss about advanced Graph search Algorithms", new HashSet<>());
 | 
			
		||||
            Research restrictedResearch = new Research("the great Constantinople war", output, new Date(1111111111),
 | 
			
		||||
                    PaperType.Article, "restricted", null, "Portuguese",
 | 
			
		||||
                    Access.Restricted, "history", "this is a summary", new HashSet<>());
 | 
			
		||||
 | 
			
		||||
            Research privateResearch = new Research("the great Potato War", output, new Date(),
 | 
			
		||||
                    PaperType.Article, "private", null, "english",
 | 
			
		||||
                    Access.Private, "private", "This Article's title speaks for itself\n We'll discuss about advanced Graph search Algorithms",null);
 | 
			
		||||
                    Access.Private, "agriculture", "my life is potato",null);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            researchesService.saveResearch(restrictedResearch);
 | 
			
		||||
 | 
			
		||||
@ -289,3 +289,4 @@ cursusprereq=The cursus you selected has some prerequisites ensure that your ext
 | 
			
		||||
imposecurriculum=Impose a curriculum
 | 
			
		||||
impose=Impose
 | 
			
		||||
gotimposed=The selected curriculum has been imposed
 | 
			
		||||
DifferentLanguage=Different Languages
 | 
			
		||||
 | 
			
		||||
@ -287,3 +287,4 @@ cursusprereq=Le cursus que vous avez selectionné a des prérequis assurez vous
 | 
			
		||||
imposecurriculum=Imposer un cursusgotimposed
 | 
			
		||||
impose=Imposer
 | 
			
		||||
gotimposed=Le cursus selectionné a été imposé
 | 
			
		||||
DifferentLanguage=Langues différentes
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
  import { toast } from 'vue3-toastify';
 | 
			
		||||
  import { ref } from 'vue'
 | 
			
		||||
  import i18n, { setLang } from './i18n.js'
 | 
			
		||||
  import { isLogged } from '@/rest/Users.js'
 | 
			
		||||
  import { isLogged, getSelf } from '@/rest/Users.js'
 | 
			
		||||
	import { notifications, fetchNotifications, archiveNotification } from '@/rest/notifications.js'
 | 
			
		||||
 | 
			
		||||
  import { appList, currentView } from '@/rest/apps.js'
 | 
			
		||||
@ -14,9 +14,11 @@ window.onhashchange = function() {
 | 
			
		||||
    currentURL = window.location.hash;
 | 
			
		||||
}
 | 
			
		||||
const Logged = ref(isLogged());
 | 
			
		||||
const user = ref();
 | 
			
		||||
 | 
			
		||||
if(Logged.value){
 | 
			
		||||
	fetchNotifications();
 | 
			
		||||
	getSelf().then(e => user.value = e);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
window.addEventListener('hashchange', () => {
 | 
			
		||||
@ -75,6 +77,7 @@ window.addEventListener('hashchange', () => {
 | 
			
		||||
                    {{i18n("app.manage.profile")}}
 | 
			
		||||
                  </a>
 | 
			
		||||
                  </div>
 | 
			
		||||
									<span v-if=Logged>RegNo - {{ user.regNo }}</span>
 | 
			
		||||
                </div>
 | 
			
		||||
            </a></li>
 | 
			
		||||
      </ul>
 | 
			
		||||
@ -133,10 +136,12 @@ window.addEventListener('hashchange', () => {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
.dropdown {
 | 
			
		||||
  color:black;
 | 
			
		||||
  margin-top:55px;
 | 
			
		||||
  width:160px;
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  height:110px;
 | 
			
		||||
  /* height:110px; */
 | 
			
		||||
	text-align: center;
 | 
			
		||||
  font-size: 13px;
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  z-index: 1;
 | 
			
		||||
@ -237,8 +242,7 @@ window.addEventListener('hashchange', () => {
 | 
			
		||||
	  .text {
 | 
			
		||||
		right: 0%;
 | 
			
		||||
		width: 0%;
 | 
			
		||||
		visibility: collapse;
 | 
			
		||||
		opacity: 0;
 | 
			
		||||
		display:none;
 | 
			
		||||
		color: white;
 | 
			
		||||
		font-size: 1.2em;
 | 
			
		||||
		font-weight: 600;
 | 
			
		||||
@ -247,7 +251,7 @@ window.addEventListener('hashchange', () => {
 | 
			
		||||
 | 
			
		||||
	  ul.vertical:hover .text {
 | 
			
		||||
		opacity:1;
 | 
			
		||||
		visibility:visible;
 | 
			
		||||
		display: inline;
 | 
			
		||||
		width: 60%;
 | 
			
		||||
		transition-duration: .3s;
 | 
			
		||||
		padding-left: 15px;
 | 
			
		||||
 | 
			
		||||
@ -32,6 +32,9 @@
 | 
			
		||||
          <div>
 | 
			
		||||
            {{ i18n("firstname/name") }} : {{user.firstName}} {{user.lastName}}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div>
 | 
			
		||||
            {{ i18n("regNo") }} :  {{user.regNo}}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div>
 | 
			
		||||
            {{ i18n("login.guest.email") }}: {{user.email}}
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
@ -192,10 +192,10 @@
 | 
			
		||||
          <div>
 | 
			
		||||
            {{ i18n("login.guest.email") }}: {{user.email}}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div v-if="user.role==='Student'">
 | 
			
		||||
          <div>
 | 
			
		||||
            {{ i18n("regNo") }} :  {{user.regNo}}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div v-else>
 | 
			
		||||
          <div>
 | 
			
		||||
            {{ i18n("role") }}:  {{i18n((user.role))}}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div>
 | 
			
		||||
 | 
			
		||||
@ -138,7 +138,6 @@ const emit = defineEmits(["modified"]);
 | 
			
		||||
#researches{
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  height: 100%;
 | 
			
		||||
  overflow: scroll;
 | 
			
		||||
}
 | 
			
		||||
#search{
 | 
			
		||||
  width: 100%;
 | 
			
		||||
 | 
			
		||||
@ -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>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
@ -99,7 +99,7 @@ async function articleClicked(){
 | 
			
		||||
          <li>{{i18n("PaperType")}} : {{article.paperType}}</li>
 | 
			
		||||
          <li>{{i18n("Domain")}} : {{article.domain}}</li>
 | 
			
		||||
          <li>{{i18n("Views")}} : {{article.views}}</li>
 | 
			
		||||
          <li>{{i18n("Access")}} : {{i18n(article.access)}}</li>
 | 
			
		||||
          <li>{{i18n("Access")}} : {{i18n("Access."+article.access)}}</li>
 | 
			
		||||
        </ul>
 | 
			
		||||
          <div id="downloads" v-if="article.pdfLocation !== null && !manage">
 | 
			
		||||
            <a :href=downloadPdf() @click.stop="articleClicked" target="_blank">{{i18n("See.Research")}}</a>
 | 
			
		||||
 | 
			
		||||
@ -11,8 +11,8 @@ import {fetchResearcher, fetchResearches, fetchStats} from "@/rest/ScientificPub
 | 
			
		||||
import ListResearches from "@/Apps/ScientificPublications/ListResearches.vue";
 | 
			
		||||
import i18n from "../../i18n.js";
 | 
			
		||||
const input = ref("");
 | 
			
		||||
const statsOf = ref("");
 | 
			
		||||
const statsBy = ref("");
 | 
			
		||||
const statsOf = ref();
 | 
			
		||||
const statsBy = ref();
 | 
			
		||||
let chart;
 | 
			
		||||
 | 
			
		||||
const researcherId = window.location.href.split("=")[1]
 | 
			
		||||
@ -63,17 +63,16 @@ const options = reactive({
 | 
			
		||||
function update(){
 | 
			
		||||
  options.title = {
 | 
			
		||||
    fontColor: "white",
 | 
			
		||||
    text: statsOf.value + " By "+ statsBy.value,
 | 
			
		||||
  }
 | 
			
		||||
 let index = (statsOf.value === "views"?0:(statsOf.value === "researches"?3:6)) + (statsBy.value ==="years"?0:(statsBy.value==="months"?1:2))
 | 
			
		||||
 | 
			
		||||
  if (statsOf.value !== "" && statsBy.value !== "")
 | 
			
		||||
  let index = (statsOf.value === "Views"?0:(statsOf.value === "Researches"?3:6)) + (statsBy.value ==="Years"?0:(statsBy.value==="Months"?1:2))
 | 
			
		||||
  if (typeof statsBy.value !== 'undefined' && typeof statsOf.value !== 'undefined'){
 | 
			
		||||
    options.data[0].dataPoints = stats.value[index]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    options.title.text = i18n(statsOf.value) +" "+ i18n("By") +" " + i18n(statsBy.value);
 | 
			
		||||
    chart.render();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
@ -97,7 +96,7 @@ function update(){
 | 
			
		||||
        <select @change="update()" id="stats-select" v-model="statsOf">
 | 
			
		||||
          <option value="Views">{{i18n("Views")}}</option>
 | 
			
		||||
          <option value="Researches">{{i18n("Researches")}}</option>
 | 
			
		||||
          <option value="Languages">{{i18n("Language")}}</option>
 | 
			
		||||
          <option value="DifferentLanguage">{{i18n("DifferentLanguage")}}</option>
 | 
			
		||||
        </select>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="surrounded">
 | 
			
		||||
@ -105,7 +104,7 @@ function update(){
 | 
			
		||||
        <select @change="update()" id="classed-select" v-model="statsBy">
 | 
			
		||||
          <option value="Years">{{i18n("Years")}}</option>
 | 
			
		||||
          <option value="Months">{{i18n("Months")}}</option>
 | 
			
		||||
          <option value="Topics">{{i18n("Domain")}}</option>
 | 
			
		||||
          <option value="Domain">{{i18n("Domain")}}</option>
 | 
			
		||||
        </select>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div id="statsPie">
 | 
			
		||||
 | 
			
		||||
@ -2,9 +2,14 @@ import { ref } from 'vue'
 | 
			
		||||
import { restGet, restPost } from '@/rest/restConsumer.js'
 | 
			
		||||
 | 
			
		||||
export const notifications = ref([]);
 | 
			
		||||
let timerSet = false
 | 
			
		||||
 | 
			
		||||
export function fetchNotifications(){
 | 
			
		||||
	restGet("/notifications").then( e => notifications.value = e );
 | 
			
		||||
	if(!timerSet){
 | 
			
		||||
		timerSet = true;
 | 
			
		||||
		setTimeout(() => {timerSet = false; fetchNotifications()}, 5000);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function archiveNotification(id){
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user