@@ -5,6 +5,7 @@ import { QueryRef } from 'apollo-angular';
55import { NGXLogger } from 'ngx-logger' ;
66import { Subscription } from 'rxjs' ;
77import { AlertService } from 'src/app/services/alert/alert.service' ;
8+ import { AuthService } from 'src/app/services/auth/auth.service' ;
89import { CommunicationService } from 'src/app/services/communication.service' ;
910import { ErrorService } from 'src/app/services/error.service' ;
1011import { HubService } from 'src/app/services/hub/hub.service' ;
@@ -38,6 +39,7 @@ export class PeoplePage implements OnInit, OnDestroy {
3839 private readonly communcationService : CommunicationService ,
3940 private readonly usersPeopleGQLService : UsersPeopleGQL ,
4041 private readonly errorService : ErrorService ,
42+ private readonly authService : AuthService ,
4143 ) { }
4244
4345 ngOnInit ( ) {
@@ -113,6 +115,22 @@ export class PeoplePage implements OnInit, OnDestroy {
113115 } ) ;
114116 }
115117
118+ goToDiscoverPage ( ) {
119+ this . navCtrl . navigateForward ( 'discover' ) ;
120+ }
121+
122+ async goToQrPage ( ) {
123+ const user = await this . authService . user ( ) ;
124+ this . navCtrl . navigateForward ( 'qr' , {
125+ state : {
126+ data : user ?. shareableId ,
127+ title : user ?. firstName && user ?. lastName ? `${ user ?. firstName } ${ user ?. lastName } ` : undefined ,
128+ subtitle : 'Scan to invite me' ,
129+ image : user ?. image ,
130+ }
131+ } ) ;
132+ }
133+
116134 async filterPeople ( ev : any ) {
117135 this . filter = ev ?. target ?. value ;
118136 if ( this . filter && this . filter ?. trim ( ) !== '' ) {
0 commit comments