Skip to content

Commit 829ae7f

Browse files
authored
Remove final DQT references (#2854)
Also fixes up a load of build warnings that have suddenly started appearing.
1 parent 527ce06 commit 829ae7f

File tree

110 files changed

+464
-35858
lines changed

Some content is hidden

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

110 files changed

+464
-35858
lines changed

TeachingRecordSystem/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<UserSecretsId>TeachingRecordSystem</UserSecretsId>
1818
<UserSecretsId Condition="'$(IsTestProject)' == 'true'">TeachingRecordSystemTests</UserSecretsId>
1919

20+
<NoWarn>CA1711;CA1304;CA1310;CA1311;CA2254</NoWarn>
2021
<NoWarn Condition="'$(IsTestProject)' == 'true'">$(NoWarn);CA1707;CA1711;CA1816;TUnit0046;xUnit1051</NoWarn>
2122
</PropertyGroup>
2223

TeachingRecordSystem/Directory.Packages.props

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@
6262
<PackageVersion Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.14.0" />
6363
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
6464
<PackageVersion Include="Microsoft.Playwright" Version="1.55.0" />
65-
<PackageVersion Include="Microsoft.PowerPlatform.Dataverse.Client" Version="1.2.10" />
66-
<PackageVersion Include="Microsoft.PowerPlatform.Dataverse.Client.Dynamics" Version="1.2.10" />
6765
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="1.8.2" />
6866
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" />
6967
<PackageVersion Include="Microsoft.Web.LibraryManager.Build" Version="3.0.71" />
@@ -112,4 +110,4 @@
112110
<PackageVersion Include="xunit.v3.assert" Version="3.2.0" />
113111
<PackageVersion Include="xunit.v3.extensibility.core" Version="3.2.0" />
114112
</ItemGroup>
115-
</Project>
113+
</Project>

TeachingRecordSystem/src/TeachingRecordSystem.Api/V1/Handlers/GetTeacherHandler.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
using TeachingRecordSystem.Api.V1.Requests;
44
using TeachingRecordSystem.Api.V1.Responses;
55
using TeachingRecordSystem.Core.DataStore.Postgres;
6-
using TeachingRecordSystem.Core.Dqt;
7-
using TeachingRecordSystem.Core.Dqt.Models;
86

97
namespace TeachingRecordSystem.Api.V1.Handlers;
108

@@ -17,7 +15,7 @@ public async Task<GetTeacherResponse> Handle(GetTeacherRequest request, Cancella
1715
return null;
1816
}
1917

20-
var birthDate = request.BirthDate.ToDateOnlyWithDqtBstFix(isLocalTime: false)!.Value.ToString("yyyy-MM-dd");
18+
var birthDate = request.BirthDate!.Value.ToString("yyyy-MM-dd");
2119
var nationalInsuranceNumber = NationalInsuranceNumber.Normalize(request.NationalInsuranceNumber);
2220

2321
var matched = await dbContext.Persons.FromSql(
@@ -65,7 +63,7 @@ public async Task<GetTeacherResponse> Handle(GetTeacherRequest request, Cancella
6563
Name = StringHelper.JoinNonEmpty(' ', person.FirstName, person.MiddleName, person.LastName),
6664
DateOfBirth = person.DateOfBirth.ToDateTime(),
6765
ActiveAlert = person.HasOpenAlert,
68-
State = ContactState.Active,
66+
State = 0,
6967
StateName = "Active"
7068
};
7169

@@ -79,7 +77,7 @@ Induction MapInduction()
7977
StartDate = person.InductionStartDate.ToDateTime(),
8078
CompletionDate = person.InductionCompletedDate.ToDateTime(),
8179
InductionStatusName = statusDescription,
82-
State = dfeta_inductionState.Active,
80+
State = 0,
8381
StateName = "Active"
8482
} :
8583
null;
@@ -92,7 +90,7 @@ QualifiedTeacherStatus MapQualifiedTeacherStatus()
9290
return new QualifiedTeacherStatus
9391
{
9492
Name = "",
95-
State = dfeta_qtsregistrationState.Active,
93+
State = 0,
9694
StateName = "Active",
9795
QtsDate = person.QtsDate.ToDateTime()
9896
};
@@ -101,8 +99,4 @@ QualifiedTeacherStatus MapQualifiedTeacherStatus()
10199
return null;
102100
}
103101
}
104-
105-
#pragma warning disable IDE1006 // Naming Styles
106-
private record PersonIdResult(Guid person_id);
107-
#pragma warning restore IDE1006 // Naming Styles
108102
}

TeachingRecordSystem/src/TeachingRecordSystem.Api/V1/Responses/GetTeacherResponse.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#nullable disable
22
using System.Text.Json.Serialization;
3-
using TeachingRecordSystem.Core.Dqt.Models;
43

54
namespace TeachingRecordSystem.Api.V1.Responses;
65

@@ -39,3 +38,8 @@ public class GetTeacherResponse
3938
[JsonPropertyName("state_name")]
4039
public string StateName { get; set; }
4140
}
41+
42+
public enum ContactState
43+
{
44+
Active = 0
45+
}

