From f438f526d8911b2437c78d8df9b2d34a4e638847 Mon Sep 17 00:00:00 2001 From: Michael Young Date: Mon, 23 Mar 2020 12:52:04 +0000 Subject: [PATCH 01/18] Pass correct view to View agreement page --- .../Controllers/EmployerAgreementController.cs | 8 ++------ .../Views/EmployerAgreement/View.cshtml | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/SFA.DAS.EmployerAccounts.Web/Controllers/EmployerAgreementController.cs b/src/SFA.DAS.EmployerAccounts.Web/Controllers/EmployerAgreementController.cs index 3514260bfc..79cb3c9ced 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Controllers/EmployerAgreementController.cs +++ b/src/SFA.DAS.EmployerAccounts.Web/Controllers/EmployerAgreementController.cs @@ -87,13 +87,9 @@ public async Task Details(string agreementId, string hashedAccount public async Task View(string agreementId, string hashedAccountId, FlashMessageViewModel flashMessage) { - var agreement = await _orchestrator.GetById( - agreementId, - hashedAccountId, - OwinWrapper.GetClaimValue(ControllerConstants.UserRefClaimKeyName) - ); + var agreement = await GetSignedAgreementViewModel(new GetEmployerAgreementRequest { AgreementId = agreementId, HashedAccountId = hashedAccountId, ExternalUserId = OwinWrapper.GetClaimValue(ControllerConstants.UserRefClaimKeyName) }); - return View(agreement.Data); + return View(agreement); } [HttpGet] diff --git a/src/SFA.DAS.EmployerAccounts.Web/Views/EmployerAgreement/View.cshtml b/src/SFA.DAS.EmployerAccounts.Web/Views/EmployerAgreement/View.cshtml index 408bc4d5ac..0adba22b1e 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Views/EmployerAgreement/View.cshtml +++ b/src/SFA.DAS.EmployerAccounts.Web/Views/EmployerAgreement/View.cshtml @@ -1,5 +1,5 @@ @using SFA.DAS.EmployerAccounts.Web.Helpers -@model EmployerAgreementViewModel +@model SignEmployerAgreementViewModel @{ ViewBag.PageID = "agreement-view"; ViewBag.Title = "Agreement view"; From f5651b40b6b3e05d89973a0f6698099e15852886 Mon Sep 17 00:00:00 2001 From: vas Date: Mon, 23 Mar 2020 13:56:27 +0000 Subject: [PATCH 02/18] CON-1457:MA - DTR Transfers showing incorrectly --- ...tAllTransactionDetailsForAccountByDate.sql | 202 +++++------------- 1 file changed, 54 insertions(+), 148 deletions(-) diff --git a/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql b/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql index e2f6b9b785..7e8f826342 100644 --- a/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql +++ b/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql @@ -136,152 +136,58 @@ SELECT DATEADD(dd, DATEDIFF(dd, 0, tl.DateCreated), 0) AS DateCreated, and tl.Amount > 0 UNION ALL - - -- sender transfers - SELECT - DATEADD(dd, DATEDIFF(dd, 0, tl.DateCreated), 0) AS DateCreated, - tl.AccountId AS AccountId, - tlt.[Description] AS TransactionType, - NULL AS PayeScheme, - NULL AS PayrollYear, - NULL AS PayrollMonth, - NULL AS LevyDeclared, - NULL AS EnglishFraction, - NULL AS TenPercentTopUp, - CASE tlt.[Description] - WHEN 'Payment' THEN meta.ProviderName - ELSE NULL - END AS TrainingProvider, - NULL AS Uln, - NULL AS Apprentice, - trans.CourseName AS ApprenticeTrainingCourse, - meta.CourseLevel AS ApprenticeTrainingCourseLevel, - SUM(tl.Amount) AS PaidFromLevy, - SUM(tl.SfaCoInvestmentAmount) AS EmployerContribution, - SUM(tl.EmployerCoInvestmentAmount) AS GovermentContribution, - SUM(tl.Amount) AS Total, - tl.TransferSenderAccountId AS TransferSenderAccountId, - tl.TransferSenderAccountName AS TransferSenderAccountName, - tl.TransferReceiverAccountId AS TransferReceiverAccountId, - tl.TransferReceiverAccountName AS TransferReceiverAccountName - FROM [employer_financial].[TransactionLine] tl - - JOIN [employer_financial].[TransactionLineTypes] tlt - ON tl.TransactionType = tlt.TransactionType - - LEFT JOIN - (SELECT tl2.AccountId, tr2.CourseName, tl2.PeriodEnd - FROM [employer_financial].[TransactionLine] tl2 - - LEFT JOIN [employer_financial].[AccountTransfers] tr2 - ON (tr2.SenderAccountId = tl2.AccountId and tr2.PeriodEnd = tl2.PeriodEnd) - - WHERE tl2.AccountId = @AccountId - AND tl2.TransactionType = 4 -- Transfer - ) as trans - on trans.AccountId = tl.AccountId - and trans.PeriodEnd = tl.PeriodEnd - - LEFT JOIN - (SELECT DISTINCT p3.AccountId, p3.PeriodEnd, m3.ProviderName, m3.ApprenticeshipCourseLevel as 'CourseLevel' - FROM [employer_financial].[Payment] p3 - inner join [employer_financial].[TransactionLine] tl3 - on tl3.AccountId = @AccountId - AND tl3.AccountId = tl3.TransferSenderAccountId - AND tl3.TransactionType IN (3, 4) - INNER JOIN [employer_financial].[PaymentMetaData] m3 - ON m3.Id = p3.PaymentMetaDataId - AND p3.AccountId = tl3.TransferReceiverAccountId - WHERE m3.ProviderName IS NOT NULL - ) as meta - on meta.AccountId = tl.TransferReceiverAccountId - and meta.PeriodEnd = tl.PeriodEnd - - WHERE tl.AccountId = @AccountId - AND tl.AccountId = tl.TransferSenderAccountId - AND tl.TransactionType IN (3, 4) -- Payment and Transfer - GROUP BY - tl.DateCreated, - tl.AccountId, - tlt.[Description], - tl.PeriodEnd, - meta.ProviderName, - trans.CourseName, - meta.CourseLevel, - tl.TransferSenderAccountId, - tl.TransferSenderAccountName, - tl.TransferReceiverAccountId, - tl.TransferReceiverAccountName - - UNION --- receiver transfers - SELECT - DATEADD(dd, DATEDIFF(dd, 0, tl.DateCreated), 0) AS DateCreated, - tl.AccountId AS AccountId, - tlt.[Description] AS TransactionType, - NULL AS PayeScheme, - NULL AS PayrollYear, - NULL AS PayrollMonth, - NULL AS LevyDeclared, - NULL AS EnglishFraction, - NULL AS TenPercentTopUp, - CASE tlt.[Description] - WHEN 'Payment' THEN meta.ProviderName - ELSE NULL - END AS TrainingProvider, - NULL AS Uln, - NULL AS Apprentice, - trans.CourseName AS ApprenticeTrainingCourse, - meta.CourseLevel AS ApprenticeTrainingCourseLevel, - SUM(tl.Amount) AS PaidFromLevy, - SUM(tl.SfaCoInvestmentAmount) AS EmployerContribution, - SUM(tl.EmployerCoInvestmentAmount) AS GovermentContribution, - SUM(tl.Amount) AS Total, - tl.TransferSenderAccountId AS TransferSenderAccountId, - tl.TransferSenderAccountName AS TransferSenderAccountName, - tl.TransferReceiverAccountId AS TransferReceiverAccountId, - tl.TransferReceiverAccountName AS TransferReceiverAccountName - FROM [employer_financial].[TransactionLine] tl - - JOIN [employer_financial].[TransactionLineTypes] tlt - ON tl.TransactionType = tlt.TransactionType - LEFT JOIN - (SELECT tl2.AccountId, tr2.CourseName, tl2.PeriodEnd - FROM [employer_financial].[TransactionLine] tl2 - - LEFT JOIN [employer_financial].[AccountTransfers] tr2 - ON (tr2.ReceiverAccountId = tl2.AccountId and tr2.PeriodEnd = tl2.PeriodEnd) - - WHERE tl2.AccountId = @AccountId - AND tl2.TransactionType = 4 -- Transfer - ) as trans - on trans.AccountId = tl.AccountId - and trans.PeriodEnd = tl.PeriodEnd - - LEFT JOIN - (SELECT DISTINCT p3.AccountId, p3.PeriodEnd, m3.ProviderName, m3.ApprenticeshipCourseLevel as 'CourseLevel' - FROM [employer_financial].[Payment] p3 - INNER JOIN [employer_financial].[PaymentMetaData] m3 - ON m3.Id = p3.PaymentMetaDataId - AND p3.AccountId = @AccountId - WHERE m3.ProviderName IS NOT NULL - ) as meta - on meta.AccountId = tl.TransferReceiverAccountId - and meta.PeriodEnd = tl.PeriodEnd - - WHERE tl.AccountId = @AccountId - AND tl.AccountId = tl.TransferReceiverAccountId - AND tl.TransactionType IN (3, 4) -- Payment and Transfer - GROUP BY - tl.DateCreated, - tl.AccountId, - tlt.[Description], - tl.PeriodEnd, - meta.ProviderName, - trans.CourseName, - meta.CourseLevel, - tl.TransferSenderAccountId, - tl.TransferSenderAccountName, - tl.TransferReceiverAccountId, - tl.TransferReceiverAccountName \ No newline at end of file +-- sender transfers +SELECT DATEADD(dd, DATEDIFF(dd, 0, [AccountTransfers].CreatedDate), 0) AS DateCreated, + [AccountTransfers].SenderAccountId AS AccountId, + 'Transfer' AS TransactionType, + NULL AS PayeScheme, + NULL AS PayrollYear, + NULL AS PayrollMonth, + NULL AS LevyDeclared, + NULL AS EnglishFraction, + NULL AS TenPercentTopUp, + NULL AS TrainingProvider, + NULL AS Uln, + NULL AS Apprentice, + [AccountTransfers].CourseName AS ApprenticeTrainingCourse, + [AccountTransfers].CourseLevel AS ApprenticeTrainingCourseLevel, + cast([AccountTransfers].[Amount]as decimal(18,4)) AS PaidFromLevy, + NULL AS EmployerContribution, + NULL AS GovermentContribution, + cast([AccountTransfers].[Amount] as decimal(18,4)) AS Total, + [AccountTransfers].SenderAccountID AS TransferSenderAccountId, + [AccountTransfers].[SenderAccountName] AS TransferSenderAccountName, + [AccountTransfers].[ReceiverAccountId] AS TransferReceiverAccountId, + [AccountTransfers].[ReceiverAccountName] AS TransferReceiverAccountName + FROM [employer_financial].[AccountTransfers] + WHERE SenderAccountId = @AccountId + +UNION ALL + +-- receiver transfers +SELECT DATEADD(dd, DATEDIFF(dd, 0, [AccountTransfers].CreatedDate), 0) AS DateCreated, + [AccountTransfers].SenderAccountId AS AccountId, + 'Transfer' AS TransactionType, + NULL AS PayeScheme, + NULL AS PayrollYear, + NULL AS PayrollMonth, + NULL AS LevyDeclared, + NULL AS EnglishFraction, + NULL AS TenPercentTopUp, + NULL AS TrainingProvider, + NULL AS Uln, + NULL AS Apprentice, + [AccountTransfers].CourseName AS ApprenticeTrainingCourse, + [AccountTransfers].CourseLevel AS ApprenticeTrainingCourseLevel, + cast([AccountTransfers].[Amount] as decimal(18,4)) AS PaidFromLevy, + NULL AS EmployerContribution, + NULL AS GovermentContribution, + cast([AccountTransfers].[Amount] as decimal(18,4)) AS Total, + [AccountTransfers].SenderAccountID AS TransferSenderAccountId, + [AccountTransfers].[SenderAccountName] AS TransferSenderAccountName, + [AccountTransfers].[ReceiverAccountId] AS TransferReceiverAccountId, + [AccountTransfers].[ReceiverAccountName] AS TransferReceiverAccountName + FROM [employer_financial].[AccountTransfers] + WHERE [AccountTransfers].[ReceiverAccountId] = @AccountId + ORDER BY datecreated \ No newline at end of file From 1baa0309580d04f203c0f00b24461ba38a7bbdb9 Mon Sep 17 00:00:00 2001 From: vas Date: Mon, 23 Mar 2020 15:07:19 +0000 Subject: [PATCH 03/18] CON-1457-MA - DTR Transfers showing incorrectly --- ...tAllTransactionDetailsForAccountByDate.sql | 96 ++++++++++--------- 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql b/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql index 7e8f826342..12ddb5364a 100644 --- a/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql +++ b/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql @@ -133,61 +133,65 @@ SELECT DATEADD(dd, DATEDIFF(dd, 0, tl.DateCreated), 0) AS DateCreated, AND DateCreated >= @FromDate AND DateCreated < @ToDate AND tl.TransactionType = 5 - and tl.Amount > 0 + AND tl.Amount > 0 UNION ALL -- sender transfers -SELECT DATEADD(dd, DATEDIFF(dd, 0, [AccountTransfers].CreatedDate), 0) AS DateCreated, - [AccountTransfers].SenderAccountId AS AccountId, - 'Transfer' AS TransactionType, - NULL AS PayeScheme, - NULL AS PayrollYear, - NULL AS PayrollMonth, - NULL AS LevyDeclared, - NULL AS EnglishFraction, - NULL AS TenPercentTopUp, - NULL AS TrainingProvider, - NULL AS Uln, - NULL AS Apprentice, - [AccountTransfers].CourseName AS ApprenticeTrainingCourse, - [AccountTransfers].CourseLevel AS ApprenticeTrainingCourseLevel, - cast([AccountTransfers].[Amount]as decimal(18,4)) AS PaidFromLevy, - NULL AS EmployerContribution, - NULL AS GovermentContribution, - cast([AccountTransfers].[Amount] as decimal(18,4)) AS Total, - [AccountTransfers].SenderAccountID AS TransferSenderAccountId, - [AccountTransfers].[SenderAccountName] AS TransferSenderAccountName, - [AccountTransfers].[ReceiverAccountId] AS TransferReceiverAccountId, - [AccountTransfers].[ReceiverAccountName] AS TransferReceiverAccountName +SELECT DATEADD(dd, DATEDIFF(dd, 0, [employer_financial].[AccountTransfers].CreatedDate), 0) AS DateCreated, + [AccountTransfers].SenderAccountId AS AccountId, + 'Transfer' AS TransactionType, + NULL AS PayeScheme, + NULL AS PayrollYear, + NULL AS PayrollMonth, + NULL AS LevyDeclared, + NULL AS EnglishFraction, + NULL AS TenPercentTopUp, + NULL AS TrainingProvider, + NULL AS Uln, + NULL AS Apprentice, + [employer_financial].[AccountTransfers].CourseName AS ApprenticeTrainingCourse, + [employer_financial].[AccountTransfers].CourseLevel AS ApprenticeTrainingCourseLevel, + cast([AccountTransfers].[Amount]as decimal(18,4)) AS PaidFromLevy, + NULL AS EmployerContribution, + NULL AS GovermentContribution, + cast([AccountTransfers].[Amount] as decimal(18,4)) AS Total, + [employer_financial].[AccountTransfers].SenderAccountID AS TransferSenderAccountId, + [employer_financial].[AccountTransfers].[SenderAccountName] AS TransferSenderAccountName, + [employer_financial].[AccountTransfers].[ReceiverAccountId] AS TransferReceiverAccountId, + [employer_financial].[AccountTransfers].[ReceiverAccountName] AS TransferReceiverAccountName FROM [employer_financial].[AccountTransfers] WHERE SenderAccountId = @AccountId + AND [employer_financial].[AccountTransfers].[CreatedDate] >= @FromDate + AND [employer_financial].[AccountTransfers].[CreatedDate] < @ToDate UNION ALL -- receiver transfers -SELECT DATEADD(dd, DATEDIFF(dd, 0, [AccountTransfers].CreatedDate), 0) AS DateCreated, - [AccountTransfers].SenderAccountId AS AccountId, - 'Transfer' AS TransactionType, - NULL AS PayeScheme, - NULL AS PayrollYear, - NULL AS PayrollMonth, - NULL AS LevyDeclared, - NULL AS EnglishFraction, - NULL AS TenPercentTopUp, - NULL AS TrainingProvider, - NULL AS Uln, - NULL AS Apprentice, - [AccountTransfers].CourseName AS ApprenticeTrainingCourse, - [AccountTransfers].CourseLevel AS ApprenticeTrainingCourseLevel, - cast([AccountTransfers].[Amount] as decimal(18,4)) AS PaidFromLevy, - NULL AS EmployerContribution, - NULL AS GovermentContribution, - cast([AccountTransfers].[Amount] as decimal(18,4)) AS Total, - [AccountTransfers].SenderAccountID AS TransferSenderAccountId, - [AccountTransfers].[SenderAccountName] AS TransferSenderAccountName, - [AccountTransfers].[ReceiverAccountId] AS TransferReceiverAccountId, - [AccountTransfers].[ReceiverAccountName] AS TransferReceiverAccountName +SELECT DATEADD(dd, DATEDIFF(dd, 0, [employer_financial].[AccountTransfers].CreatedDate), 0) AS DateCreated, + [AccountTransfers].SenderAccountId AS AccountId, + 'Transfer' AS TransactionType, + NULL AS PayeScheme, + NULL AS PayrollYear, + NULL AS PayrollMonth, + NULL AS LevyDeclared, + NULL AS EnglishFraction, + NULL AS TenPercentTopUp, + NULL AS TrainingProvider, + NULL AS Uln, + NULL AS Apprentice, + [employer_financial].[AccountTransfers].CourseName AS ApprenticeTrainingCourse, + [employer_financial].[AccountTransfers].CourseLevel AS ApprenticeTrainingCourseLevel, + cast([AccountTransfers].[Amount] as decimal(18,4)) AS PaidFromLevy, + NULL AS EmployerContribution, + NULL AS GovermentContribution, + cast([employer_financial].[AccountTransfers].[Amount] as decimal(18,4)) AS Total, + [employer_financial].[AccountTransfers].SenderAccountID AS TransferSenderAccountId, + [employer_financial].[AccountTransfers].[SenderAccountName] AS TransferSenderAccountName, + [employer_financial].[AccountTransfers].[ReceiverAccountId] AS TransferReceiverAccountId, + [employer_financial].[AccountTransfers].[ReceiverAccountName] AS TransferReceiverAccountName FROM [employer_financial].[AccountTransfers] - WHERE [AccountTransfers].[ReceiverAccountId] = @AccountId + WHERE [employer_financial].[AccountTransfers].[ReceiverAccountId] = @AccountId + AND [employer_financial].[AccountTransfers].[CreatedDate] >= @FromDate + AND [employer_financial].[AccountTransfers].[CreatedDate] < @ToDate ORDER BY datecreated \ No newline at end of file From f175749c760e334c9b12a2b1a4fb6d2566704f15 Mon Sep 17 00:00:00 2001 From: vas Date: Mon, 23 Mar 2020 15:23:06 +0000 Subject: [PATCH 04/18] CON-1457 -MA - DTR Transfers showing incorrectly --- .../GetAllTransactionDetailsForAccountByDate.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql b/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql index 12ddb5364a..68a8ace8b2 100644 --- a/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql +++ b/src/SFA.DAS.EAS.Employer_Financial.Database/StoredProcedures/GetAllTransactionDetailsForAccountByDate.sql @@ -139,7 +139,7 @@ UNION ALL -- sender transfers SELECT DATEADD(dd, DATEDIFF(dd, 0, [employer_financial].[AccountTransfers].CreatedDate), 0) AS DateCreated, - [AccountTransfers].SenderAccountId AS AccountId, + [employer_financial].[AccountTransfers].SenderAccountId AS AccountId, 'Transfer' AS TransactionType, NULL AS PayeScheme, NULL AS PayrollYear, @@ -169,7 +169,7 @@ UNION ALL -- receiver transfers SELECT DATEADD(dd, DATEDIFF(dd, 0, [employer_financial].[AccountTransfers].CreatedDate), 0) AS DateCreated, - [AccountTransfers].SenderAccountId AS AccountId, + [employer_financial].[AccountTransfers].SenderAccountId AS AccountId, 'Transfer' AS TransactionType, NULL AS PayeScheme, NULL AS PayrollYear, From 8e28cbdfa637c2d81279bd54379558dac700546d Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 24 Mar 2020 13:40:45 +0000 Subject: [PATCH 05/18] [CON-1642] COVID banner in Employer Accounts for both CDN and non-cdn implementation. Content still to finalise --- .../SFA.DAS.EmployerAccounts.Web.csproj | 1 + .../Shared/_COVID19GuidanceBanner.cshtml | 28 +++++++++++++++++++ .../Views/Shared/_Layout.cshtml | 19 +++++++++---- .../Views/Shared/_Layout_CDN.cshtml | 22 +++++++++++---- 4 files changed, 58 insertions(+), 12 deletions(-) create mode 100644 src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml diff --git a/src/SFA.DAS.EmployerAccounts.Web/SFA.DAS.EmployerAccounts.Web.csproj b/src/SFA.DAS.EmployerAccounts.Web/SFA.DAS.EmployerAccounts.Web.csproj index 549afb0e2c..18ad3322fb 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/SFA.DAS.EmployerAccounts.Web.csproj +++ b/src/SFA.DAS.EmployerAccounts.Web/SFA.DAS.EmployerAccounts.Web.csproj @@ -872,6 +872,7 @@ + diff --git a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml new file mode 100644 index 0000000000..de9ef9b1e4 --- /dev/null +++ b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml @@ -0,0 +1,28 @@ +@if (ViewBag.UseCDN ?? false) +{ +
+

New employer agreement

+

From 14 April 2020, you must accept a new employer agreement to:

+
    +
  • access apprenticeship funding for new apprentices
  • +
  • approve any changes in your account
  • +
+

+ Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your own apprentices. +

+
+} +else +{ +
+

New employer agreement

+

From 14 April 2020, you must accept a new employer agreement to:

+
    +
  • access apprenticeship funding for new apprentices
  • +
  • approve any changes in your account
  • +
+

+ Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your own apprentices. +

+
+} \ No newline at end of file diff --git a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_Layout.cshtml b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_Layout.cshtml index aa98e4ad13..0c9a11082c 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_Layout.cshtml +++ b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_Layout.cshtml @@ -122,16 +122,23 @@
@RenderSection("breadcrumb", required: false) + + @if (HttpContext.Current.User.Identity.IsAuthenticated) { - var userId = Html.ViewContext.RequestContext.HttpContext.GetOwinContext().Authentication.User?.Claims. - FirstOrDefault(x => x.Type == ControllerConstants.UserRefClaimKeyName)?.Value; - var hashedAccountId = Html.ViewContext.RouteData.Values[ControllerConstants.AccountHashedIdRouteKeyName]?.ToString(); - if (!string.IsNullOrEmpty(hashedAccountId)) + @Html.Partial("_COVID19GuidanceBanner") + + if (Html.IsAuthorized("EmployerFeature.V3AgreementBanner")) { - if (Html.ShowExpiringAgreementBanner(userId, hashedAccountId)) + var userId = Html.ViewContext.RequestContext.HttpContext.GetOwinContext().Authentication.User?.Claims. + FirstOrDefault(x => x.Type == ControllerConstants.UserRefClaimKeyName)?.Value; + var hashedAccountId = Html.ViewContext.RouteData.Values[ControllerConstants.AccountHashedIdRouteKeyName]?.ToString(); + if (!string.IsNullOrEmpty(hashedAccountId)) { - @Html.Partial(@"_NotSignedV3AgreementMessage") + if (Html.ShowExpiringAgreementBanner(userId, hashedAccountId)) + { + @Html.Partial(@"_NotSignedV3AgreementMessage") + } } } } diff --git a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_Layout_CDN.cshtml b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_Layout_CDN.cshtml index 6a86365566..1ce1389c0f 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_Layout_CDN.cshtml +++ b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_Layout_CDN.cshtml @@ -3,6 +3,10 @@ @using SFA.DAS.Authorization.Mvc @using SFA.DAS.EmployerAccounts.Web.Helpers + +@{ + ViewBag.UseCDN = true; +} @@ -147,18 +151,24 @@
@RenderSection("breadcrumb", required: false) +
@if (HttpContext.Current.User.Identity.IsAuthenticated) { - var userId = Html.ViewContext.RequestContext.HttpContext.GetOwinContext().Authentication.User?.Claims. - FirstOrDefault(x => x.Type == ControllerConstants.UserRefClaimKeyName)?.Value; - var hashedAccountId = Html.ViewContext.RouteData.Values[ControllerConstants.AccountHashedIdRouteKeyName]?.ToString(); + @Html.Partial("_COVID19GuidanceBanner") + + if (Html.IsAuthorized("EmployerFeature.V3AgreementBanner")) { - if (!string.IsNullOrEmpty(hashedAccountId)) + var userId = Html.ViewContext.RequestContext.HttpContext.GetOwinContext().Authentication.User?.Claims. + FirstOrDefault(x => x.Type == ControllerConstants.UserRefClaimKeyName)?.Value; + var hashedAccountId = Html.ViewContext.RouteData.Values[ControllerConstants.AccountHashedIdRouteKeyName]?.ToString(); { - if (Html.ShowExpiringAgreementBanner(userId, hashedAccountId)) + if (!string.IsNullOrEmpty(hashedAccountId)) { - @Html.Partial(@"_NotSignedV3AgreementMessage_CDN") + if (Html.ShowExpiringAgreementBanner(userId, hashedAccountId)) + { + @Html.Partial(@"_NotSignedV3AgreementMessage_CDN") + } } } } From 9e044514f27bb53f44f36fe439cfbeb9db163191 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 24 Mar 2020 13:57:03 +0000 Subject: [PATCH 06/18] [CON-1642] Change the content for COVID banner --- .../Shared/_COVID19GuidanceBanner.cshtml | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml index de9ef9b1e4..60dfeaad2c 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml +++ b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml @@ -1,28 +1,16 @@ @if (ViewBag.UseCDN ?? false) {
-

New employer agreement

-

From 14 April 2020, you must accept a new employer agreement to:

-
    -
  • access apprenticeship funding for new apprentices
  • -
  • approve any changes in your account
  • -
-

- Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your own apprentices. -

+

+ Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your apprenticeships. +

} else {
-

New employer agreement

-

From 14 April 2020, you must accept a new employer agreement to:

-
    -
  • access apprenticeship funding for new apprentices
  • -
  • approve any changes in your account
  • -
-

- Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your own apprentices. -

+

+ Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your apprenticeships. +

} \ No newline at end of file From 615538ecfcc2073ea8bec5a3302141966575a6d8 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 24 Mar 2020 14:22:11 +0000 Subject: [PATCH 07/18] Update version of MA shared header being used to fix navigation links with CDN --- .../SFA.DAS.EmployerAccounts.Web.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SFA.DAS.EmployerAccounts.Web/SFA.DAS.EmployerAccounts.Web.csproj b/src/SFA.DAS.EmployerAccounts.Web/SFA.DAS.EmployerAccounts.Web.csproj index 18ad3322fb..337a067e17 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/SFA.DAS.EmployerAccounts.Web.csproj +++ b/src/SFA.DAS.EmployerAccounts.Web/SFA.DAS.EmployerAccounts.Web.csproj @@ -140,7 +140,7 @@ 1.0.16 - 1.1.34 + 1.1.36 From e542979e31c6f65590f6a94b5a89be5840418f34 Mon Sep 17 00:00:00 2001 From: James King Date: Tue, 24 Mar 2020 14:17:56 +0000 Subject: [PATCH 08/18] Markup changes --- .../Views/Shared/_COVID19GuidanceBanner.cshtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml index 60dfeaad2c..14d63eb3f1 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml +++ b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml @@ -1,9 +1,9 @@ @if (ViewBag.UseCDN ?? false) {
-

- Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your apprenticeships. -

+

+ Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your apprenticeships. +

} else @@ -13,4 +13,4 @@ else Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your apprenticeships.
-} \ No newline at end of file +} From 9983dd129cd855cf8cc0040887d828844a2eb025 Mon Sep 17 00:00:00 2001 From: James King Date: Tue, 24 Mar 2020 14:20:25 +0000 Subject: [PATCH 09/18] Update heading size --- .../Views/Shared/_COVID19GuidanceBanner.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml index 14d63eb3f1..b3bc709c97 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml +++ b/src/SFA.DAS.EmployerAccounts.Web/Views/Shared/_COVID19GuidanceBanner.cshtml @@ -9,7 +9,7 @@ else {
-

+

Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your apprenticeships.

From a2ca990e8451725defe647d28b3f47bed041592d Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 24 Mar 2020 14:46:43 +0000 Subject: [PATCH 10/18] [CON-1642] COVID-19 Guidance banner for employer finance --- .../SFA.DAS.EmployerFinance.Web.csproj | 1 + .../Shared/_COVID19GuidanceBanner.cshtml | 5 +++ .../Views/Shared/_Layout.cshtml | 32 +++++++++++-------- 3 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 src/SFA.DAS.EmployerFinance.Web/Views/Shared/_COVID19GuidanceBanner.cshtml diff --git a/src/SFA.DAS.EmployerFinance.Web/SFA.DAS.EmployerFinance.Web.csproj b/src/SFA.DAS.EmployerFinance.Web/SFA.DAS.EmployerFinance.Web.csproj index 7a13891fb8..9727633cc4 100644 --- a/src/SFA.DAS.EmployerFinance.Web/SFA.DAS.EmployerFinance.Web.csproj +++ b/src/SFA.DAS.EmployerFinance.Web/SFA.DAS.EmployerFinance.Web.csproj @@ -636,6 +636,7 @@ + diff --git a/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_COVID19GuidanceBanner.cshtml b/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_COVID19GuidanceBanner.cshtml new file mode 100644 index 0000000000..34657185af --- /dev/null +++ b/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_COVID19GuidanceBanner.cshtml @@ -0,0 +1,5 @@ +
+

+ Coronavirus (COVID-19): read our guidance on the changes we're making to apprenticeships and find out how you can pause your apprenticeships. +

+
diff --git a/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_Layout.cshtml b/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_Layout.cshtml index cf88a6c246..eeda6d1cbb 100644 --- a/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_Layout.cshtml +++ b/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_Layout.cshtml @@ -1,13 +1,13 @@ -@using Microsoft.ApplicationInsights.Extensibility -@using SFA.DAS.Authorization -@using SFA.DAS.Authorization.Mvc +@using Microsoft.ApplicationInsights.Extensibility +@using SFA.DAS.Authorization +@using SFA.DAS.Authorization.Mvc @using SFA.DAS.EmployerFinance.Web.Helpers - - - - - - + + + + + + @@ -97,8 +97,8 @@ @Html.Partial("_ZenDeskWidget") - - + + + diff --git a/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_Layout.cshtml b/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_Layout.cshtml index eeda6d1cbb..e4de9335ee 100644 --- a/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_Layout.cshtml +++ b/src/SFA.DAS.EmployerFinance.Web/Views/Shared/_Layout.cshtml @@ -9,19 +9,6 @@ - - - - - @ViewBag.Title - Manage apprentices @if (!string.IsNullOrWhiteSpace(ViewBag.MetaDesc)) @@ -57,6 +44,7 @@ + @Html.Partial("_GoogleTagManager") @Html.Partial("GoogleAnalyticsInfo") @@ -97,14 +85,10 @@ @Html.Partial("_ZenDeskWidget") + @Html.Partial("_ZenDeskApiPush") - - - + @Html.Partial("_GoogleTagManagerNoScript")