\ No newline at end of file
diff --git a/src/Employer/Employer.Web/Views/Part1/Part1Complete/Part1Complete.cshtml b/src/Employer/Employer.Web/Views/Part1/Part1Complete/Part1Complete.cshtml
index 8f818b01bb..63617aad2d 100644
--- a/src/Employer/Employer.Web/Views/Part1/Part1Complete/Part1Complete.cshtml
+++ b/src/Employer/Employer.Web/Views/Part1/Part1Complete/Part1Complete.cshtml
@@ -9,16 +9,16 @@
- Review the details that will appear in your vacancy. Once this is approved it will appear on
- find an apprentice service (opens in new tab).
+ Review the details that will appear in your advert. You can still make changes if you need to.
- For example bonus schemes, performance increases or benefits
+ For example, bonus schemes, performance increases or benefits250
@@ -95,8 +95,10 @@
- Cancel
- Cancel
+
\ No newline at end of file
diff --git a/src/Shared/Recruit.Shared.Web/ViewModels/ValidationMessages.cs b/src/Shared/Recruit.Shared.Web/ViewModels/ValidationMessages.cs
index 5b75331120..6268c79599 100644
--- a/src/Shared/Recruit.Shared.Web/ViewModels/ValidationMessages.cs
+++ b/src/Shared/Recruit.Shared.Web/ViewModels/ValidationMessages.cs
@@ -30,6 +30,13 @@ public static class TypeOfDecimal
{
public const string WeeklyHours = "Hours per week must be a number";
}
+
+ public static class BlankInput
+ {
+ public const string ApprenticeshipDuration = "Enter how long the whole apprenticeship is, including work and training";
+ public const string WorkingWeekDescription = "Enter details about the working week";
+ public const string WeeklyHours = "Enter how many hours the apprentice will work each week, includingtraining";
+ }
}
public static class WageValidationMessages
@@ -38,6 +45,11 @@ public static class TypeOfMoney
{
public const string FixedWageYearlyAmount = "Fixed wage must be a number";
}
+
+ public static class NotSelected
+ {
+ public const string WageRadio = "Select how much you'd like to pay the apprentice";
+ }
}
public static class DeleteVacancyConfirmationMessages
From e103f7373728c66ff0a10558250a6c394e15d698 Mon Sep 17 00:00:00 2001
From: Ben Stone
Date: Wed, 24 Jun 2020 15:30:39 +0100
Subject: [PATCH 02/10] moves validation to fluent validation
---
.../Part1/Duration/DurationViewModel.cs | 4 ----
.../ViewModels/Part1/Wage/WageViewModel.cs | 2 --
.../Part1/Part1Complete/Part1Complete.cshtml | 2 +-
.../Employer.Web/Views/Part1/Wage/Wage.cshtml | 6 +++---
.../ViewModels/ValidationMessages.cs | 12 ------------
.../Fluent/FluentVacancyValidator.cs | 18 +++++++++---------
6 files changed, 13 insertions(+), 31 deletions(-)
diff --git a/src/Employer/Employer.Web/ViewModels/Part1/Duration/DurationViewModel.cs b/src/Employer/Employer.Web/ViewModels/Part1/Duration/DurationViewModel.cs
index 300081a6e1..da2bb9211d 100644
--- a/src/Employer/Employer.Web/ViewModels/Part1/Duration/DurationViewModel.cs
+++ b/src/Employer/Employer.Web/ViewModels/Part1/Duration/DurationViewModel.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
using Esfa.Recruit.Shared.Web.ViewModels;
using Esfa.Recruit.Shared.Web.ViewModels.Validations;
using Esfa.Recruit.Vacancies.Client.Domain.Entities;
@@ -9,16 +8,13 @@ namespace Esfa.Recruit.Employer.Web.ViewModels.Part1.Duration
{
public class DurationViewModel
{
- [Required(ErrorMessage = ErrMsg.BlankInput.ApprenticeshipDuration)]
[TypeOfInteger(ErrorMessage = ErrMsg.TypeOfInteger.Duration)]
public string Duration { get; set; }
public DurationUnit DurationUnit { get; set; }
- [Required(ErrorMessage = ErrMsg.BlankInput.WorkingWeekDescription)]
public string WorkingWeekDescription { get; set; }
- [Required(ErrorMessage = ErrMsg.BlankInput.WeeklyHours)]
[TypeOfDecimal(2, ErrorMessage = ErrMsg.TypeOfDecimal.WeeklyHours)]
public string WeeklyHours { get; set; }
diff --git a/src/Employer/Employer.Web/ViewModels/Part1/Wage/WageViewModel.cs b/src/Employer/Employer.Web/ViewModels/Part1/Wage/WageViewModel.cs
index e9b6a7935d..37b4a2cb47 100644
--- a/src/Employer/Employer.Web/ViewModels/Part1/Wage/WageViewModel.cs
+++ b/src/Employer/Employer.Web/ViewModels/Part1/Wage/WageViewModel.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
using Esfa.Recruit.Shared.Web.ViewModels;
using Esfa.Recruit.Shared.Web.ViewModels.Validations;
using Esfa.Recruit.Vacancies.Client.Domain.Entities;
@@ -9,7 +8,6 @@ namespace Esfa.Recruit.Employer.Web.ViewModels.Part1.Wage
{
public class WageViewModel
{
- [Required(ErrorMessage = ErrMsg.NotSelected.WageRadio)]
public WageType? WageType { get; set; }
[TypeOfMoney(ErrorMessage = ErrMsg.TypeOfMoney.FixedWageYearlyAmount)]
diff --git a/src/Employer/Employer.Web/Views/Part1/Part1Complete/Part1Complete.cshtml b/src/Employer/Employer.Web/Views/Part1/Part1Complete/Part1Complete.cshtml
index 63617aad2d..30d708eaae 100644
--- a/src/Employer/Employer.Web/Views/Part1/Part1Complete/Part1Complete.cshtml
+++ b/src/Employer/Employer.Web/Views/Part1/Part1Complete/Part1Complete.cshtml
@@ -15,7 +15,7 @@
From @Model.MinimumWageStartFrom, the National Minimum Wage for apprentices is @Model.ApprenticeshipMinimumWageHourly an hour.
- Based on @Model.WeeklyHours working hours a week, you'll need to pay a yearly wage of at least @Model.ApprenticeshipMinimumWageYearly.
+ Based on @Model.WeeklyHours working hours a week, you'll need to pay a yearly wage of at least @Model.ApprenticeshipMinimumWageYearly.
diff --git a/src/Shared/Recruit.Shared.Web/ViewModels/ValidationMessages.cs b/src/Shared/Recruit.Shared.Web/ViewModels/ValidationMessages.cs
index 6268c79599..5b75331120 100644
--- a/src/Shared/Recruit.Shared.Web/ViewModels/ValidationMessages.cs
+++ b/src/Shared/Recruit.Shared.Web/ViewModels/ValidationMessages.cs
@@ -30,13 +30,6 @@ public static class TypeOfDecimal
{
public const string WeeklyHours = "Hours per week must be a number";
}
-
- public static class BlankInput
- {
- public const string ApprenticeshipDuration = "Enter how long the whole apprenticeship is, including work and training";
- public const string WorkingWeekDescription = "Enter details about the working week";
- public const string WeeklyHours = "Enter how many hours the apprentice will work each week, includingtraining";
- }
}
public static class WageValidationMessages
@@ -45,11 +38,6 @@ public static class TypeOfMoney
{
public const string FixedWageYearlyAmount = "Fixed wage must be a number";
}
-
- public static class NotSelected
- {
- public const string WageRadio = "Select how much you'd like to pay the apprentice";
- }
}
public static class DeleteVacancyConfirmationMessages
diff --git a/src/Shared/Recruit.Vacancies.Client/Application/Validation/Fluent/FluentVacancyValidator.cs b/src/Shared/Recruit.Vacancies.Client/Application/Validation/Fluent/FluentVacancyValidator.cs
index 92738a941e..8a2ee882f6 100644
--- a/src/Shared/Recruit.Vacancies.Client/Application/Validation/Fluent/FluentVacancyValidator.cs
+++ b/src/Shared/Recruit.Vacancies.Client/Application/Validation/Fluent/FluentVacancyValidator.cs
@@ -286,10 +286,10 @@ private void ValidateDuration()
{
RuleFor(x => x.Wage.DurationUnit)
.NotEmpty()
- .WithMessage("You must state the expected duration")
+ .WithMessage("Enter how long the whole apprenticeship is, including work and training")
.WithErrorCode("34")
.IsInEnum()
- .WithMessage("You must state the expected duration")
+ .WithMessage("Enter how long the whole apprenticeship is, including work and training")
.WithErrorCode("34")
.RunCondition(VacancyRuleSet.Duration)
.WithRuleId(VacancyRuleSet.Duration);
@@ -297,10 +297,10 @@ private void ValidateDuration()
RuleFor(x => x.Wage.Duration)
.Cascade(CascadeMode.StopOnFirstFailure)
.NotEmpty()
- .WithMessage("You must state the expected duration")
+ .WithMessage("Enter how long the whole apprenticeship is, including work and training")
.WithErrorCode("34")
.GreaterThan(0)
- .WithMessage("You must state the expected duration")
+ .WithMessage("Enter how long the whole apprenticeship is, including work and training")
.WithErrorCode("34")
.Must((vacancy, value) =>
{
@@ -325,7 +325,7 @@ private void ValidateWorkingWeek()
RuleFor(x => x.Wage.WorkingWeekDescription)
.Cascade(CascadeMode.StopOnFirstFailure)
.NotEmpty()
- .WithMessage("You must include details of the working week")
+ .WithMessage("Enter details about the working week")
.WithErrorCode("37")
.ValidFreeTextCharacters()
.WithMessage("Working week details contains some invalid characters")
@@ -347,7 +347,7 @@ private void ValidateWeeklyHours()
{
RuleFor(x => x.Wage.WeeklyHours)
.NotEmpty()
- .WithMessage("You must state the total working hours per week")
+ .WithMessage("Enter how many hours the apprentice will work each week, including training")
.WithErrorCode("40")
.GreaterThanOrEqualTo(16)
.WithMessage("The total hours a week must be at least {ComparisonValue}")
@@ -364,7 +364,7 @@ private void ValidateWage()
{
RuleFor(x => x.Wage)
.NotNull()
- .WithMessage("You must select a wage")
+ .WithMessage("Select how much you'd like to pay the apprentice")
.WithErrorCode("46")
.RunCondition(VacancyRuleSet.Wage)
.WithRuleId(VacancyRuleSet.Wage);
@@ -373,10 +373,10 @@ private void ValidateWage()
{
RuleFor(x => x.Wage.WageType)
.NotEmpty()
- .WithMessage("You must select a wage")
+ .WithMessage("Select how much you'd like to pay the apprentice")
.WithErrorCode("46")
.IsInEnum()
- .WithMessage("You must select a wage")
+ .WithMessage("Select how much you'd like to pay the apprentice")
.WithErrorCode("46")
.RunCondition(VacancyRuleSet.Wage)
.WithRuleId(VacancyRuleSet.Wage);
From 746a4a812e9a913a856a217561759bcd24123e93 Mon Sep 17 00:00:00 2001
From: Ben Stone
Date: Wed, 24 Jun 2020 16:42:51 +0100
Subject: [PATCH 03/10] content change
---
src/Employer/Employer.Web/Views/Part1/Wage/Wage.cshtml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Employer/Employer.Web/Views/Part1/Wage/Wage.cshtml b/src/Employer/Employer.Web/Views/Part1/Wage/Wage.cshtml
index c1494ad4d4..89a0acb088 100644
--- a/src/Employer/Employer.Web/Views/Part1/Wage/Wage.cshtml
+++ b/src/Employer/Employer.Web/Views/Part1/Wage/Wage.cshtml
@@ -37,7 +37,7 @@
From @Model.MinimumWageStartFrom, National Minimum Wage is between @Model.NationalMinimumWageLowerBoundHourly and @Model.NationalMinimumWageUpperBoundHourly an hour, depending on the candidate's age.
- On the advert, this will be displayed as a yearly wage of @{@Model.NationalMinimumWageYearly}.
+ On the advert, this will be displayed as a yearly wage of @Model.NationalMinimumWageYearly.
@@ -51,7 +51,7 @@
From @Model.MinimumWageStartFrom, the National Minimum Wage for apprentices is @Model.ApprenticeshipMinimumWageHourly an hour.
- On the advert, this will be displayed as a yearly wage of @{@Model.ApprenticeshipMinimumWageYearly}.
+ On the advert, this will be displayed as a yearly wage of @Model.ApprenticeshipMinimumWageYearly.
From f9cbcee97fd5b3e7e7e57f8b482aab2a284e4a93 Mon Sep 17 00:00:00 2001
From: Ben Stone
Date: Thu, 25 Jun 2020 11:18:56 +0100
Subject: [PATCH 04/10] removes replace method as this is handled in the
updated Wage package
---
.../Employer.Web/Orchestrators/Part1/WageOrchestrator.cs | 2 +-
src/Shared/Recruit.Shared.Web/Recruit.Shared.Web.csproj | 2 +-
.../Recruit.Vacancies.Client/Recruit.Vacancies.Client.csproj | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Employer/Employer.Web/Orchestrators/Part1/WageOrchestrator.cs b/src/Employer/Employer.Web/Orchestrators/Part1/WageOrchestrator.cs
index 57e1acecb9..648609a3d7 100644
--- a/src/Employer/Employer.Web/Orchestrators/Part1/WageOrchestrator.cs
+++ b/src/Employer/Employer.Web/Orchestrators/Part1/WageOrchestrator.cs
@@ -48,7 +48,7 @@ public async Task GetWageViewModelAsync(VacancyRouteModel vrm)
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).Replace("-", "to"),
+ NationalMinimumWageYearly = GetMinimumWageYearlyText(SFA.DAS.VacancyServices.Wage.WageType.NationalMinimum, vacancy.Wage?.WeeklyHours, vacancy.StartDate.Value),
ApprenticeshipMinimumWageHourly = wagePeriod.ApprenticeshipMinimumWage.ToString("C"),
ApprenticeshipMinimumWageYearly = GetMinimumWageYearlyText(SFA.DAS.VacancyServices.Wage.WageType.ApprenticeshipMinimum, vacancy.Wage?.WeeklyHours, vacancy.StartDate.Value),
WeeklyHours = vacancy.Wage.WeeklyHours.Value,
diff --git a/src/Shared/Recruit.Shared.Web/Recruit.Shared.Web.csproj b/src/Shared/Recruit.Shared.Web/Recruit.Shared.Web.csproj
index 2414098b2e..28920856f9 100644
--- a/src/Shared/Recruit.Shared.Web/Recruit.Shared.Web.csproj
+++ b/src/Shared/Recruit.Shared.Web/Recruit.Shared.Web.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/Shared/Recruit.Vacancies.Client/Recruit.Vacancies.Client.csproj b/src/Shared/Recruit.Vacancies.Client/Recruit.Vacancies.Client.csproj
index 5b9315d200..349d671bfc 100644
--- a/src/Shared/Recruit.Vacancies.Client/Recruit.Vacancies.Client.csproj
+++ b/src/Shared/Recruit.Vacancies.Client/Recruit.Vacancies.Client.csproj
@@ -37,7 +37,7 @@
-
+
From 4a2bfc14327bb08b28ba022ebb494d3d0d118494 Mon Sep 17 00:00:00 2001
From: Ben Stone
Date: Thu, 25 Jun 2020 11:46:03 +0100
Subject: [PATCH 05/10] corrects unit test
---
.../UnitTests/Shared.Web/Extensions/WageExtensionsTests.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Shared/UnitTests/Shared.Web/Extensions/WageExtensionsTests.cs b/src/Shared/UnitTests/Shared.Web/Extensions/WageExtensionsTests.cs
index 10ea3adb9c..7c329cf4a3 100644
--- a/src/Shared/UnitTests/Shared.Web/Extensions/WageExtensionsTests.cs
+++ b/src/Shared/UnitTests/Shared.Web/Extensions/WageExtensionsTests.cs
@@ -33,7 +33,7 @@ public void ShouldFormatNationalMinimumWageCorrectly()
var actual = wage.ToText(new DateTime(2018, 5, 1));
- actual.Should().Be("£8,202.01 - £15,290.89");
+ actual.Should().Be("£8,202.01 to £15,290.89");
}
[Fact]
From a3cf9093b5991330ba374e606d95000a0f10a1e9 Mon Sep 17 00:00:00 2001
From: Corey
Date: Mon, 6 Jul 2020 15:07:32 +0100
Subject: [PATCH 06/10] CON-1977 missing content changes on Duration of
apprenticeship view
---
.../Employer.Web/Views/Part1/Duration/Duration.cshtml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/Employer/Employer.Web/Views/Part1/Duration/Duration.cshtml b/src/Employer/Employer.Web/Views/Part1/Duration/Duration.cshtml
index 54d75e3406..3796663128 100644
--- a/src/Employer/Employer.Web/Views/Part1/Duration/Duration.cshtml
+++ b/src/Employer/Employer.Web/Views/Part1/Duration/Duration.cshtml
@@ -24,10 +24,10 @@
(enter a numeric value and then select Month(s) or Year(s) in the next field)
- The apprenticeship must last at least 12 months
+ The apprenticeship must last for at least 12 months.
- For @Model.TrainingTitle, Typical length is @Model.TrainingDurationMonths months
+ For @Model.TrainingTitle, typical length is @Model.TrainingDurationMonths months.
@@ -41,9 +41,10 @@
- For example, Monday to Friday 9am to 5pm, shifts, may work evenings and weekends
+ For example, Monday to Friday 9am to 5pm, shifts, may work evenings and weekends.
+ You have 250 characters remaining