TeachingRecordSystem/src/TeachingRecordSystem.Api/V1/Responses/Induction.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#nullable disable
22
using System.Text.Json.Serialization;
3-
using TeachingRecordSystem.Core.Dqt.Models;
43

54
namespace TeachingRecordSystem.Api.V1.Responses;
65

@@ -21,3 +20,10 @@ public class Induction
2120
[JsonPropertyName("state_name")]
2221
public string StateName { get; set; }
2322
}
23+
24+
#pragma warning disable CA1707
25+
public enum dfeta_inductionState
26+
#pragma warning restore CA1707
27+
{
28+
Active = 0
29+
}

TeachingRecordSystem/src/TeachingRecordSystem.Api/V1/Responses/InitialTeacherTraining.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#nullable disable
22
using System.Text.Json.Serialization;
3-
using TeachingRecordSystem.Core.Dqt.Models;
43

54
namespace TeachingRecordSystem.Api.V1.Responses;
65

@@ -45,3 +44,10 @@ public class InitialTeacherTraining
4544
[JsonPropertyName("subject3_code")]
4645
public string Subject3Code { get; set; }
4746
}
47+
48+
#pragma warning disable CA1707
49+
public enum dfeta_initialteachertrainingState
50+
#pragma warning restore CA1707
51+
{
52+
Active = 0
53+
}

TeachingRecordSystem/src/TeachingRecordSystem.Api/V1/Responses/QualifiedTeacherStatus.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#nullable disable
22
using System.Text.Json.Serialization;
3-
using TeachingRecordSystem.Core.Dqt.Models;
43

54
namespace TeachingRecordSystem.Api.V1.Responses;
65

@@ -18,3 +17,10 @@ public class QualifiedTeacherStatus
1817
[JsonPropertyName("qts_date")]
1918
public DateTime? QtsDate { get; set; }
2019
}
20+
21+
#pragma warning disable CA1707
22+
public enum dfeta_qtsregistrationState
23+
#pragma warning restore CA1707
24+
{
25+
Active = 0
26+
}
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#nullable disable
2-
using TeachingRecordSystem.Core.Dqt.Models;
32

43
namespace TeachingRecordSystem.Api.V2.ApiModels;
54

@@ -11,14 +10,3 @@ public enum Gender
1110
NotAvailable = 389040002,
1211
NotProvided = 389040001
1312
}
14-
15-
#pragma warning disable CA1707
16-
public static class GenderExtensions
17-
{
18-
public static Contact_GenderCode ConvertToContact_GenderCode(this Gender input) =>
19-
input.ConvertToEnumByValue<Gender, Contact_GenderCode>();
20-
21-
public static bool TryConvertToContact_GenderCode(this Gender input, out Contact_GenderCode result) =>
22-
input.TryConvertToEnumByValue(out result);
23-
}
24-
#pragma warning restore CA1707

TeachingRecordSystem/src/TeachingRecordSystem.Api/V3/Implementation/Dtos/DqtInductionStatus.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using TeachingRecordSystem.Core.Dqt.Models;
2-
31
namespace TeachingRecordSystem.Api.V3.Implementation.Dtos;
42

53
public enum DqtInductionStatus
@@ -17,22 +15,6 @@ public enum DqtInductionStatus
1715

1816
public static class DqtInductionStatusExtensions
1917
{
20-
public static DqtInductionStatus ConvertToDqtInductionStatus(this dfeta_InductionStatus input) => input switch
21-
{
22-
dfeta_InductionStatus.Exempt => DqtInductionStatus.Exempt,
23-
dfeta_InductionStatus.Fail => DqtInductionStatus.Fail,
24-
dfeta_InductionStatus.FailedinWales => DqtInductionStatus.FailedInWales,
25-
dfeta_InductionStatus.InductionExtended => DqtInductionStatus.InductionExtended,
26-
dfeta_InductionStatus.InProgress => DqtInductionStatus.InProgress,
27-
dfeta_InductionStatus.NotYetCompleted => DqtInductionStatus.NotYetCompleted,
28-
dfeta_InductionStatus.Pass => DqtInductionStatus.Pass,
29-
dfeta_InductionStatus.PassedinWales => DqtInductionStatus.PassedInWales,
30-
dfeta_InductionStatus.RequiredtoComplete => DqtInductionStatus.RequiredToComplete,
31-
_ => throw new ArgumentException($"Unknown {nameof(DqtInductionStatus)}: '{input}'.")
32-
};
33-
34-
public static string GetDescription(this dfeta_InductionStatus input) => ConvertToDqtInductionStatus(input).GetDescription();
35-
3618
public static string GetDescription(this DqtInductionStatus input) => input switch
3719
{
3820
DqtInductionStatus.Exempt => "Exempt",

TeachingRecordSystem/src/TeachingRecordSystem.Api/V3/Implementation/Dtos/IttOutcome.cs

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)