Sort projects list
This commit is contained in:
parent
cbd1a2a9e3
commit
adf62d2d8a
@ -35,7 +35,7 @@
|
||||
</div>
|
||||
|
||||
<div class="table-content">
|
||||
<div *ngFor="let pw of appStateService.allProjects | sortBy:'desc':'projectDate'"
|
||||
<div *ngFor="let pw of appStateService.allProjects | sortBy:sortingOption.order:sortingOption.column"
|
||||
[routerLink]="'/ui/projects/'+pw.project.projectId"
|
||||
class="table-item pointer"
|
||||
>
|
||||
|
||||
@ -12,7 +12,8 @@ import { DoughnutChartConfig } from '../../components/simple-doughnut-chart/simp
|
||||
|
||||
class SortingOption {
|
||||
label: string;
|
||||
value: string;
|
||||
order: string;
|
||||
column: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
@ -24,8 +25,8 @@ export class ProjectListingScreenComponent implements OnInit {
|
||||
public projectsChartData: DoughnutChartConfig [] = [];
|
||||
public documentsChartData: DoughnutChartConfig [] = [];
|
||||
public sortingOptions: SortingOption[] = [
|
||||
{ label: 'Recent', value: '\'asc\':\'projectDate\'' },
|
||||
{ label: 'Alphabetically', value: 'alphabetically' }
|
||||
{ label: 'Recent', order: 'desc', column: 'projectDate' },
|
||||
{ label: 'Alphabetically', order: 'asc', column: 'project.projectName' }
|
||||
];
|
||||
public sortingOption: SortingOption = this.sortingOptions[0];
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user