Skip to content

Commit

Permalink
fix smart-service designer 'save and release' cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
IngoRoessner committed Oct 25, 2023
1 parent fac3e22 commit 89f659b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/app/modules/smart-services/designer/designer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,18 @@ export class SmartServiceDesignerComponent implements OnInit {
this.dialogService.openInputDialog('Release Name and Description', {name: design.name, description: design.description}, ['name'])
.afterClosed()
.subscribe((result: {name: string; description: string}) => {
this.releaseService.createRelease({design_id: design.id, name: result.name, description: result.description}).subscribe(value => {
if(value) {
this.snackBar.open('Release created.', undefined, { duration: 2000 });
} else {
this.snackBar.open('Error while creating a release !', 'close', { panelClass: 'snack-bar-error' });
}
if (result) {
this.releaseService.createRelease({design_id: design.id, name: result.name, description: result.description}).subscribe(value => {
if(value) {
this.snackBar.open('Release created.', undefined, { duration: 2000 });
} else {
this.snackBar.open('Error while creating a release !', 'close', { panelClass: 'snack-bar-error' });
}
then();
});
} else {
then();
});
}
});
}

Expand Down

0 comments on commit 89f659b

Please sign in to comment.