Compare commits

..

2 Commits

Author SHA1 Message Date
3825565b16 Merge pull request 'fixed views update' (#188) from Maxime/Clyde:master into master
All checks were successful
Build and test backend / Build-backend (push) Successful in 1m23s
deploy to production / deploy-backend (push) Successful in 19s
Build and test FrontEnd / Build-frontend (push) Successful in 30s
Reviewed-on: #188
2024-04-22 22:37:26 +02:00
48640dfa8b fixed views update
All checks were successful
Build and test backend / Build-backend (pull_request) Successful in 1m22s
Build and test FrontEnd / Build-frontend (pull_request) Successful in 30s
2024-04-22 22:36:12 +02:00
2 changed files with 14 additions and 2 deletions

View File

@ -35,6 +35,14 @@ watch(
}
);
async function modified(){
if (typeof props.researchList === 'undefined'){
researchList.value = await fetchAllResearches()
}
else {
emit('modified')
}
}
const openFilter = () => {
isFilterOpened.value = true;
@ -112,7 +120,7 @@ const emit = defineEmits(["modified"]);
<template>
<div id="researches">
<FilterComponent :isOpen="isFilterOpened" :allArticles="researchList" @modal-close="closeFilter" @submit="submitFilters"></FilterComponent>
<ArticleComponent :allResearcher="allResearcher" :article="articleToDisplay" :isOpen="isResearchOpened" :manage="props.manage" @modal-close="closeResearch" @modified="emit('modified')"></ArticleComponent>
<ArticleComponent :allResearcher="allResearcher" :article="articleToDisplay" :isOpen="isResearchOpened" :manage="props.manage" @modal-close="closeResearch" @modified="modified"></ArticleComponent>
<div id="search">
<input v-if="!isResearcher" type="text" id="search-input" :placeholder="i18n('Search.Researches')" v-model="input"/>
<input v-else type="text" id="search-input" :placeholder="i18n('Search.Researchers')" v-model="input"/>

View File

@ -73,6 +73,10 @@ function update(){
}
}
async function modifiedResearch(){
researchList.value = await fetchResearches(researcher.value.id)
}
</script>
<template>
@ -111,7 +115,7 @@ function update(){
<CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
</div>
</div>
<div id="researches" style="margin-top: -15px"><list-researches :researchList="researchList"></list-researches></div>
<div id="researches" style="margin-top: -15px"><list-researches :researchList="researchList" @modified="modifiedResearch"></list-researches></div>
</div>
</template>