[Send] Updated delete function for add/edit component (#277)
* [Send] Updated delete function for add/edit component * Saved final return statement
This commit is contained in:
parent
5f5580cff9
commit
8a3b551c6e
|
@ -219,16 +219,16 @@ export class AddEditComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
async delete(): Promise<void> {
|
||||
async delete(): Promise<boolean> {
|
||||
if (this.deletePromise != null) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
const confirmed = await this.platformUtilsService.showDialog(
|
||||
this.i18nService.t('deleteSendConfirmation'),
|
||||
this.i18nService.t('deleteSend'),
|
||||
this.i18nService.t('yes'), this.i18nService.t('no'), 'warning');
|
||||
if (!confirmed) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -237,7 +237,10 @@ export class AddEditComponent implements OnInit {
|
|||
this.platformUtilsService.showToast('success', null, this.i18nService.t('deletedSend'));
|
||||
await this.load();
|
||||
this.onDeletedSend.emit(this.send);
|
||||
return true;
|
||||
} catch { }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
typeChanged() {
|
||||
|
|
Loading…
Reference in New Issue