diff --git a/src/pages/shows/shows.component.html b/src/pages/shows/shows.component.html index 924e8b1..8f6cc94 100644 --- a/src/pages/shows/shows.component.html +++ b/src/pages/shows/shows.component.html @@ -9,7 +9,7 @@ - diff --git a/src/pages/shows/shows.component.ts b/src/pages/shows/shows.component.ts index 31a9b9c..2415bb8 100644 --- a/src/pages/shows/shows.component.ts +++ b/src/pages/shows/shows.component.ts @@ -82,4 +82,15 @@ export class ShowsComponent { } ) } + + editShow(show: Show, index: number) { + const modal: NgbModalRef = this.modalService.open(CreateEditModalComponent) + modal.componentInstance.editMode = true + modal.componentInstance.show = show + modal.componentInstance.initForm() + modal.result.then( + (closeResult: Show) => {this.shows[index] = closeResult}, + (dissmissResult) => {} + ) + } }