From 46f5f72bd42d9078fb6559b7806ad72e50fa4dbb Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Tue, 25 Jul 2017 15:45:25 +0200 Subject: [PATCH] Add Schedule Delete Modal component. --- .../scheduleDeleteModal.component.ts | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/scheduler/scheduleDeleteModal.component.ts diff --git a/src/scheduler/scheduleDeleteModal.component.ts b/src/scheduler/scheduleDeleteModal.component.ts new file mode 100644 index 0000000..7e21276 --- /dev/null +++ b/src/scheduler/scheduleDeleteModal.component.ts @@ -0,0 +1,49 @@ +// vim: set tw=80 ts=2 sw=2 sts=2: +import { Component, Input } from '@angular/core'; + +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; + +import { Schedule } from './schedule'; + +@Component({ + selector: 'schedule-delete-modal', + template: ` + + + + + + ` +}) +export class ScheduleDeleteModalComponent { + @Input() schedule: Schedule + + constructor(public activeModal: NgbActiveModal) {} + + title(): string { + return "Delete schedule #" + this.schedule.id; + } + + submit(): void { + this.activeModal.close(this.schedule); + } + + cancel(): void { + this.activeModal.dismiss("closed"); + } +}