fixed spelling mistake

This commit is contained in:
Bartha Maxime 2024-04-17 00:26:56 +02:00
parent 821377a72f
commit 7a05fc1316
6 changed files with 12 additions and 11 deletions

View File

@ -113,7 +113,7 @@ public class MockController {
Researcher output = researchesService.saveResearcher(jojoResearcherAccount);
Research jojoResearch = new Research("Graphs : Advanced Search Algorithms",output,new Date(0),
PaperType.Article,"here",null,"english",
PaperType.Article,"here.pdf",null,"english",
Access.OpenSource,"IT","This Article's title speaks for itself \n We'll discuss about advanced Graph search Algorithms");
Research restrictedResearch = new Research("just another Name",output,new Date(1111111111),

View File

@ -229,7 +229,7 @@ public class ResearchController {
///////
//views part
@PostMapping("/addView{url}")
@PostMapping("/addView/{url}")
public ResponseEntity<ResearchDTO> addView(@PathVariable String url){
Research research = researchesServ.getResearchByUrl(url);
if (research ==null) return new ResponseEntity<>(HttpStatus.NOT_FOUND);

View File

@ -194,6 +194,6 @@ public class ResearchesService {
public Research addView(Research research) {
research.setViews(research.getViews()+1);
articleRepo.save(research);
return articleRepo.save(research);
}
}

View File

@ -46,9 +46,7 @@ onClickOutside(target, ()=>emit('modal-close'))
</ul>
<div id="downloads" v-if="article.pdfLocation !== null">
<button @click.stop="emit('downloadBibTex')">Download BibTex</button>
<form method="get" :action=article.pdfLocation>
<button @click.stop="emit('downloadPdf', article)">Download Research</button>
</form>
<button @click.stop="emit('downloadPdf')">Download Research</button>
</div>
</div>
</div>

View File

@ -9,7 +9,7 @@
import { ref, reactive } from "vue";
import FilterComponent from "@/Apps/ScientificPublications/FilterComponent.vue";
import ArticleComponent from "@/Apps/ScientificPublications/ResearchComponent.vue";
import {fetchResearcher, fetchResearches, fetchStats, addView} from "@/rest/ScientificPublications/ResearcherProfile.js";
import {fetchResearcher, fetchResearches, fetchStats, addView, getFile} from "@/rest/ScientificPublications/ResearcherProfile.js";
const input = ref("");
const statsOf = ref("");
const statsBy = ref("");
@ -48,12 +48,12 @@ const closeResearch = () => {
}
const downloadBibTex = (research) => {
//todo
getFile(research.bibTexLocation)
}
const downloadArticle = (research) => {
addView(research.url)
addView(research.pdfLocation)
getFile(research.pdfLocation)
}
function downloadCoAuthors(){
@ -131,7 +131,7 @@ function update(){
<template>
<div id="main">
<FilterComponent :isOpen="isFilterOpened" :allArticles="researchList" @modal-close="closeFilter" @submit="submitFilters()"></FilterComponent>
<ArticleComponent :article="articleToDisplay" :isOpen="isResearchOpened" @modal-close="closeResearch" @downloadPdf="downloadArticle" @downloadBibTex="downloadBibTex"></ArticleComponent>
<ArticleComponent :article="articleToDisplay" :isOpen="isResearchOpened" @modal-close="closeResearch" @downloadPdf="downloadArticle(articleToDisplay)" @downloadBibTex="downloadBibTex(articleToDisplay)"></ArticleComponent>
<div id="profilePicture">
<img src="/Clyde.png" />
</div>

View File

@ -15,3 +15,6 @@ export async function addView(url){
return restPost("/addView/" +url)
}
export async function getFile(url){
return restGet("/" + url)
}