-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CON-3951 - Revamped legal agreements page #2211
Merged
narendranogothu
merged 7 commits into
master
from
CON-3951---Revamped-legal-agreements-page
Oct 27, 2021
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5099732
Modified page layout
d5ad34d
Changes for CR
45a12ed
Update WhenIGetOrganisationAgreements.cs
89133e7
Merge branch 'master' into CON-3951---Revamped-legal-agreements-page
db4cf4b
Merge branch 'master' into CON-3951---Revamped-legal-agreements-page
fb7df28
Merge branch 'master' into CON-3951---Revamped-legal-agreements-page
3f875ca
Update SFA.DAS.EmployerAccounts.Web.csproj
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
@using SFA.DAS.EmployerAccounts.Web.Extensions | ||
@using System.Linq | ||
@using SFA.DAS.EmployerAccounts.Web.Extensions | ||
@model OrchestratorResponse<ICollection<OrganisationAgreementViewModel>> | ||
|
||
@{ | ||
|
@@ -8,109 +9,35 @@ | |
ViewBag.Section = "organisations"; | ||
ViewBag.ZenDeskLabel = "eas-your-esfa-agreement"; | ||
ViewBag.GaData.Vpv = "/accounts/agreements/view-your-agreement/agreement-details"; | ||
var tabsCount = 0; | ||
} | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
|
||
<h1 class="govuk-heading-xl"> | ||
Your agreements with the Education and Skills Funding Agency (<abbr>ESFA</abbr>) | ||
</h1> | ||
|
||
<h1 class="govuk-heading-xl">Your agreements with the Education and Skills Funding Agency (<abbr>ESFA</abbr>)</h1> | ||
<h3 class="govuk-heading-l">Agreement ID: @ViewBag.AgreementId</h3> | ||
</div> | ||
</div> | ||
|
||
<div class="govuk-grid-row"> | ||
|
||
<div class="govuk-grid-column-full"> | ||
|
||
<div class="govuk-tabs" data-module="govuk-tabs"> | ||
|
||
<h2 class="govuk-tabs__title"> | ||
By published dates | ||
</h2> | ||
<hr class="govuk-!-margin-top-6 govuk-!-margin-bottom-6"> | ||
|
||
<ul class="govuk-tabs__list"> | ||
@Html.Partial("_AwaitingAcceptance", Model.Data.First(), new ViewDataDictionary { { "Inset", Model.Data.First().Template.InsetText(Model.Data) } }) | ||
|
||
@foreach (var item in Model.Data) | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
<h3 class="govuk-heading-m">Accepted agreements</h3> | ||
@if (Model.Data.Any(agreement => agreement.SignedDate != null)) | ||
{ | ||
<div class="govuk-accordion" data-module="govuk-accordion" id="accordion-default"> | ||
@foreach (var agreement in Model.Data.Where(agreement => agreement.SignedDate != null)) | ||
{ | ||
tabsCount++; | ||
<li class="govuk-tabs__list-item@(tabsCount == 1 ? "" : " govuk-tabs__list-item--selected")"> | ||
<a class="govuk-tabs__tab" href="@item.GetAgreementTabListId"> | ||
@item.Template.PublishedInfo | ||
</a> | ||
</li> | ||
@Html.Partial("_AcceptedAgreement", agreement, new ViewDataDictionary{{"Inset", agreement.Template.InsetText(Model.Data) } }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it worth using some sort of constant rather than hardcoding "Inset" |
||
} | ||
</ul> | ||
@foreach (var item in Model.Data) | ||
{ | ||
<div class="govuk-tabs__panel" id="@item.GetAgreementTabPanelId"> | ||
|
||
@if (item.SignedDate != null) | ||
{ | ||
ViewBag.SelectedTab = @item.Template.VersionNumber; | ||
|
||
<strong class="govuk-tag govuk-tag--green govuk-!-margin-bottom-4"> | ||
Accepted on @item.SignedDateText | ||
</strong> | ||
|
||
ViewBag.BreadCrumbsTrail = @item.AccountLegalEntity.Name; | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
|
||
<h3 class="govuk-heading-l govuk-!-margin-bottom-0"> | ||
Agreement between @item.AccountLegalEntity.Name and <abbr>ESFA</abbr> | ||
</h3> | ||
|
||
<span class="govuk-caption-m govuk-!-margin-bottom-6">@item.Template.PublishedInfo</span> | ||
|
||
@if (@item.Template.InsetText(Model.Data) != string.Empty) | ||
{ | ||
<div class="govuk-inset-text"> | ||
@item.Template.InsetText(Model.Data) | ||
</div> | ||
} | ||
|
||
</div> | ||
</div> | ||
|
||
@Html.Partial("_AcceptedAgreement", item) | ||
} | ||
else | ||
{ | ||
<strong class="govuk-tag govuk-tag--red govuk-!-margin-bottom-4"> | ||
NOT ACCEPTED YET | ||
</strong> | ||
|
||
ViewBag.BreadCrumbsTrail = @item.AccountLegalEntity.Name; | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
|
||
<h3 class="govuk-heading-l"> | ||
Agreement between @item.AccountLegalEntity.Name and <abbr>ESFA</abbr> | ||
</h3> | ||
|
||
<span class="govuk-caption-m govuk-!-margin-bottom-6">@item.Template.PublishedInfo</span> | ||
|
||
@if (@item.Template.InsetText(Model.Data) != string.Empty) | ||
{ | ||
<div class="govuk-inset-text"> | ||
@item.Template.InsetText(Model.Data) | ||
</div> | ||
} | ||
|
||
</div> | ||
</div> | ||
|
||
@Html.Partial("_NotAcceptedAgreement", item) | ||
} | ||
</div> | ||
} | ||
|
||
</div> | ||
</div> | ||
} | ||
else | ||
{ | ||
<h3 class="govuk-heading-s govuk-!-margin-bottom-9">You have no accepted agreements</h3> | ||
} | ||
</div> | ||
</div> | ||
|
||
|
126 changes: 126 additions & 0 deletions
126
src/SFA.DAS.EmployerAccounts.Web/Views/EmployerAgreement/_AcceptedAgreement.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
@model SFA.DAS.EmployerAccounts.Web.ViewModels.OrganisationAgreementViewModel | ||
|
||
<div class="govuk-accordion__section "> | ||
<div class="govuk-accordion__section-header"> | ||
<h2 class="govuk-accordion__section-heading"> | ||
<span class="govuk-accordion__section-button" id="[email protected]"> | ||
@Model.Template.PublishedInfo | ||
</span> | ||
</h2> | ||
<strong class="govuk-tag govuk-tag--green govuk-!-margin-top-3"> | ||
Accepted on @Model.SignedDateText | ||
</strong> | ||
</div> | ||
<div id="[email protected]" class="govuk-accordion__section-content" aria-labelledby="[email protected]"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<span class="govuk-caption-m"> | ||
@Model.Template.PublishedInfo | ||
</span> | ||
<h3 class="govuk-heading-m"> | ||
Agreement between @Model.AccountLegalEntity.Name and <abbr>ESFA</abbr> | ||
</h3> | ||
<div class="govuk-inset-text"> | ||
@ViewData["Inset"] | ||
</div> | ||
<span class="govuk-caption-m"> | ||
This agreement allows you to spend funds for <b>@Model.AccountLegalEntity.Name</b>. | ||
</span> | ||
<hr class=" govuk-!-margin-top-9 govuk-!-margin-bottom-9"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-one-third"> | ||
<p class="govuk-body"> | ||
<b>Parties</b> | ||
</p> | ||
</div> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<p class="govuk-body"> | ||
<i> | ||
<b>The Secretary of State for Education acting through the Education and Skills Funding Agency an executive agency of the Department for Education</b><br> | ||
Cheylesmore House<br> | ||
Quinton Road<br> | ||
Coventry<br> | ||
CV1 2WT | ||
</i> | ||
</p> | ||
@if (Model.OrganisationLookupPossible) | ||
{ | ||
<i> | ||
<p class="govuk-body"> | ||
<b>BARBERRY COVENTRY LIMITED</b><br> | ||
@Html.CommaSeperatedAddressToHtml(@Model.AccountLegalEntity.Address) | ||
|
||
</p> | ||
</i> | ||
<p> | ||
<i> | ||
<a href="@Url.Action("review", "organisation", new | ||
{ | ||
Model.HashedAccountId, | ||
Model.HashedAgreementId, | ||
Model.AccountLegalEntityPublicHashedId | ||
})" class="govuk-link govuk-link--no-visited-state govuk-!-font-size-19">Update these details</a> | ||
</i> | ||
</p> | ||
} | ||
</div> | ||
</div> | ||
<div class="govuk-grid-row govuk-!-margin-top-9 govuk-!-margin-bottom-9"> | ||
<div class="govuk-grid-column-one-third"> | ||
<p class="govuk-body"> | ||
<b>Document</b> | ||
</p> | ||
</div> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-one-third"> | ||
<a href="@Url.EmployerAccountsAction($"agreements/{Model.HashedAgreementId}/view")" aria-hidden="true"> | ||
<img src="/dist/images/pub-cover-html.png" alt="."> | ||
</a> | ||
</div> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<a href="@Url.EmployerAccountsAction($"agreements/{Model.HashedAgreementId}/view")" class="govuk-link">Your <abbr>ESFA</abbr> agreement</a> | ||
<p class="govuk-body">HTML</p> | ||
<p></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<hr class=" govuk-!-margin-top-9 govuk-!-margin-bottom-9"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
<h3 class="govuk-heading-m"> | ||
This agreement has been accepted | ||
</h3> | ||
<table class="govuk-table"> | ||
<thead class="govuk-table__head"> | ||
<tr class="govuk-table__row"> | ||
<th scope="col" class="govuk-table__header">Accepted by:</th> | ||
<td class="govuk-table__cell">@Model.SignedByName</td> | ||
</tr> | ||
</thead> | ||
<tbody class="govuk-table__body"> | ||
<tr class="govuk-table__row"> | ||
<th scope="row" class="govuk-table__header">On behalf of:</th> | ||
<td class="govuk-table__cell">@Model.AccountLegalEntity.Name</td> | ||
</tr> | ||
<tr class="govuk-table__row"> | ||
<th scope="row" class="govuk-table__header">Address: </th> | ||
<td class="govuk-table__cell">@Model.AccountLegalEntity.Address</td> | ||
</tr> | ||
<tr class="govuk-table__row"> | ||
<th scope="row" class="govuk-table__header">Accepted on:</th> | ||
<td class="govuk-table__cell">@Model.SignedDateText</td> | ||
</tr> | ||
<tr class="govuk-table__row"> | ||
<th scope="row" class="govuk-table__header">Agreement ID:</th> | ||
<td class="govuk-table__cell">@Model.AccountLegalEntityPublicHashedId</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
37 changes: 37 additions & 0 deletions
37
src/SFA.DAS.EmployerAccounts.Web/Views/EmployerAgreement/_AwaitingAcceptance.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@model SFA.DAS.EmployerAccounts.Web.ViewModels.OrganisationAgreementViewModel | ||
|
||
@if (Model.SignedDate == null) | ||
{ | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<h2 class="govuk-heading-l">Agreement between @Model.AccountLegalEntity.Name and <abbr>ESFA</abbr></h2> | ||
</div> | ||
</div> | ||
<strong class="govuk-tag govuk-tag--red govuk-!-margin-bottom-3"> | ||
Awaiting acceptance | ||
</strong> | ||
<p class="govuk-body-l"> | ||
@Model.Template.PublishedInfo | ||
</p> | ||
<p></p> | ||
if (ViewData["Inset"] != string.Empty) | ||
{ | ||
<div class="govuk-inset-text"> | ||
@ViewData["Inset"] | ||
</div> | ||
} | ||
<p class="govuk-body"> | ||
This agreement creates a legal contract between @Model.AccountLegalEntity.Name and <abbr>ESFA</abbr>. It allows you to transfer funds to other employers and pay training providers for apprenticeships. | ||
</p> | ||
<p></p> | ||
<p class="govuk-body"> | ||
You need to ensure you have authority from your organisation before you accept this agreement on their behalf. | ||
</p> | ||
|
||
<form method="get" action="@Url.EmployerAccountsAction($"agreements/{Model.HashedAgreementId}/about-your-agreement")"> | ||
@Html.AntiForgeryToken() | ||
<input class="govuk-button" type="submit" value="View agreement" /> | ||
</form> | ||
|
||
<hr class=" govuk-!-margin-top-6 govuk-!-margin-bottom-9"> | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be better to have the "AgreementId" on the model rather than using viewbag?