Fixes bug on cancel button of dmp creation form
This commit is contained in:
parent
8705f916b2
commit
71604b0ae1
|
@ -2,10 +2,13 @@
|
|||
<div class="container-fluid">
|
||||
<div *ngIf="dmp" class="card">
|
||||
<div class="card-header card-header-plain d-flex">
|
||||
<div class="card-desc d-flex flex-column justify-content-center">
|
||||
<div *ngIf="!isNew" class="card-desc d-flex flex-column justify-content-center">
|
||||
<h4 class="card-title">{{ dmp.label }}</h4>
|
||||
</div>
|
||||
<div class="d-flex ml-auto p-2">
|
||||
<div *ngIf="isNew" class="card-desc new-dmp d-flex flex-column justify-content-center">
|
||||
<h4 class="card-title">{{ 'DMP-EDITOR.TITLE.NEW' | translate }}</h4>
|
||||
</div>
|
||||
<div class="d-flex ml-auto p-2" *ngIf="!isNew">
|
||||
<button mat-icon-button [matMenuTriggerFor]="actionsMenu" class="ml-auto more-icon"
|
||||
(click)="$event.stopImmediatePropagation();">
|
||||
<mat-icon class="more-horiz">more_horiz</mat-icon>
|
||||
|
@ -37,7 +40,7 @@
|
|||
<div class="d-flex flex-column">
|
||||
<mat-tab-group class="mt-3">
|
||||
<mat-tab>
|
||||
<ng-template mat-tab-label class="tab-label">
|
||||
<ng-template mat-tab-label>
|
||||
<i class="material-icons-outlined mr-2">view_agenda</i>
|
||||
{{ 'SIDE-BAR.GENERAL' | translate }}
|
||||
</ng-template>
|
||||
|
@ -73,12 +76,18 @@
|
|||
</mat-tab-group>
|
||||
|
||||
<div class="d-flex justify-content-end pt-2 pb-4 pl-2 pr-2">
|
||||
<div>
|
||||
<div *ngIf="!isNew">
|
||||
<button mat-raised-button color="primary" (click)="cancel(dmp.id)" type="button"
|
||||
class="lightblue-btn text-uppercase mr-2">
|
||||
{{'DMP-EDITOR.ACTIONS.CANCEL' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="isNew">
|
||||
<button mat-raised-button color="primary" (click)="cancelCreation()" type="button"
|
||||
class="lightblue-btn text-uppercase mr-2">
|
||||
{{'DMP-EDITOR.ACTIONS.CANCEL' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
<!-- <div class="col"></div> -->
|
||||
<!-- <div class="col-auto" *ngIf="!isNew && this.formGroup.enabled">
|
||||
<button mat-raised-button color="primary" type="button" (click)="delete()">
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
color: #aaaaaa;
|
||||
}
|
||||
|
||||
.new-dmp {
|
||||
height: 3.5em;
|
||||
}
|
||||
|
||||
.more-icon :hover {
|
||||
color: #4687e6;
|
||||
}
|
||||
|
|
|
@ -255,6 +255,10 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
|||
// this.router.navigate(['/plans']);
|
||||
}
|
||||
|
||||
public cancelCreation(): void {
|
||||
this.router.navigate(['/plans']);
|
||||
}
|
||||
|
||||
public invite(): void {
|
||||
this.router.navigate(['/invite/' + this.dmp.id]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue