Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PI-2383 - add arrival and departure date to contact record #4146

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ 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
achimber-moj marked this conversation as resolved.
Show resolved Hide resolved

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,13 @@ 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,15 @@ 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()),
achimber-moj marked this conversation as resolved.
Show resolved Hide resolved
description = "Approved Premises Booking for ${details.premises.name}",
locationCode = ap.locationCode()
),
Expand Down
Loading