Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DFPL-2313 Update Additional Documents flow and include new Statement type. #5780

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 8 additions & 41 deletions ccd-definition/CaseEventToComplexTypes/uploadDocuments.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"ID": "UploadApplicationDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "documentType",
"ListElementCode": "document",
"EventElementLabel": "Upload a file",
"FieldDisplayOrder": 1,
"DisplayContext": "MANDATORY"
},
Expand All @@ -13,7 +14,7 @@
"ID": "UploadApplicationDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "documentName",
"ListElementCode": "documentType",
"FieldDisplayOrder": 2,
"DisplayContext": "MANDATORY"
},
Expand All @@ -22,20 +23,19 @@
"ID": "UploadApplicationDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "includedInSWET",
"EventElementLabel": "Let us know what you are including in your SWET",
"ListElementCode": "documentName",
"FieldDisplayOrder": 3,
"DisplayContext": "OPTIONAL"
"DisplayContext": "MANDATORY"
},
{
"LiveFrom": "01/01/2017",
"ID": "UploadApplicationDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "document",
"EventElementLabel": "Upload a file",
"ListElementCode": "includedInSWET",
"EventElementLabel": "Let us know what you are including in your SWET",
"FieldDisplayOrder": 4,
"DisplayContext": "MANDATORY"
"DisplayContext": "OPTIONAL"
},
{
"LiveFrom": "01/01/2017",
Expand All @@ -56,38 +56,5 @@
"FieldDisplayOrder": 6,
"DisplayContext": "OPTIONAL",
"FieldShowCondition": "temporaryApplicationDocuments=\"DO NOT SHOW\""
},
{
"LiveFrom": "01/01/2017",
"ID": "ManageDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "confidentialWarningLabel",
"FieldDisplayOrder": 7,
"DisplayContext": "READONLY",
"EventElementLabel": "<br /><div class='govuk-warning-text'><span class='govuk-warning-text__icon' aria-hidden='true'>!</span><strong class='govuk-warning-text__text'>Check if documents are confidential</strong></div><br>",
"ShowSummaryChangeOption": "N",
"FieldShowCondition": "allowMarkDocumentConfidential = \"YES\""
},
{
"LiveFrom": "01/01/2017",
"ID": "ManageDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "confidential",
"FieldDisplayOrder": 8,
"DisplayContext": "OPTIONAL",
"EventElementLabel": "Tick to restrict to the LA, Cafcass and HMCTS staff",
"FieldShowCondition": "allowMarkDocumentConfidential = \"YES\""
},
{
"LiveFrom": "01/01/2017",
"ID": "UploadApplicationDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "allowMarkDocumentConfidential",
"FieldDisplayOrder": 9,
"DisplayContext": "READONLY",
"FieldShowCondition": "confidential=\"DO_NOT_SHOW\""
}
]
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
[
{
"LiveFrom": "01/01/2017",
"CaseTypeID": "CARE_SUPERVISION_EPO",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "uploadApplicationDocumentsLabel",
"PageFieldDisplayOrder": 1,
"DisplayContext": "READONLY",
"PageID": "addApplicationDocuments",
"PageDisplayOrder": 1,
"PageColumnNumber": 1,
"ShowSummaryChangeOption": "N"
},
{
"LiveFrom": "01/01/2017",
"CaseTypeID": "CARE_SUPERVISION_EPO",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"PageFieldDisplayOrder": 2,
"PageFieldDisplayOrder": 1,
"DisplayContext": "COMPLEX",
"PageID": "addApplicationDocuments",
"PageDisplayOrder": 1,
Expand All @@ -28,8 +16,8 @@
"CaseTypeID": "CARE_SUPERVISION_EPO",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "applicationDocumentsToFollowReason",
"CaseEventFieldLabel": "Give details of documents to follow, including why you're not sending them now, and when you think they'll be ready.",
"PageFieldDisplayOrder": 3,
"CaseEventFieldLabel": "Give details of any documents you will upload at a later date.",
"PageFieldDisplayOrder": 2,
"DisplayContext": "OPTIONAL",
"PageID": "addApplicationDocuments",
"PageDisplayOrder": 1,
Expand Down
9 changes: 0 additions & 9 deletions ccd-definition/CaseField/CareSupervision/caseField.json
Original file line number Diff line number Diff line change
Expand Up @@ -2093,15 +2093,6 @@
"SecurityClassification": "Public",
"Searchable": "N"
},
{
"LiveFrom": "01/01/2017",
"CaseTypeID": "CARE_SUPERVISION_EPO",
"ID": "uploadApplicationDocumentsLabel",
"Label": "Select the supporting or annex documents you're sending with this application. <br> These can be part of the social work evidence template (SWET) or separate.",
"FieldType": "Label",
"SecurityClassification": "Public",
"Searchable": "N"
},
{
"LiveFrom": "01/01/2018",
"CaseTypeID": "CARE_SUPERVISION_EPO",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ListElementCode": "documentType",
"FieldType": "FixedList",
"FieldTypeParameter": "ApplicationDocumentType",
"ElementLabel": "Type of document",
"ElementLabel": "Document type",
"SecurityClassification": "Public"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,18 @@
"ListElement": "Birth certificate",
"DisplayOrder": 8
},
{
"LiveFrom": "01/01/2017",
"ID": "ApplicationDocumentType",
"ListElementCode": "STATEMENT",
"ListElement": "Statement",
"DisplayOrder": 9
},
{
"LiveFrom": "01/01/2017",
"ID": "ApplicationDocumentType",
"ListElementCode": "OTHER",
"ListElement": "Other",
"DisplayOrder": 9
"DisplayOrder": 10
}
]
4 changes: 2 additions & 2 deletions playwright-e2e/pages/add-application-documents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export class AddApplicationDocuments {
this.page = page;
this.applicationDocumentsHeading = page.getByRole('heading', { name: 'Application documents' });
this.addNewButton = page.getByRole('button', { name: 'Add new' });
this.typeOfDocument = page.getByLabel('Type of document');
this.typeOfDocument = page.getByLabel('Document type');
this.chooseFileButton = page.locator('input#temporaryApplicationDocuments_0_document').first();
this.giveDetailsText = page.getByLabel('Give details of documents to follow, including why you\'re not sending them now, and when you think they\'ll be ready. (Optional)');
this.giveDetailsText = page.getByLabel('Give details of any documents you will upload at a later date.');
}

