Compare commits

..

No commits in common. "8d2d936a73034fbd95fa792542b5a922485ac9e0" and "bdfcb8cdf68afa7f825484a8e93176a24b21e96a" have entirely different histories.

1 changed files with 8 additions and 5 deletions

View File

@ -62,6 +62,7 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
isNew = true;
isDeleted = false;
goToNextStep = true;
item: Dmp;
selectedBlueprint: DmpBlueprint;
step: number = 0;
@ -223,6 +224,10 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
if (this.editorModel.status == DmpStatus.Finalized || this.isDeleted) {
this.formGroup.disable();
}
if (this.item != null && this.goToNextStep) {
this.nextStep();
}
}
refreshData(): void {
@ -341,14 +346,11 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
this.formGroup.get('blueprint').setValue(this.selectedBlueprint.id);
const goToNextStep: boolean = this.formGroup.get('label').valid && this.formGroup.get('description').valid;
if (goToNextStep) {
this.buildFormAfterBlueprintSelection();
this.nextStep();
}
this.buildFormAfterBlueprintSelection(goToNextStep);
});
}
private buildFormAfterBlueprintSelection() {
private buildFormAfterBlueprintSelection(goToNextStep: boolean = true) {
const dmp: Dmp = {
label: this.formGroup.get('label').value,
description: this.formGroup.get('description').value,
@ -357,6 +359,7 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
}
this.prepareForm(dmp);
this.goToNextStep = true; //reset
}
//