Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this consistent with the changes done in the other related tickets. 'Last accessed date'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


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