fix with the stats and translations
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m26s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 33s

This commit is contained in:
2024-04-22 02:27:21 +02:00
parent 22665f0565
commit 12ff43e970
5 changed files with 17 additions and 16 deletions

View File

@ -287,3 +287,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

View File

@ -285,3 +285,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

View File

@ -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>

View File

@ -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,16 +63,15 @@ 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();
}
options.title.text = i18n(statsOf.value) +" "+ i18n("By") +" " + i18n(statsBy.value);
chart.render();
}
</script>
@ -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">