From fec70e36b08daeca9efee1917e8417a21f5d1cf6 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Tue, 6 Feb 2024 15:51:31 +0100 Subject: [PATCH] fix: fixing InterVar display issues after lookup failure (#443) (#448) --- frontend/src/components/CadaRanking/CadaRanking.vue | 4 +++- .../src/components/SeqvarClinsigCard/SeqvarClinsigCard.vue | 7 +++---- .../components/StrucvarClinsigCard/StrucvarClinsigCard.vue | 4 +++- frontend/src/ext/reev-frontend-lib | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/CadaRanking/CadaRanking.vue b/frontend/src/components/CadaRanking/CadaRanking.vue index d9965cd3..7283de3b 100644 --- a/frontend/src/components/CadaRanking/CadaRanking.vue +++ b/frontend/src/components/CadaRanking/CadaRanking.vue @@ -26,7 +26,9 @@ const geneRank = computed(() => { // Function to load the data. const loadData = async () => { await caseInfoStore.initialize() - await cadaPrioStore.loadData(caseInfoStore.caseInfo.hpoTerms.map((term) => term.termId)) + if ((caseInfoStore.caseInfo.hpoTerms ?? []).length !== 0) { + await cadaPrioStore.loadData(caseInfoStore.caseInfo.hpoTerms.map((term) => term.termId)) + } } // Load case store when mounted. diff --git a/frontend/src/components/SeqvarClinsigCard/SeqvarClinsigCard.vue b/frontend/src/components/SeqvarClinsigCard/SeqvarClinsigCard.vue index 961372d8..88af0335 100644 --- a/frontend/src/components/SeqvarClinsigCard/SeqvarClinsigCard.vue +++ b/frontend/src/components/SeqvarClinsigCard/SeqvarClinsigCard.vue @@ -164,10 +164,7 @@ const fontColor = computed(() => { watch( () => [props.seqvar, acmgRatingStore.storeState], async () => { - if ( - props.seqvar?.genomeBuild === 'grch37' && - ![StoreState.Loading, StoreState.Error].includes(acmgRatingStore.storeState) - ) { + if (props.seqvar?.genomeBuild === 'grch37') { try { await acmgRatingStore.fetchAcmgRating(props.seqvar) if (acmgRatingStore.acmgRatingStatus === false) { @@ -180,6 +177,8 @@ watch( errorMessage.value = msg emit('errorDisplay', msg) } + } else { + acmgRatingStore.clearData() } } ) diff --git a/frontend/src/components/StrucvarClinsigCard/StrucvarClinsigCard.vue b/frontend/src/components/StrucvarClinsigCard/StrucvarClinsigCard.vue index ae3326cf..975c7278 100644 --- a/frontend/src/components/StrucvarClinsigCard/StrucvarClinsigCard.vue +++ b/frontend/src/components/StrucvarClinsigCard/StrucvarClinsigCard.vue @@ -84,8 +84,10 @@ const calculateAcmgScore = computed((): number => { watch( () => [props.strucvar, acmgRatingStore.storeState], async () => { - if (props.strucvar && acmgRatingStore.storeState === StoreState.Active) { + if (props.strucvar) { await acmgRatingStore.fetchAcmgRating(props.strucvar) + } else { + acmgRatingStore.clearData() } } ) diff --git a/frontend/src/ext/reev-frontend-lib b/frontend/src/ext/reev-frontend-lib index 761d416e..fcf376e4 160000 --- a/frontend/src/ext/reev-frontend-lib +++ b/frontend/src/ext/reev-frontend-lib @@ -1 +1 @@ -Subproject commit 761d416e9180d35aeb5655ca257a6f2d562ff64a +Subproject commit fcf376e4aba41fb531799b624f1516a079504e51