Fix after prefill datase editor behaviour - 7545
This commit is contained in:
parent
da5ba952e1
commit
e4e009f5b1
|
@ -89,7 +89,7 @@
|
||||||
<span class="material-icons">chevron_right</span>
|
<span class="material-icons">chevron_right</span>
|
||||||
<div>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}</div>
|
<div>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="(this.step === this.maxStep) && !lockStatus && formGroup.get('profile').value && !viewOnly" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto">
|
<div *ngIf="(step === maxStep) && !lockStatus && formGroup.get('profile').value && !viewOnly" mat-raised-button type="button" class="col-auto stepper-btn add-dataset-btn ml-auto">
|
||||||
<div (click)="save(saveAnd.addNew)">{{ 'DATASET-WIZARD.ACTIONS.SAVE-AND-ADD' | translate }}</div>
|
<div (click)="save(saveAnd.addNew)">{{ 'DATASET-WIZARD.ACTIONS.SAVE-AND-ADD' | translate }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <mat-slide-toggle [(ngModel)]="showtocentriesErrors">
|
<!-- <mat-slide-toggle [(ngModel)]="showtocentriesErrors">
|
||||||
|
|
||||||
</mat-slide-toggle> -->
|
</mat-slide-toggle> -->
|
||||||
|
|
||||||
<!-- <div class="row">
|
<!-- <div class="row">
|
||||||
|
|
|
@ -259,6 +259,9 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme
|
||||||
this.formGroup = this.datasetWizardModel.buildForm();
|
this.formGroup = this.datasetWizardModel.buildForm();
|
||||||
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
|
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
|
||||||
this.formGroup.get('dmp').disable();
|
this.formGroup.get('dmp').disable();
|
||||||
|
this.maxStep = 1;
|
||||||
|
this.loadDatasetProfiles();
|
||||||
|
this.registerFormListeners();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.loadDatasetProfiles();
|
this.loadDatasetProfiles();
|
||||||
|
|
|
@ -574,19 +574,8 @@ export class DmpEditorComponent extends CheckDeactivateBaseComponent implements
|
||||||
}
|
}
|
||||||
|
|
||||||
onCallbackSuccessAddNew(dmp?: DmpModel) {
|
onCallbackSuccessAddNew(dmp?: DmpModel) {
|
||||||
// this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
|
// this.editDataset(dmp.id, true, this.isNew && !this.formGroup.get('datasets').value.length);
|
||||||
// this.router.navigate(['/datasets', 'new', dmp.id]);
|
this.editDataset(dmp.id, true, false);
|
||||||
// const showDialog = this.isNew && (this.formGroup.get('datasets') );
|
|
||||||
|
|
||||||
let showDialog = false;
|
|
||||||
|
|
||||||
try{
|
|
||||||
showDialog = this.isNew && !this.formGroup.get('datasets').value.length;
|
|
||||||
}catch{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
this.editDataset(dmp.id, true, showDialog);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public setErrorModel(validationErrorModel: ValidationErrorModel) {
|
public setErrorModel(validationErrorModel: ValidationErrorModel) {
|
||||||
|
|
Loading…
Reference in New Issue