@ -238,8 +238,8 @@ export class GfImportActivitiesDialog implements OnDestroy {
. subscribe ( ( { activities } ) = > {
. subscribe ( ( { activities } ) = > {
this . activities = activities ;
this . activities = activities ;
this . dataSource = new MatTableDataSource ( activities . reverse ( ) ) ;
this . dataSource = new MatTableDataSource ( activities . reverse ( ) ) ;
this . totalItems = activities . length ;
this . pageIndex = 0 ;
this . pageIndex = 0 ;
this . totalItems = activities . length ;
aStepper . next ( ) ;
aStepper . next ( ) ;
@ -247,9 +247,8 @@ export class GfImportActivitiesDialog implements OnDestroy {
} ) ;
} ) ;
}
}
public onPageChanged ( event : PageEvent ) {
public onPageChanged ( { pageIndex } : PageEvent ) {
this . pageIndex = event . pageIndex ;
this . pageIndex = pageIndex ;
// Client-side pagination - no need to refetch data as all activities are in memory
}
}
public onReset ( aStepper : MatStepper ) {
public onReset ( aStepper : MatStepper ) {
@ -347,8 +346,8 @@ export class GfImportActivitiesDialog implements OnDestroy {
} ) ;
} ) ;
this . activities = activities ;
this . activities = activities ;
this . dataSource = new MatTableDataSource ( activities . reverse ( ) ) ;
this . dataSource = new MatTableDataSource ( activities . reverse ( ) ) ;
this . totalItems = activities . length ;
this . pageIndex = 0 ;
this . pageIndex = 0 ;
this . totalItems = activities . length ;
} catch ( error ) {
} catch ( error ) {
console . error ( error ) ;
console . error ( error ) ;
this . handleImportError ( { error , activities : content.activities } ) ;
this . handleImportError ( { error , activities : content.activities } ) ;
@ -366,8 +365,8 @@ export class GfImportActivitiesDialog implements OnDestroy {
} ) ;
} ) ;
this . activities = data . activities ;
this . activities = data . activities ;
this . dataSource = new MatTableDataSource ( data . activities . reverse ( ) ) ;
this . dataSource = new MatTableDataSource ( data . activities . reverse ( ) ) ;
this . totalItems = data . activities . length ;
this . pageIndex = 0 ;
this . pageIndex = 0 ;
this . totalItems = data . activities . length ;
} catch ( error ) {
} catch ( error ) {
console . error ( error ) ;
console . error ( error ) ;
this . handleImportError ( {
this . handleImportError ( {