Skip to content

Commit

Permalink
CIV-10809 Claimant Dashboard Status - Default Judgement (#3420)
Browse files Browse the repository at this point in the history
* CIV-10809: Set Up Dashboard Status

* CIV-10809: Set Up Dashboard Status

* CIV-10809: Set Up Dashboard Status

* CIV-10809: Set Up Dashboard Status

* CIV-10809: Set Up Test Case

* CIV-10809: Set Up Test Case

---------

Co-authored-by: sankhajuria <[email protected]>
Co-authored-by: Raja Mani <[email protected]>
  • Loading branch information
3 people authored Nov 1, 2023
1 parent b00ff2d commit 13fda8f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public boolean hasResponseDeadlineBeenExtended() {
@Override
public boolean isEligibleForCCJ() {
return caseData.getRespondent1ResponseDeadline() != null
&& caseData.getRespondent1ResponseDeadline().isBefore(LocalDate.now().atTime(FOUR_PM));
&& caseData.getRespondent1ResponseDeadline().isBefore(LocalDate.now().atTime(FOUR_PM))
&& caseData.getPaymentTypeSelection() == null;
}

@Override
Expand Down Expand Up @@ -286,4 +287,11 @@ public boolean isSDOOrderCreated() {
&& CaseState.CASE_PROGRESSION.equals(caseData.getCcdState());
}

@Override
public boolean isClaimantDefaultJudgement() {
return caseData.getRespondent1ResponseDeadline() != null
&& caseData.getRespondent1ResponseDeadline().isBefore(LocalDate.now().atTime(FOUR_PM))
&& caseData.getPaymentTypeSelection() != null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,6 @@ public interface Claim {

boolean isSDOOrderCreated();

boolean isClaimantDefaultJudgement();

}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public enum DashboardClaimStatus {
REQUESTED_COUNTRY_COURT_JUDGEMENT(
Claim::claimantRequestedCountyCourtJudgement
),
DEFAULT_JUDGEMENT(
Claim::isClaimantDefaultJudgement
),
RESPONSE_OVERDUE(
Claim::hasResponsePendingOverdue
),
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/uk/gov/hmcts/reform/cmc/model/CmcClaim.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,4 +394,9 @@ public boolean isPartialAdmissionRejected() {
&& Objects.nonNull(claimantResponse)
&& claimantResponse.getType().equals(ClaimantResponseType.REJECTION);
}

@Override
public boolean isClaimantDefaultJudgement() {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import uk.gov.hmcts.reform.civil.documentmanagement.model.CaseDocument;
import uk.gov.hmcts.reform.civil.documentmanagement.model.DocumentType;
import uk.gov.hmcts.reform.civil.enums.CaseState;
import uk.gov.hmcts.reform.civil.enums.DJPaymentTypeSelection;
import uk.gov.hmcts.reform.civil.enums.RespondentResponsePartAdmissionPaymentTimeLRspec;
import uk.gov.hmcts.reform.civil.enums.RespondentResponseTypeSpec;
import uk.gov.hmcts.reform.civil.enums.RespondentResponseTypeSpecPaidStatus;
Expand Down Expand Up @@ -72,6 +73,19 @@ void given_isEligibleForCCJ_whenGetStatus_thenReturnEligibleForCCJStatus() {
assertThat(status).isEqualTo(DashboardClaimStatus.ELIGIBLE_FOR_CCJ);
}

@Test
void given_isEligibleForCCJ_whenGetStatus_thenReturnDefaultJudgementStatus() {
CaseData claim = CaseData.builder()
.respondent1ResponseDate(LocalDateTime.now())
.respondent1ResponseDeadline(LocalDateTime.of(2022, 2, 2, 16, 0))
.paymentTypeSelection(DJPaymentTypeSelection.IMMEDIATELY)
.build();

DashboardClaimStatus status = ccdClaimStatusDashboardFactory.getDashboardClaimStatus(new CcdDashboardClaimMatcher(
claim, featureToggleService));
assertThat(status).isEqualTo(DashboardClaimStatus.DEFAULT_JUDGEMENT);
}

@Test
void given_hasResponseDueToday_whenGetStatus_thenReturnResponseDueNow() {
CaseData claim = CaseData.builder()
Expand Down

0 comments on commit 13fda8f

Please sign in to comment.