Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string>();
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 =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
if (CurrentUser.IsAuthenticated && CurrentUser.FindClaimValue("has_multiple_tenants") == "true")
isAuthorizedForTenantSwitch = true;

bool isAuthorizedForPaymentConfiguration = await PermissionChecker.IsGrantedAsync("SettingManagement.ConfigurePayments");
}
<abp-dropdown id="user-dropdown">
<abp-dropdown-button class="btn-dropdown" text="@CurrentTenant.Name" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System;
using System.Text.Json;
using System.Threading.Tasks;
using Unity.GrantManager.Applications;

Check warning on line 5 in applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

The using directive for 'Unity.GrantManager.Applications' appeared previously in this namespace

Check warning on line 5 in applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

The using directive for 'Unity.GrantManager.Applications' appeared previously in this namespace

Check warning on line 5 in applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

The using directive for 'Unity.GrantManager.Applications' appeared previously in this namespace

Check warning on line 5 in applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/IApplicantAppService.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

The using directive for 'Unity.GrantManager.Applications' appeared previously in this namespace
using Unity.GrantManager.GrantApplications;
using Unity.GrantManager.Intakes;
using Unity.Modules.Shared;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Unity.Flex.Scoresheets.Enums;
using Unity.Flex.Scoresheets.Events;
using Unity.Flex.Worksheets.Definitions;
using Unity.GrantManager.Applications;

Check warning on line 15 in applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

The using directive for 'Unity.GrantManager.Applications' appeared previously in this namespace

Check warning on line 15 in applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

The using directive for 'Unity.GrantManager.Applications' appeared previously in this namespace

Check warning on line 15 in applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

The using directive for 'Unity.GrantManager.Applications' appeared previously in this namespace

Check warning on line 15 in applications/Unity.GrantManager/src/Unity.GrantManager.Application/Assessments/AssessmentAppService.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

The using directive for 'Unity.GrantManager.Applications' appeared previously in this namespace
using Unity.GrantManager.Comments;
using Unity.GrantManager.Exceptions;
using Unity.GrantManager.Workflow;
Expand Down
Loading