11
22namespace DigitalLearningSolutions . Web . Controllers . Support
33{
4- using DigitalLearningSolutions . Data . DataServices . UserDataService ;
5- using DigitalLearningSolutions . Data . DataServices ;
64 using DigitalLearningSolutions . Web . Helpers ;
75 using DigitalLearningSolutions . Web . Models . Enums ;
86 using Microsoft . AspNetCore . Mvc ;
@@ -32,26 +30,26 @@ namespace DigitalLearningSolutions.Web.Controllers.Support
3230 public class RequestSupportTicketController : Controller
3331 {
3432 private readonly IConfiguration configuration ;
35- private readonly IUserDataService userDataService ;
36- private readonly ICentresDataService centresDataService ;
33+ private readonly IUserService userService ;
34+ private readonly ICentresService centresService ;
3735 private readonly IWebHostEnvironment webHostEnvironment ;
38- private readonly IRequestSupportTicketDataService requestSupportTicketDataService ;
36+ private readonly IRequestSupportTicketService requestSupportTicketService ;
3937 private readonly IFreshdeskService freshdeskService ;
4038 private readonly IMultiPageFormService multiPageFormService ;
4139 string uploadDir = string . Empty ;
4240 public RequestSupportTicketController ( IConfiguration configuration
43- , IUserDataService userDataService
44- , ICentresDataService centresDataService
41+ , IUserService userService
42+ , ICentresService centresService
4543 , IWebHostEnvironment webHostEnvironment
46- , IRequestSupportTicketDataService requestSupportTicketDataService
44+ , IRequestSupportTicketService requestSupportTicketService
4745 , IFreshdeskService freshdeskService
4846 , IMultiPageFormService multiPageFormService )
4947 {
5048 this . configuration = configuration ;
51- this . userDataService = userDataService ;
52- this . centresDataService = centresDataService ;
49+ this . userService = userService ;
50+ this . centresService = centresService ;
5351 this . webHostEnvironment = webHostEnvironment ;
54- this . requestSupportTicketDataService = requestSupportTicketDataService ;
52+ this . requestSupportTicketService = requestSupportTicketService ;
5553 this . freshdeskService = freshdeskService ;
5654 this . multiPageFormService = multiPageFormService ;
5755 uploadDir = Path . Combine ( webHostEnvironment . WebRootPath , "Uploads\\ " ) ;
@@ -65,18 +63,18 @@ public IActionResult Index(DlsSubApplication dlsSubApplication)
6563 configuration . GetCurrentSystemBaseUrl ( )
6664 ) ;
6765 var centreId = User . GetCentreIdKnownNotNull ( ) ;
68- var userName = userDataService . GetUserDisplayName ( User . GetUserId ( ) ?? 0 ) ;
69- var userCentreEmail = requestSupportTicketDataService . GetUserCentreEmail ( User . GetUserId ( ) ?? 0 , centreId ) ;
66+ var userName = userService . GetUserDisplayName ( User . GetUserId ( ) ?? 0 ) ;
67+ var userCentreEmail = requestSupportTicketService . GetUserCentreEmail ( User . GetUserId ( ) ?? 0 , centreId ) ;
7068 var adminUserID = User . GetAdminId ( ) ;
71- var centreName = centresDataService . GetCentreName ( centreId ) ;
69+ var centreName = centresService . GetCentreName ( centreId ) ;
7270 setupRequestSupportData ( userName , userCentreEmail , adminUserID ?? 0 , centreName ) ;
7371 return View ( "Request" , model ) ;
7472 }
7573
7674 [ Route ( "/{dlsSubApplication}/RequestSupport/TypeofRequest" ) ]
7775 public IActionResult TypeofRequest ( DlsSubApplication dlsSubApplication )
7876 {
79- var requestTypes = requestSupportTicketDataService . GetRequestTypes ( ) ;
77+ var requestTypes = requestSupportTicketService . GetRequestTypes ( ) ;
8078 var data = multiPageFormService . GetMultiPageFormData < RequestSupportTicketData > (
8179 MultiPageFormDataFeature . AddCustomWebForm ( "RequestSupportTicketCWF" ) ,
8280 TempData
@@ -89,7 +87,7 @@ public IActionResult TypeofRequest(DlsSubApplication dlsSubApplication)
8987 [ Route ( "/{dlsSubApplication}/RequestSupport/setRequestType" ) ]
9088 public IActionResult setRequestType ( DlsSubApplication dlsSubApplication , RequestTypeViewModel RequestTypemodel , int requestType )
9189 {
92- var requestTypes = requestSupportTicketDataService . GetRequestTypes ( ) ;
90+ var requestTypes = requestSupportTicketService . GetRequestTypes ( ) ;
9391 var reqType = requestTypes . ToList ( ) . Where ( x => x . ID == requestType )
9492 . Select ( ticketRequestTypes => new { ticketRequestTypes . RequestTypes , ticketRequestTypes . FreshdeskRequestTypes } ) . FirstOrDefault ( ) ;
9593
0 commit comments