Files
frontend/src/app/performance-info/performance-info.component.ts
Piet Ostendorp 41c9d85e9b Add payment form and improve order stepper UI
Introduces a payment step with card input masking using ngx-mask, refactors the order stepper to include address and payment forms with validation, and enhances UI/UX with new styles and layout adjustments. Also updates dependencies and module imports to support ngx-mask and Material Checkbox.
2025-11-13 22:36:09 +01:00

31 lines
957 B
TypeScript

import { Component, 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;
}
}
}