Skip to content

Commit ae52067

Browse files
Update text for vaccine contains gelatine reason
1 parent 84aa349 commit ae52067

6 files changed

Lines changed: 19 additions & 3 deletions

File tree

app/enums.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,12 +505,14 @@ export const ReplyMethod = {
505505
* @enum {string}
506506
*/
507507
export const ReplyRefusal = {
508-
Gelatine: 'Vaccine contains gelatine',
508+
Gelatine: 'Nasal vaccine contains gelatine',
509+
GelatineMMR:
510+
'Do not want my child to have the MMR vaccine that contains gelatine',
509511
AlreadyVaccinated: 'Vaccine already received',
510512
AlreadyVaccinatedMMR: 'Already had both doses of the MMR vaccination',
511513
GettingElsewhere: 'Vaccine will be given elsewhere',
512514
Medical: 'Medical reasons',
513-
OutsideSchool: 'Don’t want vaccination in school',
515+
OutsideSchool: 'Do not want vaccination in school',
514516
Personal: 'Personal choice',
515517
Other: 'Other'
516518
}

app/utils/reply.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,11 @@ export const getRefusalReason = (type, decision) => {
317317
type !== ProgrammeType.Flu ? value !== ReplyRefusal.Gelatine : value
318318
)
319319

320+
// Gelatine content only a valid refusal reason for MMR vaccine
321+
refusalReasons = Object.values(ReplyRefusal).filter((value) =>
322+
type !== ProgrammeType.MMR ? value !== ReplyRefusal.GelatineMMR : value
323+
)
324+
320325
// You cannot decline on the basis of already having had the vaccine
321326
if (decision === ReplyDecision.Declined) {
322327
refusalReasons = refusalReasons.filter((value) =>

app/views/parent/form/refusal-reason.njk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838
},
3939
{
4040
text: ReplyRefusal.Gelatine
41-
} if vaccineIncludesGelatine,
41+
} if vaccineIncludesGelatine and "Flu" in session.presetNames,
42+
{
43+
text: ReplyRefusal.GelatineMMR
44+
} if vaccineIncludesGelatine and "MMR" in session.presetNames,
4245
{
4346
text: ReplyRefusal.Medical
4447
},

app/views/programme/show.njk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@
9797
{ text: ReplyRefusal.Gelatine },
9898
{ text: "11.1%", format: "numeric" }
9999
] if programme.type == ProgrammeType.Flu,
100+
[
101+
{ text: ReplyRefusal.GelatineMMR },
102+
{ text: "11.1%", format: "numeric" }
103+
] if programme.type == ProgrammeType.MMR,
100104
[
101105
{ text: ReplyRefusal.AlreadyVaccinated },
102106
{ text: "2.0%", format: "numeric" }

app/views/reply/form/refusal-reason.njk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
},
1616
items: [
1717
{ text: ReplyRefusal.Gelatine } if programme.type == ProgrammeType.Flu,
18+
{ text: ReplyRefusal.GelatineMMR } if programme.type == ProgrammeType.MMR,
1819
{ text: ReplyRefusal.AlreadyVaccinated },
1920
{ text: ReplyRefusal.GettingElsewhere },
2021
{ text: ReplyRefusal.Medical },

app/views/reply/form/withdraw.njk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
},
2020
items: [
2121
{ text: ReplyRefusal.Gelatine } if programme.type == ProgrammeType.Flu,
22+
{ text: ReplyRefusal.GelatineMMR } if programme.type == ProgrammeType.MMR,
2223
{ text: ReplyRefusal.AlreadyVaccinated },
2324
{ text: ReplyRefusal.GettingElsewhere },
2425
{ text: ReplyRefusal.Medical },

0 commit comments

Comments
 (0)