From 53346e579b8047eeef44f51eb946fec43e5870ee Mon Sep 17 00:00:00 2001 From: JamesPasta Date: Wed, 29 Apr 2026 17:04:35 -0700 Subject: [PATCH 1/7] feature/AB#32815-FixBuildWarnings Co-authored-by: Copilot --- .../Common/KeyValueComponentDefinition.cs | 15 +++++------- .../Configuration/ReportMappingUtils.cs | 24 +++++++++---------- .../UX2/Components/Topbar/Default.cshtml | 1 - .../Applicants/IApplicantAppService.cs | 1 - .../Assessments/AssessmentAppService.cs | 1 - 5 files changed, 18 insertions(+), 24 deletions(-) diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs index 8d27f7a3cc..1f0c7cf0a2 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs @@ -30,17 +30,14 @@ protected enum KeyValueType protected static void ValidateKeysFormat(StringValues keys) { - foreach (var key in keys) + foreach (var key in keys.Where(k => string.IsNullOrWhiteSpace(k))) { - if (string.IsNullOrWhiteSpace(key)) - { - throw new UserFriendlyException("There are empty Keys captured which are required"); - } + throw new UserFriendlyException("There are empty Keys captured which are required"); + } - if (!IsValidInput(key)) - { - throw new UserFriendlyException("The following characters are allowed for Keys: " + validInputPattern); - } + foreach (var key in keys.Where(k => !string.IsNullOrWhiteSpace(k) && !IsValidInput(k))) + { + throw new UserFriendlyException("The following characters are allowed for Keys: " + validInputPattern); } } diff --git a/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs b/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs index 169350689f..878dd022dd 100644 --- a/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs +++ b/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs @@ -316,18 +316,18 @@ internal static ReportColumnsMap CreateNewMap(UpsertReportColumnsMapDto upsertRe // Generate column names for fields without user-provided mappings // For formversion provider, use Key (CHEFS Property Name) as the source; for others, use Label - var autoGeneratedColumnNames = new Dictionary(); - foreach (var field in fieldsMap.Fields) - { - if (!userProvidedMappings.ContainsKey(field.Path)) - { - var columnNameSource = GetDefaultColumnNameSource(field, upsertReportColmnsMapDto.CorrelationProvider); - var sanitizedName = SanitizeColumnName(columnNameSource); - var uniqueName = EnsureUniqueness(sanitizedName, usedColumnNames); - autoGeneratedColumnNames[field.Path] = uniqueName; - usedColumnNames.Add(uniqueName); - } - } + var autoGeneratedColumnNames = fieldsMap.Fields + .Where(field => !userProvidedMappings.ContainsKey(field.Path)) + .ToDictionary( + field => field.Path, + field => { + var columnNameSource = GetDefaultColumnNameSource(field, upsertReportColmnsMapDto.CorrelationProvider); + var sanitizedName = SanitizeColumnName(columnNameSource); + var uniqueName = EnsureUniqueness(sanitizedName, usedColumnNames); + usedColumnNames.Add(uniqueName); + return uniqueName; + } + ); // Create mapping rows var mapRows = fieldsMap.Fields.Select(field => diff --git a/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml b/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml index 29f143e884..e9cc126ee8 100644 --- a/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml +++ b/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml @@ -33,7 +33,6 @@ if (CurrentUser.IsAuthenticated && CurrentUser.FindClaimValue("has_multiple_tenants") == "true") isAuthorizedForTenantSwitch = true; - bool isAuthorizedForPaymentConfiguration = await PermissionChecker.IsGrantedAsync("SettingManagement.ConfigurePayments"); } diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs index 700c775081..5bd565e22d 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; -using Unity.GrantManager.Applications; using Unity.GrantManager.GrantApplications; using Unity.GrantManager.Intakes; using Unity.Modules.Shared; diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs index 09d14f365a..3d5f32fffc 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs @@ -11,7 +11,6 @@ using Unity.Flex.Scoresheets.Enums; using Unity.Flex.Scoresheets.Events; using Unity.Flex.Worksheets.Definitions; -using Unity.GrantManager.Applications; using Unity.GrantManager.Comments; using Unity.GrantManager.Exceptions; using Unity.GrantManager.Workflow; From 9a2225d281bef5972862c2ff51882181c3f3890d Mon Sep 17 00:00:00 2001 From: James Pasta <129337673+JamesPasta@users.noreply.github.com> Date: Thu, 30 Apr 2026 09:50:43 -0700 Subject: [PATCH 2/7] Revert "feature/AB#32815-FixBuildWarnings" --- .../Common/KeyValueComponentDefinition.cs | 15 +++++++----- .../Configuration/ReportMappingUtils.cs | 24 +++++++++---------- .../UX2/Components/Topbar/Default.cshtml | 1 + .../Applicants/IApplicantAppService.cs | 1 + .../Assessments/AssessmentAppService.cs | 1 + 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs index 1f0c7cf0a2..8d27f7a3cc 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs @@ -30,14 +30,17 @@ protected enum KeyValueType protected static void ValidateKeysFormat(StringValues keys) { - foreach (var key in keys.Where(k => string.IsNullOrWhiteSpace(k))) + foreach (var key in keys) { - throw new UserFriendlyException("There are empty Keys captured which are required"); - } + if (string.IsNullOrWhiteSpace(key)) + { + throw new UserFriendlyException("There are empty Keys captured which are required"); + } - foreach (var key in keys.Where(k => !string.IsNullOrWhiteSpace(k) && !IsValidInput(k))) - { - throw new UserFriendlyException("The following characters are allowed for Keys: " + validInputPattern); + if (!IsValidInput(key)) + { + throw new UserFriendlyException("The following characters are allowed for Keys: " + validInputPattern); + } } } diff --git a/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs b/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs index 878dd022dd..169350689f 100644 --- a/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs +++ b/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs @@ -316,18 +316,18 @@ internal static ReportColumnsMap CreateNewMap(UpsertReportColumnsMapDto upsertRe // Generate column names for fields without user-provided mappings // For formversion provider, use Key (CHEFS Property Name) as the source; for others, use Label - var autoGeneratedColumnNames = fieldsMap.Fields - .Where(field => !userProvidedMappings.ContainsKey(field.Path)) - .ToDictionary( - field => field.Path, - field => { - var columnNameSource = GetDefaultColumnNameSource(field, upsertReportColmnsMapDto.CorrelationProvider); - var sanitizedName = SanitizeColumnName(columnNameSource); - var uniqueName = EnsureUniqueness(sanitizedName, usedColumnNames); - usedColumnNames.Add(uniqueName); - return uniqueName; - } - ); + var autoGeneratedColumnNames = new Dictionary(); + foreach (var field in fieldsMap.Fields) + { + if (!userProvidedMappings.ContainsKey(field.Path)) + { + var columnNameSource = GetDefaultColumnNameSource(field, upsertReportColmnsMapDto.CorrelationProvider); + var sanitizedName = SanitizeColumnName(columnNameSource); + var uniqueName = EnsureUniqueness(sanitizedName, usedColumnNames); + autoGeneratedColumnNames[field.Path] = uniqueName; + usedColumnNames.Add(uniqueName); + } + } // Create mapping rows var mapRows = fieldsMap.Fields.Select(field => diff --git a/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml b/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml index e9cc126ee8..29f143e884 100644 --- a/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml +++ b/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml @@ -33,6 +33,7 @@ if (CurrentUser.IsAuthenticated && CurrentUser.FindClaimValue("has_multiple_tenants") == "true") isAuthorizedForTenantSwitch = true; + bool isAuthorizedForPaymentConfiguration = await PermissionChecker.IsGrantedAsync("SettingManagement.ConfigurePayments"); } diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs index 5bd565e22d..700c775081 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; +using Unity.GrantManager.Applications; using Unity.GrantManager.GrantApplications; using Unity.GrantManager.Intakes; using Unity.Modules.Shared; diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs index 3d5f32fffc..09d14f365a 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs @@ -11,6 +11,7 @@ using Unity.Flex.Scoresheets.Enums; using Unity.Flex.Scoresheets.Events; using Unity.Flex.Worksheets.Definitions; +using Unity.GrantManager.Applications; using Unity.GrantManager.Comments; using Unity.GrantManager.Exceptions; using Unity.GrantManager.Workflow; From 327c6dab69416cc9223b57f3df93c0d2d977e059 Mon Sep 17 00:00:00 2001 From: JamesPasta Date: Thu, 30 Apr 2026 10:47:04 -0700 Subject: [PATCH 3/7] feature/AB#32815-FixBuildWarnings --- .../Applicants/IApplicantAppService.cs | 4 ++-- .../Assessments/AssessmentAppService.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs index 5bd565e22d..396be48bce 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs @@ -1,5 +1,5 @@ -using System; -using System.Collections.Generic; +using Unity.GrantManager.Applications; +using System; using System.Text.Json; using System.Threading.Tasks; using Unity.GrantManager.GrantApplications; diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs index 3d5f32fffc..b3459df016 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Authorization; +using Unity.GrantManager.Applications; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization.Infrastructure; using System; using System.Collections.Generic; From 1c5def2b79285bf596be65f56fd486133bc8c383 Mon Sep 17 00:00:00 2001 From: JamesPasta Date: Thu, 30 Apr 2026 11:30:18 -0700 Subject: [PATCH 4/7] bugfix/AB#32825-SupplierAddress --- .../Integrations/Cas/SupplierService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/Unity.GrantManager/modules/Unity.Payments/src/Unity.Payments.Application/Integrations/Cas/SupplierService.cs b/applications/Unity.GrantManager/modules/Unity.Payments/src/Unity.Payments.Application/Integrations/Cas/SupplierService.cs index 761ee71632..23147665c9 100644 --- a/applications/Unity.GrantManager/modules/Unity.Payments/src/Unity.Payments.Application/Integrations/Cas/SupplierService.cs +++ b/applications/Unity.GrantManager/modules/Unity.Payments/src/Unity.Payments.Application/Integrations/Cas/SupplierService.cs @@ -188,7 +188,7 @@ public static SiteEto GetSiteEto(JsonElement site) SupplierSiteCode = GetJsonProperty("suppliersitecode", site), AddressLine1 = GetJsonProperty("addressline1", site), AddressLine2 = GetJsonProperty("addressline2", site), - AddressLine3 = GetJsonProperty("addressline2", site), + AddressLine3 = GetJsonProperty("addressline3", site), City = GetJsonProperty("city", site), Province = GetJsonProperty("province", site), Country = GetJsonProperty("country", site), From 00598c444f1359384a3801a157802a08d9707e0c Mon Sep 17 00:00:00 2001 From: JamesPasta Date: Thu, 30 Apr 2026 12:34:03 -0700 Subject: [PATCH 5/7] feature/AB#32815-FixBuildWarnings Co-authored-by: Copilot --- .../Common/KeyValueComponentDefinition.cs | 7 ++----- .../Configuration/FormMetadataService.cs | 17 +++++++---------- .../DataGenerators/ReportingDataGenerator.cs | 7 ++----- .../ApplicantContactsController.cs | 2 ++ 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs index 1f0c7cf0a2..caaefbc908 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs @@ -65,12 +65,9 @@ protected static void ValidateInputCounts(StringValues keys, StringValues labels protected static void ValidateValuesFormat(StringValues values, KeyValueType type) { - foreach (var key in values) + foreach (var key in values.Where(k => !IsValidInput(k ?? string.Empty))) { - if (!IsValidInput(key ?? string.Empty)) - { - throw new UserFriendlyException($"The following characters are allowed for {type}: " + validInputPattern); - } + throw new UserFriendlyException($"The following characters are allowed for {type}: " + validInputPattern); } } diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Reporting/Configuration/FormMetadataService.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Reporting/Configuration/FormMetadataService.cs index 8621683fe6..5f2600d744 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Reporting/Configuration/FormMetadataService.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Reporting/Configuration/FormMetadataService.cs @@ -174,18 +174,15 @@ private static void UniqueifyPaths(List components hasDuplicates = false; // Second pass: prefix duplicate paths with (DKx) - foreach (var component in componentsList) + foreach (var component in componentsList.Where(c => !string.IsNullOrEmpty(c.Path) && pathCounts.GetValueOrDefault(c.Path, 0) > 1)) { - if (!string.IsNullOrEmpty(component.Path) && pathCounts.GetValueOrDefault(component.Path, 0) > 1) - { - // Get the current counter for this path - pathCounters[component.Path] = pathCounters.GetValueOrDefault(component.Path, 0) + 1; - int duplicateNumber = pathCounters[component.Path]; + // Get the current counter for this path + pathCounters[component.Path] = pathCounters.GetValueOrDefault(component.Path, 0) + 1; + int duplicateNumber = pathCounters[component.Path]; - // Prefix with (DKx) where x is the duplicate number - component.Path = $"(DK{duplicateNumber}){component.Path}"; - hasDuplicates = true; - } + // Prefix with (DKx) where x is the duplicate number + component.Path = $"(DK{duplicateNumber}){component.Path}"; + hasDuplicates = true; } } diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Reporting/DataGenerators/ReportingDataGenerator.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Reporting/DataGenerators/ReportingDataGenerator.cs index 587507635c..c468f4b42c 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Reporting/DataGenerators/ReportingDataGenerator.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Reporting/DataGenerators/ReportingDataGenerator.cs @@ -33,12 +33,9 @@ public class ReportingDataGenerator : ApplicationService, IReportingDataGenerato ScanNode(dataNode, keysToTrack, reportResult); // Ensure all keys are present in the result, even if no matches were found - foreach (var key in keysToTrack) + foreach (var key in keysToTrack.Where(k => !reportResult.ContainsKey(k))) { - if (!reportResult.ContainsKey(key)) - { - reportResult[key] = []; - } + reportResult[key] = []; } // Clean up the JSON strings diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantContacts/ApplicantContactsController.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantContacts/ApplicantContactsController.cs index 04ec4cd11d..1e030c1977 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantContacts/ApplicantContactsController.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantContacts/ApplicantContactsController.cs @@ -12,6 +12,8 @@ public class ApplicantContactsController : AbpController [Route("Refresh")] public async Task Refresh(Guid applicantId) { + if (!ModelState.IsValid) return BadRequest(); + await Task.CompletedTask; return ViewComponent("ApplicantContacts", new { applicantId }); From ce00ef07856a33280f19a576b2812847fdb7891f Mon Sep 17 00:00:00 2001 From: JamesPasta Date: Thu, 30 Apr 2026 12:56:46 -0700 Subject: [PATCH 6/7] feature/AB#32815-FixBuildWarnings --- .../Assessments/AssessmentAppService.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs index b3459df016..6012a3f7e8 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs @@ -23,7 +23,6 @@ using Volo.Abp.EventBus.Local; using Volo.Abp.Features; using Volo.Abp.Identity.Integration; -using Volo.Abp.Settings; using Volo.Abp.Users; using Volo.Abp.Validation; From 6383df5c4c35f57ee45ffb58b727170253956871 Mon Sep 17 00:00:00 2001 From: JamesPasta Date: Thu, 30 Apr 2026 13:06:23 -0700 Subject: [PATCH 7/7] feature/AB#32815-FixBuildWarnings Co-authored-by: Copilot --- .../Common/KeyValueComponentDefinition.cs | 2 +- .../Configuration/ReportMappingUtils.cs | 15 ++++++--------- .../Themes/UX2/Components/Topbar/Default.cshtml | 2 -- .../Applicants/IApplicantAppService.cs | 1 - .../Assessments/AssessmentAppService.cs | 1 - 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs index d6e26d8d4a..9d16afe3db 100644 --- a/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs +++ b/applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Views/Shared/Components/Common/KeyValueComponentDefinition.cs @@ -68,7 +68,7 @@ protected static void ValidateInputCounts(StringValues keys, StringValues labels protected static void ValidateValuesFormat(StringValues values, KeyValueType type) { - foreach (var key in values.Where(k => !IsValidInput(k ?? string.Empty))) + if (values.Any(k => !IsValidInput(k ?? string.Empty))) { throw new UserFriendlyException($"The following characters are allowed for {type}: " + validInputPattern); } diff --git a/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs b/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs index 169350689f..6c36736706 100644 --- a/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs +++ b/applications/Unity.GrantManager/modules/Unity.Reporting/src/Unity.Reporting.Application/Configuration/ReportMappingUtils.cs @@ -317,16 +317,13 @@ internal static ReportColumnsMap CreateNewMap(UpsertReportColumnsMapDto upsertRe // Generate column names for fields without user-provided mappings // For formversion provider, use Key (CHEFS Property Name) as the source; for others, use Label var autoGeneratedColumnNames = new Dictionary(); - foreach (var field in fieldsMap.Fields) + foreach (var field in fieldsMap.Fields.Where(f => !userProvidedMappings.ContainsKey(f.Path))) { - if (!userProvidedMappings.ContainsKey(field.Path)) - { - var columnNameSource = GetDefaultColumnNameSource(field, upsertReportColmnsMapDto.CorrelationProvider); - var sanitizedName = SanitizeColumnName(columnNameSource); - var uniqueName = EnsureUniqueness(sanitizedName, usedColumnNames); - autoGeneratedColumnNames[field.Path] = uniqueName; - usedColumnNames.Add(uniqueName); - } + var columnNameSource = GetDefaultColumnNameSource(field, upsertReportColmnsMapDto.CorrelationProvider); + var sanitizedName = SanitizeColumnName(columnNameSource); + var uniqueName = EnsureUniqueness(sanitizedName, usedColumnNames); + autoGeneratedColumnNames[field.Path] = uniqueName; + usedColumnNames.Add(uniqueName); } // Create mapping rows diff --git a/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml b/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml index 29f143e884..a0178963b9 100644 --- a/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml +++ b/applications/Unity.GrantManager/modules/Unity.Theme.UX2/src/Unity.Theme.UX2/Themes/UX2/Components/Topbar/Default.cshtml @@ -32,8 +32,6 @@ bool isAuthorizedForTenantSwitch = false; if (CurrentUser.IsAuthenticated && CurrentUser.FindClaimValue("has_multiple_tenants") == "true") isAuthorizedForTenantSwitch = true; - - bool isAuthorizedForPaymentConfiguration = await PermissionChecker.IsGrantedAsync("SettingManagement.ConfigurePayments"); } diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs index 97a608ef09..396be48bce 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs @@ -2,7 +2,6 @@ using System; using System.Text.Json; using System.Threading.Tasks; -using Unity.GrantManager.Applications; using Unity.GrantManager.GrantApplications; using Unity.GrantManager.Intakes; using Unity.Modules.Shared; diff --git a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs index 586b695e70..6012a3f7e8 100644 --- a/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs +++ b/applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs @@ -12,7 +12,6 @@ using Unity.Flex.Scoresheets.Enums; using Unity.Flex.Scoresheets.Events; using Unity.Flex.Worksheets.Definitions; -using Unity.GrantManager.Applications; using Unity.GrantManager.Comments; using Unity.GrantManager.Exceptions; using Unity.GrantManager.Workflow;