Skip to content

Commit

Permalink
MAN-26: Order metadata and add nameOrCrn sort (#4264)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcphee77 authored Sep 26, 2024
1 parent 680133f commit f47151e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ interface CaseloadRepository : JpaRepository<Caseload, Long> {
select distinct cont.type from Caseload c
join Contact cont on cont.personId = c.person.id
where c.staff.code = :staffCode and cont.type.attendanceContact = true
order by cont.type.description asc
"""
)
fun findContactTypesForStaff(staffCode: String): List<ContactType>
Expand All @@ -441,6 +442,7 @@ interface CaseloadRepository : JpaRepository<Caseload, Long> {
join Event e on e.personId = c.person.id and e.active = true and e.softDeleted = false
where e.mainOffence.offence is not null
and c.staff.code = :staffCode
order by e.mainOffence.offence.description asc
"""
)
fun findOffenceTypesForStaff(staffCode: String): List<Offence>
Expand All @@ -451,6 +453,7 @@ enum class CaseloadOrderType(val sortColumn: String) {
LAST_CONTACT("paType.description"),
SENTENCE("moo.description"),
SURNAME("p.surname"),
NAME_OR_CRN("p.surname"),
DOB("p.dateOfBirth")
}

Expand Down

0 comments on commit f47151e

Please sign in to comment.