Skip to content

Commit d6a5f00

Browse files
committed
TD-5242-verified if delegate account is active
1 parent 1bd0203 commit d6a5f00

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

DigitalLearningSolutions.Web/Views/SuperAdmin/Users/UserCentreAccounts.cshtml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,15 @@
5858
{
5959
if (centreRow.CentreId == admin.CentreId)
6060
{
61-
<a asp-action="RedirectToAdmin" asp-route-AdminId="@admin.Id">Admin@(admin.Active ? "" : "(Inactive)")</a>
61+
bool IsDelegateActive = false;
62+
foreach (var delegates in Model.UserEntity.DelegateAccounts)
63+
{
64+
if (centreRow.CentreId == delegates.CentreId)
65+
{
66+
IsDelegateActive = delegates.Active;
67+
}
68+
}
69+
<a asp-action="RedirectToAdmin" asp-route-AdminId="@admin.Id">Admin@(!admin.Active && IsDelegateActive ? "(Inactive)" : "")</a>
6270
}
6371
}
6472
}

0 commit comments

Comments
 (0)