Skip to content

Commit

Permalink
Merge pull request #870 from SkillsFundingAgency/CON-1294-EmployerMin…
Browse files Browse the repository at this point in the history
…imumWage

CON - 1294 - Employer - Minimum wage changes.
  • Loading branch information
VasanthaKasirajan3008 authored Feb 19, 2020
2 parents e8f546a + 0164f26 commit 97a05e2
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public async Task<WageViewModel> GetWageViewModelAsync(VacancyRouteModel vrm)
WageType = vacancy.Wage?.WageType,
FixedWageYearlyAmount = vacancy.Wage?.FixedWageYearlyAmount?.AsMoney(),
WageAdditionalInformation = vacancy.Wage?.WageAdditionalInformation,
MinimumWageStartFrom = wagePeriod.ValidFrom.ToMonthNameYearString(),
MinimumWageStartFrom = wagePeriod.ValidFrom.ToDayMonthYearString(),
NationalMinimumWageLowerBoundHourly = wagePeriod.NationalMinimumWageLowerBound.ToString("C"),
NationalMinimumWageUpperBoundHourly = wagePeriod.NationalMinimumWageUpperBound.ToString("C"),
NationalMinimumWageYearly = GetMinimumWageYearlyText(SFA.DAS.VacancyServices.Wage.WageType.NationalMinimum, vacancy.Wage?.WeeklyHours, vacancy.StartDate.Value),
Expand Down
12 changes: 6 additions & 6 deletions src/Employer/Employer.Web/Views/Part1/Wage/Wage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<div id="wage-type-national-minimum-wage-panel" class="govuk-radios__conditional govuk-radios__conditional--hidden">
<div class="govuk-form-group">
<p class="govuk-body">
<span class="govuk-hint">As of @Model.MinimumWageStartFrom, National Minimum Wage is set at an hourly rate from @Model.NationalMinimumWageLowerBoundHourly to @Model.NationalMinimumWageUpperBoundHourly depending on the candidate's age.<br><br>
On the vacancy this will be displayed as a yearly figure of @Model.NationalMinimumWageYearly</span>
<span class="govuk-hint">From @Model.MinimumWageStartFrom, National Minimum Wage is between @Model.NationalMinimumWageLowerBoundHourly and @Model.NationalMinimumWageUpperBoundHourly an hour, depending on the candidate's age.<br><br>
On the vacancy, this will be displayed as a yearly wage of @Model.NationalMinimumWageYearly</span>
</p>
</div>
</div>
Expand All @@ -46,8 +46,8 @@
<div class="govuk-form-group">
<p class="govuk-body">
<span class="govuk-hint">
As of @Model.MinimumWageStartFrom, National Minimum Wage for apprentices is set at an hourly rate of @Model.ApprenticeshipMinimumWageHourly.<br><br>
On the vacancy this will be displayed as a yearly figure of @Model.ApprenticeshipMinimumWageYearly
From @Model.MinimumWageStartFrom, the National Minimum Wage for apprentices is @Model.ApprenticeshipMinimumWageHourly an hour.<br><br>
On the vacancy, this will be displayed as a yearly wage of @Model.ApprenticeshipMinimumWageYearly
</span>
</p>
</div>
Expand All @@ -65,8 +65,8 @@
This must be more than the <a href="@externalLinks.Value.NationalMinimumWageRates" rel="noopener" target="_blank" class="govuk-link">National Minimum Wage for apprentices.</a>
</p>
<p class="govuk-body govuk-hint">
As of @Model.MinimumWageStartFrom, National Minimum Wage for apprentices is set at an hourly rate of @Model.ApprenticeshipMinimumWageHourly, Based on working hours of @Model.WeeklyHours hours per week, you will need to set a yearly figure of at least
<span class="govuk-!-font-weight-bold">@Model.ApprenticeshipMinimumWageYearly</span>
From @Model.MinimumWageStartFrom, the National Minimum Wage for apprentices is @Model.ApprenticeshipMinimumWageHourly an hour.<br /><br />
Based on @Model.WeeklyHours working hours a week, you'll need to pay a yearly wage of at least <span class="govuk-!-font-weight-bold">@Model.ApprenticeshipMinimumWageYearly.</span>
</p>
<span esfa-validation-message-for="FixedWageYearlyAmount" class="govuk-error-message"></span>
<input asp-for="FixedWageYearlyAmount" class="govuk-input govuk-!-width-one-quarter" type="text">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async Task<WageViewModel> GetWageViewModelAsync(VacancyRouteModel vrm)
WageType = vacancy.Wage?.WageType,
FixedWageYearlyAmount = vacancy.Wage?.FixedWageYearlyAmount?.AsMoney(),
WageAdditionalInformation = vacancy.Wage?.WageAdditionalInformation,
MinimumWageStartFrom = wagePeriod.ValidFrom.ToMonthNameYearString(),
MinimumWageStartFrom = wagePeriod.ValidFrom.ToDayMonthYearString(),
NationalMinimumWageLowerBoundHourly = wagePeriod.NationalMinimumWageLowerBound.ToString("C"),
NationalMinimumWageUpperBoundHourly = wagePeriod.NationalMinimumWageUpperBound.ToString("C"),
NationalMinimumWageYearly = GetMinimumWageYearlyText(SFA.DAS.VacancyServices.Wage.WageType.NationalMinimum, vacancy.Wage?.WeeklyHours, vacancy.StartDate.Value),
Expand Down
12 changes: 6 additions & 6 deletions src/Provider/Provider.Web/Views/Part1/Wage/Wage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<div class="govuk-form-group">
<p class="govuk-body">
<span class="govuk-hint">
As of @Model.MinimumWageStartFrom, National Minimum Wage is set at an hourly rate from @Model.NationalMinimumWageLowerBoundHourly to @Model.NationalMinimumWageUpperBoundHourly depending on the candidate's age.<br><br>
On the vacancy this will be displayed as a yearly figure of @Model.NationalMinimumWageYearly
From @Model.MinimumWageStartFrom, the National Minimum Wage is between @Model.NationalMinimumWageLowerBoundHourly and @Model.NationalMinimumWageUpperBoundHourly an hour, depending on the candidate's age.<br><br>
On the vacancy this will be displayed as a yearly wage of @Model.NationalMinimumWageYearly
</span>
</p>
</div>
Expand All @@ -43,8 +43,8 @@
<div class="govuk-form-group">
<p class="govuk-body">
<span class="govuk-hint">
As of @Model.MinimumWageStartFrom, National Minimum Wage for apprentices is set at an hourly rate of @Model.ApprenticeshipMinimumWageHourly.<br><br>
On the vacancy this will be displayed as a yearly figure of @Model.ApprenticeshipMinimumWageYearly
From @Model.MinimumWageStartFrom, the National Minimum Wage for apprentices is @Model.ApprenticeshipMinimumWageHourly an hour.<br><br>
On the vacancy, this will be displayed as a yearly wage of @Model.ApprenticeshipMinimumWageYearly.
</span>
</p>
</div>
Expand All @@ -61,8 +61,8 @@
This must be more than the <a href="@externalLinks.Value.NationalMinimumWageRates" rel="noopener" target="_blank" class="govuk-link">National Minimum Wage for apprentices.</a>
</p>
<p class="govuk-body govuk-hint">
As of @Model.MinimumWageStartFrom, National Minimum Wage for apprentices is set at an hourly rate of @Model.ApprenticeshipMinimumWageHourly, Based on working hours of @Model.WeeklyHours hours per week, you will need to set a yearly figure of at least
<span class="govuk-!-font-weight-bold">@Model.ApprenticeshipMinimumWageYearly</span>
From @Model.MinimumWageStartFrom, the National Minimum Wage for apprentices is @Model.ApprenticeshipMinimumWageHourly an hour.<br> <br>
Based on @Model.WeeklyHours working hours a week, you'll need to pay a yearly wage of at least <span class="govuk-!-font-weight-bold">@Model.ApprenticeshipMinimumWageYearly.</span>
</p>
<span esfa-validation-message-for="FixedWageYearlyAmount" class="govuk-error-message"></span>
<input asp-for="FixedWageYearlyAmount" class="govuk-input govuk-!-width-one-quarter" type="text">
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/Recruit.Shared.Web/Recruit.Shared.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
<PackageReference Include="NWebsec.AspNetCore.Mvc.TagHelpers" Version="2.0.0" />
<PackageReference Include="SFA.DAS.VacancyServices.Wage" Version="1.0.5" />
<PackageReference Include="SFA.DAS.VacancyServices.Wage" Version="1.0.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Recruit.Vacancies.Client\Recruit.Vacancies.Client.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}
<div class="@validationSummaryClass govuk-error-summary" role="alert" data-valmsg-summary="true" tabindex="-1">
<h2 class="govuk-error-summary__title">
Please fix these errors
There is a problem
</h2>
<div class="govuk-error-summary__body">
<ul class="govuk-list govuk-error-summary__list">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ internal static IRuleBuilderInitial<Vacancy, Vacancy> FixedWageMustBeGreaterThan

