Skip to content

Commit

Permalink
Merge pull request #2281 from kanselarij-vlaanderen/feature/KAS-4934-…
Browse files Browse the repository at this point in the history
…fix-print-on-approved-agenda

KAS-4934 fixed print view of document versions on older agenda versions
  • Loading branch information
ValenberghsSven authored Jan 7, 2025
2 parents 23a3f71 + 0043d42 commit 0957b99
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ export default class AgendaPrintableAgendaListSectionItemGroupItemDocumentListCo
const accessLevel = await piece.accessLevel;
const nextPiece = await piece.nextPiece;
if (accessLevel.uri !== CONSTANTS.ACCESS_LEVELS.INTERN_SECRETARIE) {
return !nextPiece ? piece : null;
if (nextPiece?.uri) {
const nextPieceInAgendaitem = pieces.find((p) => p.uri === nextPiece.uri);
return !nextPieceInAgendaitem ? piece : null;
}
return piece;
}
return null;
}));
const filteredPieces = piecesNoNextVersion.filter((piece) => piece !== null);

// Use the filename from the filename mappings to sort
for (const piece of pieces) {
let mappedName;
Expand Down

0 comments on commit 0957b99

Please sign in to comment.