Added the condition to not get services object in project allocation

This commit is contained in:
ashutosh.nehete 2025-10-04 17:26:08 +05:30
parent 04223578ad
commit d0dabf776b

View File

@ -716,7 +716,7 @@ namespace Marco.Pms.Services.Service
.Include(pa => pa.Employee) .Include(pa => pa.Employee)
.ThenInclude(e => e!.Organization) .ThenInclude(e => e!.Organization)
.Include(pa => pa.Service) .Include(pa => pa.Service)
.Where(pa => pa.ProjectId == projectId && pa.TenantId == tenantId && pa.Service != null); .Where(pa => pa.ProjectId == projectId && pa.TenantId == tenantId);
// Conditionally apply the filter for active allocations. // Conditionally apply the filter for active allocations.
if (!includeInactive) if (!includeInactive)
@ -738,6 +738,7 @@ namespace Marco.Pms.Services.Service
} }
var allocations = await projectAllocationQuery var allocations = await projectAllocationQuery
.Where(pa => pa.Service != null)
.Select(pa => new .Select(pa => new
{ {
// Fields from ProjectAllocation // Fields from ProjectAllocation