Add new header 2.0 component with loading service

Introduced Header2Component with a new design, external resource links, and a loading progress bar. Added LoadingService to manage loading state and integrated it into the schedule component. Updated main layout to use the new header and included related assets for external links. Changed API base URL in HttpService to use the production endpoint.
This commit is contained in:
2025-10-31 11:45:41 +01:00
parent 98626d11ed
commit 7549061fba
12 changed files with 103 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ import { HttpService } from '../http.service';
import { Vorstellung } from '@infinimotion/model-frontend';
import { Performance } from '../model/performance.model';
import { MovieGroup } from '../model/movie-group.model';
import { LoadingService } from '../loading.service';
@Component({
selector: 'app-schedule',
@@ -15,6 +16,7 @@ export class ScheduleComponent implements OnInit {
performaces: Vorstellung[] = [];
private http = inject(HttpService);
private loading = inject(LoadingService)
constructor() {
this.generateDates();
@@ -44,12 +46,14 @@ export class ScheduleComponent implements OnInit {
}
loadPerformances() {
this.loading.show();
this.http.getPerformaces().subscribe({
next: (data) => {
this.performaces = Array.isArray(data) ? data : [data];
this.assignPerformancesToDates();
},
error: (err) => console.error('Fehler beim Laden der Performances', err),
complete: () => this.loading.hide()
});
}