Files
frontend/src/app/app-routing-module.ts
Piet Ostendorp 624ff820da Add PDF ticket generation and download feature
Introduces PDF ticket generation using html2canvas and jsPDF, including a new PdfTicketComponent for ticket rendering and a PdfService for PDF creation. Updates purchase success flow to allow users to download tickets as PDFs, adds progress feedback, and includes a test route and component for development. Also refactors order form with a fake fill helper and improves UI details.
2025-11-26 11:54:42 +01:00

70 lines
3.0 KiB
TypeScript

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PocModelComponent } from './poc-model-component/poc-model-component';
import { HomeComponent } from './home/home.component';
import { MainLayoutComponent } from './layouts/main-layout/main-layout.component';
import { MainComponent } from './main/main.component';
import { ScheduleComponent } from './schedule/schedule.component';
import { TheaterOverlayComponent } from './theater-overlay/theater-overlay.component';
import { MovieImporterComponent } from './movie-importer/movie-importer.component';
import { AuthGuard } from './auth.guard';
import { PayForOrderComponent } from './pay-for-order/pay-for-order.component';
import { StatisticsComponent } from './statistics/statistics.component';
import { PricelistComponent } from './pricelist/pricelist.component';
import { TheaterLayoutDesignerComponent } from './theater-layout-designer/theater-layout-designer.component';
import { TestComponent } from './test/test.component';
const routes: Routes = [
// Seiten ohne Layout
{ path: 'landing', component: HomeComponent },
{ path: 'poc-model', component: PocModelComponent, data: { allowMobile: true, roles: ['employee', 'admin'] }, canActivate: [AuthGuard] },
{ path: 'test', component: TestComponent, data: { allowMobile: true, roles: ['employee', 'admin'] }, canActivate: [AuthGuard] },
// Seiten mit MainLayout
{
path: '',
component: MainLayoutComponent,
children: [
{ path: '', component: MainComponent },
{ path: 'schedule', component: ScheduleComponent },
{
path: 'admin/movie-importer',
component: MovieImporterComponent,
canActivate: [AuthGuard],
data: { roles: ['admin'] }, // Array von erlaubten Rollen. Derzeit gäbe es 'admin' und 'employee'
},
{ path: 'checkout/performance/:performanceId', component: TheaterOverlayComponent },
{ path: 'checkout/order/:orderId', component: TheaterOverlayComponent },
{ path: 'checkout/order', component: PayForOrderComponent },
{
path: 'admin/statistics',
component: StatisticsComponent,
canActivate: [AuthGuard],
data: { roles: ['admin'] }, // Array von erlaubten Rollen. Derzeit gäbe es 'admin' und 'employee'
},
{
path: 'admin/designer',
component: TheaterLayoutDesignerComponent,
canActivate: [AuthGuard],
data: { roles: ['admin'] }, // Array von erlaubten Rollen. Derzeit gäbe es 'admin' und 'employee'
},
{
path: 'admin/designer/:hallId',
component: TheaterLayoutDesignerComponent,
canActivate: [AuthGuard],
data: { roles: ['admin'] }, // Array von erlaubten Rollen. Derzeit gäbe es 'admin' und 'employee'
},
{ path: 'prices', component: PricelistComponent },
],
},
// Fallback-Route
{ path: '**', component: HomeComponent },
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}