File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
LearningHub.Nhs.WebUI/Controllers Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 44
55namespace LearningHub . Nhs . WebUI . Controllers
66{
7+ using System ;
78 using System . Collections . Generic ;
89 using System . Linq ;
910 using System . Net ;
@@ -1236,7 +1237,17 @@ private async Task<AccountCreationConfirmation> GetAccountConfirmationDetails(Ac
12361237 var employer = await this . locationService . GetByIdAsync ( int . TryParse ( accountCreationViewModel . LocationId , out int primaryEmploymentId ) ? primaryEmploymentId : 0 ) ;
12371238 var region = await this . regionService . GetAllAsync ( ) ;
12381239 var specialty = await this . specialtyService . GetSpecialtiesAsync ( ) ;
1239- var role = await this . jobRoleService . GetPagedFilteredAsync ( accountCreationViewModel . CurrentRoleName , accountCreationViewModel . CurrentPageIndex , UserRegistrationContentPageSize ) ;
1240+ var role = new Tuple < int , List < JobRoleBasicViewModel > > ( 0 , null ) ;
1241+ if ( ! string . IsNullOrEmpty ( accountCreationViewModel . CurrentRoleName ) && accountCreationViewModel . CurrentRoleName . Contains ( '/' ) )
1242+ {
1243+ string jobrole = accountCreationViewModel . CurrentRoleName . Replace ( "/" , " " ) ;
1244+ role = await this . jobRoleService . GetPagedFilteredAsync ( jobrole , accountCreationViewModel . CurrentPageIndex , UserRegistrationContentPageSize ) ;
1245+ }
1246+ else
1247+ {
1248+ role = await this . jobRoleService . GetPagedFilteredAsync ( accountCreationViewModel . CurrentRoleName , accountCreationViewModel . CurrentPageIndex , UserRegistrationContentPageSize ) ;
1249+ }
1250+
12401251 if ( role . Item1 > 0 )
12411252 {
12421253 accountCreationViewModel . CurrentRoleName = role . Item2 . FirstOrDefault ( x => x . Id == int . Parse ( accountCreationViewModel . CurrentRole ) ) . NameWithStaffGroup ;
You can’t perform that action at this time.
0 commit comments