Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
34313b5
HDPI-6638: Caseworker gen app without notice screen
scottstewart-sl Jul 11, 2026
bdd96fd
HDPI-6638: Remove unused placeholder text
scottstewart-sl Jul 11, 2026
171d9ae
HDPI-6656: Caseworker gen app refer without notice apps to a judge
scottstewart-sl Jul 11, 2026
3e8d252
Merge branch 'HDPI-6637_caseworker_genapps_payment_confirmation' into…
scottstewart-sl Jul 14, 2026
554303d
Merge branch 'HDPI-6638_caseworker_genapps_without_notice' into HDPI-…
scottstewart-sl Jul 14, 2026
bcc4658
Merge remote-tracking branch 'origin/HDPI-6638_caseworker_genapps_wit…
scottstewart-sl Jul 14, 2026
0a6a7cb
Merge remote-tracking branch 'origin/HDPI-6656_caseworker_genapp_refe…
scottstewart-sl Jul 14, 2026
4b82343
HDPI-6640: Use ShowConditions.and() helper method
scottstewart-sl Jul 14, 2026
a7cef04
Merge remote-tracking branch 'origin/HDPI-6639-Caseworker-genapps-fil…
scottstewart-sl Jul 14, 2026
71a1a59
HDPI-6640: Fix merge issue
scottstewart-sl Jul 14, 2026
4d0ef9d
Merge branch 'HDPI-6639-Caseworker-genapps-file-upload' into HDPI-664…
scottstewart-sl Jul 17, 2026
acd93f8
Merge branch 'HDPI-6639-Caseworker-genapps-file-upload' into HDPI-664…
scottstewart-sl Jul 20, 2026
03d4e9b
Merge branch 'HDPI-6639-Caseworker-genapps-file-upload' into HDPI-664…
scottstewart-sl Jul 20, 2026
4166c15
Merge branch 'HDPI-6639-Caseworker-genapps-file-upload' into HDPI-664…
scottstewart-sl Jul 20, 2026
eb090c3
Merge branch 'HDPI-6639-Caseworker-genapps-file-upload' into HDPI-664…
scottstewart-sl Jul 22, 2026
7bd13c2
Merge branch 'HDPI-6639-Caseworker-genapps-file-upload' into HDPI-664…
scottstewart-sl Jul 24, 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 @@ -60,6 +60,12 @@ public class EnterGenAppRequest {
)
private String hwfReference;

@CCD(label = "Do all parties consent to this application?")
private VerticalYesNo allPartiesAgree;

@CCD(label = "Has the applicant asked for this application to be made without notice?")
private VerticalYesNo withoutNotice;

