Skip to content

Commit afc0a1e

Browse files
author
Jani Giannoudis
committed
wage type script controller: fixed custom results storage of field periods (source is payroll cluster-set for period results)
case value provider calculation: ensure period end is not on midnight added stored procedure to updated the database statstics (tipping point) updated version to 0.9.0-beta.17
1 parent 5c584fe commit afc0a1e

17 files changed

Lines changed: 118 additions & 23 deletions

Api/Api.Core/AuthenticationConfiguration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class AuthenticationConfiguration
99
public AuthenticationMode Mode { get; set; } = AuthenticationMode.None;
1010

1111
/// <summary>Api key — only used when Mode is ApiKey</summary>
12+
// ReSharper disable once UnusedAutoPropertyAccessor.Global
1213
public string ApiKey { get; set; }
1314

1415
/// <summary>OAuth 2.0 / JWT Bearer settings — only used when Mode is OAuth</summary>

Api/Api.Core/OAuthConfiguration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class OAuthConfiguration
1212
public string Audience { get; set; }
1313

1414
/// <summary>Require HTTPS metadata (default: true)</summary>
15+
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global
1516
public bool RequireHttpsMetadata { get; set; } = true;
1617

1718
/// <summary>OAuth client secret for Swagger UI (Option B: confidential client)</summary>

Api/Api.Core/PayrunJobWorkerService.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ private async Task MarkJobCompletedAsync(PayrunJobQueueItem queueItem, string re
195195
job.ErrorMessage = reason;
196196

197197
var duration = job.JobEnd.Value - job.JobStart;
198-
job.Message = $"Job completed in {duration.ToReadableString()}: {reason}";
198+
var durationText = duration < TimeSpan.FromSeconds(1)
199+
? $"{duration.TotalMicroseconds:2} ms"
200+
: duration.ToReadableString();
201+
job.Message = $"Job completed in {durationText}: {reason}";
199202

200203
await payrunJobRepository.UpdateAsync(dbContext, queueItem.TenantId, job);
201204

Api/Api.Map/LookupRangeBracketMap.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace PayrollEngine.Api.Map;
88
/// Map a domain object with an api object
99
/// </summary>
1010
[Mapper(EnumMappingStrategy = EnumMappingStrategy.ByName, EnumMappingIgnoreCase = true)]
11+
// ReSharper disable once UnusedType.Global
1112
public partial class LookupRangeBracketMap : ApiMapBase<DomainObject.LookupRangeBracket, ApiObject.LookupRangeBracket>
1213
{
1314
public override partial ApiObject.LookupRangeBracket ToApi(DomainObject.LookupRangeBracket domainObject);

Api/Api.Model/PayrollEngine.Api.Model.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="PayrollEngine.Core" Version="0.9.0-beta.16" />
14+
<PackageReference Include="PayrollEngine.Core" Version="0.9.0-beta.17" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

Backend.Server/PayrollEngine.Backend.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="PayrollEngine.Serilog" Version="0.9.0-beta.16" />
17+
<PackageReference Include="PayrollEngine.Serilog" Version="0.9.0-beta.17" />
1818
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.3" />
1919
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
2020
<PackageReference Include="Serilog.Settings.Configuration" Version="10.0.0" />

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net10.0</TargetFramework>
5-
<Version>0.9.0-beta.16</Version>
5+
<Version>0.9.0-beta.17</Version>
66
<FileVersion>0.9.0</FileVersion>
77
<InformationalVersion></InformationalVersion>
88
<Authors>Jani Giannoudis</Authors>

Domain/Domain.Model/PayrollEngine.Domain.Model.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="PayrollEngine.Client.Scripting" Version="0.9.0-beta.16" />
16-
<PackageReference Include="PayrollEngine.Core" Version="0.9.0-beta.16" />
15+
<PackageReference Include="PayrollEngine.Client.Scripting" Version="0.9.0-beta.17" />
16+
<PackageReference Include="PayrollEngine.Core" Version="0.9.0-beta.17" />
1717
</ItemGroup>
1818

1919
</Project>

Domain/Domain.Scripting/Action/ActionReflector.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ private static List<string> GetArrayParameters(SyntaxNode syntaxNode, string arg
254254
var values = new List<string>();
255255
foreach (var arrayValueNode in arrayValueNodes)
256256
{
257-
var value = arrayValueNode.GetText().ToString().Trim();
257+
var value = arrayValueNode.GetText().ToString()?.Trim();
258258
if (!string.IsNullOrWhiteSpace(value))
259259
{
260260
values.Add(value);
@@ -276,7 +276,7 @@ private static string GetElementText(SyntaxNode syntaxNode)
276276
{
277277
return null;
278278
}
279-
var text = syntaxNode.GetText().ToString().Trim('"').Trim();
279+
var text = syntaxNode.GetText().ToString()?.Trim('"').Trim();
280280
return text;
281281
}
282282

Domain/Domain.Scripting/CaseValueProvider.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -651,17 +651,18 @@ private async Task<IList<CaseFieldValue>> GetCasePeriodValuesAsync(string caseFi
651651
// moment: build summary
652652
case CaseFieldTimeType.Moment:
653653
GetMomentCasePeriodValuesAsync(caseFieldName, caseField, valuePeriods, values);
654-
return values;
654+
break;
655655
case CaseFieldTimeType.Period:
656656
// period: use the aggregation type
657657
GetAggregationCasePeriodValuesAsync(caseFieldName, caseField, caseValues, valuePeriods, values);
658-
return values;
658+
break;
659659
case CaseFieldTimeType.CalendarPeriod:
660660
GetCalendarPeriodCasePeriodValuesAsync(caseFieldName, caseField, calculator, valuePeriods, values);
661-
return values;
661+
break;
662662
default:
663663
throw new ArgumentOutOfRangeException();
664664
}
665+
return values.OrderBy(x => x.Start).ToList();
665666
}
666667

667668
/// <summary>

0 commit comments

Comments
 (0)