var errorMessage = (vacancy.Status == VacancyStatus.Live) ?
$"National Minimum Wage is changing from {wagePeriod.ValidFrom:d MMM yyyy}. So the fixed wage you entered before will no longer be valid. Change the date to before {wagePeriod.ValidFrom:d MMM yyyy} or to change the wage, create a new vacancy." :
$"The yearly wage must be at least {minimumYearlyWageForApprentices}";
$"Yearly wage must be at least {minimumYearlyWageForApprentices}";

var failure = new ValidationFailure(string.Empty, errorMessage)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public static string ToMonthNameYearString(this DateTime date)
return date.Year == DateTime.MinValue.Year ? "Current" : date.ToString("MMMM yyyy");
}

public static string ToDayMonthYearString(this DateTime date)
{
return date.Year == DateTime.MinValue.Year ? "Current" : date.ToString("d MMMM yyyy");
}

public static string GetShortTimeElapsed(this DateTime? value, DateTime currentTime)
{
if (value == null) return string.Empty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<PackageReference Include="RestSharp" Version="106.6.10" />
<PackageReference Include="SFA.DAS.Account.Api.Client" Version="1.6.1601" />
<PackageReference Include="SFA.DAS.Http" Version="1.2.4" />
<PackageReference Include="SFA.DAS.VacancyServices.Wage" Version="1.0.5" />
<PackageReference Include="SFA.DAS.VacancyServices.Wage" Version="1.0.8" />
<PackageReference Include="SimMetrics.Net" Version="1.0.5" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
<PackageReference Include="FluentValidation" Version="7.5.2" />
Expand Down

0 comments on commit 97a05e2

Please sign in to comment.