From 93b82aedbab9b56b720d1688da0fa8f5ecb454e3 Mon Sep 17 00:00:00 2001 From: Toast Date: Thu, 30 Jan 2025 09:42:54 +0100 Subject: [PATCH] Pages/shows: add new show button --- src/pages/shows/shows.component.html | 2 +- src/pages/shows/shows.component.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pages/shows/shows.component.html b/src/pages/shows/shows.component.html index 0184096..cf63025 100644 --- a/src/pages/shows/shows.component.html +++ b/src/pages/shows/shows.component.html @@ -12,7 +12,7 @@
- +
diff --git a/src/pages/shows/shows.component.ts b/src/pages/shows/shows.component.ts index 32a985e..c37ef3b 100644 --- a/src/pages/shows/shows.component.ts +++ b/src/pages/shows/shows.component.ts @@ -4,6 +4,8 @@ import {Show} from '../../interfaces/show'; import {ShowsApiResponse} from '../../interfaces/shows-api-response'; import {Toast} from '../../interfaces/toast'; import {ToastService} from '../../services/toast/toast.service'; +import {NgbModal} from '@ng-bootstrap/ng-bootstrap'; +import {CreateModalComponent} from '../../components/create-modal/create-modal/create-modal.component'; @Component({ selector: 'app-shows', @@ -14,6 +16,7 @@ import {ToastService} from '../../services/toast/toast.service'; export class ShowsComponent { private api: ShowsApiService = inject(ShowsApiService); private toastService: ToastService = inject(ToastService); + private modalService: NgbModal = inject(NgbModal); shows: Show[] = []; @@ -34,4 +37,8 @@ export class ShowsComponent { } }) } + + createNewShow() { + this.modalService.open(CreateModalComponent) + } }