@@ -10,6 +10,7 @@ import { WindowRef } from 'src/app/services/windowRef.service';
1010import { ColumnDefinitions } from 'src/app/shared/config/columnDefinitions' ;
1111import { Person , PersonStatus } from 'src/app/shared/models' ;
1212import { BookmarksState , ToggleBookmark } from 'src/app/shared/states' ;
13+ import { runtimeEnvironment } from 'src/environments/runtime-environment' ;
1314
1415@Component ( {
1516 selector : 'app-user-detail' ,
@@ -34,6 +35,7 @@ export class UserDetailComponent implements OnInit, OnDestroy {
3435
3536 @Input ( )
3637 public previewView : boolean = false ;
38+ public rocketChatLink : string | null = null ;
3739 constructor (
3840 private snackBar : MatSnackBar ,
3941 private mailService : MailService ,
@@ -44,6 +46,7 @@ export class UserDetailComponent implements OnInit, OnDestroy {
4446
4547 public ngOnInit ( ) {
4648 this . getRandomMoney ( ) ;
49+ this . rocketChatLink = this . getRocketChatLink ( ) ;
4750 this . bookmarks$ . pipe ( untilComponentDestroyed ( this ) ) . subscribe ( bookmarks => {
4851 const index = bookmarks . findIndex ( p => p . Id === this . person . Id ) ;
4952 if ( index > - 1 ) {
@@ -94,6 +97,10 @@ export class UserDetailComponent implements OnInit, OnDestroy {
9497 this . store . dispatch ( new ToggleBookmark ( this . person ) ) ;
9598 }
9699
100+ public getRocketChatLink ( ) : string | null {
101+ return runtimeEnvironment . rocketChatUrl !== undefined ? runtimeEnvironment . rocketChatUrl + '/direct/' + this . person . Id . toLowerCase ( ) : null ;
102+ }
103+
97104 public ngOnDestroy ( ) { }
98105
99106 @HostListener ( 'click' )
0 commit comments