Skip to content

Conversation

@yohan-oc
Copy link
Contributor

@yohan-oc yohan-oc commented Oct 22, 2025

Implement PP1 Variation for a Suspended Budget Payment Plan

Additionally, covered missing user session cleanups and added a few unit tests.

@yohan-oc yohan-oc marked this pull request as ready for review October 23, 2025 17:39
case None => Future.successful(updatedAnswers)
updatedAnswers <- planDetail.scheduledPaymentStartDate match {
case Some(paymentStartDate) => Future.fromTry(updatedAnswers.set(AmendPlanEndDatePage, paymentStartDate))
case None => Future.successful(updatedAnswers)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please replace case None => with case _ =>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the code

_ <- sessionRepository.set(updatedAnswers)
} yield {
val flag: Future[Boolean] = calculateShowAction(nddService, planDetail)
val showActions = Await.result(flag, 5.seconds)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove Await.result

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is removed and moved method call inside the for comprehension


private def isSuspendPeriodActive(planDetail: PaymentPlanDetails): Boolean = {
(for {
suspensionStartDate <- planDetail.suspensionStartDate
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove suspensionStartDate <- planDetail.suspensionStartDate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is removed

Copy link
Contributor

@SandipKhedekar SandipKhedekar left a comment

Choose a reason for hiding this comment

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

Looks good...

@yohan-oc yohan-oc merged commit ffe92c9 into main Oct 27, 2025
1 check passed
@yohan-oc yohan-oc deleted the DTR-820 branch October 27, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants