Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: properly load user annotations into stores #1197

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions svs/vueapp/src/components/SvFilterApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}),
])
}
Expand Down
10 changes: 7 additions & 3 deletions variants/vueapp/src/components/FilterApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const refreshStores = async () => {
props.caseUuid,
)
await Promise.all([
Promise.all([
variantFlagsStore.initialize(
appContext.csrf_token,
appContext.project?.sodar_uuid,
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion variants/vueapp/src/stores/variantQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading