Skip to content

Commit

Permalink
Merge pull request #733 from jac-uk/feature/450-show-ia-stats
Browse files Browse the repository at this point in the history
#450 - Show number of sent/completed IAs
  • Loading branch information
crablab authored Aug 5, 2020
2 parents b45f95b + ea72115 commit 7570b2c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/views/Exercises/Tasks/IndependentAssessments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
<h1 class="govuk-heading-l">
Independent Assessments
</h1>
<div
v-if="hasInitialisedAssessments"
class="govuk-grid-row"
>
<div class="govuk-grid-column-one-half">
<div class="panel govuk-!-margin-bottom-9">
<span class="govuk-caption-m">
Sent
</span>
<h2 class="govuk-heading-m govuk-!-margin-bottom-0">
{{ assessmentsSent }}
</h2>
</div>
</div>
<div class="govuk-grid-column-one-half">
<div class="panel govuk-!-margin-bottom-9">
<span class="govuk-caption-m">Completed</span>
<h2 class="govuk-heading-m govuk-!-margin-bottom-0">
{{ assessmentsCompleted }}
</h2>
</div>
</div>
</div>
<dl class="govuk-summary-list">
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
Expand Down Expand Up @@ -301,6 +324,20 @@ export default {
assessments() {
return this.$store.state.assessments.records;
},
assessmentsSent() {
if (this.exercise.assessments && this.exercise.assessments.sent){
return this.exercise.assessments.sent;
}
return 0;
},
assessmentsCompleted() {
if (this.exercise.assessments && this.exercise.assessments.completed){
return this.exercise.assessments.completed;
}
return 0;
},
status() {
return this.$route.params.status;
},
Expand Down

0 comments on commit 7570b2c

Please sign in to comment.