diff --git a/src/components/cards/analysis/multi/AnalysisSummaryCard.vue b/src/components/cards/analysis/multi/AnalysisSummaryCard.vue index d2750be..03ebf10 100644 --- a/src/components/cards/analysis/multi/AnalysisSummaryCard.vue +++ b/src/components/cards/analysis/multi/AnalysisSummaryCard.vue @@ -127,10 +127,9 @@ const dirty = () => { const reprocess = () => { if(dirty()) { - multiAnalysisStore.analyse( - multiAnalysisStore.activeAssayStatus?.assay!, - equateIl.value, filterDuplicates.value, cleavageHandling.value - ) + const active = multiAnalysisStore.activeAssayStatus?.assay!; + multiAnalysisStore.resetAssay(active); + multiAnalysisStore.analyse(active, equateIl.value, filterDuplicates.value, cleavageHandling.value) } } diff --git a/src/stores/MultiAnalysisStore.ts b/src/stores/MultiAnalysisStore.ts index 3c76ff4..a3705b4 100644 --- a/src/stores/MultiAnalysisStore.ts +++ b/src/stores/MultiAnalysisStore.ts @@ -353,6 +353,26 @@ const useMultiAnalysis = defineStore('multi-analysis', () => { } } + const resetAssay = (assay: Assay) => { + const assayIndex = findAssayIndex(assay.id); + + if(assayIndex !== -1) { + const filterProgress = ProgressUtils.constructProgressObject(filterSteps); + filterProgress.currentStep = FilterSteps.COMPLETED; + + assayStatuses.value[assayIndex] = { + assay: assay, + + progress: ProgressUtils.constructProgressObject(progressSteps), + filterProgress: filterProgress + } as MultiProteomicsAnalysisStatus + + if (activeAssayStatus.value?.assay.id === assay.id) { + activeAssayStatus.value = assayStatuses.value[assayIndex]; + } + } + } + const removeAssay = (assay: Assay) => { const index = findAssayIndex(assay.id); @@ -409,6 +429,7 @@ const useMultiAnalysis = defineStore('multi-analysis', () => { analysisCompleted, addAssay, + resetAssay, removeAssay, removeAllAssays, activateAssay,