From 6bc417213c3c2e1773d0ce20571ebaf285384325 Mon Sep 17 00:00:00 2001 From: Oliver Stolpe Date: Wed, 1 Nov 2023 14:54:23 +0100 Subject: [PATCH] fix: properly load user annotations into stores (#1197) --- svs/vueapp/src/components/SvFilterApp.vue | 8 +++++--- variants/vueapp/src/components/FilterApp.vue | 10 +++++++--- .../src/components/FilterForm/PrioritizationPane.vue | 2 +- variants/vueapp/src/stores/variantQuery.js | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/svs/vueapp/src/components/SvFilterApp.vue b/svs/vueapp/src/components/SvFilterApp.vue index c4d28f553..1be4742af 100644 --- a/svs/vueapp/src/components/SvFilterApp.vue +++ b/svs/vueapp/src/components/SvFilterApp.vue @@ -129,9 +129,11 @@ const refreshStores = async () => { appContext, ) .then(() => { - svResultSetStore.initialize(appContext.csrf_token).then(async () => { - await svResultSetStore.loadResultSetViaQuery(svQueryStore.queryUuid) - }) + svResultSetStore + .initialize(appContext.csrf_token, true) + .then(async () => { + await svResultSetStore.loadResultSetViaQuery(svQueryStore.queryUuid) + }) }), ]) } diff --git a/variants/vueapp/src/components/FilterApp.vue b/variants/vueapp/src/components/FilterApp.vue index 6fa8906c2..aff0d4b27 100644 --- a/variants/vueapp/src/components/FilterApp.vue +++ b/variants/vueapp/src/components/FilterApp.vue @@ -144,7 +144,7 @@ const refreshStores = async () => { props.caseUuid, ) - await Promise.all([ + Promise.all([ variantFlagsStore.initialize( appContext.csrf_token, appContext.project?.sodar_uuid, @@ -166,8 +166,12 @@ const refreshStores = async () => { props.caseUuid, appContext, ), - variantResultSetStore.initialize(appContext.csrf_token), - ]) + variantResultSetStore.initialize(appContext.csrf_token, true), + ]).then(async () => { + await variantResultSetStore.loadResultSetViaQuery( + variantQueryStore.queryUuid, + ) + }) } // Initialize (=refresh) stores when mounted. diff --git a/variants/vueapp/src/components/FilterForm/PrioritizationPane.vue b/variants/vueapp/src/components/FilterForm/PrioritizationPane.vue index d162d2e22..a65ebb9f3 100644 --- a/variants/vueapp/src/components/FilterForm/PrioritizationPane.vue +++ b/variants/vueapp/src/components/FilterForm/PrioritizationPane.vue @@ -32,7 +32,7 @@ const pathoEnabledWrapper = declareWrapper(props, 'pathoEnabled', emit) const pathoScoreWrapper = declareWrapper(props, 'pathoScore', emit) const prioEnabledWarning = () => { - return !prioEnabledWrapper.value && prioHpoTermsWrapper.value.length > 0 + return !prioEnabledWrapper.value && prioHpoTermsWrapper.value?.length > 0 } const v$ = useVuelidate() diff --git a/variants/vueapp/src/stores/variantQuery.js b/variants/vueapp/src/stores/variantQuery.js index ac37ca33c..d38da9fdd 100644 --- a/variants/vueapp/src/stores/variantQuery.js +++ b/variants/vueapp/src/stores/variantQuery.js @@ -559,7 +559,7 @@ export const useVariantQueryStore = defineStore('variantQuery', () => { }) // 2.3 fetch the HPO names from the query settings for the HPO terms, if any .then(() => { - if (querySettings.value?.prio_hpo_terms.length > 0) { + if (querySettings.value?.prio_hpo_terms?.length > 0) { hpoNames.value = fetchHpoTerms( csrfToken.value, querySettings.value.prio_hpo_terms,