diff --git a/src/Application/Documents/Queries/GetAllDocumentsPaginated.cs b/src/Application/Documents/Queries/GetAllDocumentsPaginated.cs index fd5c6a0b..a8af3480 100644 --- a/src/Application/Documents/Queries/GetAllDocumentsPaginated.cs +++ b/src/Application/Documents/Queries/GetAllDocumentsPaginated.cs @@ -6,6 +6,7 @@ using Application.Common.Models.Dtos.Physical; using AutoMapper; using AutoMapper.QueryableExtensions; +using Domain.Statuses; using FluentValidation; using MediatR; using Microsoft.EntityFrameworkCore; @@ -63,7 +64,9 @@ public async Task> Handle(Query request, .Include(x => x.Folder) .ThenInclude(y => y.Locker) .ThenInclude(z => z.Room) - .ThenInclude(t => t.Department); + .ThenInclude(t => t.Department) + .Where(x => !x.IsPrivate && x.Status != DocumentStatus.Issued); + if (folderExists) {