-
Notifications
You must be signed in to change notification settings - Fork 2
HDPI-6421: Legal rep upload event #1855
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
Open
aqibh25
wants to merge
130
commits into
master
Choose a base branch
from
HDPI-6421-upload-doc-legal-rep
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
130 commits
Select commit
Hold shift + click to select a range
28820d7
HDPI-6124: link legal rep and party for a given case
m014389b e181358
HDPI-6124: add idam id to legal rep
m014389b b365685
HDPI-6124: model date times as instants, use timestamp in db schema
m014389b 9ac1804
HDPI-6124: unit test coverage
m014389b 7d293f3
Merge branch 'master' into HDPI-6124-legal-rep
m014389b 4ea2e9c
HDPI-6124: check whether LR is linked to a party and is active
m014389b 3ef73f0
Merge branch 'master' into HDPI-6124-legal-rep
m014389b 94d1d40
HDPI-6124: remove un needed column annotation
m014389b 9021f82
Merge branch 'master' into HDPI-6124-legal-rep
marianadpereira 9e1e8e8
HDPI-6124: merge conflicts with 6100
m014389b 89360e7
HDPI-6100: fix checkstyle issues
m014389b 8d1b38d
HDPI-6100: refactor tests to reduce duplication and remove NoC roles …
m014389b d25a18d
HDPI-6100: linting fixes
m014389b 41915f7
HDPI-6100: refactor ras role assignment and remove unused method
m014389b 7837351
HDPI-6124: merge conflicts with 6100
m014389b c8e05fb
HDPI-6124: only create on LegalRepresentativeEntity per userIdam id
m014389b a80dc8a
Merge branch 'master' into HDPI-6124-legal-rep
m014389b 5f9c6eb
HDPI-6221: load citizen or leg rep draft case based on signed in user…
m014389b e29910c
HDPI-6124: change db version number
m014389b 09a4c1f
Merge branch 'master' into HDPI-6124-legal-rep
m014389b 5995845
HDPI-6124: change db version number
m014389b d1657d0
HDPI-6221: update comment
m014389b 65129a2
HDPI-6124: from other pr master fixes
m014389b 50737b4
Merge branch 'master' into HDPI-6124-legal-rep
m014389b e670d76
simplified version that only works for 1:1 LR and Defendant party
m014389b 2da9abd
first iteration
adusumillipraveen 035ba88
HDPI-6124: unlink (make inactive) for existing legal rep for party
m014389b ea22372
Merge branch 'HDPI-6124-legal-rep' into handlemultipledefendants
m014389b f98dbbf
HDPI-6221: build fixes
m014389b d8dd3f8
Merge branch 'master' into HDPI-6124-legal-rep
m014389b ce25d32
Merge branch 'HDPI-6124-legal-rep' into handlemultipledefendants
m014389b d5795a6
HDPI-6221: select 1st defendant when there is only one
m014389b a42e19f
Merge branch 'handlemultipledefendants' into HDPI-6221_LR_case_valida…
m014389b 5d37e2d
HDPI-6221: merge master conflicts
m014389b ad05045
HDPI-6221: return optional empty when no client context for client co…
m014389b 9dae6d9
HDPI-6221: linting formatting
m014389b 9244705
HDPI-6221: fix bug with multiple defendants but 1 linked
m014389b 9b83445
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 3bd4dd2
HDPI-6221: latest rse-cft-lib
m014389b b4c922c
HDPI-6221: update db scripts versioning
m014389b 120570f
HDPI-6221: revert rse-cft-lib upgrade
m014389b a5f9ffb
HDPI-6221: sonar lint fixes
m014389b 9f88fe9
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b b71b081
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 822c3a4
HDPI-6221: update migration numbers
m014389b 1cee17e
HDPI-6221: improve code coverage
m014389b f8927b6
HDPI-6221: improve code coverage pt2
m014389b 2111dc4
HDPI-6221: refactor to remove duplication
m014389b 7e85d82
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 3cb6d5e
HDPI-6221: logic to handle swapping between different permutations of…
m014389b 3374132
HDPI-6221: merge master conflicts
m014389b 7f77ff9
HDPI-6221: refactor out defendant solicitor access
m014389b ed323c4
HDPI-6221: remove unused import
m014389b 663bb58
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b acb1510
HDPI-6221: return allLinkedDefendants instead of allDefendants to dis…
m014389b 5b3396f
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 157bf84
HDPI-6221: fix migration number
m014389b 6ef6e81
HDPI-6221: refactor to strategy pattern to reduce duplication
m014389b 427338c
Initial commit of legal rep document upload event
9a1b236
HDPI-6221: merge master conflicts
m014389b 987e85d
HDPI-6221: fixes to strategy choice and test coverage
m014389b aa3d6b8
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 6d91ef2
HDPI-6221: fix db migration
m014389b bf042a5
HDPI-6221: fix linting issues
m014389b 126ef13
HDPI-6221: add unique constraint for defendant response
m014389b 3addee2
Added legal rep page configurer and also additionalDocumentPage
7ea7ec6
HDPI-6221: refactor duplicated logic out into utility classes
m014389b e165154
HDPI-6221: remove unused classes
m014389b 0fedcaf
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 5d9171b
HDPI-6221: update db version
m014389b 64b0fcc
HDPI-6221: review changes refactoring reused code
m014389b beb0077
HDPI-6221: change LR to save rather than patch unsubmitted event data
m014389b 4373b35
HDPI-6221: remove comment and move transactional boundary
m014389b c0d3453
HDPI-6221: remove unused import
m014389b 416f2c9
HDPI-6221: merge master conflicts
m014389b 020c541
HDPI-6221: make exceptions reflect actual flow
m014389b eae2900
Added Legal rep document upload object in PCScase and legal represent…
22714b5
HDPI-6221: refactor to reduce duplicate code in ClaimResponseService …
m014389b ec81db6
HDPI-6221: remove unused methods from DefendantResponseRepository
m014389b a4a86bf
File name change
218cfe5
HDPI-6221: return optional rather than null for validation of possess…
m014389b c54d2b2
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 1319b44
Added logic to dynamically render radio options + selecting dates
e103b38
Building dynamic string based on existing applications in gen apps
b6d6252
Moved plus on a new line
2e002e6
Conditional logic around existing application page.
0702705
Removed unused import
a39fb47
Updated tests.
73402bd
changed to defendant solicitor
fb5bbd2
HDPI-6221: only return linked defendants for pcsCase
m014389b e339666
HDPI-6221: merge master conflicts
m014389b 757489a
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b e8bd655
PR comments
ef47525
HDPI-6221: merge master conflicts
m014389b 464484d
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b dbe2fba
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b a2b1d43
HDPI-6221: db version fix
m014389b 69afb80
PR comments
919f01d
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 89997a5
Merge branch 'master' into HDPI-6221_LR_case_validation
marianadpereira 3ae2422
HDPI-6221: update db numbers
m014389b 22974d4
Excel file format
46df40d
Updated document upload examples
4db4e6c
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b c7bbf1d
Merge branch 'HDPI-6221_LR_case_validation' into HDPI-6421-upload-doc…
88780b6
HDPI-6221: check currentRepresentedPartyId form submit event body for…
m014389b 3ac8b4e
HDPI-6221: merge master conflicts
m014389b 2ab284a
Merge branch 'master' into HDPI-6221_LR_case_validation
marianadpereira f8cdd58
Merge branch 'master' into HDPI-6221_LR_case_validation
marianadpereira 596461e
HDPI-5822: Notification - Claim Saved For Later (#1818)
lucas-phillips28 3170709
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 2b23547
HDPI-6221: update db version
m014389b 6ca8b51
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 829ccef
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b 2603dd5
Merge branch 'HDPI-6221_LR_case_validation' into HDPI-6421-upload-doc…
aqibh25 608c6ba
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
09f3176
Reverting merge conflicts
0d3df39
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
aqibh25 c5ebd18
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
marianadpereira 0ec528b
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
aqibh25 d35229c
Changed to include all genapps rather than latest.
baa81b6
linting
f94e726
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
aqibh25 861ce2b
Adding null check
4dfd645
checksum
b8a0a30
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
nicole-samuels 670cdd4
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
nicole-samuels 6e14fbe
updated to use explicit check for without notice
nicole-samuels 247aea3
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
nicole-samuels 16f7ea9
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
nicole-samuels File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...ava/uk/gov/hmcts/reform/pcs/ccd/domain/legalrepdocumentupload/DocumentUploadCategory.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.domain.legalrepdocumentupload; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
|
|
||
| import java.time.LocalDateTime; | ||
| import java.time.format.DateTimeFormatter; | ||
| import java.util.Locale; | ||
|
|
||
| @AllArgsConstructor | ||
| public enum DocumentUploadCategory { | ||
|
|
||
| ADJOURN_HEARING_APPLICATION( | ||
| "Yes, the documents I’m uploading relate to the application to adjourn the hearing - submitted on %s", | ||
| true), | ||
| SET_ASIDE_ORDER_APPLICATION( | ||
| "Yes, the documents I’m uploading relate to an application to set aside the order - submitted on %s", | ||
| true), | ||
| GENERAL_APPLICATION( | ||
| "Yes, the documents I’m uploading relate to an application submitted on %s", | ||
| true), | ||
| MAIN_CLAIM_OR_COUNTERCLAIM( | ||
| "No, the documents I’m uploading relate to the main claim or counterclaim", | ||
| false); | ||
|
|
||
| private final String label; | ||
| private final boolean requiresDate; | ||
|
|
||
| private static final DateTimeFormatter LABEL_DATE_FORMAT = | ||
| DateTimeFormatter.ofPattern("EEEE d MMM uuuu", Locale.UK); | ||
|
|
||
| public String getLabel(LocalDateTime dateTime) { | ||
| if (!requiresDate) { | ||
| return label; | ||
| } | ||
| String dateText = dateTime == null ? "" : dateTime.format(LABEL_DATE_FORMAT); | ||
| return String.format(label, dateText); | ||
| } | ||
| } |
32 changes: 32 additions & 0 deletions
32
...gov/hmcts/reform/pcs/ccd/domain/legalrepdocumentupload/LegalRepDocumentUploadDetails.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.domain.legalrepdocumentupload; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
| import uk.gov.hmcts.ccd.sdk.api.CCD; | ||
| import uk.gov.hmcts.ccd.sdk.type.YesOrNo; | ||
| import uk.gov.hmcts.reform.pcs.ccd.type.DynamicStringList; | ||
|
|
||
| import static uk.gov.hmcts.ccd.sdk.type.FieldType.DynamicRadioList; | ||
|
|
||
| @Builder | ||
| @Data | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @JsonInclude(JsonInclude.Include.NON_NULL) | ||
| public class LegalRepDocumentUploadDetails { | ||
|
|
||
| @CCD( | ||
| label = "Do these documents relate to an existing application?", | ||
| typeOverride = DynamicRadioList | ||
| ) | ||
| @JsonProperty("DocumentUploadCategories") | ||
| private DynamicStringList validCategories; | ||
|
|
||
| @CCD(searchable = false) | ||
| private YesOrNo showExistingApplicationPage; | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
...java/uk/gov/hmcts/reform/pcs/ccd/event/legalrepdocumentupload/LegalRepDocumentUpload.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.event.legalrepdocumentupload; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import org.springframework.stereotype.Component; | ||
| import uk.gov.hmcts.ccd.sdk.api.CCDConfig; | ||
| import uk.gov.hmcts.ccd.sdk.api.DecentralisedConfigBuilder; | ||
| import uk.gov.hmcts.ccd.sdk.api.Event; | ||
| import uk.gov.hmcts.ccd.sdk.api.EventPayload; | ||
| import uk.gov.hmcts.ccd.sdk.api.Permission; | ||
| import uk.gov.hmcts.ccd.sdk.api.callback.SubmitResponse; | ||
| import uk.gov.hmcts.ccd.sdk.type.YesOrNo; | ||
| import uk.gov.hmcts.reform.pcs.ccd.accesscontrol.UserRole; | ||
| import uk.gov.hmcts.reform.pcs.ccd.common.PageBuilder; | ||
| import uk.gov.hmcts.reform.pcs.ccd.domain.PCSCase; | ||
| import uk.gov.hmcts.reform.pcs.ccd.domain.State; | ||
| import uk.gov.hmcts.reform.pcs.ccd.domain.VerticalYesNo; | ||
| import uk.gov.hmcts.reform.pcs.ccd.domain.legalrepdocumentupload.LegalRepDocumentUploadDetails; | ||
| import uk.gov.hmcts.reform.pcs.ccd.domain.legalrepdocumentupload.DocumentUploadCategory; | ||
| import uk.gov.hmcts.reform.pcs.ccd.entity.PcsCaseEntity; | ||
| import uk.gov.hmcts.reform.pcs.ccd.page.legalrepdocumentupload.LegalRepDocumentUploadConfigurer; | ||
| import uk.gov.hmcts.reform.pcs.ccd.service.PcsCaseService; | ||
| import uk.gov.hmcts.reform.pcs.ccd.type.DynamicStringList; | ||
| import uk.gov.hmcts.reform.pcs.ccd.type.DynamicStringListElement; | ||
|
|
||
| import java.util.Arrays; | ||
| import java.util.Comparator; | ||
| import java.util.List; | ||
| import java.time.LocalDateTime; | ||
| import java.util.Objects; | ||
| import java.util.stream.Stream; | ||
|
|
||
| import uk.gov.hmcts.reform.pcs.ccd.entity.GenAppEntity; | ||
| import uk.gov.hmcts.reform.pcs.ccd.domain.genapp.GenAppType; | ||
|
|
||
| import static uk.gov.hmcts.reform.pcs.ccd.event.EventId.legalRepDocumentUpload; | ||
|
|
||
| @Component | ||
| @AllArgsConstructor | ||
| public class LegalRepDocumentUpload implements CCDConfig<PCSCase, State, UserRole> { | ||
|
|
||
| private final LegalRepDocumentUploadConfigurer legalRepDocumentUploadConfigurer; | ||
| private final PcsCaseService pcsCaseService; | ||
|
|
||
| @Override | ||
| public void configureDecentralised(DecentralisedConfigBuilder<PCSCase, State, UserRole> configBuilder) { | ||
| Event.EventBuilder<PCSCase, UserRole, State> eventBuilder = | ||
| configBuilder | ||
| .decentralisedEvent(legalRepDocumentUpload.name(), this::submit, this::start) | ||
| .forAllStates() | ||
| .name("Upload additional documents") | ||
| .grant(Permission.CRUD, UserRole.DEFENDANT_SOLICITOR) | ||
| .showSummary(); | ||
| legalRepDocumentUploadConfigurer.configurePages(new PageBuilder(eventBuilder)); | ||
| } | ||
|
|
||
| private PCSCase start(EventPayload<PCSCase, State> eventPayload) { | ||
| long caseReference = eventPayload.caseReference(); | ||
| PCSCase caseData = eventPayload.caseData(); | ||
|
|
||
| if (caseData.getLegalRepDocumentUploadDetails() == null) { | ||
| caseData.setLegalRepDocumentUploadDetails( | ||
| new LegalRepDocumentUploadDetails()); | ||
| } | ||
|
|
||
| PcsCaseEntity pcsCaseEntity = pcsCaseService.loadCase(caseReference); | ||
|
|
||
| List<DynamicStringListElement> validCategoryItems = | ||
| Arrays.stream(DocumentUploadCategory.values()) | ||
| .flatMap(category -> { | ||
| if (category == DocumentUploadCategory.MAIN_CLAIM_OR_COUNTERCLAIM) { | ||
| return Stream.of(buildCategoryItem(category, null)); | ||
| } | ||
|
|
||
| return findGenAppDatesForCategory(pcsCaseEntity, category) | ||
| .stream() | ||
| .map(date -> buildCategoryItem(category, date)); | ||
| }) | ||
| .toList(); | ||
|
|
||
| caseData.getLegalRepDocumentUploadDetails().setValidCategories( | ||
| DynamicStringList.builder() | ||
| .listItems(validCategoryItems) | ||
| .build() | ||
| ); | ||
|
|
||
| // By default, Main claim is always added | ||
| caseData.getLegalRepDocumentUploadDetails().setShowExistingApplicationPage(validCategoryItems.size() >= 2 | ||
| ? YesOrNo.YES : YesOrNo.NO); | ||
| return caseData; | ||
| } | ||
|
|
||
| DynamicStringListElement buildCategoryItem( | ||
| DocumentUploadCategory category, | ||
| LocalDateTime genAppDate | ||
| ) { | ||
| return DynamicStringListElement.builder() | ||
| .code(category.name()) | ||
| .label(category.getLabel(genAppDate)) | ||
| .build(); | ||
| } | ||
|
|
||
| List<LocalDateTime> findGenAppDatesForCategory( | ||
| PcsCaseEntity pcsCaseEntity, | ||
| DocumentUploadCategory category | ||
| ) { | ||
| if (pcsCaseEntity.getGenApps() == null) { | ||
| return List.of(); | ||
| } | ||
|
|
||
| GenAppType mapped = mapCategoryToGenAppType(category); | ||
| if (mapped == null) { | ||
| return List.of(); | ||
| } | ||
|
|
||
| return pcsCaseEntity.getGenApps().stream() | ||
| .filter(genApp -> genApp.getType() == mapped) | ||
| .filter(genApp -> genApp.getWithoutNotice() != null | ||
| && genApp.getWithoutNotice() == VerticalYesNo.YES) | ||
| .map(GenAppEntity::getApplicationSubmittedDate) | ||
| .filter(Objects::nonNull) | ||
| .sorted(Comparator.reverseOrder()) // optional | ||
| .toList(); | ||
| } | ||
|
|
||
| GenAppType mapCategoryToGenAppType(DocumentUploadCategory category) { | ||
| return switch (category) { | ||
| case ADJOURN_HEARING_APPLICATION -> GenAppType.ADJOURN; | ||
| case SET_ASIDE_ORDER_APPLICATION -> GenAppType.SET_ASIDE; | ||
| case GENERAL_APPLICATION -> GenAppType.SOMETHING_ELSE; | ||
| default -> null; | ||
| }; | ||
| } | ||
|
|
||
| private SubmitResponse<State> submit(EventPayload<PCSCase, State> eventPayload) { | ||
| return SubmitResponse.defaultResponse(); | ||
| } | ||
| } | ||
45 changes: 45 additions & 0 deletions
45
...java/uk/gov/hmcts/reform/pcs/ccd/page/legalrepdocumentupload/ExistingApplicationPage.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.page.legalrepdocumentupload; | ||
|
|
||
| import uk.gov.hmcts.reform.pcs.ccd.common.CcdPageConfiguration; | ||
| import uk.gov.hmcts.reform.pcs.ccd.common.PageBuilder; | ||
| import uk.gov.hmcts.reform.pcs.ccd.domain.PCSCase; | ||
| import uk.gov.hmcts.reform.pcs.ccd.domain.legalrepdocumentupload.LegalRepDocumentUploadDetails; | ||
| import uk.gov.hmcts.reform.pcs.ccd.page.CcdPage; | ||
|
|
||
| import static uk.gov.hmcts.reform.pcs.ccd.ShowConditions.NEVER_SHOW; | ||
|
|
||
| public class ExistingApplicationPage implements CcdPageConfiguration, CcdPage { | ||
|
|
||
| private static final String WITHOUT_NOTICE_APPLICATION_GUIDANCE = """ | ||
| <p class="govuk-body"> | ||
| We usually share anything you upload with the other party, for example your landlord, housing | ||
| association or mortgage provider. | ||
| </p> | ||
| <p class="govuk-body"> | ||
| If your application is 'without notice' (where you have asked us to consider your application | ||
| without telling the other party) we will not share anything with them. | ||
| </p> | ||
| """; | ||
|
|
||
| @Override | ||
| public void addTo(PageBuilder pageBuilder) { | ||
| String pageKey = getPageKey(); | ||
| pageBuilder | ||
| .page(pageKey) | ||
| .pageLabel("Confirm if these documents relate to an existing application") | ||
| .showCondition("showExistingApplicationPage=\"Yes\"") | ||
| .complex(PCSCase::getLegalRepDocumentUploadDetails) | ||
| .readonly(LegalRepDocumentUploadDetails::getShowExistingApplicationPage, NEVER_SHOW) | ||
| .done() | ||
| .label(pageKey + "-line-separator", "---") | ||
| .label(pageKey + "-content", WITHOUT_NOTICE_APPLICATION_GUIDANCE) | ||
| .complex(PCSCase::getLegalRepDocumentUploadDetails) | ||
| .mandatory(LegalRepDocumentUploadDetails::getValidCategories) | ||
| .done(); | ||
| } | ||
|
|
||
| @Override | ||
| public String getPageKey() { | ||
| return CcdPage.derivePageKey(this.getClass()); | ||
| } | ||
| } |
18 changes: 18 additions & 0 deletions
18
...ov/hmcts/reform/pcs/ccd/page/legalrepdocumentupload/LegalRepDocumentUploadConfigurer.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.page.legalrepdocumentupload; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import org.springframework.stereotype.Component; | ||
| import uk.gov.hmcts.reform.pcs.ccd.common.PageBuilder; | ||
| import uk.gov.hmcts.reform.pcs.ccd.common.PageConfigurer; | ||
|
|
||
| @Component | ||
| @AllArgsConstructor | ||
| public class LegalRepDocumentUploadConfigurer implements PageConfigurer { | ||
|
|
||
| @Override | ||
| public void configurePages(PageBuilder pageBuilder) { | ||
| pageBuilder | ||
| .add(new UploadAdditionalDocumentsInformationPage()) | ||
| .add(new ExistingApplicationPage()); | ||
| } | ||
| } |
78 changes: 78 additions & 0 deletions
78
.../reform/pcs/ccd/page/legalrepdocumentupload/UploadAdditionalDocumentsInformationPage.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| package uk.gov.hmcts.reform.pcs.ccd.page.legalrepdocumentupload; | ||
|
|
||
| import uk.gov.hmcts.reform.pcs.ccd.common.CcdPageConfiguration; | ||
| import uk.gov.hmcts.reform.pcs.ccd.common.PageBuilder; | ||
| import uk.gov.hmcts.reform.pcs.ccd.page.CcdPage; | ||
|
|
||
| public class UploadAdditionalDocumentsInformationPage implements CcdPageConfiguration, CcdPage { | ||
|
|
||
| private static final String SUPPORTING_EVIDENCE_UPLOAD_CONTENT = """ | ||
| <p class="govuk-body"> | ||
| You can upload a document to support an application, or to show proof that you have done | ||
| something. | ||
| </p> | ||
|
|
||
| <div class="govuk-details__text govuk-!-margin-bottom-5"> | ||
| <p class="govuk-body"> | ||
| We usually share anything you upload with the other party, for example your landlord, | ||
| housing association or mortgage provider. | ||
| </p> | ||
| <p class="govuk-body"> | ||
| If your application is 'without notice' (where you have asked us to consider your | ||
| application without testing the other party) we will not share anything with them. | ||
| </p> | ||
| </div> | ||
| <p class="govuk-body govuk-!-font-weight-bold govuk-!-font-size-24">What you can upload | ||
| </p> | ||
|
|
||
| <p class="govuk-body"> | ||
| You can upload any documents that you think are relevant. | ||
| </p> | ||
|
|
||
| <p class="govuk-body govuk-!-margin-bottom-0">For example, you can share:</p> | ||
| <ul class="govuk-list govuk-list--bullet"> | ||
| <li class="govuk-!-font-size-19">evidence that a judge has asked for, like bank statements | ||
| showing your rent payments | ||
|
scottstewart-sl marked this conversation as resolved.
|
||
| </li> | ||
| <li class="govuk-!-font-size-19">photographs of the property in a state of disrepair, like | ||
| damp in the bathroom</li> | ||
| <li class="govuk-!-font-size-19">a report from an electrician or a plumber, showing evidence of | ||
| a repair that needs to be done</li> | ||
| <li class="govuk-!-font-size-19">emails or letters from the claimant (your landlord, housing | ||
| association, or mortgage lender)</li> | ||
| </ul> | ||
|
|
||
| <p class="govuk-body govuk-!-margin-bottom-0">You can upload the following file types:</p> | ||
| <ul class="govuk-list govuk-list--bullet"> | ||
| <li class="govuk-!-font-size-19">DOC/DOCX(Word)</li> | ||
| <li class="govuk-!-font-size-19">XLS/XLSX(Excel)</li> | ||
| <li class="govuk-!-font-size-19">PPT/PPTX(PowerPoint)</li> | ||
| <li class="govuk-!-font-size-19">PDF</li> | ||
| <li class="govuk-!-font-size-19">RTF</li> | ||
| <li class="govuk-!-font-size-19">TXT</li> | ||
| <li class="govuk-!-font-size-19">CSV</li> | ||
| <li class="govuk-!-font-size-19">JPG/JPEG</li> | ||
| <li class="govuk-!-font-size-19">PNG</li> | ||
| <li class="govuk-!-font-size-19">BMP</li> | ||
| <li class="govuk-!-font-size-19">TIF/TIFF</li> | ||
| </ul> | ||
| <p class="govuk-body"> | ||
| You cannot upload video or audio files. | ||
| </p> | ||
| """; | ||
|
|
||
| @Override | ||
| public void addTo(PageBuilder pageBuilder) { | ||
| String pageKey = getPageKey(); | ||
| pageBuilder | ||
| .page(pageKey) | ||
| .pageLabel("Upload Additional Documents") | ||
| .label(pageKey + "-line-separator", "---") | ||
| .label(pageKey + "-content", SUPPORTING_EVIDENCE_UPLOAD_CONTENT); | ||
| } | ||
|
|
||
| @Override | ||
| public String getPageKey() { | ||
| return CcdPage.derivePageKey(this.getClass()); | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.