Add order and performance info components to ticket overlay

Introduces OrderComponent, PerformanceInfoComponent, and ShoppingCartComponent for the ticket purchase flow. Updates theater-overlay to display seat selection alongside order details and performance info. Refactors seat and performance data loading, improves UI structure, and enhances movie info display components for consistency.
This commit is contained in:
2025-11-12 10:33:34 +01:00
parent 5699f23540
commit f489073118
22 changed files with 234 additions and 39 deletions

View File

@@ -0,0 +1,30 @@
import { Component, computed, input } from '@angular/core';
import { Vorstellung } from '@infinimotion/model-frontend';
@Component({
selector: 'app-performance-info',
standalone: false,
templateUrl: './performance-info.component.html',
styleUrl: './performance-info.component.css'
})
export class PerformanceInfoComponent {
performance = input.required<Vorstellung>();
getStartTimeString(): string {
const date = new Date(this.performance().start);
return date.toLocaleDateString('de-DE', { weekday: 'short' }) + '. ' + date.toLocaleDateString('de-DE') + ', ' + date.toLocaleTimeString('de-DE', { hour: '2-digit', minute: '2-digit' }) + ' Uhr';
}
movie() {
return this.performance().movie
}
onPosterError(event: Event) {
const img = event.target as HTMLImageElement;
const placeholder = 'assets/poster_placeholder.png';
if (img.src !== window.location.origin + placeholder) {
img.src = placeholder;
}
}
}