Skip to content

Commit

Permalink
CIV-15500 HWF application type of fee not showing correctly in dashbo…
Browse files Browse the repository at this point in the history
…ard notification (#1574)

* CIV-15500 modified condition for application fee and additional application fee

* CIV-15858 application feeType

* CIV-15500 corrected unit tests after resolving conflicts
  • Loading branch information
deepthidoppalapudihmcts authored Nov 20, 2024
1 parent aee3738 commit b34a9fe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ public HashMap<String, Object> mapCaseDataToParams(CaseData caseData) {
DateUtils.formatDateInWelsh(caseData.getJudicialDecisionRequestMoreInfo().getJudgeRequestMoreInfoByDate()));
}

if (caseData.getHwfFeeType() != null) {
if (FeeType.ADDITIONAL == caseData.getHwfFeeType()) {
params.put("applicationFeeTypeEn", "additional application");
params.put("applicationFeeTypeCy", "cais ychwanegol");
} else if (FeeType.APPLICATION == caseData.getHwfFeeType()
|| caseData.getCcdState().equals(CaseState.AWAITING_APPLICATION_PAYMENT)) {
if (Objects.nonNull(caseData.getGeneralAppHelpWithFees())) {
if (caseData.getCcdState().equals(CaseState.AWAITING_APPLICATION_PAYMENT)) {
params.put("applicationFeeTypeEn", "application");
params.put("applicationFeeTypeCy", "cais");
} else if (caseData.getCcdState().equals(CaseState.APPLICATION_ADD_PAYMENT)) {
params.put("applicationFeeTypeEn", "additional application");
params.put("applicationFeeTypeCy", "cais ychwanegol");
}
}

if (Objects.nonNull(caseData.getJudicialDecisionMakeAnOrderForWrittenRepresentations())) {
LocalDate applicantDeadlineDate;
LocalDate respondentDeadlineDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import uk.gov.hmcts.reform.civil.model.BusinessProcess;
import uk.gov.hmcts.reform.civil.model.CaseData;
import uk.gov.hmcts.reform.civil.model.Fee;
import uk.gov.hmcts.reform.civil.model.citizenui.HelpWithFees;
import uk.gov.hmcts.reform.civil.model.genapplication.GAApplicationType;
import uk.gov.hmcts.reform.civil.model.genapplication.GAJudicialRequestMoreInfo;
import uk.gov.hmcts.reform.civil.model.genapplication.GAJudicialWrittenRepresentations;
Expand Down Expand Up @@ -157,6 +158,7 @@ void shouldMapParametersWhenHwfApplicationFeeIsRequested() {
.legacyCaseReference("000DC001")
.businessProcess(BusinessProcess.builder().status(BusinessProcessStatus.READY).build())
.generalAppSuperClaimType("SPEC_CLAIM")
.generalAppHelpWithFees(HelpWithFees.builder().helpWithFee(YesOrNo.YES).helpWithFeesReferenceNumber("HWF-A1B-23C").build())
.hwfFeeType(FeeType.APPLICATION)
.build();

Expand All @@ -175,6 +177,7 @@ void shouldMapParametersWhenHwfApplicationFeeIsRequestedAndMoreInfoRequired() {
.businessProcess(BusinessProcess.builder().status(BusinessProcessStatus.READY).build())
.generalAppSuperClaimType("SPEC_CLAIM")
.hwfFeeType(FeeType.APPLICATION)
.generalAppHelpWithFees(HelpWithFees.builder().helpWithFee(YesOrNo.YES).helpWithFeesReferenceNumber("HWF-A1B-23C").build())
.gaHwfDetails(HelpWithFeesDetails.builder().hwfCaseEvent(CaseEvent.MORE_INFORMATION_HWF_GA)
.remissionAmount(BigDecimal.valueOf(7500))
.outstandingFeeInPounds(new BigDecimal(200.00)).build())
Expand All @@ -190,11 +193,12 @@ void shouldMapParametersWhenHwfApplicationFeeIsRequestedAndMoreInfoRequired() {
void shouldMapParametersWhenHwfAdditionalApplicationFeeIsRequestedAndMoreInfoRequired() {
caseData = CaseDataBuilder.builder().build().toBuilder()
.ccdCaseReference(1644495739087775L)
.ccdState(AWAITING_APPLICATION_PAYMENT)
.ccdState(APPLICATION_ADD_PAYMENT)
.legacyCaseReference("000DC001")
.businessProcess(BusinessProcess.builder().status(BusinessProcessStatus.READY).build())
.generalAppSuperClaimType("SPEC_CLAIM")
.hwfFeeType(FeeType.ADDITIONAL)
.generalAppHelpWithFees(HelpWithFees.builder().helpWithFee(YesOrNo.YES).helpWithFeesReferenceNumber("HWF-A1B-23C").build())
.additionalHwfDetails(HelpWithFeesDetails.builder()
.hwfCaseEvent(CaseEvent.MORE_INFORMATION_HWF_GA)
.remissionAmount(BigDecimal.valueOf(7500))
Expand All @@ -216,6 +220,7 @@ void shouldMapParametersWhenHwfApplicationFeeIsRequestedAndIsPartAdmitted_PartRe
.businessProcess(BusinessProcess.builder().status(BusinessProcessStatus.READY).build())
.generalAppSuperClaimType("SPEC_CLAIM")
.hwfFeeType(FeeType.APPLICATION)
.generalAppHelpWithFees(HelpWithFees.builder().helpWithFee(YesOrNo.YES).helpWithFeesReferenceNumber("HWF-A1B-23C").build())
.gaHwfDetails(HelpWithFeesDetails.builder().hwfCaseEvent(CaseEvent.PARTIAL_REMISSION_HWF_GA)
.remissionAmount(BigDecimal.valueOf(7500))
.outstandingFeeInPounds(new BigDecimal(200.00)).build())
Expand All @@ -233,11 +238,12 @@ void shouldMapParametersWhenHwfApplicationFeeIsRequestedAndIsPartAdmitted_PartRe
void shouldMapParametersWhenHwfAdditionalApplicationFeeIsRequestedAndIsPartAdmitted_PartRemission() {
caseData = CaseDataBuilder.builder().build().toBuilder()
.ccdCaseReference(1644495739087775L)
.ccdState(AWAITING_APPLICATION_PAYMENT)
.ccdState(APPLICATION_ADD_PAYMENT)
.legacyCaseReference("000DC001")
.businessProcess(BusinessProcess.builder().status(BusinessProcessStatus.READY).build())
.generalAppSuperClaimType("SPEC_CLAIM")
.hwfFeeType(FeeType.ADDITIONAL)
.generalAppHelpWithFees(HelpWithFees.builder().helpWithFee(YesOrNo.YES).helpWithFeesReferenceNumber("HWF-A1B-23C").build())
.additionalHwfDetails(HelpWithFeesDetails.builder()
.hwfCaseEvent(CaseEvent.PARTIAL_REMISSION_HWF_GA).remissionAmount(BigDecimal.valueOf(7500))
.outstandingFeeInPounds(new BigDecimal(200.00)).build())
Expand All @@ -260,6 +266,7 @@ void shouldMapParametersWhenHwfApplicationFeeIsRequestedAndCaseStateIsAwaitingAp
.generalAppSuperClaimType("SPEC_CLAIM")
.generalAppType(GAApplicationType.builder().types(List.of(GeneralApplicationTypes.VARY_ORDER))
.build())
.generalAppHelpWithFees(HelpWithFees.builder().helpWithFee(YesOrNo.YES).helpWithFeesReferenceNumber("HWF-A1B-23C").build())
.ccdState(CaseState.AWAITING_APPLICATION_PAYMENT)
.hwfFeeType(FeeType.APPLICATION)
.build();
Expand All @@ -277,6 +284,7 @@ void shouldMapParametersWhenHwfAdditionalApplicationFeeIsRequested() {
.ccdState(APPLICATION_ADD_PAYMENT)
.legacyCaseReference("000DC001")
.businessProcess(BusinessProcess.builder().status(BusinessProcessStatus.READY).build())
.generalAppHelpWithFees(HelpWithFees.builder().helpWithFee(YesOrNo.YES).helpWithFeesReferenceNumber("HWF-A1B-23C").build())
.generalAppSuperClaimType("SPEC_CLAIM")
.hwfFeeType(FeeType.ADDITIONAL)
.build();
Expand All @@ -296,6 +304,7 @@ void shouldMapParametersWhenHwfAdditionalApplicationFeeIsRequestedAndCaseStateIs
.generalAppSuperClaimType("SPEC_CLAIM")
.generalAppType(GAApplicationType.builder().types(List.of(GeneralApplicationTypes.VARY_ORDER))
.build())
.generalAppHelpWithFees(HelpWithFees.builder().helpWithFee(YesOrNo.YES).helpWithFeesReferenceNumber("HWF-A1B-23C").build())
.ccdState(APPLICATION_ADD_PAYMENT)
.hwfFeeType(FeeType.ADDITIONAL)
.build();
Expand Down

0 comments on commit b34a9fe

Please sign in to comment.