From 8a63658e506784b4cd30579ec17f53dad133064c Mon Sep 17 00:00:00 2001 From: Pieter Verschaffelt Date: Wed, 1 Jun 2022 10:16:20 +0200 Subject: [PATCH] Deleting a study works properly again --- package.json | 2 +- src/App.vue | 2 +- src/components/navigation-drawers/StudyItem.vue | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 68727469..f653e2a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "unipept-desktop", - "version": "1.2.5", + "version": "1.2.6", "private": true, "author": "Unipept Team (Ghent University)", "description": "A desktop equivalent of unipept.ugent.be. This app aims at high-throughput analysis of metaproteomics samples.", diff --git a/src/App.vue b/src/App.vue index 6003619f..ac5d2364 100644 --- a/src/App.vue +++ b/src/App.vue @@ -169,7 +169,7 @@ export default class App extends Vue implements ErrorListener { @Watch("activeAssay") private activeAssayChanged(assay: AssayAnalysisStatus) { - if (assay.analysisReady) { + if (!assay || assay.analysisReady) { electron.remote.BrowserWindow.getAllWindows()[0].setProgressBar(-1); } else { electron.remote.BrowserWindow.getAllWindows()[0].setProgressBar( diff --git a/src/components/navigation-drawers/StudyItem.vue b/src/components/navigation-drawers/StudyItem.vue index f92e8087..def20ba4 100644 --- a/src/components/navigation-drawers/StudyItem.vue +++ b/src/components/navigation-drawers/StudyItem.vue @@ -313,6 +313,12 @@ export default class StudyItem extends Vue { this.$store.getters.dbManager ); await this.study.accept(studyDestroyer); + + for (const assay of this.study.getAssays()) { + await this.$store.dispatch("removeAssay", assay); + } + + await this.$store.dispatch("removeStudy", this.study); } private async onSelectAssay(assay: Assay) {