dmp editor > select default blueprint

This commit is contained in:
Sofia Papacharalampous 2024-04-08 10:59:26 +03:00
parent 6ffc0a0a10
commit 6013cb5225
1 changed files with 5 additions and 8 deletions

View File

@ -62,7 +62,6 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
isNew = true;
isDeleted = false;
goToNextStep = true;
item: Dmp;
selectedBlueprint: DmpBlueprint;
step: number = 0;
@ -224,10 +223,6 @@ 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 {
@ -346,11 +341,14 @@ 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;
this.buildFormAfterBlueprintSelection(goToNextStep);
if (goToNextStep) {
this.buildFormAfterBlueprintSelection();
this.nextStep();
}
});
}
private buildFormAfterBlueprintSelection(goToNextStep: boolean = true) {
private buildFormAfterBlueprintSelection() {
const dmp: Dmp = {
label: this.formGroup.get('label').value,
description: this.formGroup.get('description').value,
@ -359,7 +357,6 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
}
this.prepareForm(dmp);
this.goToNextStep = true; //reset
}
//