Skip to content

Commit

Permalink
PI-2383 - add arrival and departure date to contact record
Browse files Browse the repository at this point in the history
  • Loading branch information
achimber-moj committed Aug 7, 2024
1 parent 357447d commit 963d4df
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ 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("""
Current: 30/01/2023 to 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,12 @@ 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("""
Current: 30/01/2023 to 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,10 @@ class ReferralService(
ContactDetails(
date = details.bookingMadeAt,
type = ContactTypeCode.BOOKING_MADE,
notes = "To view details of the Approved Premises booking, click here: ${details.applicationUrl}",
notes = listOfNotNull(
"Current: ${DeliusDateFormatter.format(details.arrivalOn)} to ${DeliusDateFormatter.format(details.departureOn)}",
"To view details of the Approved Premises booking, click here: ${details.applicationUrl}")
.joinToString(System.lineSeparator() + System.lineSeparator()),
description = "Approved Premises Booking for ${details.premises.name}",
locationCode = ap.locationCode()
),
Expand Down

0 comments on commit 963d4df

Please sign in to comment.