Merge Angular 16 Irish Monitor to develop #33
|
@ -206,8 +206,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
this.createRoleModal.okButtonLeft = false;
|
||||
this.createRoleModal.okButtonText = 'Create';
|
||||
this.roleFb = this.fb.group({
|
||||
name: this.fb.control(Role.mapType(this.type) + '.' + this.id, Validators.required),
|
||||
description: this.fb.control(Role.mapType(this.type) + ' ' + this.id, Validators.required)
|
||||
name: this.fb.control(Role.roleName(this.type, this.id), Validators.required),
|
||||
description: this.fb.control(Role.roleName(this.type, this.id), Validators.required)
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.roleFb.get('name').disable();
|
||||
|
|
|
@ -218,6 +218,9 @@ export class Role {
|
|||
public static USER_MANAGER = 'USER_MANAGER';
|
||||
public static CURATOR_CLAIM = 'CURATOR_CLAIM';
|
||||
|
||||
public static roleName(type: string, id: string) {
|
||||
return this.GROUP + this.mapType(type) + '.' + id;
|
||||
}
|
||||
|
||||
public static mapType(type: string, communityMap: boolean = true): string {
|
||||
if (type == "ri" && communityMap) {
|
||||
|
@ -225,7 +228,7 @@ export class Role {
|
|||
} else if (type == "organization") {
|
||||
type = "institution";
|
||||
}
|
||||
return Role.GROUP + type;
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue