Skip to content
Open
Show file tree
Hide file tree
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 Apr 20, 2026
e181358
HDPI-6124: add idam id to legal rep
m014389b Apr 21, 2026
b365685
HDPI-6124: model date times as instants, use timestamp in db schema
m014389b Apr 21, 2026
9ac1804
HDPI-6124: unit test coverage
m014389b Apr 21, 2026
7d293f3
Merge branch 'master' into HDPI-6124-legal-rep
m014389b Apr 21, 2026
4ea2e9c
HDPI-6124: check whether LR is linked to a party and is active
m014389b Apr 21, 2026
3ef73f0
Merge branch 'master' into HDPI-6124-legal-rep
m014389b Apr 21, 2026
94d1d40
HDPI-6124: remove un needed column annotation
m014389b Apr 22, 2026
9021f82
Merge branch 'master' into HDPI-6124-legal-rep
marianadpereira Apr 22, 2026
9e1e8e8
HDPI-6124: merge conflicts with 6100
m014389b Apr 23, 2026
89360e7
HDPI-6100: fix checkstyle issues
m014389b Apr 17, 2026
8d1b38d
HDPI-6100: refactor tests to reduce duplication and remove NoC roles …
m014389b Apr 21, 2026
d25a18d
HDPI-6100: linting fixes
m014389b Apr 21, 2026
41915f7
HDPI-6100: refactor ras role assignment and remove unused method
m014389b Apr 21, 2026
7837351
HDPI-6124: merge conflicts with 6100
m014389b Apr 23, 2026
c8e05fb
HDPI-6124: only create on LegalRepresentativeEntity per userIdam id
m014389b Apr 24, 2026
a80dc8a
Merge branch 'master' into HDPI-6124-legal-rep
m014389b Apr 27, 2026
5f9c6eb
HDPI-6221: load citizen or leg rep draft case based on signed in user…
m014389b Apr 28, 2026
e29910c
HDPI-6124: change db version number
m014389b Apr 28, 2026
09a4c1f
Merge branch 'master' into HDPI-6124-legal-rep
m014389b Apr 28, 2026
5995845
HDPI-6124: change db version number
m014389b Apr 28, 2026
d1657d0
HDPI-6221: update comment
m014389b Apr 28, 2026
65129a2
HDPI-6124: from other pr master fixes
m014389b Apr 28, 2026
50737b4
Merge branch 'master' into HDPI-6124-legal-rep
m014389b Apr 28, 2026
e670d76
simplified version that only works for 1:1 LR and Defendant party
m014389b Apr 29, 2026
2da9abd
first iteration
adusumillipraveen Apr 29, 2026
035ba88
HDPI-6124: unlink (make inactive) for existing legal rep for party
m014389b Apr 29, 2026
ea22372
Merge branch 'HDPI-6124-legal-rep' into handlemultipledefendants
m014389b Apr 29, 2026
f98dbbf
HDPI-6221: build fixes
m014389b Apr 29, 2026
d8dd3f8
Merge branch 'master' into HDPI-6124-legal-rep
m014389b Apr 29, 2026
ce25d32
Merge branch 'HDPI-6124-legal-rep' into handlemultipledefendants
m014389b Apr 29, 2026
d5795a6
HDPI-6221: select 1st defendant when there is only one
m014389b May 1, 2026
a42e19f
Merge branch 'handlemultipledefendants' into HDPI-6221_LR_case_valida…
m014389b May 1, 2026
5d37e2d
HDPI-6221: merge master conflicts
m014389b May 5, 2026
ad05045
HDPI-6221: return optional empty when no client context for client co…
m014389b May 5, 2026
9dae6d9
HDPI-6221: linting formatting
m014389b May 5, 2026
9244705
HDPI-6221: fix bug with multiple defendants but 1 linked
m014389b May 6, 2026
9b83445
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 6, 2026
3bd4dd2
HDPI-6221: latest rse-cft-lib
m014389b May 6, 2026
b4c922c
HDPI-6221: update db scripts versioning
m014389b May 6, 2026
120570f
HDPI-6221: revert rse-cft-lib upgrade
m014389b May 6, 2026
a5f9ffb
HDPI-6221: sonar lint fixes
m014389b May 7, 2026
9f88fe9
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 7, 2026
b71b081
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 7, 2026
822c3a4
HDPI-6221: update migration numbers
m014389b May 7, 2026
1cee17e
HDPI-6221: improve code coverage
m014389b May 7, 2026
f8927b6
HDPI-6221: improve code coverage pt2
m014389b May 8, 2026
2111dc4
HDPI-6221: refactor to remove duplication
m014389b May 8, 2026
7e85d82
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 11, 2026
3cb6d5e
HDPI-6221: logic to handle swapping between different permutations of…
m014389b May 11, 2026
3374132
HDPI-6221: merge master conflicts
m014389b May 12, 2026
7f77ff9
HDPI-6221: refactor out defendant solicitor access
m014389b May 12, 2026
ed323c4
HDPI-6221: remove unused import
m014389b May 12, 2026
663bb58
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 12, 2026
acb1510
HDPI-6221: return allLinkedDefendants instead of allDefendants to dis…
m014389b May 12, 2026
5b3396f
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 12, 2026
157bf84
HDPI-6221: fix migration number
m014389b May 12, 2026
6ef6e81
HDPI-6221: refactor to strategy pattern to reduce duplication
m014389b May 12, 2026
427338c
Initial commit of legal rep document upload event
May 12, 2026
9a1b236
HDPI-6221: merge master conflicts
m014389b May 13, 2026
987e85d
HDPI-6221: fixes to strategy choice and test coverage
m014389b May 13, 2026
aa3d6b8
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 13, 2026
6d91ef2
HDPI-6221: fix db migration
m014389b May 13, 2026
bf042a5
HDPI-6221: fix linting issues
m014389b May 13, 2026
126ef13
HDPI-6221: add unique constraint for defendant response
m014389b May 13, 2026
3addee2
Added legal rep page configurer and also additionalDocumentPage
May 13, 2026
7ea7ec6
HDPI-6221: refactor duplicated logic out into utility classes
m014389b May 14, 2026
e165154
HDPI-6221: remove unused classes
m014389b May 14, 2026
0fedcaf
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 14, 2026
5d9171b
HDPI-6221: update db version
m014389b May 14, 2026
64b0fcc
HDPI-6221: review changes refactoring reused code
m014389b May 14, 2026
beb0077
HDPI-6221: change LR to save rather than patch unsubmitted event data
m014389b May 15, 2026
4373b35
HDPI-6221: remove comment and move transactional boundary
m014389b May 15, 2026
c0d3453
HDPI-6221: remove unused import
m014389b May 15, 2026
416f2c9
HDPI-6221: merge master conflicts
m014389b May 15, 2026
020c541
HDPI-6221: make exceptions reflect actual flow
m014389b May 15, 2026
eae2900
Added Legal rep document upload object in PCScase and legal represent…
May 16, 2026
22714b5
HDPI-6221: refactor to reduce duplicate code in ClaimResponseService …
m014389b May 18, 2026
ec81db6
HDPI-6221: remove unused methods from DefendantResponseRepository
m014389b May 18, 2026
a4a86bf
File name change
May 18, 2026
218cfe5
HDPI-6221: return optional rather than null for validation of possess…
m014389b May 18, 2026
c54d2b2
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 18, 2026
1319b44
Added logic to dynamically render radio options + selecting dates
May 19, 2026
e103b38
Building dynamic string based on existing applications in gen apps
May 19, 2026
b6d6252
Moved plus on a new line
May 20, 2026
2e002e6
Conditional logic around existing application page.
May 20, 2026
0702705
Removed unused import
May 20, 2026
a39fb47
Updated tests.
May 20, 2026
73402bd
changed to defendant solicitor
May 20, 2026
fb5bbd2
HDPI-6221: only return linked defendants for pcsCase
m014389b May 22, 2026
e339666
HDPI-6221: merge master conflicts
m014389b May 22, 2026
757489a
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 22, 2026
e8bd655
PR comments
May 25, 2026
ef47525
HDPI-6221: merge master conflicts
m014389b May 26, 2026
464484d
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 28, 2026
dbe2fba
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 29, 2026
a2b1d43
HDPI-6221: db version fix
m014389b May 29, 2026
69afb80
PR comments
May 29, 2026
919f01d
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b May 29, 2026
89997a5
Merge branch 'master' into HDPI-6221_LR_case_validation
marianadpereira Jun 1, 2026
3ae2422
HDPI-6221: update db numbers
m014389b Jun 1, 2026
22974d4
Excel file format
Jun 1, 2026
46df40d
Updated document upload examples
Jun 1, 2026
4db4e6c
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b Jun 1, 2026
c7bbf1d
Merge branch 'HDPI-6221_LR_case_validation' into HDPI-6421-upload-doc…
Jun 2, 2026
88780b6
HDPI-6221: check currentRepresentedPartyId form submit event body for…
m014389b Jun 2, 2026
3ac8b4e
HDPI-6221: merge master conflicts
m014389b Jun 3, 2026
2ab284a
Merge branch 'master' into HDPI-6221_LR_case_validation
marianadpereira Jun 4, 2026
f8cdd58
Merge branch 'master' into HDPI-6221_LR_case_validation
marianadpereira Jun 4, 2026
596461e
HDPI-5822: Notification - Claim Saved For Later (#1818)
lucas-phillips28 Jun 4, 2026
3170709
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b Jun 4, 2026
2b23547
HDPI-6221: update db version
m014389b Jun 4, 2026
6ca8b51
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b Jun 5, 2026
829ccef
Merge branch 'master' into HDPI-6221_LR_case_validation
m014389b Jun 8, 2026
2603dd5
Merge branch 'HDPI-6221_LR_case_validation' into HDPI-6421-upload-doc…
aqibh25 Jun 11, 2026
608c6ba
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
Jun 16, 2026
09f3176
Reverting merge conflicts
Jun 16, 2026
0d3df39
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
aqibh25 Jun 16, 2026
c5ebd18
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
marianadpereira Jun 17, 2026
0ec528b
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
aqibh25 Jun 18, 2026
d35229c
Changed to include all genapps rather than latest.
Jun 19, 2026
baa81b6
linting
Jun 19, 2026
f94e726
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
aqibh25 Jun 22, 2026
861ce2b
Adding null check
Jun 23, 2026
4dfd645
checksum
Jun 23, 2026
b8a0a30
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
nicole-samuels Jun 25, 2026
670cdd4
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
nicole-samuels Jun 26, 2026
6e14fbe
updated to use explicit check for without notice
nicole-samuels Jun 26, 2026
247aea3
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
nicole-samuels Jun 29, 2026
16f7ea9
Merge branch 'master' into HDPI-6421-upload-doc-legal-rep
nicole-samuels Jun 30, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import uk.gov.hmcts.reform.pcs.ccd.domain.grounds.RentArrearsGroundsReasons;
import uk.gov.hmcts.reform.pcs.ccd.domain.grounds.SecureOrFlexibleGroundsReasons;
import uk.gov.hmcts.reform.pcs.ccd.domain.grounds.SecureOrFlexiblePossessionGrounds;
import uk.gov.hmcts.reform.pcs.ccd.domain.legalrepdocumentupload.LegalRepDocumentUploadDetails;
import uk.gov.hmcts.reform.pcs.ccd.domain.respondpossessionclaim.PossessionClaimResponse;
import uk.gov.hmcts.reform.pcs.ccd.domain.statementoftruth.StatementOfTruthDetails;
import uk.gov.hmcts.reform.pcs.ccd.domain.tabs.parties.CasePartiesTab;
Expand Down Expand Up @@ -522,6 +523,9 @@ public class PCSCase {
@JsonUnwrapped
private EnforcementOrder enforcementOrder;

@JsonUnwrapped
private LegalRepDocumentUploadDetails legalRepDocumentUploadDetails;

@CCD(label = "Is there an underlessee or mortgagee entitled to claim relief against forfeiture?")
private VerticalYesNo hasUnderlesseeOrMortgagee;

Expand Down
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);
}
}
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;

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ public enum EventId {
addCaseNote,
createFlags,
amendFlags,
claimIssuePayment
claimIssuePayment,
legalRepDocumentUpload,
}
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> {
Comment thread
guygrewal77 marked this conversation as resolved.

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();
}
}
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());
}
}
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());
}
}
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
Comment thread
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());
}
}
Loading
Loading