Skip to content

Commit

Permalink
feat: impact not updated when quick presets are updated (#2014)
Browse files Browse the repository at this point in the history
  • Loading branch information
stolpeo committed Oct 14, 2024
1 parent 0f405f6 commit 55f6665
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion frontend/ext/reev-frontend-lib
Submodule reev-frontend-lib updated 36 files
+3 −0 .gitignore
+73 −0 Makefile
+82 −0 ext/cadaPrio-api/openapi.yaml
+78 −0 ext/cadaPrio-api/src/lib/@tanstack/vue-query.gen.ts
+4 −0 ext/cadaPrio-api/src/lib/index.ts
+45 −0 ext/cadaPrio-api/src/lib/schemas.gen.ts
+45 −0 ext/cadaPrio-api/src/lib/services.gen.ts
+26 −0 ext/cadaPrio-api/src/lib/types.gen.ts
+251 −0 ext/dotty-api/openapi.yaml
+85 −0 ext/dotty-api/src/lib/@tanstack/vue-query.gen.ts
+4 −0 ext/dotty-api/src/lib/index.ts
+231 −0 ext/dotty-api/src/lib/schemas.gen.ts
+47 −0 ext/dotty-api/src/lib/services.gen.ts
+98 −0 ext/dotty-api/src/lib/types.gen.ts
+413 −0 ext/variantValidator-api/openapi.yaml
+247 −0 ext/variantValidator-api/src/lib/@tanstack/vue-query.gen.ts
+3 −0 ext/variantValidator-api/src/lib/index.ts
+177 −0 ext/variantValidator-api/src/lib/services.gen.ts
+411 −0 ext/variantValidator-api/src/lib/types.gen.ts
+494 −0 ext/viguno-api/openapi.yaml
+143 −0 ext/viguno-api/src/lib/@tanstack/vue-query.gen.ts
+4 −0 ext/viguno-api/src/lib/index.ts
+280 −0 ext/viguno-api/src/lib/schemas.gen.ts
+95 −0 ext/viguno-api/src/lib/services.gen.ts
+334 −0 ext/viguno-api/src/lib/types.gen.ts
+10 −0 openapi-ts.config.cadaPrio.ts
+10 −0 openapi-ts.config.dotty.ts
+10 −0 openapi-ts.config.variantValidator.ts
+10 −0 openapi-ts.config.viguno.ts
+82 −0 openapis/cada-prio.yaml
+0 −0 openapis/dotty.yaml
+248 −136 package-lock.json
+3 −1 package.json
+9 −5 src/components/SeqvarVariantValidatorCard/SeqvarVariantValidatorCard.vue
+178 −166 src/components/StrucvarGeneListCard/GeneListEntry.vue
+4 −0 src/lib/urlConfig.ts
10 changes: 9 additions & 1 deletion frontend/src/cases/views/CaseList/CaseList.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<script setup lang="ts">
import { VueQueryDevtools } from '@tanstack/vue-query-devtools'
import { ref } from 'vue'
import { onMounted } from 'vue'
import CaseListQc from '@/cases/components/CaseListQc/CaseListQc.vue'
import CaseListTable from '@/cases/components/CaseListTable/CaseListTable.vue'
import TheAppBar from '@/cases/components/TheAppBar/TheAppBar.vue'
import TheNavBar from '@/cases/components/TheNavBar/TheNavBar.vue'
import { useCaseListStore } from '@/cases/stores/caseList'
import { SnackbarMessage } from '@/seqvars/views/PresetSets/lib'
import QueryPresets from '@/variants/components/QueryPresets.vue'
Expand All @@ -20,6 +22,8 @@ const props = defineProps<{
presetSet?: string
}>()
const caseListStore = useCaseListStore()
// Whether to hide the navigation bar; component state.
const navbarShown = ref<boolean>(true)
/** Messages to display in VSnackbarQueue; component state. */
Expand All @@ -29,6 +33,10 @@ const messages = ref<SnackbarMessage[]>([])
const queueMessage = (message: SnackbarMessage) => {
messages.value.push(message)
}
onMounted(async () => {
await caseListStore.initialize(props.projectUuid)
})
</script>

<template>
Expand Down Expand Up @@ -95,7 +103,7 @@ const queueMessage = (message: SnackbarMessage) => {
<CaseListQc />
</div>
<div v-else-if="props.currentTab === Tab.QUERY_PRESETS">
<QueryPresets :preset-set="presetSet" />
<QueryPresets :project-uuid="projectUuid" :preset-set="presetSet" />
</div>
<div v-else>
<v-alert type="error">Unknown tab: {{ props.currentTab }}</v-alert>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/variants/components/FilterForm/QuickPresets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const inheritanceWrapper = computed({
return inheritanceRef.value
},
set(newValue) {
if (newValue !== 'custom') {
if (newValue && newValue !== 'custom') {
props.querySettings.genotype = copy(
props.categoryPresets.inheritance[newValue].genotype,
)
Expand Down Expand Up @@ -189,7 +189,7 @@ const qualityWrapper = computed({
return qualityRef.value
},
set(newValue) {
if (newValue !== 'custom') {
if (newValue && newValue !== 'custom') {
for (const member of Object.values(props.case.pedigree)) {
props.querySettings.quality[member.name] = _objectWithoutKeys(
props.categoryPresets.quality[newValue],
Expand Down Expand Up @@ -251,7 +251,7 @@ const makeWrapper = (name) =>
return valueRefs[name].value
},
set(newValue) {
if (newValue !== 'custom') {
if (newValue && newValue !== 'custom') {
const oldBlockRefresh = blockRefresh.value
blockRefresh.value = true
for (const [key, value] of Object.entries(
Expand Down
7 changes: 2 additions & 5 deletions frontend/src/variants/components/QueryPresets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { computed, onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import { overlayMessage, overlayShow } from '@/cases/common'
import { useCaseListStore } from '@/cases/stores/caseList'
import ModalConfirm from '@/varfish/components/ModalConfirm.vue'
import ModalInput from '@/varfish/components/ModalInput.vue'
import Overlay from '@/varfish/components/Overlay.vue'
Expand All @@ -23,10 +22,9 @@ const labelRules = Object.freeze([required, minLength(5)])
const props = defineProps({
// eslint-ignore-next-line vue/require-default-prop
presetSet: String,
projectUuid: String,
})
/** Access store with case list. */
const caseListStore = useCaseListStore()
/** Access store with query presets. */
const queryPresetsStore = useQueryPresetsStore()
/** Access the router. */
Expand Down Expand Up @@ -179,8 +177,7 @@ const handleEditClicked = async () => {
/** Initialize store on first mount. */
onMounted(async () => {
await caseListStore.initializeRes
await queryPresetsStore.initialize(caseListStore.projectUuid)
await queryPresetsStore.initialize(props.projectUuid)
})
/** Return list of presets sets in a null/undefined safe manner. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ const handleAddClicked = async (category) => {
quality: null,
chromosome: null,
flagsetc: null,
inheritance: null,
}
} else if (category === 'qualitypresets') {
payload = {
Expand Down

0 comments on commit 55f6665

Please sign in to comment.