Skip to content

Commit 0b93535

Browse files
committed
TD-4946-Name property initialized from UserAccount entity
1 parent 3098eaa commit 0b93535

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

DigitalLearningSolutions.Web/ViewModels/TrackingSystem/Centre/Administrator/SearchableAdminViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ ReturnPageQuery returnPageQuery
1717
)
1818
{
1919
Id = admin.AdminAccount.Id;
20-
Name = admin.SearchableName;
20+
Name = string.IsNullOrWhiteSpace(admin.UserAccount.FirstName) ? admin.UserAccount.LastName :
21+
$"{admin.UserAccount.LastName}, {admin.UserAccount.FirstName}";
2122
CategoryName = admin.AdminAccount.CategoryName ?? "All";
2223
EmailAddress = admin.EmailForCentreNotifications;
2324
IsLocked = admin.UserAccount.FailedLoginCount >= AuthHelper.FailedLoginThreshold;

0 commit comments

Comments
 (0)