Skip to content

Commit

Permalink
#1212 Remove IAs from downloads if not chosen
Browse files Browse the repository at this point in the history
  • Loading branch information
warrensearle committed Mar 30, 2021
1 parent 4b65fc0 commit 7045bc1
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 53 deletions.
116 changes: 64 additions & 52 deletions src/views/Exercises/Edit/Downloads.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,67 +147,79 @@ export default {
}),
...mapGetters('exerciseDocument', {
exerciseId: 'id',
hasIndependentAssessments: 'hasIndependentAssessments',
}),
uploadPath() {
return `/exercise/${this.exerciseId}`;
},
uploadList() {
const data = [
{
title: 'Job Description',
id: 'jobDescriptions',
name: 'job-descriptions',
mandatory: true,
},
{
title: 'Terms and Conditions',
id: 'termsAndConditions',
name: 'terms-and-conditions',
mandatory: true,
},
{
title: 'Competency Framework',
id: 'competencyFramework',
name: 'competency-framework',
mandatory: false,
},
{
title: 'Pensions Information',
id: 'pensionsInformation',
name: 'pensions-information',
mandatory: false,
},
{
title: 'Skills and Abilities Criteria',
id: 'skillsAndAbilitiesCriteria',
name: 'skills-and-abilities-criteria',
mandatory: false,
},
{
const data = [];
data.push({
title: 'Job Description',
id: 'jobDescriptions',
name: 'job-descriptions',
mandatory: true,
});
data.push({
title: 'Terms and Conditions',
id: 'termsAndConditions',
name: 'terms-and-conditions',
mandatory: true,
});
data.push({
title: 'Competency Framework',
id: 'competencyFramework',
name: 'competency-framework',
mandatory: false,
});
data.push({
title: 'Pensions Information',
id: 'pensionsInformation',
name: 'pensions-information',
mandatory: false,
});
data.push({
title: 'Skills and Abilities Criteria',
id: 'skillsAndAbilitiesCriteria',
name: 'skills-and-abilities-criteria',
mandatory: false,
});
if (this.hasIndependentAssessments) {
data.push({
title: 'Independent Assessors',
id: 'independentAssessors',
name: 'independent-assessors',
mandatory: true,
},
{
title: 'Candidate Assessment Form',
id: 'candidateAssessementForms',
name: 'candidate-assessement-forms',
mandatory: false,
},
{
title: 'Welsh Translation',
id: 'welshTranslation',
name: 'welsh-translation',
mandatory: false,
},
{
title: 'Other Downloads',
id: 'otherDownloads',
name: 'other-downloads',
mandatory: false,
},
];
});
}
data.push({
title: 'Candidate Assessment Form',
id: 'candidateAssessementForms',
name: 'candidate-assessement-forms',
mandatory: false,
});
data.push({
title: 'Welsh Translation',
id: 'welshTranslation',
name: 'welsh-translation',
mandatory: false,
});
data.push({
title: 'Other Downloads',
id: 'otherDownloads',
name: 'other-downloads',
mandatory: false,
});
return data;
},
},
Expand Down
6 changes: 5 additions & 1 deletion src/views/Exercises/Show/Downloads.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@
</ul>
</dd>
</div>
<div class="govuk-summary-list__row">
<div
v-if="hasIndependentAssessments"
class="govuk-summary-list__row"
>
<dt class="govuk-summary-list__key">
Independent Assessors
</dt>
Expand Down Expand Up @@ -197,6 +200,7 @@ export default {
exerciseId: 'id',
//exercise: 'record',
isEditable: 'isEditable',
hasIndependentAssessments: 'hasIndependentAssessments',
}),
exercise() {
return this.$store.getters['exerciseDocument/data']();
Expand Down

0 comments on commit 7045bc1

Please sign in to comment.