dmp editor > select default blueprint
This commit is contained in:
parent
6ffc0a0a10
commit
6013cb5225
|
@ -62,7 +62,6 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
||||||
|
|
||||||
isNew = true;
|
isNew = true;
|
||||||
isDeleted = false;
|
isDeleted = false;
|
||||||
goToNextStep = true;
|
|
||||||
item: Dmp;
|
item: Dmp;
|
||||||
selectedBlueprint: DmpBlueprint;
|
selectedBlueprint: DmpBlueprint;
|
||||||
step: number = 0;
|
step: number = 0;
|
||||||
|
@ -224,10 +223,6 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
||||||
if (this.editorModel.status == DmpStatus.Finalized || this.isDeleted) {
|
if (this.editorModel.status == DmpStatus.Finalized || this.isDeleted) {
|
||||||
this.formGroup.disable();
|
this.formGroup.disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.item != null && this.goToNextStep) {
|
|
||||||
this.nextStep();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshData(): void {
|
refreshData(): void {
|
||||||
|
@ -346,11 +341,14 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
||||||
this.formGroup.get('blueprint').setValue(this.selectedBlueprint.id);
|
this.formGroup.get('blueprint').setValue(this.selectedBlueprint.id);
|
||||||
|
|
||||||
const goToNextStep: boolean = this.formGroup.get('label').valid && this.formGroup.get('description').valid;
|
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 = {
|
const dmp: Dmp = {
|
||||||
label: this.formGroup.get('label').value,
|
label: this.formGroup.get('label').value,
|
||||||
description: this.formGroup.get('description').value,
|
description: this.formGroup.get('description').value,
|
||||||
|
@ -359,7 +357,6 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
this.prepareForm(dmp);
|
this.prepareForm(dmp);
|
||||||
this.goToNextStep = true; //reset
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue