Merge pull request #4744 from GabrielInTheWorld/assignment-list

Refactores sorting of assignment-list
This commit is contained in:
Emanuel Schütze 2019-05-28 11:21:24 +02:00 committed by GitHub
commit a6f2147c93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,9 +17,10 @@ export class AssignmentSortListService extends BaseSortListService<ViewAssignmen
* Define the sort options * Define the sort options
*/ */
public sortOptions: OsSortingOption<ViewAssignment>[] = [ public sortOptions: OsSortingOption<ViewAssignment>[] = [
{ property: 'assignment', label: 'Name' }, { property: 'title', label: 'Name' },
{ property: 'phase', label: 'Phase' }, { property: 'phase', label: 'Phase' },
{ property: 'candidateAmount', label: 'Number of candidates' } { property: 'candidateAmount', label: 'Number of candidates' },
{ property: 'id', label: 'Creation date' }
]; ];
/** /**
@ -39,7 +40,7 @@ export class AssignmentSortListService extends BaseSortListService<ViewAssignmen
*/ */
public async getDefaultDefinition(): Promise<OsSortingDefinition<ViewAssignment>> { public async getDefaultDefinition(): Promise<OsSortingDefinition<ViewAssignment>> {
return { return {
sortProperty: 'assignment', sortProperty: 'title',
sortAscending: true sortAscending: true
}; };
} }