Merge pull request 'fixed views update' (#188) from Maxime/Clyde:master into master
Reviewed-on: #188
This commit is contained in:
commit
3825565b16
@ -35,6 +35,14 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
async function modified(){
|
||||||
|
if (typeof props.researchList === 'undefined'){
|
||||||
|
researchList.value = await fetchAllResearches()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
emit('modified')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const openFilter = () => {
|
const openFilter = () => {
|
||||||
isFilterOpened.value = true;
|
isFilterOpened.value = true;
|
||||||
@ -112,7 +120,7 @@ const emit = defineEmits(["modified"]);
|
|||||||
<template>
|
<template>
|
||||||
<div id="researches">
|
<div id="researches">
|
||||||
<FilterComponent :isOpen="isFilterOpened" :allArticles="researchList" @modal-close="closeFilter" @submit="submitFilters"></FilterComponent>
|
<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">
|
<div id="search">
|
||||||
<input v-if="!isResearcher" type="text" id="search-input" :placeholder="i18n('Search.Researches')" v-model="input"/>
|
<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"/>
|
<input v-else type="text" id="search-input" :placeholder="i18n('Search.Researchers')" v-model="input"/>
|
||||||
|
@ -73,6 +73,10 @@ function update(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
async function modifiedResearch(){
|
||||||
|
researchList.value = await fetchResearches(researcher.value.id)
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -111,7 +115,7 @@ function update(){
|
|||||||
<CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
|
<CanvasJSChart :options="options" id=chart @chart-ref="c => chart = c "/>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user