diff --git a/src/Fusion.Resources.Functions.Common/ApiClients/LineOrgApiClient.cs b/src/Fusion.Resources.Functions.Common/ApiClients/LineOrgApiClient.cs index cd93f4707..5e2765d83 100644 --- a/src/Fusion.Resources.Functions.Common/ApiClients/LineOrgApiClient.cs +++ b/src/Fusion.Resources.Functions.Common/ApiClients/LineOrgApiClient.cs @@ -45,6 +45,7 @@ public class OrgUnits public string? FullDepartment { get; set; } public string? SapId { get; set; } public Management Management { get; set; } + public int Level { get; set; } } public class Management diff --git a/src/backend/api/Fusion.Resources.Api/libman.json b/src/backend/api/Fusion.Resources.Api/libman.json new file mode 100644 index 000000000..ceee2710f --- /dev/null +++ b/src/backend/api/Fusion.Resources.Api/libman.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "defaultProvider": "cdnjs", + "libraries": [] +} \ No newline at end of file diff --git a/src/backend/function/Fusion.Resources.Functions/Functions/Notifications/ResourceOwner/WeeklyReport/ScheduledReportTimerTriggerFunction.cs b/src/backend/function/Fusion.Resources.Functions/Functions/Notifications/ResourceOwner/WeeklyReport/ScheduledReportTimerTriggerFunction.cs index 519497a48..26c1c24c5 100644 --- a/src/backend/function/Fusion.Resources.Functions/Functions/Notifications/ResourceOwner/WeeklyReport/ScheduledReportTimerTriggerFunction.cs +++ b/src/backend/function/Fusion.Resources.Functions/Functions/Notifications/ResourceOwner/WeeklyReport/ScheduledReportTimerTriggerFunction.cs @@ -88,7 +88,7 @@ private async Task SendResourceOwnersToQueue(ServiceBusSender sender, int totalB // Query departments from LineOrg var departments = (await _lineOrgClient.GetOrgUnitDepartmentsAsync()) .Where(d => d.FullDepartment != null) // Exclude departments with blank department name - .Where(d => d.FullDepartment.Contains("PRD")) + .Where(d => d.Level >= 4) // Only include departments of level 4 and up .Where(x => x.Management?.Persons.Length > 0) // Exclude departments with no receivers .ToList(); diff --git a/src/backend/function/Fusion.Resources.Functions/Fusion.Resources.Functions.csproj b/src/backend/function/Fusion.Resources.Functions/Fusion.Resources.Functions.csproj index 884d12565..5bc881f71 100644 --- a/src/backend/function/Fusion.Resources.Functions/Fusion.Resources.Functions.csproj +++ b/src/backend/function/Fusion.Resources.Functions/Fusion.Resources.Functions.csproj @@ -5,10 +5,10 @@ <_FunctionsSkipCleanOutput>true - + - - + +