Skip to content

Commit

Permalink
PI-2383 - add arrival and departure date to contact record (#4146)
Browse files Browse the repository at this point in the history
* PI-2383 - add arrival and departure date to contact record

* Formatting changes

* Update projects/approved-premises-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/ReferralService.kt

Co-authored-by: Marcus Aspin <[email protected]>

* Formatting changes

* PI-2383 - add arrival and departure date to contact record

---------

Co-authored-by: probation-integration-bot[bot] <177347787+probation-integration-bot[bot]@users.noreply.github.com>
Co-authored-by: Marcus Aspin <[email protected]>
  • Loading branch information
3 people authored Aug 7, 2024
1 parent 7284184 commit 21f3ded
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,14 @@ internal class MessagingIntegrationInactiveTest {
assertThat(contact.description, equalTo("Approved Premises Booking for Hope House"))
assertThat(
contact.notes,
equalTo("To view details of the Approved Premises booking, click here: https://approved-premises-dev.hmpps.service.justice.gov.uk/applications/484b8b5e-6c3b-4400-b200-425bbe410713")
equalTo(
"""
Expected arrival: 30/01/2023
Expected departure: 30/04/2023
To view details of the Approved Premises booking, click here: https://approved-premises-dev.hmpps.service.justice.gov.uk/applications/484b8b5e-6c3b-4400-b200-425bbe410713
""".trimIndent()
)
)
assertThat(contact.locationId, equalTo(OfficeLocationGenerator.DEFAULT.id))
assertThat(contact.eventId, equalTo(PersonGenerator.INACTIVE_EVENT.id))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,14 @@ internal class MessagingIntegrationTest {
assertThat(contact.description, equalTo("Approved Premises Booking for Hope House"))
assertThat(
contact.notes,
equalTo("To view details of the Approved Premises booking, click here: https://approved-premises-dev.hmpps.service.justice.gov.uk/applications/484b8b5e-6c3b-4400-b200-425bbe410713")
equalTo(
"""
Expected arrival: 30/01/2023
Expected departure: 30/04/2023
To view details of the Approved Premises booking, click here: https://approved-premises-dev.hmpps.service.justice.gov.uk/applications/484b8b5e-6c3b-4400-b200-425bbe410713
""".trimIndent()
)
)
assertThat(contact.locationId, equalTo(OfficeLocationGenerator.DEFAULT.id))
assertThat(contact.eventId, equalTo(PersonGenerator.EVENT.id))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ class ReferralService(
ContactDetails(
date = details.bookingMadeAt,
type = ContactTypeCode.BOOKING_MADE,
notes = "To view details of the Approved Premises booking, click here: ${details.applicationUrl}",
notes = """
Expected arrival: ${DeliusDateFormatter.format(details.arrivalOn)}
Expected departure: ${DeliusDateFormatter.format(details.departureOn)}
To view details of the Approved Premises booking, click here: ${details.applicationUrl}
""".trimIndent(),
description = "Approved Premises Booking for ${details.premises.name}",
locationCode = ap.locationCode()
),
Expand Down

0 comments on commit 21f3ded

Please sign in to comment.