Skip to content

Commit

Permalink
CIV-15536 refactor hwf more info template id
Browse files Browse the repository at this point in the history
  • Loading branch information
karthick-mohanasundaram-HMCTS committed Oct 22, 2024
1 parent e436a4b commit 371129e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public interface NotificationData {
String TYPE_OF_FEE = "typeOfFee";
String TYPE_OF_FEE_WELSH = "typeOfFeeWelsh";
String HWF_MORE_INFO_DATE = "date";
String HWF_MORE_INFO_DATE_IN_WELSH = "dateInWelsh";
String HWF_MORE_INFO_DOCUMENTS = "documents";
String HWF_MORE_INFO_DOCUMENTS_WELSH = "documentsWelsh";
String PART_AMOUNT = "partAmount";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package uk.gov.hmcts.reform.civil.service;

import static uk.gov.hmcts.reform.civil.helpers.DateFormatHelper.DATE;
import static uk.gov.hmcts.reform.civil.helpers.DateFormatHelper.formatLocalDate;
import static uk.gov.hmcts.reform.civil.utils.DateUtils.formatDateInWelsh;

import uk.gov.hmcts.reform.civil.callback.CaseEvent;
Expand Down Expand Up @@ -195,12 +197,13 @@ private Map<String, String> getMoreInformationProperties(CaseData caseData) {
? caseData.getHelpWithFeesMoreInformationGa()
: caseData.getHelpWithFeesMoreInformationAdditional();
return Map.of(
HWF_MORE_INFO_DATE, formatDateInWelsh(moreInformation.getHwFMoreInfoDocumentDate()),
HWF_MORE_INFO_DOCUMENTS, getMoreInformationDocumentList(
moreInformation.getHwFMoreInfoRequiredDocuments()
),
HWF_MORE_INFO_DOCUMENTS_WELSH, getMoreInformationDocumentListWelsh(
moreInformation.getHwFMoreInfoRequiredDocuments())
HWF_MORE_INFO_DATE, formatLocalDate(moreInformation.getHwFMoreInfoDocumentDate(), DATE),
HWF_MORE_INFO_DATE_IN_WELSH, formatDateInWelsh(moreInformation.getHwFMoreInfoDocumentDate()),
HWF_MORE_INFO_DOCUMENTS, getMoreInformationDocumentList(
moreInformation.getHwFMoreInfoRequiredDocuments()
),
HWF_MORE_INFO_DOCUMENTS_WELSH, getMoreInformationDocumentListWelsh(
moreInformation.getHwFMoreInfoRequiredDocuments())
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ notifications:
notifyApplicantForNoRemission: "3008a18a-07ec-445b-a226-62ffa19132ce"
notifyApplicantForHwfPaymentOutcome: "64c4047f-3256-45ff-9b4e-9a11bccf14fe"
notifyApplicantForHwfInvalidRefNumberBilingual: "8950e206-6d15-4575-9d99-734908389fa7"
notifyApplicantForHwFMoreInformationNeededWelsh: "65b3524b-b58c-4cdb-b8b5-5fc2cec505a5"
notifyApplicantForHwFMoreInformationNeededWelsh: "70267e5b-9f11-4549-bc59-56bf7fbdeca7"
notifyApplicantForHwfNoRemissionWelsh: "f9d2f0db-2ae4-4691-8076-bfbb82548846"
notifyApplicantForHwfUpdateRefNumberBilingual: "a7c206b5-8a27-4419-83ff-61351cbc69fb"
notifyApplicantForHwfPartialRemissionBilingual: "5bbd4518-5501-4737-8a1e-a6adacd5e679"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import static uk.gov.hmcts.reform.civil.handler.callback.camunda.notification.NotificationData.CLAIMANT_NAME;
import static uk.gov.hmcts.reform.civil.handler.callback.camunda.notification.NotificationData.FEE_AMOUNT;
import static uk.gov.hmcts.reform.civil.handler.callback.camunda.notification.NotificationData.HWF_MORE_INFO_DATE;
import static uk.gov.hmcts.reform.civil.handler.callback.camunda.notification.NotificationData.HWF_MORE_INFO_DATE_IN_WELSH;
import static uk.gov.hmcts.reform.civil.handler.callback.camunda.notification.NotificationData.HWF_MORE_INFO_DOCUMENTS;
import static uk.gov.hmcts.reform.civil.handler.callback.camunda.notification.NotificationData.HWF_MORE_INFO_DOCUMENTS_WELSH;
import static uk.gov.hmcts.reform.civil.handler.callback.camunda.notification.NotificationData.HWF_REFERENCE_NUMBER;
Expand All @@ -27,6 +28,8 @@
import static uk.gov.hmcts.reform.civil.handler.callback.camunda.notification.NotificationData.REMAINING_AMOUNT;
import static uk.gov.hmcts.reform.civil.handler.callback.camunda.notification.NotificationData.TYPE_OF_FEE;
import static uk.gov.hmcts.reform.civil.handler.callback.camunda.notification.NotificationData.TYPE_OF_FEE_WELSH;
import static uk.gov.hmcts.reform.civil.helpers.DateFormatHelper.DATE;
import static uk.gov.hmcts.reform.civil.helpers.DateFormatHelper.formatLocalDate;
import static uk.gov.hmcts.reform.civil.utils.DateUtils.formatDateInWelsh;

import uk.gov.hmcts.reform.ccd.client.model.CaseDetails;
Expand Down Expand Up @@ -291,7 +294,8 @@ private List<HwFMoreInfoRequiredDocuments> getMoreInformationDocumentList() {

private Map<String, String> getNotificationDataMapMoreInfoGa() {
return Map.of(
HWF_MORE_INFO_DATE, formatDateInWelsh(NOW),
HWF_MORE_INFO_DATE, formatLocalDate(NOW, DATE),
HWF_MORE_INFO_DATE_IN_WELSH, formatDateInWelsh(NOW),
CLAIMANT_NAME, APPLICANT,
CASE_REFERENCE, GA_REFERENCE,
TYPE_OF_FEE, FeeType.APPLICATION.getLabel(),
Expand All @@ -304,7 +308,8 @@ HWF_MORE_INFO_DOCUMENTS_WELSH, getMoreInformationDocumentListStringWelsh(),

private Map<String, String> getNotificationDataMapMoreInfoAdditional() {
return Map.of(
HWF_MORE_INFO_DATE, formatDateInWelsh(NOW),
HWF_MORE_INFO_DATE, formatLocalDate(NOW, DATE),
HWF_MORE_INFO_DATE_IN_WELSH, formatDateInWelsh(NOW),
CLAIMANT_NAME, APPLICANT,
CASE_REFERENCE, GA_REFERENCE,
TYPE_OF_FEE, FeeType.ADDITIONAL.getLabel(),
Expand Down

0 comments on commit 371129e

Please sign in to comment.