Skip to content

Commit

Permalink
Merge pull request #95 from SkillsFundingAgency/CV-613-Add-Html-Attri…
Browse files Browse the repository at this point in the history
…butes-For-Automation

Adds Ids to bing box tags
  • Loading branch information
Najamuddin-Muhammad authored Jan 29, 2020
2 parents cacf5c6 + e0e7d98 commit 2d7d25b
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,23 @@ public async Task<CohortsViewModel> Map(CohortsByAccountRequest source)
CohortsInDraft = new CohortCardLinkViewModel(
cohorts.Count(x => x.GetStatus() == CohortStatus.Draft),
"drafts",
_linkGenerator.CommitmentsV2Link($"{source.AccountHashedId}/unapproved/draft")),
_linkGenerator.CommitmentsV2Link($"{source.AccountHashedId}/unapproved/draft"),
CohortStatus.Draft.ToString()),
CohortsInReview = new CohortCardLinkViewModel(
cohorts.Count(x => x.GetStatus() == CohortStatus.Review),
"ready to review",
_linkGenerator.CommitmentsV2Link($"{source.AccountHashedId}/unapproved/review")),
_linkGenerator.CommitmentsV2Link($"{source.AccountHashedId}/unapproved/review"),
CohortStatus.Review.ToString()),
CohortsWithTrainingProvider = new CohortCardLinkViewModel(
cohorts.Count(x => x.GetStatus() == CohortStatus.WithProvider),
"with training providers",
_linkGenerator.CommitmentsV2Link($"{source.AccountHashedId}/unapproved/with-training-provider")),
_linkGenerator.CommitmentsV2Link($"{source.AccountHashedId}/unapproved/with-training-provider"),
CohortStatus.WithProvider.ToString()),
CohortsWithTransferSender = new CohortCardLinkViewModel(
cohorts.Count(x => x.GetStatus() == CohortStatus.WithTransferSender),
"with transfer sending employers",
_linkGenerator.CommitmentsV2Link($"{source.AccountHashedId}/unapproved/with-transfer-sender")),
_linkGenerator.CommitmentsV2Link($"{source.AccountHashedId}/unapproved/with-transfer-sender"),
CohortStatus.WithTransferSender.ToString()),

BackLink = _linkGenerator.CommitmentsV2Link($"{source.AccountHashedId}")
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ public class CohortCardLinkViewModel
public int Count { get; set; }
public string Description { get; set; }
public string Url { get; set; }
public string LinkId { get; set; }

public CohortCardLinkViewModel(int count, string description, string url)
public CohortCardLinkViewModel(int count, string description, string url, string linkId)
{
if (count > 0)
{
Url = url;
}
Count = count;
Description = description;
LinkId = linkId;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@foreach (var cohort in Model.Cohorts)
{

<tr class="govuk-table__row">
<tr class="govuk-table__row" data-cohort="@cohort.CohortReference">
<td class="govuk-table__cell" data-label="Training provider">@cohort.ProviderName</td>
<td class="govuk-table__cell" data-label="Reference">@cohort.CohortReference</td>
<td class="govuk-table__cell govuk-table__cell--numeric" data-label="Number of apprentices">@cohort.NumberOfApprentices</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@foreach (var cohort in Model.Cohorts)
{

<tr class="govuk-table__row">
<tr class="govuk-table__row" data-cohort="@cohort.CohortReference">
<td class="govuk-table__cell" data-label="Training provider">@cohort.ProviderName</td>
<td class="govuk-table__cell" data-label="Reference">@cohort.CohortReference</td>
<td class="govuk-table__cell govuk-table__cell--numeric" data-label="Number of apprentices">@cohort.NumberOfApprentices</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@

@foreach (var cohort in Model.Cohorts)
{

<tr class="govuk-table__row">
<tr class="govuk-table__row" data-cohort="@cohort.CohortReference">
<td class="govuk-table__cell" data-label="Training provider">@cohort.ProviderName</td>
<td class="govuk-table__cell" data-label="Reference">@cohort.CohortReference</td>
<td class="govuk-table__cell govuk-table__cell--numeric" data-label="Number of apprentices">@cohort.NumberOfApprentices</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
@foreach (var cohort in Model.Cohorts)
{

<tr class="govuk-table__row">
<td class="govuk-table__cell" data-label="Training provider">@cohort.TransferSenderName</td>
<tr class="govuk-table__row" data-cohort="@cohort.CohortReference">
<td class="govuk-table__cell" data-label="Transfer sender">@cohort.TransferSenderName</td>
<td class="govuk-table__cell" data-label="Training provider">@cohort.ProviderName</td>
<td class="govuk-table__cell " data-label="Number of apprentices">@cohort.CohortReference</td>
<td class="govuk-table__cell govuk-table__cell--numeric" data-label="Last Message">@cohort.NumberOfApprentices</td>
<td class="govuk-table__cell " data-label="Reference">@cohort.CohortReference</td>
<td class="govuk-table__cell govuk-table__cell--numeric" data-label="Number of apprentices">@cohort.NumberOfApprentices</td>
<td class="govuk-table__cell" data-label="">
@Html.ActionLink("Details", "Details", "Cohort", new { @Model.AccountHashedId, cohort.CohortReference }, new { @class = "govuk-link cohort-details-link" })
</td>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@model SFA.DAS.EmployerCommitmentsV2.Web.Models.Cohort.CohortCardLinkViewModel

<div class="das-card">
<a class="das-card-link--bingo" href="@Model.Url">
<a id="@Model.LinkId" class="das-card-link--bingo" href="@Model.Url">
<span class="das-card-figure">@Model.Count</span>
<span class="govuk-visually-hidden">cohorts</span>
<span class="das-text-capitalise">@Model.Description</span>
Expand Down

0 comments on commit 2d7d25b

Please sign in to comment.