cleaning frontend
This commit is contained in:
@ -7,17 +7,11 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from "vue";
|
||||
import FilterComponent from "@/Apps/ScientificPublications/FilterComponent.vue";
|
||||
import ArticleComponent from "@/Apps/ScientificPublications/ResearchComponent.vue";
|
||||
import {fetchResearcher, fetchResearches, fetchStats, fetchResearch} from "@/rest/ScientificPublications/ResearcherProfile.js";
|
||||
import {getFile, addView} from "@/rest/ScientificPublications/ManageResearch.js";
|
||||
import {fetchResearcher, fetchResearches, fetchStats} from "@/rest/ScientificPublications/ResearcherProfile.js";
|
||||
import ListResearches from "@/Apps/ScientificPublications/ListResearches.vue";
|
||||
const input = ref("");
|
||||
const statsOf = ref("");
|
||||
const statsBy = ref("");
|
||||
const isFilterOpened = ref(false);
|
||||
const isResearchOpened = ref(false);
|
||||
const articleToDisplay = ref(Object)
|
||||
let chart;
|
||||
|
||||
const researcherId = window.location.href.split("=")[1]
|
||||
@ -27,29 +21,6 @@ const researchList = ref(await fetchResearches(researcherId));
|
||||
const researcher = ref(await fetchResearcher(researcherId));
|
||||
const stats = ref(await fetchStats(researcherId))
|
||||
|
||||
const closeFilter = () => {
|
||||
isFilterOpened.value = false;
|
||||
};
|
||||
const submitFilters = ()=>{
|
||||
}
|
||||
|
||||
const closeResearch = () => {
|
||||
isResearchOpened.value =false;
|
||||
articleToDisplay.value = null;
|
||||
}
|
||||
|
||||
const downloadBibTex = (research) => {
|
||||
getFile(research.bibTexLocation)
|
||||
}
|
||||
|
||||
async function downloadArticle (research) {
|
||||
await addView(research.pdfLocation)
|
||||
await getFile(research.pdfLocation)
|
||||
articleToDisplay.value = await fetchResearch(articleToDisplay.value.id)
|
||||
stats.value = await fetchStats(researcher.value.id)
|
||||
update()
|
||||
}
|
||||
|
||||
function downloadCoAuthors(){
|
||||
let coAuthors = []
|
||||
for (let i in researchList.value) {
|
||||
@ -100,8 +71,6 @@ function update(){
|
||||
|
||||
<template>
|
||||
<div id="main">
|
||||
<FilterComponent :isOpen="isFilterOpened" :allArticles="researchList" @modal-close="closeFilter" @submit="submitFilters()"></FilterComponent>
|
||||
<ArticleComponent :article="articleToDisplay" :isOpen="isResearchOpened" :manage="false" @modal-close="closeResearch" @downloadPdf="downloadArticle(articleToDisplay)" @downloadBibTex="downloadBibTex(articleToDisplay)"></ArticleComponent>
|
||||
<div id="profilePicture">
|
||||
<img src="/Clyde.png" />
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user