Skip to content

Commit

Permalink
Refactored unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
HansDahle committed Nov 24, 2024
1 parent d10212b commit 4a07df3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
using System.Threading.Tasks;
using Fusion.Resources.Database;
using Fusion.Resources.Domain.Models;
using static Microsoft.ApplicationInsights.MetricDimensionNames.TelemetryContext;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;

namespace Fusion.Resources.Domain.Queries
{
Expand Down Expand Up @@ -62,7 +60,7 @@ public Handler(ILogger<Handler> logger, IFusionProfileResolver profileResolver,
// Determine if the user is a manager in the department he/she belongs to.
var isDepartmentManager = departmentsWithResponsibility.Any(r => r == user.FullDepartment);

var relevantSectors = await ResolveRelevantSectorsAsync(user.FullDepartment, sector, isDepartmentManager, departmentsWithResponsibility);
var relevantSectors = ResolveRelevantSectors(departmentsWithResponsibility);

var relevantDepartments = new List<string>();
foreach (var relevantSector in relevantSectors)
Expand Down Expand Up @@ -107,7 +105,7 @@ private async Task<List<string>> GetUserManagerForAsync(FusionFullPersonProfile

return orgUnits;
}
private async Task<List<string>> ResolveRelevantSectorsAsync(string? fullDepartment, string? sector, bool isDepartmentManager, IEnumerable<string> departmentsWithResponsibility)
private List<string> ResolveRelevantSectors(IEnumerable<string> departmentsWithResponsibility)
{
// Get sectors the user have responsibility in, to find all relevant departments
var relevantSectors = new List<string>();
Expand Down

0 comments on commit 4a07df3

Please sign in to comment.