Skip to content

Commit 1464781

Browse files
author
Jani Giannoudis
committed
added culture to case-value, collector, wage-type and all payroll results
build case: refactored init of case field values emplyee: added delete including db-sp new app setting AuditTrailDisabled to disable the audit trail object creation (default=false) new app setting DumpCompilerSources to dump the compiler source files (default=false) - expert analysis updated third party nugets updated db-schema to v0.9.3 updated version to 0.9.0-beta.10
1 parent 0f83c3f commit 1464781

File tree

104 files changed

+1550
-10057
lines changed

Some content is hidden

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

104 files changed

+1550
-10057
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,3 +344,4 @@ ASALocalRun/
344344
/**/bin/
345345
/**/obj/
346346
_site
347+
ScriptDump/

Api/Api.Core/ApiFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ internal static void SetupApiServices(IServiceCollection services,
5050
services.AddSingleton<IPayrollCalculatorProvider, DefaultPayrollCalculatorProvider>();
5151

5252
// repositories
53-
ApiRepositoryFactory.SetupApiServices(services);
53+
ApiRepositoryFactory.SetupApiServices(services, configuration);
5454
ApiServiceFactory.SetupApiServices(services, configuration);
5555
}
5656
}

Api/Api.Core/ApiRepositoryFactory.cs

Lines changed: 147 additions & 109 deletions
Large diffs are not rendered by default.

Api/Api.Core/ApiStartupExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using Microsoft.Extensions.Configuration;
1414
using Microsoft.Extensions.DependencyInjection;
1515
using Microsoft.AspNetCore.Server.Kestrel.Core;
16+
using PayrollEngine.Domain.Scripting;
1617
using PayrollEngine.Persistence;
1718
using DomainModel = PayrollEngine.Domain.Model;
1819

@@ -77,6 +78,7 @@ public static IServiceCollection AddApiServices(this IServiceCollection services
7778
{
7879
InitializeScriptCompiler();
7980
}
81+
ScriptCompiler.DumpCompilerSources = serverConfiguration.DumpCompilerSources;
8082

8183
// culture
8284
var cultureName = serverConfiguration.StartupCulture;

Api/Api.Core/PayrollEngine.Api.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<ItemGroup>
1010
<PackageReference Include="Asp.Versioning.Mvc" Version="8.1.0" />
1111
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.4" />
12-
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.3" />
13-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.8" />
12+
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.4" />
13+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.9" />
1414
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
1515
</ItemGroup>
1616

Api/Api.Core/PayrollServerConfiguration.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@ public class PayrollServerConfiguration
1616
/// <summary>Culture at start (default: os working culture)</summary>
1717
public string StartupCulture { get; set; }
1818

19+
/// <summary>Disable the audit trail (default: false)</summary>
20+
public bool AuditTrailDisabled { get; set; }
21+
1922
/// <summary>Log http request (default: false)</summary>
2023
public bool LogHttpRequests { get; set; }
2124

2225
/// <summary>Initialize the script compiler to reduce first execution time (default: false)</summary>
2326
public bool InitializeScriptCompiler { get; set; }
2427

28+
/// <summary>Dump compiler source files (default: false)</summary>
29+
public bool DumpCompilerSources { get; set; }
30+
2531
/// <summary>Database command timeout in seconds (default: 2 minutes)</summary>
2632
public TimeSpan DbCommandTimeout { get; set; } = TimeSpan.FromMinutes(2);
2733

Api/Api.Model/CaseValue.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ public class CaseValue : ApiObjectBase
7070
/// </summary>
7171
public decimal? NumericValue { get; set; }
7272

73+
/// <summary>
74+
/// The case field culture name based on RFC 4646
75+
/// </summary>
76+
public string Culture { get; set; }
77+
7378
/// <summary>
7479
/// The case relation
7580
/// </summary>

Api/Api.Model/Collector.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public class Collector : ApiObjectBase
4141
/// </summary>
4242
public ValueType ValueType { get; set; }
4343

44+
/// <summary>
45+
/// The collector culture name based on RFC 4646
46+
/// </summary>
47+
public string Culture { get; set; }
48+
4449
/// <summary>
4550
/// Associated collector groups
4651
/// </summary>

Api/Api.Model/CollectorAudit.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ public class CollectorAudit : ApiObjectBase
4545
/// </summary>
4646
public ValueType ValueType { get; set; }
4747

48+
/// <summary>
49+
/// The collector culture name based on RFC 4646
50+
/// </summary>
51+
public string Culture { get; set; }
52+
4853
/// <summary>
4954
/// Associated collector groups
5055
/// </summary>

Api/Api.Model/CollectorCustomResult.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ public class CollectorCustomResult : ApiObjectBase
4444
[Required]
4545
public decimal Value { get; set; }
4646

47+
/// <summary>
48+
/// The collector custom result culture name based on RFC 4646
49+
/// </summary>
50+
public string Culture { get; set; }
51+
4752
/// <summary>
4853
/// The period starting date for the value
4954
/// </summary>

0 commit comments

Comments
 (0)