Add IMDb movie importer feature and unify header

Introduces a new movie importer feature allowing admins to search and import movies from IMDb, including new components for search, result display, and error handling. Replaces the schedule header with a reusable menu header component. Updates routing, navigation, and HTTP service to support the new importer. Adds a poster placeholder image and improves poster error handling.
This commit is contained in:
2025-11-07 01:57:42 +01:00
parent bd7a0ed9f1
commit 4f5a8e9661
25 changed files with 338 additions and 42 deletions

View File

@@ -1,4 +1,4 @@
import { Kinosaal, Sitzplatz, Vorstellung, Film } from '@infinimotion/model-frontend';
import { Kinosaal, Sitzplatz, Vorstellung, Film, OmdbSearch } from '@infinimotion/model-frontend';
import { HttpClient } from "@angular/common/http";
import { inject, Injectable } from "@angular/core";
import { Observable } from "rxjs";
@@ -52,7 +52,7 @@ export class HttpService {
}
/* POST /api/vorstellung/filter */
getPerformaceByFilter(filter: string[]): Observable<Vorstellung[]> {
getPerformacesByFilter(filter: string[]): Observable<Vorstellung[]> {
return this.http.post<Vorstellung[]>(`${this.baseUrl}vorstellung/filter`, filter);
}
@@ -79,11 +79,31 @@ export class HttpService {
return this.http.get<Film[]>(`${this.baseUrl}film`);
}
/* POST /api/vorstellung/filter */
getMoviesByFilter(filter: string[]): Observable<Film[]> {
return this.http.post<Film[]>(`${this.baseUrl}film/filter`, filter);
}
/* Show-Seats APIs*/
/* Show-Seats APIs */
/* GET /api/show-seats/{show} */
getSeatsByShowId(show: number): Observable<{seats:Sitzplatz[], reserved:Sitzplatz[], booked:Sitzplatz[]}> {
return this.http.get<{seats:Sitzplatz[], reserved:Sitzplatz[], booked:Sitzplatz[]}>(`${this.baseUrl}show-seats/${show}`);
}
/* Movie Importer APIs */
/* GET /api/importer/search */
searchMovie(query: string): Observable<OmdbSearch> {
return this.http.get<OmdbSearch>(`${this.baseUrl}importer/search`, {
params: { title: query }
});
}
/* POST /api/importer/import */
importMovie(imdbId: string): Observable<Film> {
return this.http.post<Film>(`${this.baseUrl}importer/import?id=${imdbId}`, {})
}
}