From 3aa81a99ff617c2b3ec9fd938a4f2552053e32d9 Mon Sep 17 00:00:00 2001 From: dannygb Date: Fri, 30 Apr 2021 11:50:47 +0100 Subject: [PATCH] [TM-12] Adds Your transfers page & wraps it in a feature toggle --- .../Extensions/UrlHelperExtensions.cs | 8 +++++++ .../Views/EmployerTeam/Index.cshtml | 10 ++++++++ .../Controllers/TransfersController.cs | 17 ++++++++++++++ .../SFA.DAS.EmployerFinance.Web.csproj | 2 ++ .../Views/Transfers/Index.cshtml | 23 +++++++++++++++++++ 5 files changed, 60 insertions(+) create mode 100644 src/SFA.DAS.EmployerFinance.Web/Controllers/TransfersController.cs create mode 100644 src/SFA.DAS.EmployerFinance.Web/Views/Transfers/Index.cshtml diff --git a/src/SFA.DAS.EmployerAccounts.Web/Extensions/UrlHelperExtensions.cs b/src/SFA.DAS.EmployerAccounts.Web/Extensions/UrlHelperExtensions.cs index 4abbbd660c..c5376efca0 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Extensions/UrlHelperExtensions.cs +++ b/src/SFA.DAS.EmployerAccounts.Web/Extensions/UrlHelperExtensions.cs @@ -54,6 +54,14 @@ public static string EmployerIncentivesAction(this UrlHelper helper, string path return Action(baseUrl, $"{hashedAccountId}/{path}"); } + public static string YourTransfersAction(this UrlHelper helper, string path = "") + { + var configuration = DependencyResolver.Current.GetService(); + var baseUrl = configuration.EmployerFinanceBaseUrl; + var hashedAccountId = helper.RequestContext.RouteData.Values[ControllerConstants.AccountHashedIdRouteKeyName]; + return Action(baseUrl, $"transfers/{hashedAccountId}"); + } + public static string EmployerProjectionsAction(this UrlHelper helper, string path) { var configuration = DependencyResolver.Current.GetService(); diff --git a/src/SFA.DAS.EmployerAccounts.Web/Views/EmployerTeam/Index.cshtml b/src/SFA.DAS.EmployerAccounts.Web/Views/EmployerTeam/Index.cshtml index 70291fa07d..7e8ba5283b 100644 --- a/src/SFA.DAS.EmployerAccounts.Web/Views/EmployerTeam/Index.cshtml +++ b/src/SFA.DAS.EmployerAccounts.Web/Views/EmployerTeam/Index.cshtml @@ -102,6 +102,16 @@ else

Apply for the payment, view applications and change your payment details.

} + + @if (Model.Data.ApprenticeshipEmployerType!= ApprenticeshipEmployerType.Levy + && Html.IsAuthorized("EmployerFeature.TransfersMatching")) + { +
+

Your transfers

+

View your 25% transfers balance and manage your transfers, including finding a business to transfer your levy to.

+
+ } + diff --git a/src/SFA.DAS.EmployerFinance.Web/Controllers/TransfersController.cs b/src/SFA.DAS.EmployerFinance.Web/Controllers/TransfersController.cs new file mode 100644 index 0000000000..08bbb2ba63 --- /dev/null +++ b/src/SFA.DAS.EmployerFinance.Web/Controllers/TransfersController.cs @@ -0,0 +1,17 @@ +using System.Web.Mvc; +using SFA.DAS.Authorization.Mvc.Attributes; + +namespace SFA.DAS.EmployerFinance.Web.Controllers +{ + [DasAuthorize("EmployerFeature.TransfersMatching")] + [RoutePrefix("transfers")] + public class TransfersController : Controller + { + [HttpGet] + [Route("{hashedAccountId}")] + public ActionResult Index(string hashedAccountId) + { + return View(); + } + } +} \ No newline at end of file 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 2b142aa5c4..8250f8b29e 100644 --- a/src/SFA.DAS.EmployerFinance.Web/SFA.DAS.EmployerFinance.Web.csproj +++ b/src/SFA.DAS.EmployerFinance.Web/SFA.DAS.EmployerFinance.Web.csproj @@ -169,6 +169,7 @@ + @@ -641,6 +642,7 @@ + diff --git a/src/SFA.DAS.EmployerFinance.Web/Views/Transfers/Index.cshtml b/src/SFA.DAS.EmployerFinance.Web/Views/Transfers/Index.cshtml new file mode 100644 index 0000000000..e9d6f66ab5 --- /dev/null +++ b/src/SFA.DAS.EmployerFinance.Web/Views/Transfers/Index.cshtml @@ -0,0 +1,23 @@ + +@{ + ViewBag.PageID = "transfers"; + ViewBag.Section = "transfers"; + ViewBag.Title = "Transfers"; + ViewBag.AnalyticsData.Vpv = $"/finance/home"; + ViewBag.ZenDeskLabel = "eas-finance"; +} + +

Your Transfers

+ +@section breadcrumb { + +} + +@section pageSpecificJS { +} \ No newline at end of file