Removes preview status of DMP at Dataset Public Editor.
This commit is contained in:
parent
52cfc6cde6
commit
c1a6a8d30e
|
@ -89,9 +89,9 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
|||
this.dmpAutoCompleteConfiguration = {
|
||||
filterFn: this.searchDmp.bind(this),
|
||||
initialItems: (extraData) => this.searchDmp(''),
|
||||
displayFn: (item) => (item['status'] ? this.language.instant('TYPES.DATASET-STATUS.FINALISED').toUpperCase() : this.language.instant('TYPES.DATASET-STATUS.DRAFT').toUpperCase()) + ': ' + item['label'],
|
||||
displayFn: (item) => this.getDatasetDisplay(item),
|
||||
titleFn: (item) => item['label'],
|
||||
iconFn: (item) => item['status'] ? 'lock' : 'lock_open'
|
||||
iconFn: (item) => this.publicMode ? '' : (item['status'] ? 'lock' : 'lock_open')
|
||||
};
|
||||
|
||||
const params = this.route.snapshot.params;
|
||||
|
@ -368,6 +368,13 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
|||
this.router.navigate(['/datasets']);
|
||||
}
|
||||
|
||||
getDatasetDisplay(item: any): string {
|
||||
if (!this.publicMode) {
|
||||
return (item['status'] ? this.language.instant('TYPES.DATASET-STATUS.FINALISED').toUpperCase() : this.language.instant('TYPES.DATASET-STATUS.DRAFT').toUpperCase()) + ': ' + item['label'];
|
||||
}
|
||||
else { return item['label']; }
|
||||
}
|
||||
|
||||
getDefinition() {
|
||||
// if (this.formGroup.invalid) { setTimeout(() => this.stepper.selectedIndex = 0); return; }
|
||||
this.datasetWizardService.getDefinition(this.formGroup.get('profile').value)
|
||||
|
@ -437,7 +444,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
|||
}
|
||||
|
||||
hasNotReversableStatus(): boolean {
|
||||
if (this.formGroup.get('dmp').value) {
|
||||
if (this.formGroup.get('dmp').value && !this.publicMode) {
|
||||
return (this.formGroup.get('dmp').value.status == DmpStatus.Finalized && this.formGroup.get('status').value == DatasetStatus.Finalized);
|
||||
} else {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue