Skip to content

Commit

Permalink
Merge pull request #2797 from NationalSecurityAgency/t#2796/insuffici…
Browse files Browse the repository at this point in the history
…ent_points_warning

#2796: do not show Insufficient Points warning until data is loaded
  • Loading branch information
rmmayo authored Aug 26, 2024
2 parents 976376e + 342c7e5 commit 9703169
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dashboard/src/components/projects/ProjectPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ const headerOptions = computed(() => {
})
const isInsufficientPoints = computed(() => {
if (!project.value) {
return false
}
const projPoints = project.value?.totalPoints || 0
return projPoints < appConfig.minimumProjectPoints
})
Expand Down
5 changes: 4 additions & 1 deletion dashboard/src/components/subjects/SubjectPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ const headerOptions = computed(() => {
})
const isInsufficientPoints = computed(() => {
return subjectState.subject.totalPoints < appConfig.minimumSubjectPoints
if (!subjectState.subject) {
return false
}
return subjectState.subject?.totalPoints < appConfig.minimumSubjectPoints
})
const minimumPoints = computed(() => {
Expand Down

0 comments on commit 9703169

Please sign in to comment.