- PRD: vollständige Produktspezifikation (5 Module, Scope, Akzeptanzkriterien) - ARCHITECTURE: Tech Stack, Ordnerstruktur, Multi-Tenancy, Push, Kosten - DATABASE_SCHEMA: Vollständiges SQL-Schema mit RLS Policies und Views - USER_STORIES: 40+ Stories nach Rolle (Admin, Mitglied, Azubi, Obermeister) - PERSONAS: 5 detaillierte Nutzerprofile mit Alltag, Zitaten und Erwartungen - BUSINESS_MODEL: Preistabellen, Unit Economics, Revenue-Projektionen, Distribution - ROADMAP: 6 Phasen, Sprint-Planung, Meilensteine und KPIs - COMPETITIVE_ANALYSIS: Wettbewerbsmatrix, USPs, Preispositionierung - API_DESIGN: Supabase Query Patterns, Edge Functions, Realtime Subscriptions - ONBOARDING_FLOWS: 7 User Flows von Setup bis Fehlerfall - GTM_STRATEGY: 3-Phasen-Vertrieb, Outreach-Sequenz, Einwandbehandlung - AZUBI_MODULE: Video-Feed, 1-Click-Apply, Chat, Berichtsheft, Quiz - DSGVO_KONZEPT: Rechtsgrundlagen, TOMs, AVV, Minderjährige, Incident Response - FEATURES_BACKLOG: 72 Features nach MoSCoW + Technische Schulden Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
63 lines
1.8 KiB
TypeScript
63 lines
1.8 KiB
TypeScript
/**
|
|
* Public Lehrlingsbörse — accessible without login
|
|
* Can be embedded in a WebView or shared as a link
|
|
*/
|
|
import {
|
|
View,
|
|
Text,
|
|
FlatList,
|
|
RefreshControl,
|
|
} from 'react-native'
|
|
import { SafeAreaView } from 'react-native-safe-area-context'
|
|
import { useRouter } from 'expo-router'
|
|
import { trpc } from '@/lib/trpc'
|
|
import { StelleCard } from '@/components/stellen/StelleCard'
|
|
import { EmptyState } from '@/components/ui/EmptyState'
|
|
import { LoadingSpinner } from '@/components/ui/LoadingSpinner'
|
|
|
|
export default function StellenPublicScreen() {
|
|
const router = useRouter()
|
|
const { data, isLoading, refetch, isRefetching } = trpc.stellen.listPublic.useQuery({})
|
|
|
|
return (
|
|
<SafeAreaView className="flex-1 bg-gray-50">
|
|
<View className="bg-brand-500 px-4 py-4">
|
|
<Text className="text-white text-xl font-bold">Lehrlingsbörse</Text>
|
|
<Text className="text-white/80 text-sm mt-0.5">
|
|
Aktuelle Ausbildungsplätze
|
|
</Text>
|
|
</View>
|
|
|
|
{isLoading ? (
|
|
<LoadingSpinner />
|
|
) : (
|
|
<FlatList
|
|
data={data ?? []}
|
|
keyExtractor={(item) => item.id}
|
|
contentContainerStyle={{ padding: 12, gap: 8 }}
|
|
refreshControl={
|
|
<RefreshControl
|
|
refreshing={isRefetching}
|
|
onRefresh={refetch}
|
|
tintColor="#E63946"
|
|
/>
|
|
}
|
|
renderItem={({ item }) => (
|
|
<StelleCard
|
|
stelle={item}
|
|
onPress={() => router.push(`/(app)/stellen/${item.id}`)}
|
|
/>
|
|
)}
|
|
ListEmptyComponent={
|
|
<EmptyState
|
|
icon="🎓"
|
|
title="Keine Angebote"
|
|
subtitle="Aktuell sind keine Ausbildungsplätze verfügbar"
|
|
/>
|
|
}
|
|
/>
|
|
)}
|
|
</SafeAreaView>
|
|
)
|
|
}
|