Skip to content

Commit

Permalink
Adjust sort order.
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Jonsson <[email protected]>
  • Loading branch information
oyvind-wedoe and flexable777 committed Sep 18, 2023
1 parent 85576b0 commit eb7c6ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class DokumentMapper(
it.getType() != DokumentUnderArbeid.DokumentUnderArbeidType.JOURNALFOERT
}

return dokumenterUnderArbeid.sortedBy { it.created }
return dokumenterUnderArbeid.sortedByDescending { it.created }
.map { mapToDokumentView(it) } + journalfoerteDokumenterUnderArbeid.map { mapToDokumentView(it) }
.sortedBy { it.journalfoertDokumentReference?.datoOpprettet }
.sortedByDescending { it.journalfoertDokumentReference?.datoOpprettet }
}

fun mapToDokumentView(dokumentUnderArbeid: DokumentUnderArbeid): DokumentView {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package no.nav.klage.dokument.service

import jakarta.transaction.Transactional
import no.nav.klage.dokument.api.mapper.DokumentMapper
import no.nav.klage.dokument.api.view.DocumentValidationResponse
import no.nav.klage.dokument.api.view.JournalfoertDokumentReference
import no.nav.klage.dokument.clients.kabaljsontopdf.KabalJsonToPdfClient
Expand Down Expand Up @@ -56,7 +55,6 @@ class DokumentUnderArbeidService(
private val innloggetSaksbehandlerService: InnloggetSaksbehandlerService,
private val dokumentService: DokumentService,
private val kabalDocumentMapper: KabalDocumentMapper,
private val dokumentMapper: DokumentMapper,
private val eregClient: EregClient,
) {
companion object {
Expand Down

0 comments on commit eb7c6ba

Please sign in to comment.