Skip to content

Commit

Permalink
RIA-7378 unlink_case (#697)
Browse files Browse the repository at this point in the history
* RIA-7552_appeal_can_proceed: Add Asylum case definition for Record out of time decision, Letter template, Letter generator and configuration, tests

* RIA-7378_unlink_appeal: refactor test method name

* RIA-7378_unlink_appeal: Rename classes, tags to 'Maintain case unlink appeal'

* RIA-7378_unlink_appeal: Rename classes, tags to 'Maintain case unlink appeal'

* RIA-7378_unlink_appeal: Fix the code duplication issue on Sonar Cloud
  • Loading branch information
ikirsanov authored Sep 15, 2023
1 parent 689a42b commit 1629e61
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

@Component
public class InternalDecideHomeOfficeApplicationDecisionGrantedLetterTemplate implements DocumentTemplate<AsylumCase> {
private static final String timeExtentionContent = "The Tribunal will give the Home Office more time to complete its next task. You will get a notification with the new date soon.";
private static final String adjournExpediteTransferOrUpdateHearingReqsContent = "The details of the hearing will be updated and you will be sent a new Notice of Hearing with the agreed changes.";
private static final String judgesReviewContent = "The decision on the Home Office’s original request will be overturned. You will be notified if there is something you need to do next.";
private static final String linkOrUnlinkContent = "This appeal will be linked to or unlinked from the appeal in the Home Office application. You will be notified when this happens.";
private static final String withdrawnContent = "The Tribunal will end the appeal. You will be notified when this happens.";
private static final String reinstateAppealContent = "This appeal will be reinstated and will continue from the point where it was ended. You will be notified when this happens.";
private static final String homeOfficetimeExtentionContent = "The Tribunal will give the Home Office more time to complete its next task. You will get a notification with the new date soon.";
private static final String homeOfficeAdjournExpediteTransferOrUpdateHearingReqsContent = "The details of the hearing will be updated and you will be sent a new Notice of Hearing with the agreed changes.";
private static final String homeOfficeJudgesReviewContent = "The decision on the Home Office’s original request will be overturned. You will be notified if there is something you need to do next.";
private static final String homeOfficeLinkOrUnlinkContent = "This appeal will be linked to or unlinked from the appeal in the Home Office application. You will be notified when this happens.";
private static final String homeOfficeWithdrawnContent = "The Tribunal will end the appeal. You will be notified when this happens.";
private static final String homeOfficeReinstateAppealContent = "This appeal will be reinstated and will continue from the point where it was ended. You will be notified when this happens.";
private static final String applicationTypeOtherContent = "You will be notified when the Tribunal makes the changes the Home Office asked for.";
private final String templateName;
private final DateProvider dateProvider;
Expand Down Expand Up @@ -93,12 +93,12 @@ private Optional<MakeAnApplication> getMakeAnApplication(AsylumCase asylumCase)

private String getWhatHappensNextContent(MakeAnApplicationTypes makeAnApplicationTypes) {
return switch (makeAnApplicationTypes) {
case TIME_EXTENSION -> timeExtentionContent;
case ADJOURN, EXPEDITE, TRANSFER, UPDATE_HEARING_REQUIREMENTS -> adjournExpediteTransferOrUpdateHearingReqsContent;
case JUDGE_REVIEW, JUDGE_REVIEW_LO -> judgesReviewContent;
case LINK_OR_UNLINK -> linkOrUnlinkContent;
case WITHDRAW -> withdrawnContent;
case REINSTATE -> reinstateAppealContent;
case TIME_EXTENSION -> homeOfficetimeExtentionContent;
case ADJOURN, EXPEDITE, TRANSFER, UPDATE_HEARING_REQUIREMENTS -> homeOfficeAdjournExpediteTransferOrUpdateHearingReqsContent;
case JUDGE_REVIEW, JUDGE_REVIEW_LO -> homeOfficeJudgesReviewContent;
case LINK_OR_UNLINK -> homeOfficeLinkOrUnlinkContent;
case WITHDRAW -> homeOfficeWithdrawnContent;
case REINSTATE -> homeOfficeReinstateAppealContent;
case OTHER -> applicationTypeOtherContent;
default -> "";
};
Expand Down

0 comments on commit 1629e61

Please sign in to comment.