Disables project input on /plans/edit/:finalized_id, fixes Breadcrumb translate, fixes message on dialog of finalizing dmp with no datasets
This commit is contained in:
parent
6607714e4c
commit
b8c498013e
|
@ -179,19 +179,20 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
|||
this.formGroup = this.dmp.buildForm();
|
||||
this.registerFormEventsForNewItem();
|
||||
if (this.isAuthenticated) {
|
||||
const breadCrumbs = [];
|
||||
breadCrumbs.push({
|
||||
this.language.get('NAV-BAR.MY-DMPS').pipe(takeUntil(this._destroyed)).subscribe(x => {
|
||||
this.breadCrumbs = Observable.of([
|
||||
{
|
||||
parentComponentName: null,
|
||||
label: this.language.instant('NAV-BAR.MY-DMPS'),
|
||||
url: "/plans"
|
||||
});
|
||||
breadCrumbs.push({
|
||||
label: x,
|
||||
url: '/plans'
|
||||
},
|
||||
{
|
||||
parentComponentName: null,
|
||||
label: "CREATE NEW DMP",
|
||||
url: "/plans/new"
|
||||
}
|
||||
);
|
||||
this.breadCrumbs = Observable.of(breadCrumbs);
|
||||
]);
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
</mat-panel-title>
|
||||
<mat-panel-description></mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
<div *ngIf="allDatasets.length > 0">
|
||||
<div *ngFor="let dataset of allDatasets" class="row pl-3 datasets">
|
||||
<mat-icon *ngIf="isDraft(dataset)" class="col-1 draft-bookmark">bookmark</mat-icon>
|
||||
<mat-icon *ngIf="!isDraft(dataset)" class="col-1 finalized-bookmark">bookmark</mat-icon>
|
||||
|
@ -33,6 +34,8 @@
|
|||
{{ dataset.label }}</h4>
|
||||
<h4 *ngIf="!isDraft(dataset)" class="col-11 ml-auto mt-1 mb-4">{{ dataset.label }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="allDatasets.length === 0" class="emptyList">{{ 'DMP-FINALISE-DIALOG.EMPTY' | translate }} </div>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
|
||||
|
@ -70,18 +73,21 @@
|
|||
</mat-panel-title>
|
||||
<mat-panel-description></mat-panel-description>
|
||||
</mat-expansion-panel-header>
|
||||
<div *ngIf="allDatasetLabels.length > 0">
|
||||
<div *ngFor="let label of allDatasetLabels" class="row pl-3 datasets">
|
||||
<mat-icon class="col-1 finalized-bookmark">bookmark</mat-icon>
|
||||
<h4 class="col-11 ml-auto mt-1 mb-4">{{ label }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="allDatasetLabels.length === 0" class="emptyList"> {{ 'DMP-FINALISE-DIALOG.EMPTY' | translate }} </div>
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<mat-error class="row pt-2 pb-2 pl-4 pr-4">
|
||||
<div *ngIf="datasetsFinalized && datasetsFinalized.length != 0">
|
||||
<div class="row pt-2 pb-2 pl-4 pr-4">
|
||||
{{ 'DMP-FINALISE-DIALOG.IMPACT' | translate }}
|
||||
</mat-error>
|
||||
</div>
|
||||
<div class="row pl-4 pr-4">
|
||||
{{ 'DMP-FINALISE-DIALOG.AFTER-FINALIZATION' | translate }}
|
||||
</div>
|
||||
|
|
|
@ -67,3 +67,8 @@
|
|||
.datasets span {
|
||||
color: #4687f0;
|
||||
}
|
||||
|
||||
.emptyList {
|
||||
font-style: italic;
|
||||
color:rgba(0, 0, 0, 0.26);
|
||||
}
|
||||
|
|
|
@ -39,11 +39,6 @@ export class ProjectTabComponent implements OnInit {
|
|||
titleFn: (item) => item['label']
|
||||
};
|
||||
|
||||
if (!this.formGroup) {
|
||||
this.project = new ProjectTabModel();
|
||||
this.formGroup = this.project.buildForm();
|
||||
}
|
||||
|
||||
this.isCreateNew = (this.formGroup.get('label').value != null && this.formGroup.get('label').value.length > 0);
|
||||
this.setValidators();
|
||||
}
|
||||
|
@ -65,7 +60,12 @@ export class ProjectTabComponent implements OnInit {
|
|||
this.formGroup.get('existProject').disable();
|
||||
this.formGroup.get('label').enable();
|
||||
this.formGroup.get('description').enable();
|
||||
} else {
|
||||
} else if (this.isFinalized) {
|
||||
this.formGroup.get('existProject').disable();
|
||||
this.formGroup.get('label').disable();
|
||||
this.formGroup.get('description').disable();
|
||||
}
|
||||
else {
|
||||
this.formGroup.get('existProject').enable();
|
||||
this.formGroup.get('label').disable();
|
||||
this.formGroup.get('label').reset();
|
||||
|
|
|
@ -848,6 +848,7 @@
|
|||
"DMP-FINALISE-DIALOG": {
|
||||
"DMP": "DMP",
|
||||
"DATASETS": "Datasets",
|
||||
"EMPTY": "No Datasets for this DMP so far",
|
||||
"SUBMIT": "Submit",
|
||||
"FINALISE-TITLE": "Do you want to finalise any of the following Draft Datasets?",
|
||||
"ALREADY-FINALISED-DATASETS": "Already Finalized Datasets",
|
||||
|
|
Loading…
Reference in New Issue