File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ export function generateConsent(
130130 ReplyDecision . OnlyMenACWY ,
131131 ReplyDecision . OnlyTdIPV
132132 ] . includes ( decision ) && { healthAnswers, triageNote } ) ,
133- ...( decision === ReplyDecision . Refused && {
133+ ...( [ ReplyDecision . Declined , ReplyDecision . Refused ] . includes ( decision ) && {
134134 refusalReason,
135135 ...( refusalReason === ReplyRefusal . AlreadyVaccinated && {
136136 refusalReasonDetails : 'My child had the vaccination at our GP surgery.'
@@ -143,6 +143,10 @@ export function generateConsent(
143143 refusalReasonDetails :
144144 'My child has recently had chemotherapy and her immune system needs time to recover.'
145145 } ) ,
146+ ...( refusalReason === ReplyRefusal . OutsideSchool && {
147+ refusalReasonDetails :
148+ 'My child gets anxious in situations where there are a lot of people.'
149+ } ) ,
146150 ...( refusalReason === ReplyRefusal . Other && {
147151 refusalReasonOther : 'My family rejects vaccinations on principle.'
148152 } ) ,
Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ export class Reply {
129129
130130 if (
131131 [
132+ ReplyDecision . Declined ,
132133 ReplyDecision . Refused ,
133134 ReplyDecision . OnlyMenACWY ,
134135 ReplyDecision . OnlyTdIPV
Original file line number Diff line number Diff line change @@ -324,10 +324,13 @@ export const getRefusalReason = (type, decision) => {
324324
325325 // You cannot decline on the basis of already having had the vaccine
326326 if ( decision === ReplyDecision . Declined ) {
327- refusalReasons = refusalReasons . filter ( ( value ) =>
328- [ ReplyRefusal . AlreadyVaccinated , ReplyRefusal . GettingElsewhere ] . includes (
329- value
330- )
327+ refusalReasons = refusalReasons . filter (
328+ ( value ) =>
329+ ! [
330+ ReplyRefusal . AlreadyVaccinated ,
331+ ReplyRefusal . AlreadyVaccinatedMMR ,
332+ ReplyRefusal . GettingElsewhere
333+ ] . includes ( value )
331334 )
332335 }
333336
Original file line number Diff line number Diff line change 1717 },
1818 email : {
1919 label : __ (" parent.email.label" ),
20- value : reply .parent .email ,
21- href : reply .uri + " /edit/parent"
20+ value : reply .parent .email
2221 },
2322 tel : {
2423 label : __ (" parent.tel.label" ),
25- value : reply .parent .tel ,
26- href : reply .uri + " /edit/parent"
24+ value : reply .parent .tel
2725 },
2826 contactPreference : {
2927 label : __ (" parent.contactPreference.label" ),
3028 value : reply .parent .contactPreference
3129 },
3230 refusalReason : {},
33- refusalReasonDetails : {},
34- note : {}
31+ refusalReasonDetails : {}
3532 })
3633 })
3734 }) }}
You can’t perform that action at this time.
0 commit comments