Skip to content

Commit

Permalink
Merge pull request #36 from EasyAbp/sort-notifications
Browse files Browse the repository at this point in the history
Sort notifications
  • Loading branch information
gdlcf88 authored Jul 15, 2024
2 parents 7d16276 + 7a0f9f8 commit 066d6a4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0-preview.12</Version>
<Version>1.0.0-preview.13</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<AbpProjectType>module</AbpProjectType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ protected override NotificationDto MapToGetOutputDto(Notification entity)
return dto;
}

protected override IQueryable<Notification> ApplyDefaultSorting(IQueryable<Notification> query)
{
return query.OrderByDescending(e => e.Id);
}

protected override NotificationDto MapToGetListOutputDto(Notification entity)
{
return MapToGetOutputDto(entity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ protected override ProcessDto MapToGetOutputDto(Process entity)
return dto;
}

protected override IQueryable<Process> ApplyDefaultSorting(IQueryable<Process> query)
{
return query.OrderByDescending(e => e.Id);
}

protected override ProcessDto MapToGetListOutputDto(Process entity)
{
return MapToGetOutputDto(entity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
res.items.forEach(function (item) {
if (!existingAlertIds.has(item.id)) {
var newAlert = createAlert(item);
alertPlaceholder.append(newAlert)
alertPlaceholder.prepend(newAlert)
var newAlertNode = document.getElementById(item.id);
newAlertNode.addEventListener('close.bs.alert', function () {
tryClearInterval();
Expand Down

0 comments on commit 066d6a4

Please sign in to comment.