@@ -69,7 +69,7 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
69
69
} ,
70
70
] ,
71
71
columnDefs : [ { type : 'date' , targets : 2 } , { orderable : false , targets : [ 0 ] } ] ,
72
- order : [ [ 1 , 'asc' ] , [ 2 , 'desc' ] , [ 4 , 'desc' ] ]
72
+ order : [ [ 1 , 'asc' ] , [ 2 , 'desc' ] , [ 4 , 'desc' ] ]
73
73
} ;
74
74
dtTrigger : Subject < any > = new Subject ( ) ;
75
75
@ViewChild ( DataTableDirective , { static : false } )
@@ -79,7 +79,7 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
79
79
rerenderTableSubscription : Subscription ;
80
80
resultSum : TotalHours ;
81
81
resultSumEntriesSelected : TotalHours ;
82
- resultSumEntriesSelected$ :Observable < TotalHours > ;
82
+ resultSumEntriesSelected$ : Observable < TotalHours > ;
83
83
totalHoursSubscription : Subscription ;
84
84
dateTimeOffset : ParseDateTimeOffset ;
85
85
@@ -96,7 +96,9 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
96
96
this . actionsSubject$
97
97
. pipe ( filter ( ( action : any ) => action . type === UserActionTypes . LOAD_USERS_SUCCESS ) )
98
98
. subscribe ( ( action ) => {
99
- this . users = action . payload ;
99
+ const sortUsers = [ ...action . payload ] ;
100
+ sortUsers . sort ( ( a , b ) => a . name . localeCompare ( b . name ) ) ;
101
+ this . users = sortUsers ;
100
102
} ) ;
101
103
}
102
104
0 commit comments