Skip to content

Commit 942906b

Browse files
authored
Merge pull request #1896 from bcgov/dev
Dev
2 parents 65f76cc + e23a6d8 commit 942906b

125 files changed

Lines changed: 10954 additions & 1182 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Application.Contracts/Scoresheets/ScoresheetSectionDto.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ namespace Unity.Flex.Scoresheets
99
public class ScoresheetSectionDto : ExtensibleEntityDto<Guid>
1010
{
1111
public virtual string Name { get; private set; } = string.Empty;
12-
public virtual uint Order { get; private set; }
13-
public virtual Guid ScoresheetId { get; }
14-
12+
public virtual uint Order { get; private set;} = 0;
13+
public virtual Guid ScoresheetId { get; }
1514
public virtual Collection<QuestionDto> Fields { get; private set; } = [];
16-
17-
1815
}
1916
}

applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Application/Domain/ScoresheetInstances/ScoresheetInstance.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class ScoresheetInstance : FullAuditedAggregateRoot<Guid>, IMultiTenant,
2020

2121
// Correlation
2222
public virtual Guid CorrelationId { get; private set; }
23-
public virtual string CorrelationProvider { get; private set; } = string.Empty;
23+
public virtual string CorrelationProvider { get; private set; }
2424

2525
public Guid? TenantId { get; set; }
2626

applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Application/Domain/Services/WorksheetsManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private async Task<WorksheetInstance> CreateNewWorksheetInstanceAsync(IWorksheet
168168
var newWorksheetInstances = new List<(Worksheet, WorksheetInstance)>();
169169

170170
// naming convention custom_worksheetname_fieldname
171-
foreach (var (fieldName, chefsPropertyName, value) in eventData.CustomFields)
171+
foreach (var (fieldName, _, _) in eventData.CustomFields)
172172
{
173173
var split = fieldName.Split('_', StringSplitOptions.RemoveEmptyEntries);
174174

applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Pages/Components/DataGrid/DataGridServiceUtils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ internal static List<WorksheetFieldViewModel> ExtractCustomColumnsValues(DataGri
4141
CurrentValueId = Guid.Empty,
4242
Definition = GetDefaultDefinition(column.Type),
4343
Enabled = true,
44-
Type = (CustomFieldType)Enum.Parse(typeof(CustomFieldType), column.Type),
44+
Type = Enum.Parse<CustomFieldType>(column.Type),
4545
UiAnchor = string.Empty,
4646
Order = rowNumber
4747
});
@@ -52,7 +52,7 @@ internal static List<WorksheetFieldViewModel> ExtractCustomColumnsValues(DataGri
5252

5353
internal static string GetDefaultDefinition(string type)
5454
{
55-
return DefinitionResolver.Resolve((CustomFieldType)Enum.Parse(typeof(CustomFieldType), type), null);
55+
return DefinitionResolver.Resolve(Enum.Parse<CustomFieldType>(type), null);
5656
}
5757

5858
internal static string? GetCurrentValueAndTransform(DataGridRow? dataRow, DataGridDefinitionColumn column)

applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Pages/ScoresheetConfiguration/QuestionModal.cshtml.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public QuestionModalModel(IQuestionAppService questionAppService, IScoresheetApp
2222
{
2323
_questionAppService = questionAppService;
2424
_scoresheetAppService = scoresheetAppService;
25-
QuestionTypeOptionsList = Enum.GetValues(typeof(QuestionType))
26-
.Cast<QuestionType>()
25+
QuestionTypeOptionsList = Enum.GetValues<QuestionType>()
2726
.Select(qt => new SelectListItem
2827
{
2928
Value = ((int)qt).ToString(),

applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Pages/WorksheetConfiguration/UpsertCustomFieldModal.cshtml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public async Task OnGetAsync(Guid worksheetId, Guid sectionId, Guid fieldId, str
6363
WorksheetId = worksheetId;
6464
SectionId = sectionId;
6565
FieldTypes = GetAvailableFieldTypes();
66-
UpsertAction = (WorksheetUpsertAction)Enum.Parse(typeof(WorksheetUpsertAction), actionType);
66+
UpsertAction = Enum.Parse<WorksheetUpsertAction>(actionType);
6767
FieldType = "Text";
6868

6969
if (UpsertAction == WorksheetUpsertAction.Update)
@@ -118,7 +118,7 @@ private async Task<CustomFieldDto> InsertCustomField()
118118
Definition = ExtractDefinition(),
119119
Label = Label!,
120120
Key = Key!,
121-
Type = (CustomFieldType)Enum.Parse(typeof(CustomFieldType), FieldType!)
121+
Type = Enum.Parse<CustomFieldType>(FieldType!)
122122
});
123123
}
124124

@@ -129,7 +129,7 @@ private async Task<CustomFieldDto> UpdateCustomField()
129129
Definition = ExtractDefinition(),
130130
Label = Label!,
131131
Key = Key!,
132-
Type = (CustomFieldType)Enum.Parse(typeof(CustomFieldType), FieldType!)
132+
Type = Enum.Parse<CustomFieldType>(FieldType!)
133133
});
134134
}
135135

applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Pages/WorksheetConfiguration/UpsertSectionModal.cshtml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public async Task OnGetAsync(Guid worksheetId, Guid sectionId, string actionType
3838
{
3939
WorksheetId = worksheetId;
4040
SectionId = sectionId;
41-
UpsertAction = (WorksheetUpsertAction)Enum.Parse(typeof(WorksheetUpsertAction), actionType);
41+
UpsertAction = Enum.Parse<WorksheetUpsertAction>(actionType);
4242

4343
if (UpsertAction == WorksheetUpsertAction.Update)
4444
{

applications/Unity.GrantManager/modules/Unity.Flex/src/Unity.Flex.Web/Pages/WorksheetConfiguration/UpsertWorksheetModal.cshtml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ public class UpsertWorksheetModalModel(IWorksheetAppService worksheetAppService)
3232

3333
public async Task OnGetAsync(Guid worksheetId, string actionType)
3434
{
35-
UpsertAction = (WorksheetUpsertAction)Enum.Parse(typeof(WorksheetUpsertAction), actionType);
35+
UpsertAction = Enum.Parse<WorksheetUpsertAction>(actionType);
3636

3737
if (UpsertAction == WorksheetUpsertAction.Update)
3838
{
3939
WorksheetDto worksheetDto = await worksheetAppService.GetAsync(worksheetId);
40-
UpsertAction = (WorksheetUpsertAction)Enum.Parse(typeof(WorksheetUpsertAction), actionType);
40+
UpsertAction = Enum.Parse<WorksheetUpsertAction>(actionType);
4141

4242
Name = worksheetDto.Name;
4343
WorksheetId = worksheetDto.Id;
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-

1+
/* BC Address Widget Styles - Placeholder file required by the component structure */
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-

1+
/* Currency Definition Widget Styles - Placeholder file required by the component structure */

0 commit comments

Comments
 (0)