@@ -69,7 +69,7 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
6969 } ,
7070 ] ,
7171 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' ] ]
7373 } ;
7474 dtTrigger : Subject < any > = new Subject ( ) ;
7575 @ViewChild ( DataTableDirective , { static : false } )
@@ -79,7 +79,7 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
7979 rerenderTableSubscription : Subscription ;
8080 resultSum : TotalHours ;
8181 resultSumEntriesSelected : TotalHours ;
82- resultSumEntriesSelected$ :Observable < TotalHours > ;
82+ resultSumEntriesSelected$ : Observable < TotalHours > ;
8383 totalHoursSubscription : Subscription ;
8484 dateTimeOffset : ParseDateTimeOffset ;
8585
@@ -96,7 +96,9 @@ export class TimeEntriesTableComponent implements OnInit, OnDestroy, AfterViewIn
9696 this . actionsSubject$
9797 . pipe ( filter ( ( action : any ) => action . type === UserActionTypes . LOAD_USERS_SUCCESS ) )
9898 . 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 ;
100102 } ) ;
101103 }
102104
0 commit comments