From e4267e4fe3b1c91ad5c5b14b4ad841bde03a06db Mon Sep 17 00:00:00 2001 From: Toast Date: Thu, 30 Jan 2025 11:20:56 +0100 Subject: [PATCH 1/2] Interfaces/shows: update --- src/interfaces/show.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interfaces/show.ts b/src/interfaces/show.ts index 3618e03..9655a9c 100644 --- a/src/interfaces/show.ts +++ b/src/interfaces/show.ts @@ -1,8 +1,9 @@ export interface Show { _id: string title: string - year: number + date: Date seasons: number + episodes: number description: string genres: string[] } From 4f505507be141d0401d4c4b94d16dc4197217109 Mon Sep 17 00:00:00 2001 From: Toast Date: Thu, 30 Jan 2025 11:43:28 +0100 Subject: [PATCH 2/2] Pages/show: update card --- src/pages/shows/shows.component.html | 2 +- src/pages/shows/shows.component.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/shows/shows.component.html b/src/pages/shows/shows.component.html index cf63025..026e38f 100644 --- a/src/pages/shows/shows.component.html +++ b/src/pages/shows/shows.component.html @@ -5,7 +5,7 @@
{{ show.title }}
-

{{ show.year }}

+

{{ show.date | date }}

} diff --git a/src/pages/shows/shows.component.ts b/src/pages/shows/shows.component.ts index c37ef3b..21b1bc6 100644 --- a/src/pages/shows/shows.component.ts +++ b/src/pages/shows/shows.component.ts @@ -6,10 +6,13 @@ 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'; +import {DatePipe} from '@angular/common'; @Component({ selector: 'app-shows', - imports: [], + imports: [ + DatePipe + ], templateUrl: './shows.component.html', styleUrl: './shows.component.css' })