import { Component, OnInit, Input } from '@angular/core'; import { UserModel } from '../../../../core/model/user/user'; import { DmpEditorModel } from '../dmp-editor.model'; import { MatDialog } from '@angular/material'; import { DmpInvitationDialogComponent } from '../../invitation/dmp-invitation.component'; import { UserInfoListingModel } from '../../../../core/model/user/user-info-listing'; import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'app-people-tab', templateUrl: './people-tab.component.html', styleUrls: ['./people-tab.component.scss'] }) export class PeopleTabComponent implements OnInit { @Input() associatedUsers: Array; @Input() people: Array; @Input() dmp: DmpEditorModel; constructor( private dialog: MatDialog, private translate: TranslateService ) { } ngOnInit() { } openShareDialog(rowId: any, rowName: any) { const dialogRef = this.dialog.open(DmpInvitationDialogComponent, { // height: '250px', // width: '700px', data: { dmpId: rowId, dmpName: rowName } }); } roleDisplay(user: UserInfoListingModel) { if (user.role === 0) { return this.translate.instant('DMP-LISTING.OWNER'); } else if (user.role === 1) { return this.translate.instant('DMP-LISTING.MEMBER'); } else { return this.translate.instant('DMP-LISTING.OWNER'); } } removeUser() { } }