Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon committed Oct 11, 2023
1 parent 81696da commit 4883156
Show file tree
Hide file tree
Showing 3 changed files with 299 additions and 163 deletions.
32 changes: 22 additions & 10 deletions frontend/src/components/SvDetails/AcmgRating.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const resetAcmgRating = () => {
if (!acmgRatingStore.acmgRating) {
return
}
acmgRatingStore.acmgRating.setUserPresenceAutoCNV()
acmgRatingStore.acmgRating.setUserToAutoCNV()
}
const calculateAcmgClass = computed((): string => {
Expand Down Expand Up @@ -66,7 +66,6 @@ const switchCriteria = (
acmgRatingStore.acmgRating.setPresence(StateSourceCNV.User, criteria, Presence.Absent)
} else {
acmgRatingStore.acmgRating.setPresence(StateSourceCNV.User, criteria, Presence.Present)
console.log('setPresence, ', criteria, acmgRatingStore.acmgRating.getCriteriaCNVState(criteria))
}
}
</script>
Expand Down Expand Up @@ -128,17 +127,24 @@ const switchCriteria = (
acmgRatingStore.acmgRating.getCriteriaCNVState(criteria).presence
)
"
color="primary"
hide-details="auto"
density="compact"
class="switch"
>
</v-switch>
{{ acmgRatingStore.acmgRating.getCriteriaCNVState(criteria) }}
<div v-if="ACMG_CRITERIA_CNV_DEFS.get(criteria)?.slider">
<v-slider
:v-model="acmgRatingStore.acmgRating.getCriteriaCNVState(criteria).score"
:min="0"
:max="1"
:step="0.1"
:model-value="
acmgRatingStore.acmgRating.getCriteriaCNVState(criteria).score ?? 0
"
@update:model-value="
acmgRatingStore.acmgRating.setScore(StateSourceCNV.User, criteria, $event)
"
:min="ACMG_CRITERIA_CNV_DEFS.get(criteria)?.minScore ?? 0"
:max="ACMG_CRITERIA_CNV_DEFS.get(criteria)?.maxScore ?? 1"
:step="0.05"
thumb-label
thumb-size="10"
class="slider"
Expand Down Expand Up @@ -172,17 +178,23 @@ const switchCriteria = (
acmgRatingStore.acmgRating.getCriteriaCNVState(criteria).presence
)
"
color="primary"
hide-details="auto"
density="compact"
class="switch"
>
</v-switch>
<div v-if="ACMG_CRITERIA_CNV_DEFS.get(criteria)?.slider">
<v-slider
:v-model="acmgRatingStore.acmgRating.getCriteriaCNVState(criteria).score"
:min="0"
:max="1"
:step="0.1"
:model-value="
acmgRatingStore.acmgRating.getCriteriaCNVState(criteria).score ?? 0
"
@update:model-value="
acmgRatingStore.acmgRating.setScore(StateSourceCNV.User, criteria, $event)
"
:min="ACMG_CRITERIA_CNV_DEFS.get(criteria)?.minScore ?? 0"
:max="ACMG_CRITERIA_CNV_DEFS.get(criteria)?.maxScore ?? 1"
:step="0.05"
thumb-label
thumb-size="10"
class="slider"
Expand Down
Loading

0 comments on commit 4883156

Please sign in to comment.