From 7394a23b45d10cc4bb0ceb7ccc9911ca2dc0c83a Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Thu, 18 Apr 2024 16:17:16 +0200 Subject: [PATCH] added reactivity to post delete and patch --- .../ManageResearcherProfile.vue | 14 ++++++++------ .../ScientificPublications/ResearchComponent.vue | 12 +++++++----- .../ResearchPostComponent.vue | 10 +++++----- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/frontend/src/Apps/ScientificPublications/ManageResearcherProfile.vue b/frontend/src/Apps/ScientificPublications/ManageResearcherProfile.vue index 6979f38..53d837a 100644 --- a/frontend/src/Apps/ScientificPublications/ManageResearcherProfile.vue +++ b/frontend/src/Apps/ScientificPublications/ManageResearcherProfile.vue @@ -4,7 +4,6 @@ import FilterComponent from "@/Apps/ScientificPublications/FilterComponent.vue"; import ArticleComponent from "@/Apps/ScientificPublications/ResearchComponent.vue"; import {fetchResearches, } from "@/rest/ScientificPublications/ResearcherProfile.js"; import {getSelf, patchProfile} from "@/rest/ScientificPublications/ManageResearcherProfile.js"; -import {c, f} from "../../../dist/assets/_plugin-vue_export-helper-Bvj9NrzX.js"; import ResearchPostComponent from "@/Apps/ScientificPublications/ResearchPostComponent.vue"; const input = ref(""); const isFilterOpened = ref(false); @@ -43,7 +42,6 @@ const closeResearch = () => { function openPostResearch(){ isPostResearchOpened.value = true - } @@ -81,12 +79,16 @@ function cancelChanges(){ changing.value = false toModify= Object.assign({}, {}); } -function confirmChanges(){ - patchProfile(researcher.value.id, toModify) +async function confirmChanges(){ + await patchProfile(researcher.value.id, toModify) changing.value = false toModify= Object.assign({}, {}); + researcher.value = await getSelf(); } +async function modifiedResearch(){ + researchList.value = await fetchResearches(researcher.value.id) +} @@ -94,8 +96,8 @@ function confirmChanges(){