Skip to content

Commit

Permalink
Merge pull request #1051 from DFE-Digital/hotfix/fam-application-form…
Browse files Browse the repository at this point in the history
…-bug

Hotfix/fam application form bug
  • Loading branch information
paullocknimble authored Apr 24, 2024
2 parents 89871ce + d0ad6e0 commit 4a4df25
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public override async Task<IActionResult> OnGetAsync(int id)
return NotFound();
}

// This page should only show for join a mat application forms
if (applicationResponse.Body.ApplicationType is not ("JoinMat" or "joinAMat"))
{
return StatusCode(501);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,62 @@
@{
var id = ViewContext.RouteData.Values["id"];
}

<nav class="moj-sub-navigation" aria-label="Sub navigation">
<ul class="moj-sub-navigation__list govuk-!-margin-top-6">
<li class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.TaskList.Index.Page"
asp-route-id="@id">
Project details
</sub-menu-link>
</li>
<ul class="moj-sub-navigation__list govuk-!-margin-top-6">
<li class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.TaskList.Index.Page"
asp-route-id="@id">
Project details
</sub-menu-link>
</li>

<li if="@Model.IsVoluntary && !Model.IsExternalSchoolApplication" class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.ApplicationForm.Index.Page"
asp-route-id="@id">
School application form
</sub-menu-link>
</li>
<li if="@Model.IsFormAMat;" class="moj-sub-navigation__item">
<li if="@Model.IsVoluntary && !Model.IsExternalSchoolApplication && !Model.IsFormAMat" class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.FormAMat.Index.Page"
asp-page="@Links.ApplicationForm.Index.Page"
asp-route-id="@id">
School application form
</sub-menu-link>
</li>

<li if="@Model.IsSponsored" class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.AnnexB.Index.Page"
asp-route-id="@id">
Annex B form
</sub-menu-link>
</li>
<li if="@Model.IsVoluntary && Model.IsExternalSchoolApplication" class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.ExternalApplicationForm.Index.Page"
asp-route-id="@id">
School application form
</sub-menu-link>
</li>

<li if="@Model.IsFormAMat && !Model.IsExternalSchoolApplication" class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.FormAMat.Index.Page"
asp-route-id="@id">
School application form
</sub-menu-link>
</li>

<li if="@Model.IsSponsored" class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.AnnexB.Index.Page"
asp-route-id="@id">
Annex B form
</sub-menu-link>
</li>

<li class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.Decision.SubMenuRecordADecision.Page"
asp-route-id="@id">
Record a decision
</sub-menu-link>
</li>
<li class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.ProjectNotes.Index.Page"
asp-route-id="@id">
Project notes
</sub-menu-link>
</li>
</ul>

<li class="moj-sub-navigation__item">
<sub-menu-link class="moj-sub-navigation__link"
asp-page="@Links.ProjectNotes.Index.Page"
asp-route-id="@id">
Project notes
</sub-menu-link>
</li>
</ul>
</nav>
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ public ProjectViewModel(AcademyConversionProject project)

public string Id { get; }
public int? FormAMatProjectId { get; }
public bool IsFormAMat { get; }
public string ProjectStatus { get; }
public string ProjectStatusColour { get; }
public string ApplicationReferenceNumber { get; set; }
Expand Down

0 comments on commit 4a4df25

Please sign in to comment.