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:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { Wrench, FlaskConical, Ticket, Sparkles } from 'lucide-vue-next'
|
||||
import { Wrench, FlaskConical, Ticket, Sparkles, GraduationCap } from 'lucide-vue-next'
|
||||
import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
|
||||
@@ -14,14 +14,6 @@ interface ProductArea {
|
||||
}
|
||||
|
||||
const areas: ProductArea[] = [
|
||||
{
|
||||
id: 'experimenta',
|
||||
label: 'experimenta Jahreskarte',
|
||||
icon: Sparkles,
|
||||
enabled: true,
|
||||
visible: true,
|
||||
route: '/experimenta',
|
||||
},
|
||||
{
|
||||
id: 'makerspace',
|
||||
label: 'Makerspace Jahreskarte',
|
||||
@@ -30,12 +22,29 @@ const areas: ProductArea[] = [
|
||||
visible: true,
|
||||
route: '/products',
|
||||
},
|
||||
{
|
||||
id: 'educator',
|
||||
label: 'Pädagogen Jahreskarte',
|
||||
icon: GraduationCap,
|
||||
enabled: true,
|
||||
visible: true,
|
||||
route: '/educator',
|
||||
},
|
||||
{
|
||||
id: 'experimenta',
|
||||
label: 'experimenta Jahreskarte',
|
||||
icon: Sparkles,
|
||||
enabled: true,
|
||||
visible: true,
|
||||
badge: 'Demnächst',
|
||||
route: '/experimenta',
|
||||
},
|
||||
{
|
||||
id: 'labs',
|
||||
label: 'Labore',
|
||||
icon: FlaskConical,
|
||||
enabled: false,
|
||||
visible: true,
|
||||
visible: false,
|
||||
badge: 'Demnächst',
|
||||
route: '/labs',
|
||||
},
|
||||
@@ -47,6 +56,8 @@ const currentArea = computed(() => {
|
||||
// Determine current area based on route
|
||||
if (route.path.startsWith('/products') || route.path === '/') {
|
||||
return 'makerspace'
|
||||
} else if (route.path.startsWith('/educator')) {
|
||||
return 'educator'
|
||||
} else if (route.path.startsWith('/labs')) {
|
||||
return 'labs'
|
||||
} else if (route.path.startsWith('/experimenta')) {
|
||||
|
||||
Reference in New Issue
Block a user