diff --git a/IRaCIS.Core.Application/Service/Document/TrialNormalRecordService.cs b/IRaCIS.Core.Application/Service/Document/TrialNormalRecordService.cs index 531fd4908..557213588 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialNormalRecordService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialNormalRecordService.cs @@ -33,6 +33,7 @@ public class TrialNormalRecordService(IRepository _trialNorma var trialNormalRecordQueryable = _trialNormalRecordRepository .Where(x => x.TrialFileTypeId == inDto.TrialFileTypeId) + .WhereIf(inDto.IsAuthorizedView != null, x => x.IsAuthorizedView == inDto.IsAuthorizedView) .WhereIf(inDto.FileName.IsNotNullOrEmpty(), x => x.TrialFileRecord.FileName.Contains(inDto.FileName)) .ProjectTo(_mapper.ConfigurationProvider); diff --git a/IRaCIS.Core.Application/Service/Document/TrialTrianingRecordService.cs b/IRaCIS.Core.Application/Service/Document/TrialTrianingRecordService.cs index ef3ab1e2d..240d2db66 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialTrianingRecordService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialTrianingRecordService.cs @@ -38,6 +38,7 @@ public class TrialTrianingRecordService(IRepository< var trialTrianingRecordQueryable = _trialTrianingRecordRepository .Where(x => x.TrialFileTypeId == inDto.TrialFileTypeId) + .WhereIf(inDto.IsAuthorizedView != null, x => x.IsAuthorizedView == inDto.IsAuthorizedView) .WhereIf(inDto.FileName.IsNotNullOrEmpty(), x => x.TrialFileRecord.FileName.Contains(inDto.FileName)) .WhereIf(inDto.TrianingDateStartTime != null, x => x.TrianingDate >= inDto.TrianingDateStartTime) .WhereIf(inDto.TrianingDateEndTime != null, x => x.TrianingDate <= inDto.TrianingDateEndTime)