Skip to content

Commit

Permalink
Details reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic NEED authored and Dominic NEED committed Nov 14, 2023
1 parent 1f577e9 commit 9417458
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ public async Task Should_log_warning_when_school_performance_not_found(AcademyCo

public class EstablishmentMockData
{
public MisEstablishmentDto MisEstablishment { get; set; }
public MisEstablishmentResponse MisEstablishment { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ public class AcademisationApplication
public string ApplicationReference { get; set; }
public List<Contributor> Contributors { get; set; }
public JoinTrustDetails JoinTrustDetails { get; set; }
public FormTrustDtos FormTrustDtos { get; set; }
public FormTrustDetails FormTrustDetails { get; set; }

public List<School> Schools { get; set; }

public static Application.Application MapToApplication(AcademisationApplication academisationApplication, string schoolName = null)
{
// Following the fields used by the front end
Application.Application academiesApplication = PopulateOverview(academisationApplication, out School academisationApplicationSchool, out ApplyingSchool academiesApplicationSchool, schoolName);
if(academiesApplication.ApplicationType.Equals(GlobalStrings.FormAMat)) PopulateFormAMatTrustInformation(academiesApplication, academisationApplication);
if (academiesApplication.ApplicationType.Equals(GlobalStrings.FormAMat)) PopulateFormAMatTrustInformation(academiesApplication, academisationApplication);
PopulateSchoolDetails(academiesApplicationSchool, academisationApplicationSchool);
PopulateFurtherInformation(academiesApplicationSchool, academisationApplicationSchool);
PopulateSchoolFinances(academiesApplicationSchool, academisationApplicationSchool);
Expand All @@ -41,29 +41,29 @@ public static Application.Application MapToApplication(AcademisationApplication

private static void PopulateFormAMatTrustInformation(Application.Application academiesApplication, AcademisationApplication academisationApplication)
{
academiesApplication.FormTrustOpeningDate = academisationApplication.FormTrustDtos.FormTrustOpeningDate;
academiesApplication.TrustApproverName = academisationApplication.FormTrustDtos.TrustApproverName;
academiesApplication.TrustApproverEmail = academisationApplication.FormTrustDtos.TrustApproverEmail;
academiesApplication.FormTrustReasonForming = academisationApplication.FormTrustDtos.FormTrustReasonForming;
academiesApplication.FormTrustReasonVision = academisationApplication.FormTrustDtos.FormTrustReasonVision;
academiesApplication.FormTrustReasonGeoAreas = academisationApplication.FormTrustDtos.FormTrustReasonGeoAreas;
academiesApplication.FormTrustReasonFreedom = academisationApplication.FormTrustDtos.FormTrustReasonFreedom;
academiesApplication.FormTrustReasonImproveTeaching = academisationApplication.FormTrustDtos.FormTrustReasonImproveTeaching;
academiesApplication.FormTrustGrowthPlansYesNo = academisationApplication.FormTrustDtos.FormTrustGrowthPlansYesNo;
academiesApplication.FormTrustPlanForGrowth = academisationApplication.FormTrustDtos.FormTrustPlanForGrowth;
academiesApplication.FormTrustPlansForNoGrowth = academisationApplication.FormTrustDtos.FormTrustPlansForNoGrowth;
academiesApplication.FormTrustImprovementSupport = academisationApplication.FormTrustDtos.FormTrustImprovementSupport;
academiesApplication.FormTrustImprovementStrategy = academisationApplication.FormTrustDtos.FormTrustImprovementStrategy;
academiesApplication.FormTrustImprovementApprovedSponsor = academisationApplication.FormTrustDtos.FormTrustImprovementApprovedSponsor;
academiesApplication.KeyPeople = academisationApplication.FormTrustDtos.KeyPeople;
academiesApplication.FormTrustOpeningDate = academisationApplication.FormTrustDetails.FormTrustOpeningDate;
academiesApplication.TrustApproverName = academisationApplication.FormTrustDetails.TrustApproverName;
academiesApplication.TrustApproverEmail = academisationApplication.FormTrustDetails.TrustApproverEmail;
academiesApplication.FormTrustReasonForming = academisationApplication.FormTrustDetails.FormTrustReasonForming;
academiesApplication.FormTrustReasonVision = academisationApplication.FormTrustDetails.FormTrustReasonVision;
academiesApplication.FormTrustReasonGeoAreas = academisationApplication.FormTrustDetails.FormTrustReasonGeoAreas;
academiesApplication.FormTrustReasonFreedom = academisationApplication.FormTrustDetails.FormTrustReasonFreedom;
academiesApplication.FormTrustReasonImproveTeaching = academisationApplication.FormTrustDetails.FormTrustReasonImproveTeaching;
academiesApplication.FormTrustGrowthPlansYesNo = academisationApplication.FormTrustDetails.FormTrustGrowthPlansYesNo;
academiesApplication.FormTrustPlanForGrowth = academisationApplication.FormTrustDetails.FormTrustPlanForGrowth;
academiesApplication.FormTrustPlansForNoGrowth = academisationApplication.FormTrustDetails.FormTrustPlansForNoGrowth;
academiesApplication.FormTrustImprovementSupport = academisationApplication.FormTrustDetails.FormTrustImprovementSupport;
academiesApplication.FormTrustImprovementStrategy = academisationApplication.FormTrustDetails.FormTrustImprovementStrategy;
academiesApplication.FormTrustImprovementApprovedSponsor = academisationApplication.FormTrustDetails.FormTrustImprovementApprovedSponsor;
academiesApplication.KeyPeople = academisationApplication.FormTrustDetails.KeyPeople;

}

public static void PopulateDeclaration(ApplyingSchool academiesApplicationSchool,
School academisationApplicationSchool)
{
academiesApplicationSchool.DeclarationBodyAgree = academisationApplicationSchool.DeclarationBodyAgree;

}

public static void PopulateConsultation(ApplyingSchool academiesApplicationSchool,
Expand Down Expand Up @@ -92,7 +92,7 @@ public static void PopulateLandAndBuildings(ApplyingSchool academiesApplicationS
academisationApplicationSchool.LandAndBuildings.FacilitiesSharedExplained;
academiesApplicationSchool.SchoolBuildLandGrants = academisationApplicationSchool.LandAndBuildings.Grants;
academiesApplicationSchool.SchoolBuildLandGrantsExplained =
academisationApplicationSchool.LandAndBuildings.GrantsAwardingBodies;
academisationApplicationSchool.LandAndBuildings.GrantsAwardingBodies;
academiesApplicationSchool.SchoolBuildLandPFIScheme =
academisationApplicationSchool.LandAndBuildings.PartOfPfiScheme;
academiesApplicationSchool.SchoolBuildLandPFISchemeType =
Expand Down Expand Up @@ -225,31 +225,31 @@ public static void PopulateFurtherInformation(ApplyingSchool academiesApplicatio
// Further Information
academiesApplicationSchool.SchoolAdSchoolContributionToTrust =
academisationApplicationSchool
.TrustBenefitDetails;
academiesApplicationSchool.SchoolAdInspectedButReportNotPublished = !academisationApplicationSchool.OfstedInspectionDetails.IsNullOrEmpty();
.TrustBenefitDetails;
academiesApplicationSchool.SchoolAdInspectedButReportNotPublished = !academisationApplicationSchool.OfstedInspectionDetails.IsNullOrEmpty();
academiesApplicationSchool.SchoolAdInspectedButReportNotPublishedExplain =
academisationApplicationSchool.OfstedInspectionDetails;
academiesApplicationSchool.SchoolOngoingSafeguardingInvestigations =
academisationApplicationSchool.Safeguarding;
academisationApplicationSchool.Safeguarding;
// Questions regarding the below are outstanding
// academiesApplicationSchool.SchoolOngoingSafeguardingDetails = academisationApplicationSchool.SafeguardingDetails;

Check warning on line 235 in Dfe.PrepareConversions/Dfe.PrepareConversions.Data/Models/AcademisationApplication/AcademisationApplication.cs

View workflow job for this annotation

GitHub Actions / build

Remove this commented out code. (https://rules.sonarsource.com/csharp/RSPEC-125)
academiesApplicationSchool.SchoolPartOfLaReorganizationPlan =
!academisationApplicationSchool.LocalAuthorityReorganisationDetails
.IsNullOrEmpty();
.IsNullOrEmpty();
academiesApplicationSchool.SchoolLaReorganizationDetails =
academisationApplicationSchool.LocalAuthorityReorganisationDetails;
academiesApplicationSchool.SchoolPartOfLaClosurePlan =
!academisationApplicationSchool.LocalAuthorityClosurePlanDetails.IsNullOrEmpty();
academiesApplicationSchool.SchoolLaClosurePlanDetails =
academisationApplicationSchool
.LocalAuthorityClosurePlanDetails;
.LocalAuthorityClosurePlanDetails;
academiesApplicationSchool.SchoolFaithSchool =
!academisationApplicationSchool.DioceseName
.IsNullOrEmpty();
.IsNullOrEmpty();
academiesApplicationSchool.SchoolFaithSchoolDioceseName = academisationApplicationSchool.DioceseName;
academiesApplicationSchool.SchoolIsPartOfFederation = academisationApplicationSchool.PartOfFederation;
academiesApplicationSchool.SchoolIsSupportedByFoundation =
!academisationApplicationSchool.FoundationTrustOrBodyName.IsNullOrEmpty();
!academisationApplicationSchool.FoundationTrustOrBodyName.IsNullOrEmpty();
academiesApplicationSchool.SchoolSupportedFoundationBodyName =
academisationApplicationSchool.FoundationTrustOrBodyName;
if (academisationApplicationSchool.ExemptionEndDate is not null)
Expand All @@ -268,9 +268,9 @@ public static void PopulateFurtherInformation(ApplyingSchool academiesApplicatio
_ => string.Empty
};
academiesApplicationSchool.SchoolAdditionalInformationAdded =
!academisationApplicationSchool.FurtherInformation.IsNullOrEmpty();
!academisationApplicationSchool.FurtherInformation.IsNullOrEmpty();
academiesApplicationSchool.SchoolAdditionalInformation =
academisationApplicationSchool.FurtherInformation;
academisationApplicationSchool.FurtherInformation;
}

public static void PopulateSchoolDetails(ApplyingSchool academiesApplicationSchool,
Expand Down Expand Up @@ -328,7 +328,7 @@ public static Application.Application PopulateOverview(AcademisationApplication
academiesApplication.TrustName = academisationApplication.ApplicationType switch
{
GlobalStrings.JoinAMat => academisationApplication.JoinTrustDetails.TrustName,
GlobalStrings.FormAMat => academisationApplication.FormTrustDtos.FormTrustProposedNameOfTrust,
GlobalStrings.FormAMat => academisationApplication.FormTrustDetails.FormTrustProposedNameOfTrust,
_ => academiesApplication.TrustName
};

Expand All @@ -355,8 +355,8 @@ public static Application.Application PopulateOverview(AcademisationApplication
academiesApplication.ChangesToLaGovernanceExplained =
academisationApplication.JoinTrustDetails.ChangesToLaGovernanceExplained;
}


return academiesApplication;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Dfe.PrepareConversions.Data.Models.AcademisationApplication
{
public class FormTrustDtos
public class FormTrustDetails
{
public DateTime? FormTrustOpeningDate { get; set; }
public string? FormTrustProposedNameOfTrust { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class EstablishmentResponse
public string SchoolCapacity { get; set; }
public CensusResponse Census { get; set; }
public NameAndCodeDto ParliamentaryConstituency { get; set; }
public MisEstablishmentDto MISEstablishment { get; set; }
public MisEstablishmentResponse MISEstablishment { get; set; }
public AddressResponse Address { get; set; }
public ViewAcademyConversion ViewAcademyConversion { get; set; }
public string OpenDate { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Dfe.PrepareConversions.Data.Models.Establishment;

public class MisEstablishmentDto
public class MisEstablishmentResponse
{
public string DateOfLatestSection8Inspection { get; set; }
public string InspectionEndDate { get; set; }
Expand Down

0 comments on commit 9417458

Please sign in to comment.