Skip to content

Commit a3f9761

Browse files
Merge pull request #244 from TechnologyEnhancedLearning/Develop/fixes/TD-3953-ManagerRoleFix
TD-3953 manager role fix
2 parents 9068108 + 025e512 commit a3f9761

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

LearningHub.Nhs.WebUI/Controllers/AccountController.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,6 @@ public async Task<IActionResult> CreateAccountWorkPlaceSearch()
953953
public async Task<IActionResult> CreateAccountWorkPlace(AccountCreationViewModel accountCreationViewModel)
954954
{
955955
var accountCreation = await this.multiPageFormService.GetMultiPageFormData<AccountCreationViewModel>(MultiPageFormDataFeature.AddRegistrationPrompt, this.TempData);
956-
957956
if (string.IsNullOrWhiteSpace(accountCreationViewModel.FilterText))
958957
{
959958
if (!string.IsNullOrWhiteSpace(accountCreation.LocationId))
@@ -1265,10 +1264,11 @@ private async Task<AccountCreationConfirmation> GetAccountConfirmationDetails(Ac
12651264
var employer = await this.locationService.GetByIdAsync(int.TryParse(accountCreationViewModel.LocationId, out int primaryEmploymentId) ? primaryEmploymentId : 0);
12661265
var region = await this.regionService.GetAllAsync();
12671266
var specialty = await this.specialtyService.GetSpecialtiesAsync();
1268-
var role = await this.jobRoleService.GetPagedFilteredAsync(accountCreationViewModel.CurrentRoleName, accountCreationViewModel.CurrentPageIndex, UserRegistrationContentPageSize);
1269-
if (role.Item1 > 0)
1267+
1268+
var role = await this.jobRoleService.GetFilteredAsync(accountCreationViewModel.CurrentRoleName);
1269+
if (role.Count > 0)
12701270
{
1271-
accountCreationViewModel.CurrentRoleName = role.Item2.FirstOrDefault(x => x.Id == int.Parse(accountCreationViewModel.CurrentRole)).NameWithStaffGroup;
1271+
accountCreationViewModel.CurrentRoleName = role.FirstOrDefault(x => x.Id == int.Parse(accountCreationViewModel.CurrentRole)).NameWithStaffGroup;
12721272
}
12731273

12741274
var grade = await this.gradeService.GetGradesForJobRoleAsync(int.TryParse(accountCreationViewModel.CurrentRole, out int roleId) ? roleId : 0);

0 commit comments

Comments
 (0)