Fix UX
This commit is contained in:
parent
674f07f5f1
commit
19aad2b2af
1 changed files with 232 additions and 10013 deletions
|
|
@ -10,7 +10,16 @@ import { CancelService } from '../../services/cancel.service';
|
|||
export class ModalComponent {
|
||||
ModalType = ModalType;
|
||||
|
||||
save: () => void = null;
|
||||
|
||||
constructor(public modalService: ModalService, private cancelService: CancelService) {
|
||||
this.cancelService.subscribe(this, () => this.modalService.cancel());
|
||||
this.cancelService.subscribe(this, () => {
|
||||
if (this.save) {
|
||||
this.save();
|
||||
this.save = null;
|
||||
} else {
|
||||
this.modalService.cancel();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue