(part: IdlObject) => {
this.editDialog.mode = 'update';
this.editDialog.recId = part.id();
- this.editDialog.open().then(
- ok => this.partsGrid.reload(),
- err => {}
- );
+ this.editDialog.open()
+ .subscribe(ok => this.partsGrid.reload());
}
);
this.editDialog.record = part;
this.editDialog.mode = 'create';
- this.editDialog.open().then(
- ok => this.partsGrid.reload(),
- err => {}
- );
+ this.editDialog.open().subscribe(ok => this.partsGrid.reload());
};
this.deleteSelected = (parts: IdlObject[]) => {
this.mergeSelected = (parts: IdlObject[]) => {
if (parts.length < 2) { return; }
this.mergeDialog.parts = parts;
- this.mergeDialog.open().then(
- ok => this.partsGrid.reload(),
- err => console.debug('Dialog dismissed')
- );
+ this.mergeDialog.open().subscribe(ok => this.partsGrid.reload());
};
}
}