Added the logic to filter by service Id

This commit is contained in:
ashutosh.nehete 2025-09-20 19:25:33 +05:30
parent 84e2f840b4
commit 0ba4ccf45c

View File

@ -639,6 +639,12 @@ namespace Marco.Pms.Services.Service
projectAllocationQuery = projectAllocationQuery projectAllocationQuery = projectAllocationQuery
.Where(pa => pa.Employee != null && pa.Employee.OrganizationId == organizationId.Value && pa.Employee.Organization != null); .Where(pa => pa.Employee != null && pa.Employee.OrganizationId == organizationId.Value && pa.Employee.Organization != null);
} }
// Conditionally apply the filter for service ID.
if (serviceId.HasValue)
{
projectAllocationQuery = projectAllocationQuery
.Where(pa => pa.Employee != null && pa.ServiceId == serviceId.Value);
}
var allocations = await projectAllocationQuery var allocations = await projectAllocationQuery
.Select(pa => new .Select(pa => new