From cfabe32f4eb18f6cecac9d021ef19c652caa719f Mon Sep 17 00:00:00 2001 From: Vzart Date: Tue, 13 Jun 2023 17:21:21 +0700 Subject: [PATCH] modified: get all document now only return public document --- .../Documents/Queries/GetAllDocumentsPaginated.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) {