diff --git a/Dfe.Academies.Api.Infrastructure/Dfe.Academies.Infrastructure.csproj b/Dfe.Academies.Api.Infrastructure/Dfe.Academies.Infrastructure.csproj index 27e0d4c1f..a7cfc8198 100644 --- a/Dfe.Academies.Api.Infrastructure/Dfe.Academies.Infrastructure.csproj +++ b/Dfe.Academies.Api.Infrastructure/Dfe.Academies.Infrastructure.csproj @@ -8,7 +8,7 @@ - + all diff --git a/Dfe.Academies.Api.Infrastructure/Repositories/EstablishmentRepository.cs b/Dfe.Academies.Api.Infrastructure/Repositories/EstablishmentRepository.cs index 15ebc279e..95e54dabd 100644 --- a/Dfe.Academies.Api.Infrastructure/Repositories/EstablishmentRepository.cs +++ b/Dfe.Academies.Api.Infrastructure/Repositories/EstablishmentRepository.cs @@ -71,7 +71,7 @@ public async Task> GetByTrust(long? trustId, CancellationTok .ToListAsync(cancellationToken) .ConfigureAwait(false); - var establishments = await DefaultIncludes() + var establishments = await DefaultIncludes().AsNoTracking() .Where(e => establishmentIds.Contains(e.SK)) .ToListAsync(cancellationToken) .ConfigureAwait(false); diff --git a/Dfe.Academies.Application.Tests/Queries/Establishment/EstablishmentQueriesTests.cs b/Dfe.Academies.Application.Tests/Queries/Establishment/EstablishmentQueriesTests.cs index eec84a79e..8e2da3033 100644 --- a/Dfe.Academies.Application.Tests/Queries/Establishment/EstablishmentQueriesTests.cs +++ b/Dfe.Academies.Application.Tests/Queries/Establishment/EstablishmentQueriesTests.cs @@ -198,8 +198,8 @@ private bool HasMappedCorrectly(EstablishmentDto dto, Domain.Establishment.Estab dto.Census.NumberOfPupils == establishment.NumberOfPupils && dto.Census.PercentageFsm == establishment.PercentageFSM && - dto.MISEstablishment.DateOfLatestSection8Inspection == establishment.DateOfLatestShortInspection?.ToString(new CultureInfo("en-GB")) && - dto.MISEstablishment.InspectionEndDate == establishment.InspectionEndDate?.ToString(new CultureInfo("en-GB")) && + dto.MISEstablishment.DateOfLatestSection8Inspection == establishment.DateOfLatestShortInspection?.ToString("d", new CultureInfo("en-GB")) && + dto.MISEstablishment.InspectionEndDate == establishment.InspectionEndDate?.ToString("d", new CultureInfo("en-GB")) && dto.MISEstablishment.OverallEffectiveness == establishment.OverallEffectiveness?.ToString() && dto.MISEstablishment.QualityOfEducation == establishment.QualityOfEducation?.ToString() && dto.MISEstablishment.BehaviourAndAttitudes == establishment.BehaviourAndAttitudes?.ToString() && diff --git a/Dfe.Academies.Application/Builders/EstablishmentDtoBuilder.cs b/Dfe.Academies.Application/Builders/EstablishmentDtoBuilder.cs index c4142d50e..cf83004cb 100644 --- a/Dfe.Academies.Application/Builders/EstablishmentDtoBuilder.cs +++ b/Dfe.Academies.Application/Builders/EstablishmentDtoBuilder.cs @@ -15,7 +15,7 @@ public EstablishmentDtoBuilder WithBasicDetails(Domain.Establishment.Establishme _dto.Ukprn = establishment?.UKPRN; _dto.NoOfBoys = establishment?.NumberOfBoys.ToString(); _dto.NoOfGirls = establishment?.NumberOfGirls.ToString(); - _dto.GiasLastChangedDate = establishment?.GiasLastChangedDate?.ToString(new CultureInfo("en-GB")); + _dto.GiasLastChangedDate = establishment?.GiasLastChangedDate?.ToString("d", new CultureInfo("en-GB")); _dto.ReligousEthos = establishment?.ReligiousEthos; _dto.SenUnitCapacity = establishment?.SenUnitCapacity.ToString(); _dto.SenUnitOnRoll = establishment?.SenUnitOnRoll.ToString(); @@ -32,6 +32,11 @@ public EstablishmentDtoBuilder WithBasicDetails(Domain.Establishment.Establishme _dto.Deficit = establishment?.IfdPipeline?.ProjectTemplateInformationDeficit; _dto.ViabilityIssue = establishment?.IfdPipeline?.ProjectTemplateInformationViabilityIssue; + _dto.HeadteacherTitle = establishment.HeadTitle; + _dto.HeadteacherFirstName = establishment.HeadFirstName; + _dto.HeadteacherLastName = establishment.HeadLastName; + _dto.HeadteacherPreferredJobTitle = establishment.HeadPreferredJobTitle; + return this; } @@ -150,8 +155,8 @@ public EstablishmentDtoBuilder WithMISEstablishment(Domain.Establishment.Establi { _dto.MISEstablishment = new MisEstablishmentDto { - DateOfLatestSection8Inspection = establishment?.DateOfLatestShortInspection?.ToString(new CultureInfo("en-GB")), - InspectionEndDate = establishment?.InspectionEndDate?.ToString(new CultureInfo("en-GB")), + DateOfLatestSection8Inspection = establishment?.DateOfLatestShortInspection?.ToString("d", new CultureInfo("en-GB")), + InspectionEndDate = establishment?.InspectionEndDate?.ToString("d", new CultureInfo("en-GB")), OverallEffectiveness = establishment?.OverallEffectiveness?.ToString(), QualityOfEducation = establishment?.QualityOfEducation?.ToString(), BehaviourAndAttitudes = establishment?.BehaviourAndAttitudes?.ToString(), diff --git a/Dfe.Academies.Application/Dfe.Academies.Application.csproj b/Dfe.Academies.Application/Dfe.Academies.Application.csproj index 8ce43b59c..8c7ed8db3 100644 --- a/Dfe.Academies.Application/Dfe.Academies.Application.csproj +++ b/Dfe.Academies.Application/Dfe.Academies.Application.csproj @@ -7,7 +7,7 @@ - + diff --git a/Dfe.Academies.Domain/Dfe.Academies.Domain.csproj b/Dfe.Academies.Domain/Dfe.Academies.Domain.csproj index faddd9152..42e9b7ad5 100644 --- a/Dfe.Academies.Domain/Dfe.Academies.Domain.csproj +++ b/Dfe.Academies.Domain/Dfe.Academies.Domain.csproj @@ -7,7 +7,7 @@ - + diff --git a/TramsDataApi.Test/TramsDataApi.Test.csproj b/TramsDataApi.Test/TramsDataApi.Test.csproj index 79e0bea71..cfd7e737b 100644 --- a/TramsDataApi.Test/TramsDataApi.Test.csproj +++ b/TramsDataApi.Test/TramsDataApi.Test.csproj @@ -16,7 +16,7 @@ - + diff --git a/TramsDataApi/TramsDataApi.csproj b/TramsDataApi/TramsDataApi.csproj index bdbadae54..c29e8d156 100644 --- a/TramsDataApi/TramsDataApi.csproj +++ b/TramsDataApi/TramsDataApi.csproj @@ -6,7 +6,7 @@ - +