diff --git a/internal/donor/donorpage/progress.go b/internal/donor/donorpage/progress.go index a1acb25dc..d7049234d 100644 --- a/internal/donor/donorpage/progress.go +++ b/internal/donor/donorpage/progress.go @@ -178,6 +178,25 @@ func Progress(tmpl template.Template, lpaStoreResolvingService LpaStoreResolving }) } + if donor.RegisteringWithCourtOfProtection { + if donor.Tasks.PayForLpa.IsCompleted() && !donor.WitnessedByCertificateProviderAt.IsZero() { + data.InfoNotifications = append(data.InfoNotifications, progressNotification{ + Heading: appData.Localizer.T("yourLpaMustBeReviewedByCourtOfProtection"), + Body: appData.Localizer.T("opgIsCompletingChecksSoYouCanSubmitToCourtOfProtection"), + }) + } else if donor.Tasks.PayForLpa.IsCompleted() { + data.InfoNotifications = append(data.InfoNotifications, progressNotification{ + Heading: appData.Localizer.T("yourLpaMustBeReviewedByCourtOfProtection"), + Body: appData.Localizer.T("returnToYourTaskListToSignThenOpgWillCheck"), + }) + } else if !donor.WitnessedByCertificateProviderAt.IsZero() { + data.InfoNotifications = append(data.InfoNotifications, progressNotification{ + Heading: appData.Localizer.T("yourLpaMustBeReviewedByCourtOfProtection"), + Body: appData.Localizer.T("whenYouHavePaidOpgWillCheck"), + }) + } + } + return tmpl(w, data) } } diff --git a/internal/donor/donorpage/progress_test.go b/internal/donor/donorpage/progress_test.go index 21cd96ed8..fd376f3c6 100644 --- a/internal/donor/donorpage/progress_test.go +++ b/internal/donor/donorpage/progress_test.go @@ -463,6 +463,62 @@ func TestGetProgress(t *testing.T) { return l }, }, + "applying to court of protection and signed and paid": { + donor: &donordata.Provided{ + Tasks: donordata.Tasks{ + PayForLpa: task.PaymentStateCompleted, + }, + WitnessedByCertificateProviderAt: time.Now(), + RegisteringWithCourtOfProtection: true, + }, + lpa: &lpadata.Lpa{}, + setupCertificateProviderStore: certificateProviderStoreNotFound, + infoNotifications: []progressNotification{ + {Heading: "H", Body: "B"}, + }, + setupLocalizer: func(t *testing.T) *mockLocalizer { + l := newMockLocalizer(t) + l.EXPECT().T("yourLpaMustBeReviewedByCourtOfProtection").Return("H") + l.EXPECT().T("opgIsCompletingChecksSoYouCanSubmitToCourtOfProtection").Return("B") + return l + }, + }, + "applying to court of protection and signed": { + donor: &donordata.Provided{ + WitnessedByCertificateProviderAt: time.Now(), + RegisteringWithCourtOfProtection: true, + }, + lpa: &lpadata.Lpa{}, + setupCertificateProviderStore: certificateProviderStoreNotFound, + infoNotifications: []progressNotification{ + {Heading: "H", Body: "B"}, + }, + setupLocalizer: func(t *testing.T) *mockLocalizer { + l := newMockLocalizer(t) + l.EXPECT().T("yourLpaMustBeReviewedByCourtOfProtection").Return("H") + l.EXPECT().T("whenYouHavePaidOpgWillCheck").Return("B") + return l + }, + }, + "applying to court of protection and paid": { + donor: &donordata.Provided{ + Tasks: donordata.Tasks{ + PayForLpa: task.PaymentStateCompleted, + }, + RegisteringWithCourtOfProtection: true, + }, + lpa: &lpadata.Lpa{}, + setupCertificateProviderStore: certificateProviderStoreNotFound, + infoNotifications: []progressNotification{ + {Heading: "H", Body: "B"}, + }, + setupLocalizer: func(t *testing.T) *mockLocalizer { + l := newMockLocalizer(t) + l.EXPECT().T("yourLpaMustBeReviewedByCourtOfProtection").Return("H") + l.EXPECT().T("returnToYourTaskListToSignThenOpgWillCheck").Return("B") + return l + }, + }, } for name, tc := range testCases { diff --git a/lang/cy.json b/lang/cy.json index a9fc058b3..abdc633e3 100644 --- a/lang/cy.json +++ b/lang/cy.json @@ -1519,5 +1519,9 @@ "voucherHasConfirmedYourIdentity": "{{.VoucherFullName}} Welsh", "returnToYourTaskListForInformationAboutWhatToDoNext": "Welsh", "weAreReviewingTheEvidenceYouSent": "Welsh", - "ifYourEvidenceIsApprovedWillShowPaid": "Welsh" + "ifYourEvidenceIsApprovedWillShowPaid": "Welsh", + "yourLpaMustBeReviewedByCourtOfProtection": "Welsh", + "opgIsCompletingChecksSoYouCanSubmitToCourtOfProtection": "Welsh", + "returnToYourTaskListToSignThenOpgWillCheck": "Welsh", + "whenYouHavePaidOpgWillCheck": "Welsh" } diff --git a/lang/en.json b/lang/en.json index abf072ea1..d6ab62eb3 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1415,5 +1415,9 @@ "voucherHasConfirmedYourIdentity": "{{.VoucherFullName}} has confirmed your identity", "returnToYourTaskListForInformationAboutWhatToDoNext": "Return to your task list for information about what to do next.", "weAreReviewingTheEvidenceYouSent": "We are reviewing the evidence you sent about your LPA fee", - "ifYourEvidenceIsApprovedWillShowPaid": "If your evidence is approved, your LPA will show as paid." + "ifYourEvidenceIsApprovedWillShowPaid": "If your evidence is approved, your LPA will show as paid.", + "yourLpaMustBeReviewedByCourtOfProtection": "Your LPA must be reviewed by the Court of Protection", + "opgIsCompletingChecksSoYouCanSubmitToCourtOfProtection": "The Office of the Public Guardian is completing checks on your LPA so you can submit it to the Court of Protection. We’ll contact you with guidance on what to do next.", + "returnToYourTaskListToSignThenOpgWillCheck": "Return to your task list to sign your LPA. OPG will then be able to complete our checks on it so you can submit it to the Court of Protection.", + "whenYouHavePaidOpgWillCheck": "When you have paid for your LPA, the Office of the Public Guardian will complete our checks on it so you can submit it to the Court of Protection. We’ll contact you with guidance on what to do next." }