minor rollback
This commit is contained in:
parent
c807d28c29
commit
c11ab819cb
|
@ -77,14 +77,11 @@ export class UserProfileComponent extends BaseComponent implements OnInit, OnDes
|
||||||
}
|
}
|
||||||
|
|
||||||
getUserRole(dmp: DmpModel) {
|
getUserRole(dmp: DmpModel) {
|
||||||
let role = -1;
|
if (dmp.creator.id === this.currentUserId) {
|
||||||
dmp.users.forEach(user => {
|
return this.language.instant('USER-PROFILE.DMPS.CREATOR');
|
||||||
if (user.id === this.currentUserId) {
|
} else if (dmp.associatedUsers.map(x => x.id).indexOf(this.currentUserId) !== -1) {
|
||||||
role = user.role;
|
return this.language.instant('USER-PROFILE.DMPS.MEMBER');
|
||||||
}
|
}
|
||||||
});
|
|
||||||
if (role === 0) { return this.language.instant('USER-PROFILE.DMPS.CREATOR'); } else if (role === 1) { return this.language.instant('USER-PROFILE.DMPS.MEMBER'); }
|
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
showAllDmps() {
|
showAllDmps() {
|
||||||
|
|
Loading…
Reference in New Issue