diff --git a/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/LicenceConditionIntegrationTest.kt b/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/LicenceConditionIntegrationTest.kt index b06616b2a5..8a0f205f04 100644 --- a/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/LicenceConditionIntegrationTest.kt +++ b/projects/manage-supervision-and-delius/src/integrationTest/kotlin/uk/gov/justice/digital/hmpps/LicenceConditionIntegrationTest.kt @@ -91,7 +91,7 @@ class LicenceConditionIntegrationTest { LIC_COND_SUB_CAT.description, LocalDate.now().minusDays(7), LocalDate.now(), - note = LicenceConditionNote( + licenceConditionNote = LicenceConditionNote( 0, "CVL Service", LocalDate.of(2024, 4, 22), 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 94a03fd281..2e4fafe3ee 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 @@ -155,7 +155,7 @@ class SentenceIntegrationTest { LC_WITHOUT_NOTES.id, LIC_COND_MAIN_CAT.description, imposedReleasedDate = LocalDate.now().minusDays(14), - notes = listOf() + licenceConditionNotes = listOf() ), LicenceCondition( LC_WITH_NOTES_WITHOUT_ADDED_BY.id, @@ -167,7 +167,7 @@ class SentenceIntegrationTest { LicenceConditionNote( 0, note = "He shall not contact or associate with Peter Jones without the prior approval of the supervising officer;", - hasNotesBeenTruncated = false + hasNoteBeenTruncated = false ) ) ) 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 d471f6ba2e..895552790a 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 @@ -9,8 +9,8 @@ data class LicenceCondition( val subTypeDescription: String? = null, val imposedReleasedDate: LocalDate, val actualStartDate: LocalDate? = null, - val notes: List? = null, - val note: LicenceConditionNote? = null + val licenceConditionNotes: List? = null, + val licenceConditionNote: LicenceConditionNote? = null ) data class LicenceConditionNote( @@ -18,7 +18,7 @@ data class LicenceConditionNote( val createdBy: String? = null, val createdByDate: LocalDate? = null, val note: String, - val hasNotesBeenTruncated: Boolean? = null + val hasNoteBeenTruncated: Boolean? = null ) data class LicenceConditionNoteDetail( diff --git a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/LicenceConditionService.kt b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/LicenceConditionService.kt index ff2ea7dfad..c1ad6b76a9 100644 --- a/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/LicenceConditionService.kt +++ b/projects/manage-supervision-and-delius/src/main/kotlin/uk/gov/justice/digital/hmpps/service/LicenceConditionService.kt @@ -47,7 +47,7 @@ fun EntityLicenceCondition.toLicenceConditionSingleNote(noteId: Int, truncateNot subCategory?.description, imposedReleasedDate, actualStartDate, - note = toLicenceConditionNote(truncateNote).elementAtOrNull(noteId) + licenceConditionNote = toLicenceConditionNote(truncateNote).elementAtOrNull(noteId) ) fun EntityLicenceCondition.toLicenceConditionNote(truncateNote: Boolean): List {