Skip to content

Commit

Permalink
fix: variant details loading broken (#1904) (#1905)
Browse files Browse the repository at this point in the history
  • Loading branch information
stolpeo authored Aug 14, 2024
1 parent 521fcc8 commit 3a4a3bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions frontend/src/variants/views/SeqvarDetails/SeqvarDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ const seqvar = computed<Seqvar | undefined>(() => {
/** Refresh the stores. */
const refreshStores = async () => {
if (props.resultRowUuid && props.selectedSection) {
console.log('Refreshing stores')
console.log(props.resultRowUuid)
if (props.resultRowUuid) {
await variantResultSetStore.initialize()
await variantResultSetStore.fetchResultSetViaRow(props.resultRowUuid)
if (!variantResultSetStore.caseUuid) {
Expand Down Expand Up @@ -153,32 +155,31 @@ const refreshStores = async () => {
watch(
() => props.resultRowUuid,
async () => {
console.log('watch: resultRowUuid changed')
await refreshStores()
},
)
watch(
() => [
variantResultSetStore.storeState.state,
pubtatorStore.storeState,
geneInfoStore.storeState,
seqvarInfoStore.storeState,
variantAcmgRatingStore.storeState.state,
// exclude variantCommentsStore because it triggers a reload cycle
variantDetailsStore.storeState.state,
],
() => {
storesLoading.value = true
const completeStoreStates = [StoreState.Active, StoreState.Error]
const completeStates = [State.Active, State.Error]
console.log('1', variantResultSetStore.storeState.state)
console.log('2', geneInfoStore.storeState)
console.log('3', seqvarInfoStore.storeState)
console.log('4', variantDetailsStore.storeState.state)
if (
completeStates.includes(variantResultSetStore.storeState.state) &&
completeStoreStates.includes(pubtatorStore.storeState) &&
completeStoreStates.includes(geneInfoStore.storeState) &&
completeStoreStates.includes(seqvarInfoStore.storeState) &&
completeStates.includes(variantAcmgRatingStore.storeState.state) &&
completeStates.includes(variantDetailsStore.storeState.state)
// exclude variantCommentsStore because it triggers a reload cycle
) {
storesLoading.value = false
setTimeout(() => {
Expand All @@ -200,6 +201,7 @@ watch(
/** When mounted, scroll to the selected element if any.
*/
onMounted(async () => {
console.log('On mounted')
await refreshStores()
})
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ onMounted(() => {
>
<template v-if="navbarShown"> Toggle Logs </template>
</v-list-item>
<v-list-item
<!-- <v-list-item
:prepend-icon="`mdi-window-${detailsInSheet ? 'restore' : 'maximize'}`"
@click="detailsInSheet = !detailsInSheet"
>
<template v-if="navbarShown"> Toggle Details Sheet </template>
</v-list-item>
</v-list-item> -->
<v-list-item v-if="!presetSetUuid" prepend-icon="mdi-factory" link>
<template v-if="navbarShown"> Filter: Defaults </template>
</v-list-item>
Expand Down

0 comments on commit 3a4a3bf

Please sign in to comment.