async uploadDocumentSmokeTest() {
Expand Down
2 changes: 1 addition & 1 deletion playwright-e2e/pages/start-application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class StartApplication {
this.allocationProposalHeading = page.getByRole("group", { name: "Allocation proposal" }).getByRole("heading");
this.allocationProposalLink = page.getByRole("link", { name: "Allocation proposal", });
this.uploadDocumentsLink = page.getByRole("link", { name: "Upload documents", });
this.addApplicationDocsHeading = page.getByRole("heading", { name: "Add application documents", });
this.addApplicationDocsHeading = page.getByRole("heading", { name: "Application documents", });
this.upLoadDocsInProgress = page.locator('p').filter({ hasText: 'Upload documents' }).getByRole('img', { name: 'Finished' })
this.applicantDetailsLink = page.getByRole('link', { name: 'Applicant\'s details' });
this.respondentsDetailsLink = page.getByRole('link', { name: 'Respondents\' details' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@

<br/>

## Add application documents

<span class='govuk-hint govuk-!-font-size-14'>For example, SWET, social work chronology and care plan<br> In emergency cases, you can send your application without this information </span>
## Application documents

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<a href='/case/PUBLICLAW/CARE_SUPERVISION_EPO/${[CASE_REFERENCE]}/trigger/uploadDocuments'>Upload documents</a>

<span class='govuk-hint govuk-!-font-size-14'>In emergency cases, you can send your application without this information</span>

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<br/>
Expand Down
6 changes: 3 additions & 3 deletions service/src/integrationTest/resources/fixtures/taskList.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@

<br/>

## Add application documents

<span class='govuk-hint govuk-!-font-size-14'>For example, SWET, social work chronology and care plan<br> In emergency cases, you can send your application without this information </span>
## Application documents

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<a href='/case/PUBLICLAW/CARE_SUPERVISION_EPO/${[CASE_REFERENCE]}/trigger/uploadDocuments'>Upload documents</a>

<span class='govuk-hint govuk-!-font-size-14'>In emergency cases, you can send your application without this information</span>

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@

<br/>

## Add application documents

<span class='govuk-hint govuk-!-font-size-14'>For example, SWET, social work chronology and care plan<br> In emergency cases, you can send your application without this information </span>
## Application documents

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<a href='/case/PUBLICLAW/CARE_SUPERVISION_EPO/${[CASE_REFERENCE]}/trigger/uploadDocuments'>Upload documents</a>

<span class='govuk-hint govuk-!-font-size-14'>In emergency cases, you can send your application without this information</span>

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public enum ApplicationDocumentType {
GENOGRAM("Genogram", "Genogram"),
CHECKLIST_DOCUMENT("Checklist document", "Dogfen wirio"),
BIRTH_CERTIFICATE("Birth certificate", "Tystysgrif geni"),
STATEMENT("Statement", "Datganiad"),
OTHER("Other", "Arall");

private final String label;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.OTHER;
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.SOCIAL_WORK_CHRONOLOGY;
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.SOCIAL_WORK_STATEMENT;
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.STATEMENT;
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.SWET;
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.THRESHOLD;
import static uk.gov.hmcts.reform.fpl.utils.ElementUtils.element;
Expand Down Expand Up @@ -77,7 +78,7 @@ private Map<String, Object> synchroniseToNewFields(List<Element<ApplicationDocum
public Map<String, Object> synchroniseToNewFields(List<Element<ApplicationDocument>> applicationDocuments) {
Map<String, Object> ret = new HashMap<>();
ret.putAll(synchroniseToNewFields(applicationDocuments, List.of(SWET, SOCIAL_WORK_CHRONOLOGY,
SOCIAL_WORK_STATEMENT, GENOGRAM, CHECKLIST_DOCUMENT, BIRTH_CERTIFICATE, OTHER),
SOCIAL_WORK_STATEMENT, GENOGRAM, CHECKLIST_DOCUMENT, BIRTH_CERTIFICATE, STATEMENT, OTHER),
"documentsFiledOnIssueList"));
ret.putAll(synchroniseToNewFields(applicationDocuments, List.of(CARE_PLAN), "carePlanList"));
ret.putAll(synchroniseToNewFields(applicationDocuments, List.of(THRESHOLD), "thresholdList"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ private List<TaskSection> groupInSections(List<Task> allTasks, Optional<Map<Even
.map(task -> task.withHint("In emergency cases, you can send your application without this information"))
.ifPresent(applicationGrounds::withTask);

final TaskSection documents = newSection("Add application documents")
.withTask(tasks.get(APPLICATION_DOCUMENTS))
.withHint("For example, SWET, social work chronology and care plan<br> In emergency cases, "
+ "you can send your application without this information ");
final TaskSection documents = newSection("Application documents");

ofNullable(tasks.get(APPLICATION_DOCUMENTS))
.map(task -> task.withHint("In emergency cases, you can send your application without this information"))
.ifPresent(documents::withTask);

final TaskSection parties = newSection("Add information about the parties")
.withTask(tasks.containsKey(ORGANISATION_DETAILS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@

<br/>

## Add application documents

<span class='govuk-hint govuk-!-font-size-14'>For example, SWET, social work chronology and care plan<br> In emergency cases, you can send your application without this information </span>
## Application documents

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<a href='/case/PUBLICLAW/CARE_SUPERVISION_EPO/${[CASE_REFERENCE]}/trigger/uploadDocuments'>Upload documents</a><img align='right' height='25px' src='https://raw.githubusercontent.com/hmcts/fpl-ccd-configuration/master/resources/information-added.png' title='Information added'/>

<span class='govuk-hint govuk-!-font-size-14'>In emergency cases, you can send your application without this information</span>

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@

<br/>

## Add application documents

<span class='govuk-hint govuk-!-font-size-14'>For example, SWET, social work chronology and care plan<br> In emergency cases, you can send your application without this information </span>
## Application documents

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<a href='/case/PUBLICLAW/CARE_SUPERVISION_EPO/${[CASE_REFERENCE]}/trigger/uploadDocuments'>Upload documents</a><img align='right' height='25px' src='https://raw.githubusercontent.com/hmcts/fpl-ccd-configuration/master/resources/information-added.png' title='Information added'/>

<span class='govuk-hint govuk-!-font-size-14'>In emergency cases, you can send your application without this information</span>

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@

<br/>

## Add application documents

<span class='govuk-hint govuk-!-font-size-14'>For example, SWET, social work chronology and care plan<br> In emergency cases, you can send your application without this information </span>
## Application documents

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<a href='/case/PUBLICLAW/CARE_SUPERVISION_EPO/${[CASE_REFERENCE]}/trigger/uploadDocuments'>Upload documents</a><img align='right' height='25px' src='https://raw.githubusercontent.com/hmcts/fpl-ccd-configuration/master/resources/information-added.png' title='Information added'/>

<span class='govuk-hint govuk-!-font-size-14'>In emergency cases, you can send your application without this information</span>

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@

<br/>

## Add application documents

<span class='govuk-hint govuk-!-font-size-14'>For example, SWET, social work chronology and care plan<br> In emergency cases, you can send your application without this information </span>
## Application documents

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<a href='/case/PUBLICLAW/CARE_SUPERVISION_EPO/${[CASE_REFERENCE]}/trigger/uploadDocuments'>Upload documents</a><img align='right' height='25px' src='https://raw.githubusercontent.com/hmcts/fpl-ccd-configuration/master/resources/information-added.png' title='Information added'/>

<span class='govuk-hint govuk-!-font-size-14'>In emergency cases, you can send your application without this information</span>

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<br/>
Expand Down
6 changes: 3 additions & 3 deletions service/src/test/resources/task-list/expected-task-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@

<br/>

## Add application documents

<span class='govuk-hint govuk-!-font-size-14'>For example, SWET, social work chronology and care plan<br> In emergency cases, you can send your application without this information </span>
## Application documents

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<a href='/case/PUBLICLAW/CARE_SUPERVISION_EPO/${[CASE_REFERENCE]}/trigger/uploadDocuments'>Upload documents</a><img align='right' height='25px' src='https://raw.githubusercontent.com/hmcts/fpl-ccd-configuration/master/resources/information-added.png' title='Information added'/>

<span class='govuk-hint govuk-!-font-size-14'>In emergency cases, you can send your application without this information</span>

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@

<br/>

## Add application documents

<span class='govuk-hint govuk-!-font-size-14'>For example, SWET, social work chronology and care plan<br> In emergency cases, you can send your application without this information </span>
## Application documents

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<a href='/case/PUBLICLAW/CARE_SUPERVISION_EPO/${[CASE_REFERENCE]}/trigger/uploadDocuments'>Upload documents</a><img align='right' height='25px' src='https://raw.githubusercontent.com/hmcts/fpl-ccd-configuration/master/resources/information-added.png' title='Information added'/>

<span class='govuk-hint govuk-!-font-size-14'>In emergency cases, you can send your application without this information</span>

<hr class='govuk-!-margin-top-3 govuk-!-margin-bottom-2'/>

<br/>
Expand Down
Loading
Loading