UI fixes and bug fixes
* Member of dmp cannot see dmp editor anymore. Redirects to overview * Hide percentage bar in dmp editor when editor is disabled (when finalized or locked) * Change font sizes on Resource page (static pages) * Fix issue of indeterministic disabled on DMP editor.
This commit is contained in:
parent
22ddc1311f
commit
9161dbda56
|
@ -79,7 +79,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto pr-0">
|
<div class="col-auto pr-0">
|
||||||
<app-form-progress-indication class="col-12" *ngIf="formGroup" [formGroup]="formGroup" [isDmpEditor]="true"></app-form-progress-indication>
|
<app-form-progress-indication class="col-12" *ngIf="formGroup && !formGroup.disabled && !lockStatus" [formGroup]="formGroup" [isDmpEditor]="true"></app-form-progress-indication>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto form" id="editor-form">
|
<div class="col-auto form" id="editor-form">
|
||||||
|
|
|
@ -33,7 +33,7 @@ import { ValidationErrorModel } from '@common/forms/validation/error-model/valid
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import * as FileSaver from 'file-saver';
|
import * as FileSaver from 'file-saver';
|
||||||
import { Observable, of as observableOf, interval } from 'rxjs';
|
import { Observable, of as observableOf, interval } from 'rxjs';
|
||||||
import { delay, map, takeUntil } from 'rxjs/operators';
|
import { catchError, delay, map, takeUntil } from 'rxjs/operators';
|
||||||
import { Principal } from "@app/core/model/auth/principal";
|
import { Principal } from "@app/core/model/auth/principal";
|
||||||
import { Role } from "@app/core/common/enum/role";
|
import { Role } from "@app/core/common/enum/role";
|
||||||
import { LockService } from '@app/core/services/lock/lock.service';
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
|
@ -185,6 +185,10 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
|
|
||||||
this.setIsUserOwner();
|
this.setIsUserOwner();
|
||||||
if (!this.isUserOwner) {
|
if (!this.isUserOwner) {
|
||||||
|
|
||||||
|
if(this.isUserMember()){
|
||||||
|
this.router.navigate(['plans', 'overview', itemId]);
|
||||||
|
}
|
||||||
this.isFinalized = true;
|
this.isFinalized = true;
|
||||||
this.formGroup.disable();
|
this.formGroup.disable();
|
||||||
}
|
}
|
||||||
|
@ -365,7 +369,15 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
setIsUserOwner() {
|
setIsUserOwner() {
|
||||||
if (this.dmp) {
|
if (this.dmp) {
|
||||||
const principal: Principal = this.authentication.current();
|
const principal: Principal = this.authentication.current();
|
||||||
this.isUserOwner = principal.id === this.dmp.users.find(x => x.role === Role.Owner).id;
|
this.isUserOwner = !!this.dmp.users.find(x => (x.role === Role.Owner) && (x.id === principal.id) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
isUserMember(): boolean{
|
||||||
|
try{
|
||||||
|
const principal: Principal = this.authentication.current();
|
||||||
|
return !!this.dmp.users.find(x => (x.role === Role.Member) && (x.id === principal.id) );
|
||||||
|
}catch{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,7 @@ section.benefits {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-family: 'Roboto',sans-serif;
|
font-family: 'Roboto',sans-serif;
|
||||||
font-size: 1.25rem;
|
font-size: 1.688rem;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
opacity: 0.81;
|
opacity: 0.81;
|
||||||
|
@ -209,7 +209,7 @@ section.benefits {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-family: 'Roboto', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 0.87rem;
|
font-size: 1.125rem;
|
||||||
line-height: 1.6rem;
|
line-height: 1.6rem;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
|
@ -218,7 +218,7 @@ section.benefits {
|
||||||
}
|
}
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
font-size: 0.87rem;
|
font-size: 1.125rem;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue