diff --git a/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/SentenceIntegrationTest.kt b/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/SentenceIntegrationTest.kt index ad4c2184f0..cdf923183b 100644 --- a/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/SentenceIntegrationTest.kt +++ b/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/SentenceIntegrationTest.kt @@ -13,6 +13,9 @@ import uk.gov.justice.digital.hmpps.api.model.overview.Rar import uk.gov.justice.digital.hmpps.api.model.sentence.* import uk.gov.justice.digital.hmpps.data.generator.CourtReportGenerator.COURT_DOCUMENT import uk.gov.justice.digital.hmpps.data.generator.CourtReportGenerator.EVENT_DOCUMENT +import uk.gov.justice.digital.hmpps.data.generator.LicenceConditionGenerator.LC_WITHOUT_NOTES +import uk.gov.justice.digital.hmpps.data.generator.LicenceConditionGenerator.LC_WITH_NOTES +import uk.gov.justice.digital.hmpps.data.generator.LicenceConditionGenerator.LC_WITH_NOTES_WITHOUT_ADDED_BY import uk.gov.justice.digital.hmpps.data.generator.PersonGenerator import uk.gov.justice.digital.hmpps.data.generator.personalDetails.PersonDetailsGenerator import uk.gov.justice.digital.hmpps.service.toSummary @@ -120,6 +123,7 @@ class SentenceIntegrationTest { "3 minutes completed (of 12 hours)", listOf( LicenceCondition( + LC_WITH_NOTES.id, LIC_COND_MAIN_CAT.description, LIC_COND_SUB_CAT.description, LocalDate.now().minusDays(7), @@ -148,10 +152,12 @@ class SentenceIntegrationTest { ) ), LicenceCondition( + LC_WITHOUT_NOTES.id, LIC_COND_MAIN_CAT.description, imposedReleasedDate = LocalDate.now().minusDays(14), ), LicenceCondition( + LC_WITH_NOTES_WITHOUT_ADDED_BY.id, LIC_COND_MAIN_CAT.description, LIC_COND_SUB_CAT.description, LocalDate.now().minusDays(7), diff --git a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/sentence/LicenceCondition.kt b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/sentence/LicenceCondition.kt index 0de8894c12..37ef0cc519 100644 --- a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/sentence/LicenceCondition.kt +++ b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/api/model/sentence/LicenceCondition.kt @@ -3,6 +3,7 @@ package uk.gov.justice.digital.hmpps.api.model.sentence import java.time.LocalDate data class LicenceCondition( + val id: Long, val mainDescription: String, val subTypeDescription: String? = null, val imposedReleasedDate: LocalDate, diff --git a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceService.kt b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceService.kt index 3d097fb423..e5fa4362c9 100644 --- a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceService.kt +++ b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/SentenceService.kt @@ -80,6 +80,7 @@ class SentenceService( fun EntityLicenceCondition.toLicenceCondition() = LicenceCondition( + id, mainCategory.description, subCategory?.description, imposedReleasedDate,