Skip to content

Commit

Permalink
Small adjustment to method names
Browse files Browse the repository at this point in the history
  • Loading branch information
aleklundeq committed Dec 17, 2023
1 parent 3f739da commit ed09d90
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private async Task BuildContentForResourceOwner(Guid azureUniqueId, string fullD

//11.Personnel with more than 100 % workload
var listOfPersonnelWithTBEContent =
personnelForDepartment.Select(p => CreatePersonnelWithTBEContent(p));
personnelForDepartment.Select(p => CreatePersonnelContentWithTotalWorkload(p));
var listOfPersonnelWithTBEContentOnlyMoreThan100PercentWorkload = listOfPersonnelWithTBEContent.Where(p => p.TotalWorkload > 100);


Expand Down Expand Up @@ -206,7 +206,7 @@ private IEnumerable<PersonnelContent> FilterPersonnelWithoutFutureAllocations(
x.PositionInstances.Where(pos => pos.IsActive && pos.AppliesTo <= threeMonthsFuture).Any());
var personnelWithoutFutureAllocations = personnelWithPositionsEndingInThreeMonths.Where(person =>
person.PositionInstances.All(pos => pos.AppliesTo < threeMonthsFuture));
return personnelWithoutFutureAllocations.Select(p => CreatePersonnelContent(p));
return personnelWithoutFutureAllocations.Select(p => CreatePersonnelContentWithPositionInformation(p));
}

private async Task<IEnumerable<InternalPersonnelPerson>> GetPersonnelLeave(
Expand Down Expand Up @@ -341,7 +341,7 @@ private string CalculateAverageTimeToHandleRequests(IEnumerable<ResourceAllocati
return averageTimeUsedToHandleRequest;
}

private PersonnelContent CreatePersonnelContent(InternalPersonnelPerson person)
private PersonnelContent CreatePersonnelContentWithPositionInformation(InternalPersonnelPerson person)
{
if (person == null)
throw new ArgumentNullException();
Expand All @@ -359,7 +359,7 @@ private PersonnelContent CreatePersonnelContent(InternalPersonnelPerson person)
return personnelContent;
}

private PersonnelContent CreatePersonnelWithTBEContent(InternalPersonnelPerson person)
private PersonnelContent CreatePersonnelContentWithTotalWorkload(InternalPersonnelPerson person)
{
var totalWorkLoad = person.ApiPersonAbsences?
.Where(ab => ab.Type != ApiAbsenceType.Absence && ab.IsActive).Select(ab => ab.AbsencePercentage).Sum();
Expand Down

0 comments on commit ed09d90

Please sign in to comment.