@CCD(
label = "Add document",
hint = "Upload a document to the system",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public void configureDecentralised(DecentralisedConfigBuilder<PCSCase, State, Us
.name("Enter a general application")
.grant(Permission.CRU, CASEWORKER_ROLES)
.grantHistoryOnly(JUDICIAL_HISTORY_ROLES)
.endButtonLabel("Submit")
.showSummary();

new PageBuilder(eventBuilder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,25 @@

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.VerticalYesNo;
import uk.gov.hmcts.reform.pcs.ccd.domain.caseworker.EnterGenAppRequest;

public class ConsentAndNotice implements CcdPageConfiguration {
import static uk.gov.hmcts.reform.pcs.ccd.ShowConditions.fieldEquals;

private static final String PLACEHOLDER_BANNER = """
<div class="govuk-notification-banner" role="region"
aria-labelledby="govuk-notification-banner-title" data-module="govuk-notification-banner">
<div class="govuk-notification-banner__content">
<p class="govuk-notification-banner__heading">
Placeholder
</p>
</div>
</div>
""";
public class ConsentAndNotice implements CcdPageConfiguration {

@Override
public void addTo(PageBuilder pageBuilder) {
pageBuilder
.page("consentAndNotice")
.pageLabel("Application consent and notice")
.label("consentAndNotice-lineSeparator", "---")
.label("consentAndNotice-placeholder", PLACEHOLDER_BANNER);
.complex(PCSCase::getEnterGenAppRequest)
.mandatory(EnterGenAppRequest::getAllPartiesAgree)
.mandatory(EnterGenAppRequest::getWithoutNotice,
fieldEquals("enter_genapp_AllPartiesAgree", VerticalYesNo.NO))
.done();
}

}
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
package uk.gov.hmcts.reform.pcs.ccd.page.caseworker.entergenapp;

import uk.gov.hmcts.reform.pcs.ccd.ShowConditions;
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.VerticalYesNo;

import static uk.gov.hmcts.reform.pcs.ccd.ShowConditions.fieldEquals;

public class ReferApplicationToJudge implements CcdPageConfiguration {

private static final String PLACEHOLDER_BANNER = """
<div class="govuk-notification-banner" role="region"
aria-labelledby="govuk-notification-banner-title" data-module="govuk-notification-banner">
<div class="govuk-notification-banner__content">
<p class="govuk-notification-banner__heading">
Placeholder
</p>
</div>
</div>
private static final String MESSAGE_TEXT = """
<p class="body">You must refer this application to a judge.</p>
""";

@Override
public void addTo(PageBuilder pageBuilder) {
pageBuilder
.page("referApplicationToJudge")
.pageLabel("Refer without notice application to judge")
.showCondition(ShowConditions.and(
fieldEquals("enter_genapp_AllPartiesAgree", VerticalYesNo.NO),
fieldEquals("enter_genapp_WithoutNotice", VerticalYesNo.YES))
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only new code that isn't covered in one of the other PRs

.label("referApplicationToJudge-lineSeparator", "---")
.label("referApplicationToJudge-placeholder", PLACEHOLDER_BANNER);
.label("referApplicationToJudge-message", MESSAGE_TEXT);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public void createGenAppEntity(PCSCase caseData,
.state(initialState)
.feeAmountReceived(enterGenAppRequest.getFeeAmountReceived())
.appliedForHwf(enterGenAppRequest.getAppliedForHwf())
.otherPartiesAgreed(enterGenAppRequest.getAllPartiesAgree())
.build();

if (enterGenAppRequest.getApplicationTypeOption() == EnterGenAppType.SOMETHING_ELSE) {
Expand All @@ -160,6 +161,10 @@ public void createGenAppEntity(PCSCase caseData,
genAppEntity.setHelpWithFeesEntity(helpWithFeesEntity);
}

if (enterGenAppRequest.getAllPartiesAgree() == VerticalYesNo.NO) {
genAppEntity.setWithoutNotice(enterGenAppRequest.getWithoutNotice());
}

Document uploadedGenApp = caseData.getUploadSingleDocument();
DocumentEntity submissionDocument = createSubmissionDocumentEntity(
uploadedGenApp, pcsCaseEntity, genAppEntity, applicantParty.getId()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,71 @@ void shouldSetHwfFlagButNotReferenceWhenNo() {
assertThat(genAppEntity.getHelpWithFeesEntity()).isNull();
}

@ParameterizedTest
@EnumSource(VerticalYesNo.class)
void shouldSetAllPartiesAgreeFlag(VerticalYesNo allPartiesAgree) {
// Given
EnterGenAppRequest enterGenAppRequest = EnterGenAppRequest.builder()
.applicationTypeOption(EnterGenAppType.SOMETHING_ELSE)
.allPartiesAgree(allPartiesAgree)
.build();

PCSCase caseData = PCSCase.builder()
.enterGenAppRequest(enterGenAppRequest)
.build();

// When
underTest.createGenAppEntity(caseData, pcsCaseEntity, applicantParty, GEN_APP_ISSUED);

// Then
GenAppEntity genAppEntity = getSavedGenAppEntity();
assertThat(genAppEntity.getOtherPartiesAgreed()).isEqualTo(allPartiesAgree);
}

@ParameterizedTest
@EnumSource(VerticalYesNo.class)
void shouldSetWithoutNoticeFlagWhenNotAllPartiesAgree(VerticalYesNo withoutNotice) {
// Given
EnterGenAppRequest enterGenAppRequest = EnterGenAppRequest.builder()
.applicationTypeOption(EnterGenAppType.SOMETHING_ELSE)
.allPartiesAgree(VerticalYesNo.NO)
.withoutNotice(withoutNotice)
.build();

PCSCase caseData = PCSCase.builder()
.enterGenAppRequest(enterGenAppRequest)
.build();

// When
underTest.createGenAppEntity(caseData, pcsCaseEntity, applicantParty, GEN_APP_ISSUED);

// Then
GenAppEntity genAppEntity = getSavedGenAppEntity();
assertThat(genAppEntity.getWithoutNotice()).isEqualTo(withoutNotice);
}

@ParameterizedTest
@EnumSource(VerticalYesNo.class)
void shouldNotSetWithoutNoticeFlagWhenAllPartiesAgree(VerticalYesNo withoutNotice) {
// Given
EnterGenAppRequest enterGenAppRequest = EnterGenAppRequest.builder()
.applicationTypeOption(EnterGenAppType.SOMETHING_ELSE)
.allPartiesAgree(VerticalYesNo.YES)
.withoutNotice(withoutNotice)
.build();

PCSCase caseData = PCSCase.builder()
.enterGenAppRequest(enterGenAppRequest)
.build();

// When
underTest.createGenAppEntity(caseData, pcsCaseEntity, applicantParty, GEN_APP_ISSUED);

// Then
GenAppEntity genAppEntity = getSavedGenAppEntity();
assertThat(genAppEntity.getWithoutNotice()).isNull();
}

@Test
void shouldSaveUploadedGenAppAsSubmissionDocument() {
// Given
Expand Down