Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
HalcyonJAC committed Dec 14, 2023
1 parent 8da8b42 commit 0b46ce6
Showing 1 changed file with 34 additions and 31 deletions.
65 changes: 34 additions & 31 deletions src/views/Exercise/Reports/Diversity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
Applications
</th>
<th
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
scope="col"
class="govuk-table__header govuk-table__header--numeric"
>
Expand All @@ -136,7 +136,7 @@
<Stat :stat="diversity[activeTab].gender.male" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].gender.male) }}
Expand All @@ -153,7 +153,7 @@
<Stat :stat="diversity[activeTab].gender.female" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].gender.female) }}
Expand All @@ -171,7 +171,7 @@
/>
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].gender.declaration) }}
Expand Down Expand Up @@ -199,7 +199,7 @@
Applications
</th>
<th
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
scope="col"
class="govuk-table__header govuk-table__header--numeric"
>
Expand All @@ -219,7 +219,7 @@
<Stat :stat="diversity[activeTab].ethnicity.bame" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].ethnicity.bame) }}
Expand All @@ -236,7 +236,7 @@
<Stat :stat="diversity[activeTab].ethnicity.white" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].ethnicity.white) }}
Expand All @@ -254,7 +254,7 @@
/>
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].ethnicity.declaration) }}
Expand Down Expand Up @@ -282,7 +282,7 @@
Applications
</th>
<th
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
scope="col"
class="govuk-table__header govuk-table__header--numeric"
>
Expand All @@ -299,7 +299,7 @@
<Stat :stat="diversity[activeTab].disability.yes" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].disability.yes) }}
Expand All @@ -313,7 +313,7 @@
<Stat :stat="diversity[activeTab].disability.no" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].disability.no) }}
Expand All @@ -331,7 +331,7 @@
/>
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].disability.total) }}
Expand Down Expand Up @@ -359,7 +359,7 @@
Applications
</th>
<th
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
scope="col"
class="govuk-table__header govuk-table__header--numeric"
>
Expand All @@ -379,7 +379,7 @@
<Stat :stat="diversity[activeTab].professionalBackground.barrister" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].professionalBackground.barrister) }}
Expand All @@ -393,7 +393,7 @@
<Stat :stat="diversity[activeTab].professionalBackground.cilex" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].professionalBackground.cilex) }}
Expand All @@ -407,7 +407,7 @@
<Stat :stat="diversity[activeTab].professionalBackground.solicitor" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].professionalBackground.solicitor) }}
Expand All @@ -422,7 +422,7 @@
<Stat :stat="diversity[activeTab].professionalBackground.other" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].professionalBackground.other) }}
Expand All @@ -441,7 +441,7 @@
/>
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].professionalBackground.declaration) }}
Expand Down Expand Up @@ -472,7 +472,7 @@
Applications
</th>
<th
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
scope="col"
class="govuk-table__header govuk-table__header--numeric"
>
Expand All @@ -489,7 +489,7 @@
<Stat :stat="diversity[activeTab].attendedUKStateSchool.attendedUKStateSchool" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].attendedUKStateSchool.attendedUKStateSchool) }}
Expand All @@ -507,7 +507,7 @@
/>
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].attendedUKStateSchool.declaration) }}
Expand Down Expand Up @@ -536,7 +536,7 @@
Applications
</th>
<th
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
scope="col"
class="govuk-table__header govuk-table__header--numeric"
>
Expand All @@ -553,7 +553,7 @@
<Stat :stat="diversity[activeTab].firstGenerationUniversity.firstGenerationUniversity" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].firstGenerationUniversity.firstGenerationUniversity) }}
Expand All @@ -571,7 +571,7 @@
/>
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].firstGenerationUniversity.declaration) }}
Expand Down Expand Up @@ -601,7 +601,7 @@
Applications
</th>
<th
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
scope="col"
class="govuk-table__header govuk-table__header--numeric"
>
Expand All @@ -618,7 +618,7 @@
<Stat :stat="diversity[activeTab].parentsNotAttendedUniversity.parentsNotAttendedUniversity" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].parentsNotAttendedUniversity.parentsNotAttendedUniversity) }}
Expand All @@ -636,7 +636,7 @@
/>
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].parentsNotAttendedUniversity.declaration) }}
Expand Down Expand Up @@ -665,7 +665,7 @@
Applications
</th>
<th
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
scope="col"
class="govuk-table__header govuk-table__header--numeric"
>
Expand All @@ -688,7 +688,7 @@
<Stat :stat="diversity[activeTab].emp.applied" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].emp.applied) }}
Expand All @@ -705,7 +705,7 @@
<Stat :stat="diversity[activeTab].emp.ethnicity" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].emp.ethnicity) }}
Expand All @@ -722,7 +722,7 @@
<Stat :stat="diversity[activeTab].emp.gender" />
</td>
<td
v-if="activeTab !== 'applied'"
v-if="isNotApplied"
class="govuk-table__cell govuk-table__cell--numeric"
>
{{ showChange(diversity[activeTab].emp.gender) }}
Expand Down Expand Up @@ -815,6 +815,9 @@ export default {
}
return '';
},
isNotApplied() {
return this.activeTab !== 'applied';
},
},
created() {
this.unsubscribe = firestore.doc(`exercises/${this.exercise.id}/reports/diversity`)
Expand Down

0 comments on commit 0b46ce6

Please sign in to comment.