From 7cabb921e522812b6d1f92b50b74f337b8433882 Mon Sep 17 00:00:00 2001 From: Joshua Hawxwell Date: Thu, 5 Dec 2024 09:24:55 +0000 Subject: [PATCH] Update progress tracker items --- cypress/e2e/attorney/progress.cy.js | 12 +- cypress/e2e/donor/lpa-progress.cy.js | 40 +- cypress/e2e/supporter/view-lpa.cy.js | 32 +- .../{lpa_progress.go => progress.go} | 6 +- ...{lpa_progress_test.go => progress_test.go} | 18 +- internal/donor/donorpage/register.go | 2 +- .../supporter/supporterpage/view_lpa_test.go | 4 +- internal/task/progress.go | 181 ++---- internal/task/progress_test.go | 573 ++++++++---------- lang/cy.json | 42 +- lang/en.json | 38 +- web/template/attorney/progress.gohtml | 70 +-- web/template/donor/lpa_progress.gohtml | 31 - web/template/donor/progress.gohtml | 34 ++ web/template/layout/donor-lpa-progress.gohtml | 30 +- web/template/supporter/view_lpa.gohtml | 2 - 16 files changed, 467 insertions(+), 648 deletions(-) rename internal/donor/donorpage/{lpa_progress.go => progress.go} (80%) rename internal/donor/donorpage/{lpa_progress_test.go => progress_test.go} (69%) delete mode 100644 web/template/donor/lpa_progress.gohtml create mode 100644 web/template/donor/progress.gohtml diff --git a/cypress/e2e/attorney/progress.cy.js b/cypress/e2e/attorney/progress.cy.js index 9cda3e8990..e1987c7b6b 100644 --- a/cypress/e2e/attorney/progress.cy.js +++ b/cypress/e2e/attorney/progress.cy.js @@ -3,23 +3,23 @@ describe('Progress', () => { cy.visit('/fixtures/attorney?redirect=/progress'); cy.checkA11yApp(); - cy.contains('li', 'You’ve signed the LPA In progress'); - cy.contains('li', 'All attorneys have signed the LPA Not started'); + cy.contains('li', 'LPA signed by you Not completed'); + cy.contains('li', 'LPA signed by all attorneys Not completed'); }); it('when signed', () => { cy.visit('/fixtures/attorney?redirect=/progress&progress=signedByAttorney'); cy.checkA11yApp(); - cy.contains('li', 'You’ve signed the LPA Completed'); - cy.contains('li', 'All attorneys have signed the LPA In progress'); + cy.contains('li', 'LPA signed by you Completed'); + cy.contains('li', 'LPA signed by all attorneys Not completed'); }); it('when all signed', () => { cy.visit('/fixtures/attorney?redirect=/progress&progress=signedByAllAttorneys'); cy.checkA11yApp(); - cy.contains('li', 'You’ve signed the LPA Completed'); - cy.contains('li', 'All attorneys have signed the LPA Completed'); + cy.contains('li', 'LPA signed by you Completed'); + cy.contains('li', 'LPA signed by all attorneys Completed'); }); }); diff --git a/cypress/e2e/donor/lpa-progress.cy.js b/cypress/e2e/donor/lpa-progress.cy.js index 7340ae837d..7065ae8a44 100644 --- a/cypress/e2e/donor/lpa-progress.cy.js +++ b/cypress/e2e/donor/lpa-progress.cy.js @@ -1,36 +1,40 @@ describe('LPA progress', () => { it('when nothing completed', () => { cy.visit('/fixtures?redirect=/progress'); + cy.checkA11yApp(); - cy.contains('li', 'You’ve signed your LPA In progress'); - cy.contains('li', 'Your certificate provider has provided their certificate Not started'); - cy.contains('li', 'Your attorneys have signed your LPA Not started'); - cy.contains('li', 'We have received your LPA Not started'); - cy.contains('li', 'Your 4-week waiting period has started Not started'); - cy.contains('li', 'Your LPA has been registered Not started'); + cy.contains('li', 'LPA paid for Not completed'); + cy.contains('li', 'Your identity confirmed Not completed'); + cy.contains('li', 'LPA signed by you Not completed'); + cy.contains('li', 'LPA certificate provided Not completed'); + cy.contains('li', 'LPA signed by all attorneys Not completed'); + cy.contains('li', 'OPG’s statutory 4-week waiting period begins Not completed'); + cy.contains('li', 'LPA registered by OPG Not completed'); }) it('when LPA submitted', () => { cy.visit('/fixtures?redirect=/progress&progress=signTheLpa'); cy.checkA11yApp(); - cy.contains('li', 'You’ve signed your LPA Completed'); - cy.contains('li', 'Charlie Cooper has provided their certificate In progress'); - cy.contains('li', 'Your attorneys have signed your LPA Not started'); - cy.contains('li', 'We have received your LPA Not started'); - cy.contains('li', 'Your 4-week waiting period has started Not started'); - cy.contains('li', 'Your LPA has been registered Not started'); + cy.contains('li', 'LPA paid for Completed'); + cy.contains('li', 'Your identity confirmed Completed'); + cy.contains('li', 'LPA signed by you Completed'); + cy.contains('li', 'LPA certificate provided Not completed'); + cy.contains('li', 'LPA signed by all attorneys Not completed'); + cy.contains('li', 'OPG’s statutory 4-week waiting period begins Not completed'); + cy.contains('li', 'LPA registered by OPG Not completed'); }) it('when certificate provided', () => { cy.visit('/fixtures?redirect=/progress&progress=signedByCertificateProvider'); cy.checkA11yApp(); - cy.contains('li', 'You’ve signed your LPA Completed'); - cy.contains('li', 'Charlie Cooper has provided their certificate Completed'); - cy.contains('li', 'Your attorneys have signed your LPA In progress'); - cy.contains('li', 'We have received your LPA Not started'); - cy.contains('li', 'Your 4-week waiting period has started Not started'); - cy.contains('li', 'Your LPA has been registered Not started'); + cy.contains('li', 'LPA paid for Completed'); + cy.contains('li', 'Your identity confirmed Completed'); + cy.contains('li', 'LPA signed by you Completed'); + cy.contains('li', 'LPA certificate provided Completed'); + cy.contains('li', 'LPA signed by all attorneys Not completed'); + cy.contains('li', 'OPG’s statutory 4-week waiting period begins Not completed'); + cy.contains('li', 'LPA registered by OPG Not completed'); }) }); diff --git a/cypress/e2e/supporter/view-lpa.cy.js b/cypress/e2e/supporter/view-lpa.cy.js index 9e9f81f28d..2681f47a6a 100644 --- a/cypress/e2e/supporter/view-lpa.cy.js +++ b/cypress/e2e/supporter/view-lpa.cy.js @@ -36,28 +36,24 @@ describe('View LPA', () => { it('shows progress of LPA', () => { cy.contains('a', 'M-FAKE').click() - cy.contains('h2', 'LPA progress') - - cy.contains('li', 'Sam Smith has paid In progress') - cy.contains('li', 'Sam Smith has confirmed their identity Not started') - cy.contains('li', 'Sam Smith has signed the LPA Not started') - cy.contains('li', 'The certificate provider has provided their certificate Not started') - cy.contains('li', 'All attorneys have signed the LPA Not started') - cy.contains('li', 'OPG has received the LPA Not started') - cy.contains('li', 'The 4-week waiting period has started Not started') - cy.contains('li', 'The LPA has been registered Not started') + cy.contains('li', 'LPA paid for Not completed') + cy.contains('li', 'Sam Smith’s identity confirmed Not completed') + cy.contains('li', 'LPA signed by Sam Smith Not completed') + cy.contains('li', 'LPA certificate provided by Charlie Cooper Not completed') + cy.contains('li', 'LPA signed by all attorneys Not completed') + cy.contains('li', 'OPG’s statutory 4-week waiting period begins Not completed') + cy.contains('li', 'Sam Smith’s LPA registered by OPG Not completed') cy.visit('/fixtures/supporter?organisation=1&redirect=/dashboard&lpa=1&setLPAProgress=1&progress=registered'); cy.contains('a', 'M-FAKE').click() - cy.contains('li', 'Sam Smith has paid Completed') - cy.contains('li', 'Sam Smith has confirmed their identity Completed') - cy.contains('li', 'Sam Smith has signed the LPA Completed') - cy.contains('li', 'The certificate provider has provided their certificate') - cy.contains('li', 'All attorneys have signed the LPA Completed') - cy.contains('li', 'OPG has received the LPA Completed') - cy.contains('li', 'The 4-week waiting period has started Completed') - cy.contains('li', 'The LPA has been registered Completed') + cy.contains('li', 'LPA paid for Completed') + cy.contains('li', 'Sam Smith’s identity confirmed Completed') + cy.contains('li', 'LPA signed by Sam Smith Completed') + cy.contains('li', 'LPA certificate provided by Charlie Cooper Completed') + cy.contains('li', 'LPA signed by all attorneys Completed') + cy.contains('li', 'OPG’s statutory 4-week waiting period begins Completed') + cy.contains('li', 'Sam Smith’s LPA registered by OPG Completed') }) }) diff --git a/internal/donor/donorpage/lpa_progress.go b/internal/donor/donorpage/progress.go similarity index 80% rename from internal/donor/donorpage/lpa_progress.go rename to internal/donor/donorpage/progress.go index c6a24435fb..3e32c6a1a7 100644 --- a/internal/donor/donorpage/lpa_progress.go +++ b/internal/donor/donorpage/progress.go @@ -10,21 +10,21 @@ import ( "github.com/ministryofjustice/opg-modernising-lpa/internal/validation" ) -type lpaProgressData struct { +type progressData struct { App appcontext.Data Donor *donordata.Provided Progress task.Progress Errors validation.List } -func LpaProgress(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, progressTracker ProgressTracker) Handler { +func Progress(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, progressTracker ProgressTracker) Handler { return func(appData appcontext.Data, w http.ResponseWriter, r *http.Request, donor *donordata.Provided) error { lpa, err := lpaStoreResolvingService.Get(r.Context()) if err != nil { return err } - data := &lpaProgressData{ + data := &progressData{ App: appData, Donor: donor, Progress: progressTracker.Progress(lpa), diff --git a/internal/donor/donorpage/lpa_progress_test.go b/internal/donor/donorpage/progress_test.go similarity index 69% rename from internal/donor/donorpage/lpa_progress_test.go rename to internal/donor/donorpage/progress_test.go index bdfe2b65f8..d77fc563b2 100644 --- a/internal/donor/donorpage/lpa_progress_test.go +++ b/internal/donor/donorpage/progress_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/mock" ) -func TestGetLpaProgress(t *testing.T) { +func TestGetProgress(t *testing.T) { w := httptest.NewRecorder() r, _ := http.NewRequest(http.MethodGet, "/", nil) @@ -26,25 +26,25 @@ func TestGetLpaProgress(t *testing.T) { progressTracker := newMockProgressTracker(t) progressTracker.EXPECT(). Progress(lpa). - Return(task.Progress{DonorSigned: task.ProgressTask{State: task.StateInProgress}}) + Return(task.Progress{DonorSigned: task.ProgressTask{Done: true}}) template := newMockTemplate(t) template.EXPECT(). - Execute(w, &lpaProgressData{ + Execute(w, &progressData{ App: testAppData, Donor: &donordata.Provided{LpaUID: "lpa-uid"}, - Progress: task.Progress{DonorSigned: task.ProgressTask{State: task.StateInProgress}}, + Progress: task.Progress{DonorSigned: task.ProgressTask{Done: true}}, }). Return(nil) - err := LpaProgress(template.Execute, lpaStoreResolvingService, progressTracker)(testAppData, w, r, &donordata.Provided{LpaUID: "lpa-uid"}) + err := Progress(template.Execute, lpaStoreResolvingService, progressTracker)(testAppData, w, r, &donordata.Provided{LpaUID: "lpa-uid"}) resp := w.Result() assert.Nil(t, err) assert.Equal(t, http.StatusOK, resp.StatusCode) } -func TestGetLpaProgressWhenLpaStoreClientErrors(t *testing.T) { +func TestGetProgressWhenLpaStoreClientErrors(t *testing.T) { w := httptest.NewRecorder() r, _ := http.NewRequest(http.MethodGet, "/", nil) @@ -53,11 +53,11 @@ func TestGetLpaProgressWhenLpaStoreClientErrors(t *testing.T) { Get(r.Context()). Return(nil, expectedError) - err := LpaProgress(nil, lpaStoreResolvingService, nil)(testAppData, w, r, &donordata.Provided{LpaUID: "lpa-uid"}) + err := Progress(nil, lpaStoreResolvingService, nil)(testAppData, w, r, &donordata.Provided{LpaUID: "lpa-uid"}) assert.Equal(t, expectedError, err) } -func TestGetLpaProgressOnTemplateError(t *testing.T) { +func TestGetProgressOnTemplateError(t *testing.T) { w := httptest.NewRecorder() r, _ := http.NewRequest(http.MethodGet, "/", nil) @@ -76,6 +76,6 @@ func TestGetLpaProgressOnTemplateError(t *testing.T) { Execute(w, mock.Anything). Return(expectedError) - err := LpaProgress(template.Execute, lpaStoreResolvingService, progressTracker)(testAppData, w, r, &donordata.Provided{LpaUID: "lpa-uid"}) + err := Progress(template.Execute, lpaStoreResolvingService, progressTracker)(testAppData, w, r, &donordata.Provided{LpaUID: "lpa-uid"}) assert.Equal(t, expectedError, err) } diff --git a/internal/donor/donorpage/register.go b/internal/donor/donorpage/register.go index c5fe70bdc0..c44e63c132 100644 --- a/internal/donor/donorpage/register.go +++ b/internal/donor/donorpage/register.go @@ -462,7 +462,7 @@ func Register( Guidance(tmpls.Get("you_have_submitted_your_lpa.gohtml"))) handleWithDonor(donor.PathProgress, page.None, - LpaProgress(tmpls.Get("lpa_progress.gohtml"), lpaStoreResolvingService, progressTracker)) + Progress(tmpls.Get("progress.gohtml"), lpaStoreResolvingService, progressTracker)) handleWithDonor(donor.PathUploadEvidenceSSE, page.None, UploadEvidenceSSE(documentStore, 3*time.Minute, 2*time.Second, time.Now)) diff --git a/internal/supporter/supporterpage/view_lpa_test.go b/internal/supporter/supporterpage/view_lpa_test.go index 18fdae664f..5aa518a794 100644 --- a/internal/supporter/supporterpage/view_lpa_test.go +++ b/internal/supporter/supporterpage/view_lpa_test.go @@ -26,14 +26,14 @@ func TestGetViewLPA(t *testing.T) { progressTracker := newMockProgressTracker(t) progressTracker.EXPECT(). Progress(lpa). - Return(task.Progress{Paid: task.ProgressTask{State: task.StateInProgress}}) + Return(task.Progress{Paid: task.ProgressTask{Done: true}}) template := newMockTemplate(t) template.EXPECT(). Execute(w, &viewLPAData{ App: testAppData, Lpa: lpa, - Progress: task.Progress{Paid: task.ProgressTask{State: task.StateInProgress}}, + Progress: task.Progress{Paid: task.ProgressTask{Done: true}}, }). Return(nil) diff --git a/internal/task/progress.go b/internal/task/progress.go index 36bf2383d6..6a215c8f83 100644 --- a/internal/task/progress.go +++ b/internal/task/progress.go @@ -26,188 +26,79 @@ type ProgressTracker struct { } type ProgressTask struct { - State State + Done bool Label string } type Progress struct { - isOrganisation bool Paid ProgressTask ConfirmedID ProgressTask DonorSigned ProgressTask CertificateProviderSigned ProgressTask AttorneysSigned ProgressTask - LpaSubmitted ProgressTask - NoticesOfIntentSent ProgressTask StatutoryWaitingPeriod ProgressTask - LpaRegistered ProgressTask + Registered ProgressTask } func (p Progress) ToSlice() []ProgressTask { - var list []ProgressTask - if p.isOrganisation { - list = append(list, p.Paid, p.ConfirmedID) + return []ProgressTask{ + p.Paid, + p.ConfirmedID, + p.DonorSigned, + p.CertificateProviderSigned, + p.AttorneysSigned, + p.StatutoryWaitingPeriod, + p.Registered, } - - list = append(list, p.DonorSigned, p.CertificateProviderSigned, p.AttorneysSigned, p.LpaSubmitted) - - if p.NoticesOfIntentSent.State.IsCompleted() { - list = append(list, p.NoticesOfIntentSent) - } - - list = append(list, p.StatutoryWaitingPeriod, p.LpaRegistered) - - return list } func (pt ProgressTracker) Progress(lpa *lpadata.Lpa) Progress { - var labels map[string]string - - if lpa.IsOrganisationDonor { - labels = map[string]string{ - "paid": pt.Localizer.Format( - "donorFullNameHasPaid", - map[string]interface{}{"DonorFullName": lpa.Donor.FullName()}, - ), - "confirmedID": pt.Localizer.Format( - "donorFullNameHasConfirmedTheirIdentity", - map[string]interface{}{"DonorFullName": lpa.Donor.FullName()}, - ), - "donorSigned": pt.Localizer.Format( - "donorFullNameHasSignedTheLPA", - map[string]interface{}{"DonorFullName": lpa.Donor.FullName()}, - ), - "certificateProviderSigned": pt.Localizer.T("theCertificateProviderHasDeclared"), - "attorneysSigned": pt.Localizer.T("allAttorneysHaveSignedTheLpa"), - "lpaSubmitted": pt.Localizer.T("opgHasReceivedTheLPA"), - "noticesOfIntentSent": "weSentAnEmailTheLpaIsReadyToRegister", - "statutoryWaitingPeriod": pt.Localizer.T("theWaitingPeriodHasStarted"), - "lpaRegistered": pt.Localizer.T("theLpaHasBeenRegistered"), - } - } else { - labels = map[string]string{ - "donorSigned": pt.Localizer.T("youveSignedYourLpa"), - "attorneysSigned": pt.Localizer.Count("attorneysHaveDeclared", len(lpa.Attorneys.Attorneys)), - "lpaSubmitted": pt.Localizer.T("weHaveReceivedYourLpa"), - "noticesOfIntentSent": "weSentAnEmailYourLpaIsReadyToRegister", - "statutoryWaitingPeriod": pt.Localizer.T("yourWaitingPeriodHasStarted"), - "lpaRegistered": pt.Localizer.T("yourLpaHasBeenRegistered"), - } - - if lpa.CertificateProvider.FirstNames != "" { - labels["certificateProviderSigned"] = pt.Localizer.Format( - "certificateProviderHasDeclared", - map[string]interface{}{"CertificateProviderFullName": lpa.CertificateProvider.FullName()}, - ) - } else { - labels["certificateProviderSigned"] = pt.Localizer.T("yourCertificateProviderHasDeclared") - } - } - progress := Progress{ - isOrganisation: lpa.IsOrganisationDonor, Paid: ProgressTask{ - State: StateNotStarted, - Label: labels["paid"], + Done: lpa.Paid, + Label: pt.Localizer.T("lpaPaidFor"), }, ConfirmedID: ProgressTask{ - State: StateNotStarted, - Label: labels["confirmedID"], + Done: !lpa.Donor.IdentityCheck.CheckedAt.IsZero(), }, DonorSigned: ProgressTask{ - State: StateNotStarted, - Label: labels["donorSigned"], + Done: lpa.SignedForDonor(), }, CertificateProviderSigned: ProgressTask{ - State: StateNotStarted, - Label: labels["certificateProviderSigned"], + Done: !lpa.CertificateProvider.SignedAt.IsZero(), }, AttorneysSigned: ProgressTask{ - State: StateNotStarted, - Label: labels["attorneysSigned"], - }, - LpaSubmitted: ProgressTask{ - State: StateNotStarted, - Label: labels["lpaSubmitted"], - }, - NoticesOfIntentSent: ProgressTask{ - State: StateNotStarted, + Done: lpa.AllAttorneysSigned(), + Label: pt.Localizer.T("lpaSignedByAllAttorneys"), }, StatutoryWaitingPeriod: ProgressTask{ - State: StateNotStarted, - Label: labels["statutoryWaitingPeriod"], + Done: !lpa.StatutoryWaitingPeriodAt.IsZero(), + Label: pt.Localizer.T("opgStatutoryWaitingPeriodBegins"), }, - LpaRegistered: ProgressTask{ - State: StateNotStarted, - Label: labels["lpaRegistered"], + Registered: ProgressTask{ + Done: !lpa.RegisteredAt.IsZero(), }, } if lpa.IsOrganisationDonor { - progress.Paid.State = StateInProgress - if !lpa.Paid { - return progress - } - - progress.Paid.State = StateCompleted - progress.ConfirmedID.State = StateInProgress - - if lpa.Donor.IdentityCheck.CheckedAt.IsZero() { - return progress - } - - progress.ConfirmedID.State = StateCompleted - progress.DonorSigned.State = StateInProgress - - if !lpa.SignedForDonor() { - return progress + progress.ConfirmedID.Label = pt.Localizer.Format("donorsIdentityConfirmed", + map[string]any{"DonorFullName": lpa.Donor.FullName()}) + progress.DonorSigned.Label = pt.Localizer.Format("lpaSignedByDonor", + map[string]any{"DonorFullName": lpa.Donor.FullName()}) + if lpa.CertificateProvider.FirstNames == "" { + progress.CertificateProviderSigned.Label = pt.Localizer.T("lpaCertificateProvided") + } else { + progress.CertificateProviderSigned.Label = pt.Localizer.Format("lpaCertificateProvidedBy", + map[string]any{"CertificateProviderFullName": lpa.CertificateProvider.FullName()}) } + progress.Registered.Label = pt.Localizer.Format("donorsLpaRegisteredByOpg", + map[string]any{"DonorFullName": lpa.Donor.FullName()}) } else { - progress.DonorSigned.State = StateInProgress - if !lpa.SignedForDonor() { - return progress - } - } - - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateInProgress - - if lpa.CertificateProvider.SignedAt.IsZero() { - return progress - } - - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateInProgress - - if !lpa.AllAttorneysSigned() { - return progress + progress.ConfirmedID.Label = pt.Localizer.T("yourIdentityConfirmed") + progress.DonorSigned.Label = pt.Localizer.T("lpaSignedByYou") + progress.CertificateProviderSigned.Label = pt.Localizer.T("lpaCertificateProvided") + progress.Registered.Label = pt.Localizer.T("lpaRegisteredByOpg") } - progress.AttorneysSigned.State = StateCompleted - progress.LpaSubmitted.State = StateInProgress - - if !lpa.Submitted { - return progress - } - - progress.LpaSubmitted.State = StateCompleted - - if lpa.StatutoryWaitingPeriodAt.IsZero() { - return progress - } - - progress.NoticesOfIntentSent.Label = pt.Localizer.Format(labels["noticesOfIntentSent"], map[string]any{ - "SentOn": pt.Localizer.FormatDate(lpa.StatutoryWaitingPeriodAt), - }) - progress.NoticesOfIntentSent.State = StateCompleted - progress.StatutoryWaitingPeriod.State = StateInProgress - - if lpa.RegisteredAt.IsZero() { - return progress - } - - progress.StatutoryWaitingPeriod.State = StateCompleted - progress.LpaRegistered.State = StateCompleted - return progress } diff --git a/internal/task/progress_test.go b/internal/task/progress_test.go index 8e09b3ad32..6bd1b6883f 100644 --- a/internal/task/progress_test.go +++ b/internal/task/progress_test.go @@ -11,79 +11,25 @@ import ( ) func TestProgressToSlice(t *testing.T) { - testcases := map[string]func(Progress) (Progress, []ProgressTask){ - "donor": func(p Progress) (Progress, []ProgressTask) { - return p, []ProgressTask{ - p.DonorSigned, - p.CertificateProviderSigned, - p.AttorneysSigned, - p.LpaSubmitted, - p.StatutoryWaitingPeriod, - p.LpaRegistered, - } - }, - "organisation": func(p Progress) (Progress, []ProgressTask) { - p.isOrganisation = true - - return p, []ProgressTask{ - p.Paid, - p.ConfirmedID, - p.DonorSigned, - p.CertificateProviderSigned, - p.AttorneysSigned, - p.LpaSubmitted, - p.StatutoryWaitingPeriod, - p.LpaRegistered, - } - }, - "donor notices sent": func(p Progress) (Progress, []ProgressTask) { - p.NoticesOfIntentSent.State = StateCompleted - - return p, []ProgressTask{ - p.DonorSigned, - p.CertificateProviderSigned, - p.AttorneysSigned, - p.LpaSubmitted, - p.NoticesOfIntentSent, - p.StatutoryWaitingPeriod, - p.LpaRegistered, - } - }, - "organisation notices sent": func(p Progress) (Progress, []ProgressTask) { - p.isOrganisation = true - p.NoticesOfIntentSent.State = StateCompleted - - return p, []ProgressTask{ - p.Paid, - p.ConfirmedID, - p.DonorSigned, - p.CertificateProviderSigned, - p.AttorneysSigned, - p.LpaSubmitted, - p.NoticesOfIntentSent, - p.StatutoryWaitingPeriod, - p.LpaRegistered, - } - }, + progress := Progress{ + Paid: ProgressTask{Label: "Paid translation"}, + ConfirmedID: ProgressTask{Label: "ConfirmedID translation"}, + DonorSigned: ProgressTask{Label: "DonorSigned translation"}, + CertificateProviderSigned: ProgressTask{Label: "CertificateProviderSigned translation"}, + AttorneysSigned: ProgressTask{Label: "AttorneysSigned translation"}, + StatutoryWaitingPeriod: ProgressTask{Label: "StatutoryWaitingPeriod translation"}, + Registered: ProgressTask{Label: "LpaRegistered translation"}, } - for name, fn := range testcases { - t.Run(name, func(t *testing.T) { - progress, slice := fn(Progress{ - Paid: ProgressTask{State: StateNotStarted, Label: "Paid translation"}, - ConfirmedID: ProgressTask{State: StateNotStarted, Label: "ConfirmedID translation"}, - DonorSigned: ProgressTask{State: StateInProgress, Label: "DonorSigned translation"}, - CertificateProviderSigned: ProgressTask{State: StateNotStarted, Label: "CertificateProviderSigned translation"}, - AttorneysSigned: ProgressTask{State: StateNotStarted, Label: "AttorneysSigned translation"}, - LpaSubmitted: ProgressTask{State: StateNotStarted, Label: "LpaSubmitted translation"}, - NoticesOfIntentSent: ProgressTask{State: StateNotStarted, Label: "NoticesOfIntentSent translation"}, - StatutoryWaitingPeriod: ProgressTask{State: StateNotStarted, Label: "StatutoryWaitingPeriod translation"}, - LpaRegistered: ProgressTask{State: StateNotStarted, Label: "LpaRegistered translation"}, - }) - - assert.Equal(t, slice, progress.ToSlice()) - }) - } + assert.Equal(t, []ProgressTask{ + progress.Paid, + progress.ConfirmedID, + progress.DonorSigned, + progress.CertificateProviderSigned, + progress.AttorneysSigned, + progress.StatutoryWaitingPeriod, + progress.Registered, + }, progress.ToSlice()) } func TestProgressTrackerProgress(t *testing.T) { @@ -91,137 +37,102 @@ func TestProgressTrackerProgress(t *testing.T) { uid1 := actoruid.New() uid2 := actoruid.New() initialProgress := Progress{ - Paid: ProgressTask{State: StateNotStarted, Label: ""}, - ConfirmedID: ProgressTask{State: StateNotStarted, Label: ""}, - DonorSigned: ProgressTask{State: StateInProgress, Label: "DonorSigned translation"}, - CertificateProviderSigned: ProgressTask{State: StateNotStarted, Label: "CertificateProviderSigned translation"}, - AttorneysSigned: ProgressTask{State: StateNotStarted, Label: "AttorneysSigned translation"}, - LpaSubmitted: ProgressTask{State: StateNotStarted, Label: "LpaSubmitted translation"}, - StatutoryWaitingPeriod: ProgressTask{State: StateNotStarted, Label: "StatutoryWaitingPeriod translation"}, - LpaRegistered: ProgressTask{State: StateNotStarted, Label: "LpaRegistered translation"}, + Paid: ProgressTask{Label: "Paid translation"}, + ConfirmedID: ProgressTask{Label: "ConfirmedID translation"}, + DonorSigned: ProgressTask{Label: "DonorSigned translation"}, + CertificateProviderSigned: ProgressTask{Label: "CertificateProviderSigned translation"}, + AttorneysSigned: ProgressTask{Label: "AttorneysSigned translation"}, + StatutoryWaitingPeriod: ProgressTask{Label: "StatutoryWaitingPeriod translation"}, + Registered: ProgressTask{Label: "LpaRegistered translation"}, } testCases := map[string]struct { lpa *lpadata.Lpa expectedProgress func() Progress - setupLocalizer func(*mockLocalizer) }{ "initial state": { - lpa: &lpadata.Lpa{ - Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{}}}, - }, + lpa: &lpadata.Lpa{}, expectedProgress: func() Progress { return initialProgress }, - setupLocalizer: func(localizer *mockLocalizer) { - localizer.EXPECT(). - T("yourCertificateProviderHasDeclared"). - Return("CertificateProviderSigned translation") - localizer.EXPECT(). - Count("attorneysHaveDeclared", 1). - Return("AttorneysSigned translation") - }, }, - "initial state with certificate provider name": { + "paid": { lpa: &lpadata.Lpa{ - CertificateProvider: lpadata.CertificateProvider{FirstNames: "A", LastName: "B"}, - Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{}}}, + Paid: true, }, expectedProgress: func() Progress { - return initialProgress - }, - setupLocalizer: func(localizer *mockLocalizer) { - localizer.EXPECT(). - Format("certificateProviderHasDeclared", map[string]interface{}{ - "CertificateProviderFullName": "A B", - }). - Return("CertificateProviderSigned translation") - localizer.EXPECT(). - Count("attorneysHaveDeclared", 1). - Return("AttorneysSigned translation") + progress := initialProgress + progress.Paid.Done = true + + return progress }, }, "lpa signed": { lpa: &lpadata.Lpa{ Donor: lpadata.Donor{FirstNames: "a", LastName: "b"}, - Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{}}}, SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, }, expectedProgress: func() Progress { progress := initialProgress - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateInProgress + progress.DonorSigned.Done = true return progress }, - setupLocalizer: func(localizer *mockLocalizer) { - localizer.EXPECT(). - T("yourCertificateProviderHasDeclared"). - Return("CertificateProviderSigned translation") - localizer.EXPECT(). - Count("attorneysHaveDeclared", 1). - Return("AttorneysSigned translation") - }, }, "certificate provider signed": { lpa: &lpadata.Lpa{ - Paid: true, - Donor: lpadata.Donor{FirstNames: "a", LastName: "b"}, - CertificateProvider: lpadata.CertificateProvider{SignedAt: lpaSignedAt}, - Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{}}}, + Paid: true, + Donor: lpadata.Donor{FirstNames: "a", LastName: "b"}, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + SignedAt: lpaSignedAt, + }, SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, }, expectedProgress: func() Progress { progress := initialProgress - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateInProgress + progress.Paid.Done = true + progress.DonorSigned.Done = true + progress.CertificateProviderSigned.Done = true return progress }, - setupLocalizer: func(localizer *mockLocalizer) { - localizer.EXPECT(). - T("yourCertificateProviderHasDeclared"). - Return("CertificateProviderSigned translation") - localizer.EXPECT(). - Count("attorneysHaveDeclared", 1). - Return("AttorneysSigned translation") - }, }, "attorneys signed": { lpa: &lpadata.Lpa{ - Paid: true, - Donor: lpadata.Donor{FirstNames: "a", LastName: "b"}, - CertificateProvider: lpadata.CertificateProvider{SignedAt: lpaSignedAt}, + Paid: true, + Donor: lpadata.Donor{FirstNames: "a", LastName: "b"}, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + SignedAt: lpaSignedAt, + }, Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid1, SignedAt: lpaSignedAt.Add(time.Minute)}, {UID: uid2, SignedAt: lpaSignedAt.Add(time.Minute)}}}, SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, }, expectedProgress: func() Progress { progress := initialProgress - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateCompleted - progress.LpaSubmitted.State = StateInProgress + progress.Paid.Done = true + progress.DonorSigned.Done = true + progress.CertificateProviderSigned.Done = true + progress.AttorneysSigned.Done = true return progress }, - setupLocalizer: func(localizer *mockLocalizer) { - localizer.EXPECT(). - T("yourCertificateProviderHasDeclared"). - Return("CertificateProviderSigned translation") - localizer.EXPECT(). - Count("attorneysHaveDeclared", 2). - Return("AttorneysSigned translation") - }, }, "submitted": { lpa: &lpadata.Lpa{ - Paid: true, - Donor: lpadata.Donor{FirstNames: "a", LastName: "b"}, - CertificateProvider: lpadata.CertificateProvider{SignedAt: lpaSignedAt}, + Paid: true, + Donor: lpadata.Donor{FirstNames: "a", LastName: "b"}, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + SignedAt: lpaSignedAt, + }, Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid1, SignedAt: lpaSignedAt}}}, SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, @@ -229,27 +140,23 @@ func TestProgressTrackerProgress(t *testing.T) { }, expectedProgress: func() Progress { progress := initialProgress - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateCompleted - progress.LpaSubmitted.State = StateCompleted + progress.Paid.Done = true + progress.DonorSigned.Done = true + progress.CertificateProviderSigned.Done = true + progress.AttorneysSigned.Done = true return progress }, - setupLocalizer: func(localizer *mockLocalizer) { - localizer.EXPECT(). - T("yourCertificateProviderHasDeclared"). - Return("CertificateProviderSigned translation") - localizer.EXPECT(). - Count("attorneysHaveDeclared", 1). - Return("AttorneysSigned translation") - }, }, "statutory waiting period": { lpa: &lpadata.Lpa{ - Paid: true, - Donor: lpadata.Donor{FirstNames: "a", LastName: "b"}, - CertificateProvider: lpadata.CertificateProvider{SignedAt: lpaSignedAt}, + Paid: true, + Donor: lpadata.Donor{FirstNames: "a", LastName: "b"}, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + SignedAt: lpaSignedAt, + }, Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid1, SignedAt: lpaSignedAt}}}, SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, @@ -258,30 +165,14 @@ func TestProgressTrackerProgress(t *testing.T) { }, expectedProgress: func() Progress { progress := initialProgress - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateCompleted - progress.LpaSubmitted.State = StateCompleted - progress.NoticesOfIntentSent.State = StateCompleted - progress.NoticesOfIntentSent.Label = "NoticesOfIntentSent translation" - progress.StatutoryWaitingPeriod.State = StateInProgress + progress.Paid.Done = true + progress.DonorSigned.Done = true + progress.CertificateProviderSigned.Done = true + progress.AttorneysSigned.Done = true + progress.StatutoryWaitingPeriod.Done = true return progress }, - setupLocalizer: func(localizer *mockLocalizer) { - localizer.EXPECT(). - T("yourCertificateProviderHasDeclared"). - Return("CertificateProviderSigned translation") - localizer.EXPECT(). - Count("attorneysHaveDeclared", 1). - Return("AttorneysSigned translation") - localizer.EXPECT(). - Format("weSentAnEmailYourLpaIsReadyToRegister", map[string]any{"SentOn": "statutory-waiting-period-on"}). - Return("NoticesOfIntentSent translation") - localizer.EXPECT(). - FormatDate(lpaSignedAt). - Return("statutory-waiting-period-on") - }, }, "registered": { lpa: &lpadata.Lpa{ @@ -290,38 +181,26 @@ func TestProgressTrackerProgress(t *testing.T) { SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid1, SignedAt: lpaSignedAt.Add(time.Minute)}}}, - CertificateProvider: lpadata.CertificateProvider{SignedAt: lpaSignedAt}, - Submitted: true, - StatutoryWaitingPeriodAt: lpaSignedAt, - RegisteredAt: lpaSignedAt, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + SignedAt: lpaSignedAt, + }, + Submitted: true, + StatutoryWaitingPeriodAt: lpaSignedAt, + RegisteredAt: lpaSignedAt, }, expectedProgress: func() Progress { progress := initialProgress - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateCompleted - progress.LpaSubmitted.State = StateCompleted - progress.NoticesOfIntentSent.State = StateCompleted - progress.NoticesOfIntentSent.Label = "NoticesOfIntentSent translation" - progress.StatutoryWaitingPeriod.State = StateCompleted - progress.LpaRegistered.State = StateCompleted + progress.Paid.Done = true + progress.DonorSigned.Done = true + progress.CertificateProviderSigned.Done = true + progress.AttorneysSigned.Done = true + progress.StatutoryWaitingPeriod.Done = true + progress.Registered.Done = true return progress }, - setupLocalizer: func(localizer *mockLocalizer) { - localizer.EXPECT(). - T("yourCertificateProviderHasDeclared"). - Return("CertificateProviderSigned translation") - localizer.EXPECT(). - Count("attorneysHaveDeclared", 1). - Return("AttorneysSigned translation") - localizer.EXPECT(). - Format("weSentAnEmailYourLpaIsReadyToRegister", map[string]any{"SentOn": "statutory-waiting-period-on"}). - Return("NoticesOfIntentSent translation") - localizer.EXPECT(). - FormatDate(lpaSignedAt). - Return("statutory-waiting-period-on") - }, }, } @@ -329,21 +208,33 @@ func TestProgressTrackerProgress(t *testing.T) { t.Run(name, func(t *testing.T) { localizer := newMockLocalizer(t) localizer.EXPECT(). - T("youveSignedYourLpa"). - Return("DonorSigned translation") + T("lpaPaidFor"). + Return("Paid translation"). + Once() localizer.EXPECT(). - T("weHaveReceivedYourLpa"). - Return("LpaSubmitted translation") + T("yourIdentityConfirmed"). + Return("ConfirmedID translation"). + Once() localizer.EXPECT(). - T("yourWaitingPeriodHasStarted"). - Return("StatutoryWaitingPeriod translation") + T("lpaSignedByYou"). + Return("DonorSigned translation"). + Once() localizer.EXPECT(). - T("yourLpaHasBeenRegistered"). - Return("LpaRegistered translation") - - if tc.setupLocalizer != nil { - tc.setupLocalizer(localizer) - } + T("lpaCertificateProvided"). + Return("CertificateProviderSigned translation"). + Once() + localizer.EXPECT(). + T("lpaSignedByAllAttorneys"). + Return("AttorneysSigned translation"). + Once() + localizer.EXPECT(). + T("opgStatutoryWaitingPeriodBegins"). + Return("StatutoryWaitingPeriod translation"). + Once() + localizer.EXPECT(). + T("lpaRegisteredByOpg"). + Return("LpaRegistered translation"). + Once() progressTracker := ProgressTracker{Localizer: localizer} @@ -357,16 +248,13 @@ func TestLpaProgressAsSupporter(t *testing.T) { lpaSignedAt := time.Now() uid := actoruid.New() initialProgress := Progress{ - isOrganisation: true, - Paid: ProgressTask{State: StateInProgress, Label: "Paid translation"}, - ConfirmedID: ProgressTask{State: StateNotStarted, Label: "ConfirmedID translation"}, - DonorSigned: ProgressTask{State: StateNotStarted, Label: "DonorSigned translation"}, - CertificateProviderSigned: ProgressTask{State: StateNotStarted, Label: "CertificateProviderSigned translation"}, - AttorneysSigned: ProgressTask{State: StateNotStarted, Label: "AttorneysSigned translation"}, - LpaSubmitted: ProgressTask{State: StateNotStarted, Label: "LpaSubmitted translation"}, - NoticesOfIntentSent: ProgressTask{State: StateNotStarted}, - StatutoryWaitingPeriod: ProgressTask{State: StateNotStarted, Label: "StatutoryWaitingPeriod translation"}, - LpaRegistered: ProgressTask{State: StateNotStarted, Label: "LpaRegistered translation"}, + Paid: ProgressTask{Label: "Paid translation"}, + ConfirmedID: ProgressTask{Label: "ConfirmedID translation"}, + DonorSigned: ProgressTask{Label: "DonorSigned translation"}, + CertificateProviderSigned: ProgressTask{Label: "CertificateProviderSigned translation"}, + AttorneysSigned: ProgressTask{Label: "AttorneysSigned translation"}, + StatutoryWaitingPeriod: ProgressTask{Label: "StatutoryWaitingPeriod translation"}, + Registered: ProgressTask{Label: "LpaRegistered translation"}, } testCases := map[string]struct { @@ -383,21 +271,35 @@ func TestLpaProgressAsSupporter(t *testing.T) { expectedProgress: func() Progress { return initialProgress }, + setupLocalizer: func(localizer *mockLocalizer) { + localizer.EXPECT(). + T("lpaCertificateProvided"). + Return("CertificateProviderSigned translation") + }, }, "paid": { lpa: &lpadata.Lpa{ IsOrganisationDonor: true, Donor: lpadata.Donor{FirstNames: "a", LastName: "b"}, Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{}}}, - Paid: true, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + }, + Paid: true, }, expectedProgress: func() Progress { progress := initialProgress - progress.Paid.State = StateCompleted - progress.ConfirmedID.State = StateInProgress + progress.Paid.Done = true return progress }, + setupLocalizer: func(localizer *mockLocalizer) { + localizer.EXPECT(). + Format("lpaCertificateProvidedBy", + map[string]any{"CertificateProviderFullName": "c d"}). + Return("CertificateProviderSigned translation") + }, }, "confirmed ID": { lpa: &lpadata.Lpa{ @@ -408,17 +310,26 @@ func TestLpaProgressAsSupporter(t *testing.T) { DateOfBirth: dateOfBirth, IdentityCheck: lpadata.IdentityCheck{CheckedAt: time.Now()}, }, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + }, Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{}}}, Paid: true, }, expectedProgress: func() Progress { progress := initialProgress - progress.Paid.State = StateCompleted - progress.ConfirmedID.State = StateCompleted - progress.DonorSigned.State = StateInProgress + progress.Paid.Done = true + progress.ConfirmedID.Done = true return progress }, + setupLocalizer: func(localizer *mockLocalizer) { + localizer.EXPECT(). + Format("lpaCertificateProvidedBy", + map[string]any{"CertificateProviderFullName": "c d"}). + Return("CertificateProviderSigned translation") + }, }, "donor signed": { lpa: &lpadata.Lpa{ @@ -429,6 +340,10 @@ func TestLpaProgressAsSupporter(t *testing.T) { DateOfBirth: dateOfBirth, IdentityCheck: lpadata.IdentityCheck{CheckedAt: time.Now()}, }, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + }, Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{}}}, Paid: true, SignedAt: lpaSignedAt, @@ -436,13 +351,18 @@ func TestLpaProgressAsSupporter(t *testing.T) { }, expectedProgress: func() Progress { progress := initialProgress - progress.Paid.State = StateCompleted - progress.ConfirmedID.State = StateCompleted - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateInProgress + progress.Paid.Done = true + progress.ConfirmedID.Done = true + progress.DonorSigned.Done = true return progress }, + setupLocalizer: func(localizer *mockLocalizer) { + localizer.EXPECT(). + Format("lpaCertificateProvidedBy", + map[string]any{"CertificateProviderFullName": "c d"}). + Return("CertificateProviderSigned translation") + }, }, "certificate provider signed": { lpa: &lpadata.Lpa{ @@ -453,22 +373,31 @@ func TestLpaProgressAsSupporter(t *testing.T) { DateOfBirth: dateOfBirth, IdentityCheck: lpadata.IdentityCheck{CheckedAt: time.Now()}, }, - Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{}}}, - CertificateProvider: lpadata.CertificateProvider{SignedAt: lpaSignedAt}, + Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{}}}, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + SignedAt: lpaSignedAt, + }, Paid: true, SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, }, expectedProgress: func() Progress { progress := initialProgress - progress.Paid.State = StateCompleted - progress.ConfirmedID.State = StateCompleted - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateInProgress + progress.Paid.Done = true + progress.ConfirmedID.Done = true + progress.DonorSigned.Done = true + progress.CertificateProviderSigned.Done = true return progress }, + setupLocalizer: func(localizer *mockLocalizer) { + localizer.EXPECT(). + Format("lpaCertificateProvidedBy", + map[string]any{"CertificateProviderFullName": "c d"}). + Return("CertificateProviderSigned translation") + }, }, "attorneys signed": { lpa: &lpadata.Lpa{ @@ -479,23 +408,32 @@ func TestLpaProgressAsSupporter(t *testing.T) { DateOfBirth: dateOfBirth, IdentityCheck: lpadata.IdentityCheck{CheckedAt: time.Now()}, }, - Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid, SignedAt: lpaSignedAt.Add(time.Minute)}}}, - CertificateProvider: lpadata.CertificateProvider{SignedAt: lpaSignedAt}, + Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid, SignedAt: lpaSignedAt.Add(time.Minute)}}}, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + SignedAt: lpaSignedAt, + }, Paid: true, SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, }, expectedProgress: func() Progress { progress := initialProgress - progress.Paid.State = StateCompleted - progress.ConfirmedID.State = StateCompleted - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateCompleted - progress.LpaSubmitted.State = StateInProgress + progress.Paid.Done = true + progress.ConfirmedID.Done = true + progress.DonorSigned.Done = true + progress.CertificateProviderSigned.Done = true + progress.AttorneysSigned.Done = true return progress }, + setupLocalizer: func(localizer *mockLocalizer) { + localizer.EXPECT(). + Format("lpaCertificateProvidedBy", + map[string]any{"CertificateProviderFullName": "c d"}). + Return("CertificateProviderSigned translation") + }, }, "submitted": { lpa: &lpadata.Lpa{ @@ -506,8 +444,12 @@ func TestLpaProgressAsSupporter(t *testing.T) { DateOfBirth: dateOfBirth, IdentityCheck: lpadata.IdentityCheck{CheckedAt: time.Now()}, }, - Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid, SignedAt: lpaSignedAt.Add(time.Minute)}}}, - CertificateProvider: lpadata.CertificateProvider{SignedAt: lpaSignedAt}, + Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid, SignedAt: lpaSignedAt.Add(time.Minute)}}}, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + SignedAt: lpaSignedAt, + }, Paid: true, SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, @@ -515,15 +457,20 @@ func TestLpaProgressAsSupporter(t *testing.T) { }, expectedProgress: func() Progress { progress := initialProgress - progress.Paid.State = StateCompleted - progress.ConfirmedID.State = StateCompleted - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateCompleted - progress.LpaSubmitted.State = StateCompleted + progress.Paid.Done = true + progress.ConfirmedID.Done = true + progress.DonorSigned.Done = true + progress.CertificateProviderSigned.Done = true + progress.AttorneysSigned.Done = true return progress }, + setupLocalizer: func(localizer *mockLocalizer) { + localizer.EXPECT(). + Format("lpaCertificateProvidedBy", + map[string]any{"CertificateProviderFullName": "c d"}). + Return("CertificateProviderSigned translation") + }, }, "statutory waiting period": { lpa: &lpadata.Lpa{ @@ -534,8 +481,12 @@ func TestLpaProgressAsSupporter(t *testing.T) { DateOfBirth: dateOfBirth, IdentityCheck: lpadata.IdentityCheck{CheckedAt: time.Now()}, }, - Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid, SignedAt: lpaSignedAt.Add(time.Minute)}}}, - CertificateProvider: lpadata.CertificateProvider{SignedAt: lpaSignedAt}, + Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid, SignedAt: lpaSignedAt.Add(time.Minute)}}}, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + SignedAt: lpaSignedAt, + }, Paid: true, SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, @@ -544,25 +495,20 @@ func TestLpaProgressAsSupporter(t *testing.T) { }, expectedProgress: func() Progress { progress := initialProgress - progress.Paid.State = StateCompleted - progress.ConfirmedID.State = StateCompleted - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateCompleted - progress.LpaSubmitted.State = StateCompleted - progress.NoticesOfIntentSent.Label = "NoticesOfIntentSent translation" - progress.NoticesOfIntentSent.State = StateCompleted - progress.StatutoryWaitingPeriod.State = StateInProgress + progress.Paid.Done = true + progress.ConfirmedID.Done = true + progress.DonorSigned.Done = true + progress.CertificateProviderSigned.Done = true + progress.AttorneysSigned.Done = true + progress.StatutoryWaitingPeriod.Done = true return progress }, setupLocalizer: func(localizer *mockLocalizer) { localizer.EXPECT(). - Format("weSentAnEmailTheLpaIsReadyToRegister", map[string]any{"SentOn": "statutory-waiting-period-on"}). - Return("NoticesOfIntentSent translation") - localizer.EXPECT(). - FormatDate(lpaSignedAt). - Return("statutory-waiting-period-on") + Format("lpaCertificateProvidedBy", + map[string]any{"CertificateProviderFullName": "c d"}). + Return("CertificateProviderSigned translation") }, }, "registered": { @@ -574,8 +520,12 @@ func TestLpaProgressAsSupporter(t *testing.T) { DateOfBirth: dateOfBirth, IdentityCheck: lpadata.IdentityCheck{CheckedAt: time.Now()}, }, - Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid, SignedAt: lpaSignedAt.Add(time.Minute)}}}, - CertificateProvider: lpadata.CertificateProvider{SignedAt: lpaSignedAt}, + Attorneys: lpadata.Attorneys{Attorneys: []lpadata.Attorney{{UID: uid, SignedAt: lpaSignedAt.Add(time.Minute)}}}, + CertificateProvider: lpadata.CertificateProvider{ + FirstNames: "c", + LastName: "d", + SignedAt: lpaSignedAt, + }, Paid: true, SignedAt: lpaSignedAt, WitnessedByCertificateProviderAt: lpaSignedAt, @@ -585,26 +535,21 @@ func TestLpaProgressAsSupporter(t *testing.T) { }, expectedProgress: func() Progress { progress := initialProgress - progress.Paid.State = StateCompleted - progress.ConfirmedID.State = StateCompleted - progress.DonorSigned.State = StateCompleted - progress.CertificateProviderSigned.State = StateCompleted - progress.AttorneysSigned.State = StateCompleted - progress.LpaSubmitted.State = StateCompleted - progress.NoticesOfIntentSent.Label = "NoticesOfIntentSent translation" - progress.NoticesOfIntentSent.State = StateCompleted - progress.StatutoryWaitingPeriod.State = StateCompleted - progress.LpaRegistered.State = StateCompleted + progress.Paid.Done = true + progress.ConfirmedID.Done = true + progress.DonorSigned.Done = true + progress.CertificateProviderSigned.Done = true + progress.AttorneysSigned.Done = true + progress.StatutoryWaitingPeriod.Done = true + progress.Registered.Done = true return progress }, setupLocalizer: func(localizer *mockLocalizer) { localizer.EXPECT(). - Format("weSentAnEmailTheLpaIsReadyToRegister", map[string]any{"SentOn": "statutory-waiting-period-on"}). - Return("NoticesOfIntentSent translation") - localizer.EXPECT(). - FormatDate(lpaSignedAt). - Return("statutory-waiting-period-on") + Format("lpaCertificateProvidedBy", + map[string]any{"CertificateProviderFullName": "c d"}). + Return("CertificateProviderSigned translation") }, }, } @@ -613,37 +558,25 @@ func TestLpaProgressAsSupporter(t *testing.T) { t.Run(name, func(t *testing.T) { localizer := newMockLocalizer(t) localizer.EXPECT(). - Format( - "donorFullNameHasPaid", - map[string]interface{}{"DonorFullName": "a b"}, - ). + T("lpaPaidFor"). Return("Paid translation") localizer.EXPECT(). - Format( - "donorFullNameHasConfirmedTheirIdentity", - map[string]interface{}{"DonorFullName": "a b"}, - ). + Format("donorsIdentityConfirmed", + map[string]any{"DonorFullName": "a b"}). Return("ConfirmedID translation") localizer.EXPECT(). - Format( - "donorFullNameHasSignedTheLPA", - map[string]interface{}{"DonorFullName": "a b"}, - ). + Format("lpaSignedByDonor", + map[string]any{"DonorFullName": "a b"}). Return("DonorSigned translation") localizer.EXPECT(). - T("theCertificateProviderHasDeclared"). - Return("CertificateProviderSigned translation") - localizer.EXPECT(). - T("allAttorneysHaveSignedTheLpa"). + T("lpaSignedByAllAttorneys"). Return("AttorneysSigned translation") localizer.EXPECT(). - T("opgHasReceivedTheLPA"). - Return("LpaSubmitted translation") - localizer.EXPECT(). - T("theWaitingPeriodHasStarted"). + T("opgStatutoryWaitingPeriodBegins"). Return("StatutoryWaitingPeriod translation") localizer.EXPECT(). - T("theLpaHasBeenRegistered"). + Format("donorsLpaRegisteredByOpg", + map[string]any{"DonorFullName": "a b"}). Return("LpaRegistered translation") if tc.setupLocalizer != nil { diff --git a/lang/cy.json b/lang/cy.json index 0cd1ed93a9..70952ab3ec 100644 --- a/lang/cy.json +++ b/lang/cy.json @@ -489,20 +489,6 @@ "discussWithCertificateProviderContent": "

Welsh {{.CertificateProviderFullName}}

>", "signYourLpaStep": "

Welsh {{.CertificateProviderFullName}} {{.CertificateProviderFullName}}

", "signYourLpaStepCannotSign": "

2. Llofnodi eich LPA

Bydd eich llofnodwr awdurdodedig, {{.AuthorisedSignatoryFullName}}, yn llofnodi eich LPA ar-lein.

Anfonir codau unigryw drwy neges testun at eich darparwr tystysgrif, {{.CertificateProviderFullName}}, a’ch tyst annibynnol, {{.IndependentWitnessFullName}}. Rhaid i’r ddau nodi eu codau unigryw i brofi eu bod yno pan gafodd eich LPA ei llofnodi.

", - "youveSignedYourLpa": "Rydych wedi llofnodi’ch LPA", - "certificateProviderHasDeclared": "Mae {{.CertificateProviderFullName}} wedi darparu eu tystysgrif", - "yourCertificateProviderHasDeclared": "Mae’ch darparwr tystysgrif wedi darparu eu tystysgrif", - "attorneysHaveDeclared": { - "zero": "", - "one": "Mae’ch atwrnai wedi llofnodi’ch LPA", - "two": "Mae’ch atwrneiod wedi llofnodi’ch LPA", - "few": "Mae’ch atwrneiod wedi llofnodi’ch LPA", - "many": "Mae’ch atwrneiod wedi llofnodi’ch LPA", - "other": "Mae’ch atwrneiod wedi llofnodi’ch LPA" - }, - "weHaveReceivedYourLpa": "Rydym wedi cael eich LPA", - "yourWaitingPeriodHasStarted": "Mae’ch cyfnod aros o 4 wythnos wedi dechrau", - "yourLpaHasBeenRegistered": "Mae’ch LPA wedi cael ei chofrestru", "trackLpaProgress": "Dilyn trywydd eich LPA", "backToDashboard": "Yn ôl i’r dangosfwrdd", "myLpa": "Fy LPA {{ .LpaType }}", @@ -917,8 +903,6 @@ "uploadItOnline": "Ei huwchlwytho ar-lein", "sendItByPost": "Ei hanfon drwy’r post", "theirLpa": "LPA {{.FullName}} {{.LpaType}}", - "allAttorneysHaveSignedTheLpa": "Mae’r holl atwrneiod wedi llofnodi’r LPA", - "youveSignedTheLpa": "Rydych wedi llofnodi’r LPA", "removeAttorney": "Dileu atwrnai", "removePersonToNotify": "Dileu person i’w hysbysu", "weNeedYourCorrectMobileNumber:independentWitness": "{{.FirstNames}}, fel y tyst annibynnol, mae angen eich rhif ffôn symudol cywir arnom i anfon eich cod tystio.", @@ -1211,14 +1195,6 @@ "incorrectAccessCode": "Mae’r cod mynediad rydych chi wedi’i roi yn anghywir, gwiriwch y cod a rhowch gynnig arall arni", "linked": "Wedi’u cysylltu", "removeAccess": "Tynnu mynediad", - "lpaProgress": "Cynnydd yr LPA", - "donorFullNameHasPaid": "Mae {{.DonorFullName }} wedi talu", - "donorFullNameHasConfirmedTheirIdentity": "Mae {{.DonorFullName }} wedi cadarnhau pwy ydyn nhw", - "donorFullNameHasSignedTheLPA": "Mae {{.DonorFullName }} wedi llofnodi’r LPA", - "theCertificateProviderHasDeclared": "Mae darparwr y dystysgrif wedi darparu eu tystysgrif", - "opgHasReceivedTheLPA": "Mae’r LPA wedi cyrraedd Swyddfa’r Gwarcheidwad Cyhoeddus", - "theWaitingPeriodHasStarted": "Mae’r cyfnod aros o 4 wythnos wedi dechrau", - "theLpaHasBeenRegistered": "Mae’r LPA wedi cael ei chofrestru", "inviteRecalled": "Adalwyd gwahoddiad", "youRecalledTheInviteFor": "Rydych chi wedi adalw’r gwahoddiad i’r LPA hon ar gyfer {{.Email}}.", "accessRemoved": "Mynediad wedi’i dynnu", @@ -1538,5 +1514,21 @@ "ifYouDoNotWantRegisteredWithConfirmedDetailsWarning": "Welsh", "continueToUse": "Welsh", "yourLpasHaveBeenSuccessfullyRegistered": "Welsh", - "theLpasNamedAsAttorneyHaveSuccessfullyRegistered": "Welsh" + "theLpasNamedAsAttorneyHaveSuccessfullyRegistered": "Welsh", + "lpaPaidFor": "Welsh", + "yourIdentityConfirmed": "Welsh", + "lpaSignedByYou": "Welsh", + "lpaCertificateProvided": "Welsh", + "lpaSignedByAllAttorneys": "Welsh", + "opgStatutoryWaitingPeriodBegins": "Welsh", + "lpaRegisteredByOpg": "Welsh", + "donorsIdentityConfirmed": "{{possessive .DonorFullName}} Welsh", + "lpaSignedByDonor": "Welsh {{.DonorFullName}}", + "lpaCertificateProvidedBy": "Welsh {{.CertificateProviderFullName}}", + "donorsLpaRegisteredByOpg": "{{possessive .DonorFullName}} Welsh", + "notCompleted": "Welsh", + "checkTheProgressOfYourLpa": "Welsh", + "checkTheProgressOfYourLpaContent": "

Welsh

", + "checkTheProgressOfAnLpa": "Welsh", + "checkTheProgressOfDonorsLpa": "Welsh {{possessive .DonorFullName}}" } diff --git a/lang/en.json b/lang/en.json index 508d5abda4..41ffcf7cb9 100644 --- a/lang/en.json +++ b/lang/en.json @@ -429,16 +429,6 @@ "discussWithCertificateProviderContent": "

Read over your LPA to check it’s correct – you’ll be able to make changes if not.

Discuss your LPA with {{.CertificateProviderFullName}}. It’s their responsibility to make sure:

", "signYourLpaStep": "

2. Sign your LPA

When you have signed your LPA (you can do this online) we will send {{.CertificateProviderFullName}} a unique code by text message.

{{.CertificateProviderFullName}} must enter the code into this service within 30 minutes, to prove they witnessed your signature.

", "signYourLpaStepCannotSign": "

2. Sign your LPA

Your authorised signatory, {{.AuthorisedSignatoryFullName}}, will sign the LPA online for you.

Your certificate provider, {{.CertificateProviderFullName}}, and your independent witness, {{.IndependentWitnessFullName}}, will both be sent unique codes by text message. They must both enter their codes to prove they were there when your LPA was signed.

", - "youveSignedYourLpa": "You’ve signed your LPA", - "certificateProviderHasDeclared": "{{.CertificateProviderFullName}} has provided their certificate", - "yourCertificateProviderHasDeclared": "Your certificate provider has provided their certificate", - "attorneysHaveDeclared": { - "one": "Your attorney has signed your LPA", - "other": "Your attorneys have signed your LPA" - }, - "weHaveReceivedYourLpa": "We have received your LPA", - "yourWaitingPeriodHasStarted": "Your 4-week waiting period has started", - "yourLpaHasBeenRegistered": "Your LPA has been registered", "trackLpaProgress": "Track LPA progress", "backToDashboard": "Back to dashboard", "myLpa": "My {{ .LpaType }} lasting power of attorney", @@ -833,8 +823,6 @@ "uploadItOnline": "Upload it online", "sendItByPost": "Send it by post", "theirLpa": "{{possessive .FullName}} {{.LpaType}} LPA", - "allAttorneysHaveSignedTheLpa": "All attorneys have signed the LPA", - "youveSignedTheLpa": "You’ve signed the LPA", "removeAttorney": "Remove attorney", "removePersonToNotify": "Remove person to notify", "weNeedYourCorrectMobileNumber:independentWitness": "{{.FirstNames}}, as the independent witness, we need your correct mobile number to send your witnessing code.", @@ -1107,14 +1095,6 @@ "incorrectAccessCode": "The access code you entered is incorrect, please check it and try again", "linked": "Linked", "removeAccess": "Remove access", - "lpaProgress": "LPA progress", - "donorFullNameHasPaid": "{{.DonorFullName }} has paid", - "donorFullNameHasConfirmedTheirIdentity": "{{.DonorFullName }} has confirmed their identity", - "donorFullNameHasSignedTheLPA": "{{.DonorFullName }} has signed the LPA", - "theCertificateProviderHasDeclared": "The certificate provider has provided their certificate", - "opgHasReceivedTheLPA": "OPG has received the LPA", - "theWaitingPeriodHasStarted": "The 4-week waiting period has started", - "theLpaHasBeenRegistered": "The LPA has been registered", "inviteRecalled": "Invite recalled", "youRecalledTheInviteFor": "You recalled the invite to this LPA for {{.Email}}.", "accessRemoved": "Access removed", @@ -1430,5 +1410,21 @@ "ifYouDoNotWantRegisteredWithConfirmedDetailsWarning": "If you do not want your LPA to be registered with your confirmed identity details, you must withdraw your LPA. You will lose any fees you have paid for this LPA.", "continueToUse": "Continue to Use a lasting power of attorney", "yourLpasHaveBeenSuccessfullyRegistered": "Your LPAs have been successfully registered.", - "theLpasNamedAsAttorneyHaveSuccessfullyRegistered": "The LPAs where you are named as an attorney have been successfully registered." + "theLpasNamedAsAttorneyHaveSuccessfullyRegistered": "The LPAs where you are named as an attorney have been successfully registered.", + "lpaPaidFor": "LPA paid for", + "yourIdentityConfirmed": "Your identity confirmed", + "lpaSignedByYou": "LPA signed by you", + "lpaCertificateProvided": "LPA certificate provided", + "lpaSignedByAllAttorneys": "LPA signed by all attorneys", + "opgStatutoryWaitingPeriodBegins": "OPG’s statutory 4-week waiting period begins", + "lpaRegisteredByOpg": "LPA registered by OPG", + "donorsIdentityConfirmed": "{{possessive .DonorFullName}} identity confirmed", + "lpaSignedByDonor": "LPA signed by {{.DonorFullName}}", + "lpaCertificateProvidedBy": "LPA certificate provided by {{.CertificateProviderFullName}}", + "donorsLpaRegisteredByOpg": "{{possessive .DonorFullName}} LPA registered by OPG", + "notCompleted": "Not completed", + "checkTheProgressOfYourLpa": "Check the progress of your LPA", + "checkTheProgressOfYourLpaContent": "

Thank you for filling in your LPA. Before it can be registered and used, the steps on this page must be completed. We’ll contact you if you need to take action. Use this page to check items:

", + "checkTheProgressOfAnLpa": "Check the progress of an LPA", + "checkTheProgressOfDonorsLpa": "Check the progress of {{possessive .DonorFullName}} LPA" } diff --git a/web/template/attorney/progress.gohtml b/web/template/attorney/progress.gohtml index a949185a89..ad40fd4e06 100644 --- a/web/template/attorney/progress.gohtml +++ b/web/template/attorney/progress.gohtml @@ -1,47 +1,47 @@ {{ template "page" . }} {{ define "pageTitle" }} - {{ tr .App "lpaProgress" }} + {{ tr .App "checkTheProgressOfAnLpa" }} {{ end }} {{ define "main" }} -
-
-

{{ template "pageTitle" . }}

-
-
-
-
{{ tr .App "lpaType" }}
-
{{ tr .App .Lpa.Type.String }}
-
-
-
{{ tr .App "referenceNumber" }}
-
{{ .Lpa.LpaUID }}
-
-
-
+
+
+

{{ trFormat .App "checkTheProgressOfDonorsLpa" "DonorFullName" .Lpa.Donor.FullName }}

+
+
+
+
{{ tr .App "lpaType" }}
+
{{ tr .App .Lpa.Type.String }}
+
+
+
{{ tr .App "referenceNumber" }}
+
{{ .Lpa.LpaUID }}
+
+
+
-
+
-
-
    -
  1. - - - {{ tr .App "youveSignedTheLpa" }} {{ if .Signed }}{{ tr .App "completed" }}{{ else }}{{ tr .App "inProgress" }}{{ end }} - -
  2. -
  3. - - - {{ tr .App "allAttorneysHaveSignedTheLpa" }} {{ if .AttorneysSigned }}{{ tr .App "completed" }}{{ else if .Signed }}{{ tr .App "inProgress" }}{{ else }}{{ tr .App "notStarted" }}{{ end }} - -
  4. -
-
+
+
    +
  1. + + + {{ tr .App "lpaSignedByYou" }} {{ if .Signed }}{{ tr .App "completed" }}{{ else }}{{ tr .App "notCompleted" }}{{ end }} + +
  2. +
  3. + + + {{ tr .App "lpaSignedByAllAttorneys" }} {{ if .AttorneysSigned }}{{ tr .App "completed" }}{{ else }}{{ tr .App "notCompleted" }}{{ end }} + +
  4. +
+
- {{ tr .App "backToDashboard" }} + {{ tr .App "returnToDashboard" }} +
-
{{ end }} diff --git a/web/template/donor/lpa_progress.gohtml b/web/template/donor/lpa_progress.gohtml deleted file mode 100644 index 5ac3cfbb4e..0000000000 --- a/web/template/donor/lpa_progress.gohtml +++ /dev/null @@ -1,31 +0,0 @@ -{{ template "page" . }} - -{{ define "pageTitle" }} - {{ tr .App "lpaProgress" }} -{{ end }} - -{{ define "main" }} -
-
-

{{ template "pageTitle" . }}

-
-
-
-
{{ tr .App "lpaType" }}
-
{{ tr .App .Donor.Type.String }}
-
-
-
{{ tr .App "referenceNumber" }}
-
{{ .Donor.LpaUID }}
-
-
-
- -
- - {{ template "donor-lpa-progress" . }} - - {{ tr .App "backToDashboard" }} -
-
-{{ end }} diff --git a/web/template/donor/progress.gohtml b/web/template/donor/progress.gohtml new file mode 100644 index 0000000000..245fe7b5f2 --- /dev/null +++ b/web/template/donor/progress.gohtml @@ -0,0 +1,34 @@ +{{ template "page" . }} + +{{ define "pageTitle" }} + {{ tr .App "checkTheProgressOfYourLpa" }} +{{ end }} + +{{ define "main" }} +
+
+

{{ template "pageTitle" . }}

+
+
+ {{ template "summary-row" (staticSummaryRow .App "name" + .Donor.Donor.FullName) }} + {{ template "summary-row" (staticSummaryRow .App "lpaType" + (tr .App .Donor.Type.String)) }} + {{ template "summary-row" (staticSummaryRow .App "referenceNumber" + .Donor.LpaUID) }} +
+
+ + {{ trHtml .App "checkTheProgressOfYourLpaContent" }} + +
+ + {{ template "donor-lpa-progress" . }} + +
+ {{ template "button" (button .App "returnToDashboard" "link" (link .App global.Paths.Dashboard.Format)) }} + {{ tr .App "goToTaskList" }} +
+
+
+{{ end }} diff --git a/web/template/layout/donor-lpa-progress.gohtml b/web/template/layout/donor-lpa-progress.gohtml index 04fadb653a..216e174a56 100644 --- a/web/template/layout/donor-lpa-progress.gohtml +++ b/web/template/layout/donor-lpa-progress.gohtml @@ -1,14 +1,20 @@ {{ define "donor-lpa-progress" }} -
-
    - {{ range .Progress.ToSlice }} -
  1. - - - {{ .Label }} {{tr $.App .State.String }} - -
  2. - {{ end }} -
-
+
+
    + {{ $shownInProgress := false }} + {{ range .Progress.ToSlice }} + {{ if and (not $shownInProgress) (not .Done) }} + {{ $shownInProgress = true }} +
  1. + {{ else }} +
  2. + {{ end }} + + + {{ .Label }} {{ if .Done }}{{ tr $.App "completed" }}{{ else }}{{ tr $.App "notCompleted" }}{{ end }} + +
  3. + {{ end }} +
+
{{ end }} diff --git a/web/template/supporter/view_lpa.gohtml b/web/template/supporter/view_lpa.gohtml index 462eea9eab..dc7d306665 100644 --- a/web/template/supporter/view_lpa.gohtml +++ b/web/template/supporter/view_lpa.gohtml @@ -32,8 +32,6 @@
-

{{tr .App "lpaProgress"}}

- {{ template "donor-lpa-progress" . }}
{{ end }}