Skip to content

Commit 5a428b7

Browse files
committed
Merge branch 'DLS-Release-v1.1.1' into UAT
2 parents c541d9d + b1438be commit 5a428b7

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,7 @@ public int GetAdminUserRoleForFrameworkId(int adminId, int frameworkId)
18271827
@"SELECT CASE WHEN FW.OwnerAdminID = @adminId THEN 3 WHEN fwc.CanModify = 1 THEN 2 WHEN fwc.CanModify = 0 THEN 1 ELSE 0 END AS UserRole
18281828
FROM Frameworks AS FW LEFT OUTER JOIN
18291829
FrameworkCollaborators AS fwc ON fwc.FrameworkID = FW.ID AND fwc.AdminID = @adminId
1830-
WHERE FW.ID = @frameworkId",
1830+
WHERE FW.ID = @frameworkId and FWC.IsDeleted=0",
18311831
new { adminId, frameworkId }
18321832
);
18331833
}

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)