Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ public List<DelegateUserCard> GetDelegateUserCardsForExportByCentreId(String sea

if (sortBy == "SearchableName")
orderBy = " ORDER BY LTRIM(LastName) " + sortDirection + ", LTRIM(FirstName) ";
else if(sortBy == "LastAccessed")
orderBy = " ORDER BY LastAccessed " + sortDirection;
else
orderBy = " ORDER BY DateRegistered " + sortDirection;

Expand Down
3 changes: 3 additions & 0 deletions DigitalLearningSolutions.Data/Helpers/GenericSortingHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ public static class DelegateSortByOptions
public static readonly (string DisplayText, string PropertyName) Name =
("Name", nameof(DelegateUserCard.SearchableName));

public static readonly (string DisplayText, string PropertyName) LastAccessed =
("Last accessed date", nameof(DelegateUserCard.LastAccessed));

public static readonly (string DisplayText, string PropertyName) RegistrationDate =
("Registration Date", nameof(DelegateUserCard.DateRegistered));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ IEnumerable<FilterModel> availableFilters
public override IEnumerable<(string, string)> SortOptions { get; } = new[]
{
DelegateSortByOptions.Name,
DelegateSortByOptions.LastAccessed,
DelegateSortByOptions.RegistrationDate,
};

Expand Down
Loading