Skip to content

Commit

Permalink
sort plans in reverse chronological order
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTatiyants committed Apr 16, 2016
1 parent 9b004d7 commit eae3aee
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/assets/css/styles.css

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions app/assets/sass/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ code, .code {
margin-top: $padding-lg;
}

.pad-bottom {
margin-bottom: $padding-lg;
}

[tooltip]:before {
width: 150px;
text-transform: none;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/styles.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/components/plan-list/plan-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Welcome to PEV! Please <a [routerLink]="['/PlanNew']">submit</a> a plan for visualization
</div>

<table class="table">
<table class="table pad-bottom">
<tr *ngFor="#plan of plans">
<!-- this is a hack that should be converted to a proper dialog once that is available in angular 2-->
<div *ngIf="openDialog">
Expand Down
5 changes: 4 additions & 1 deletion app/services/plan-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export class PlanService {
}
}

return plans;
return _.chain(plans)
.sortBy('createdOn')
.reverse()
.value();
}

getPlan(id: string): IPlan {
Expand Down

0 comments on commit eae3aee

Please sign in to comment.