Add educator annual pass functionality and update product listings

- Introduced a new page for educator annual passes, displaying relevant products with a dedicated layout and loading/error states.
- Updated AreaTabs component to include the educator tab and adjusted routing logic.
- Modified useAuth to redirect users to the products page after login.
- Adjusted mock product prices and stock quantities in the database seeding script to reflect new pricing strategy.

These changes enhance the user experience for educators and improve product visibility in the application.
This commit is contained in:
Bastian Masanek
2025-11-03 14:03:29 +01:00
parent ebb6dc0b27
commit e252d68f0c
4 changed files with 170 additions and 17 deletions

View File

@@ -62,7 +62,7 @@ const mockProducts: Array<{
name: 'Makerspace Jahreskarte',
description:
'Unbegrenzter Zugang zum Makerspace für 365 Tage. Nutze modernste Werkzeuge, 3D-Drucker, Lasercutter und vieles mehr. Perfekt für Maker, Tüftler und kreative Köpfe.',
price: '120.00',
price: '30.00',
stockQuantity: 100,
category: 'makerspace-annual-pass',
active: true,
@@ -73,7 +73,7 @@ const mockProducts: Array<{
name: 'experimenta Jahreskarte',
description:
'Erlebe die Ausstellungswelt der experimenta ein ganzes Jahr lang. Mit freiem Eintritt zu allen Ausstellungen, Science Dome Shows und Sonderausstellungen.',
price: '85.00',
price: '49.00',
stockQuantity: 200,
category: 'annual-pass',
active: true,
@@ -84,11 +84,11 @@ const mockProducts: Array<{
name: 'Pädagogen Jahreskarte',
description:
'Speziell für Lehrkräfte und Pädagogen. Mit exklusiven Fortbildungsangeboten, didaktischen Materialien und freiem Zugang zu allen Ausstellungen.',
price: '60.00',
stockQuantity: 50,
price: '0.00',
stockQuantity: 99999,
category: 'educator-annual-pass',
active: true,
roles: ['educator'],
roles: ['private', 'educator'],
},
]