Yaltopia-Tickets-App/app/(tabs)/proforma.tsx
“kirukib” b42b3d7602 -
2026-02-22 22:50:18 +03:00

40 lines
1.8 KiB
TypeScript

import { View, ScrollView, Pressable } from 'react-native';
import { Text } from '@/components/ui/text';
import { Button } from '@/components/ui/button';
import { Card, CardContent, CardHeader, CardTitle, CardDescription, CardFooter } from '@/components/ui/card';
import { MOCK_PROFORMA } from '@/lib/mock-data';
import { router } from 'expo-router';
export default function ProformaScreen() {
return (
<ScrollView className="flex-1 bg-background" contentContainerStyle={{ padding: 16, paddingBottom: 32 }}>
<Text className="text-muted-foreground mb-4">
Create or select proforma requests and share with contacts via email or SMS.
</Text>
<Button className="mb-4 bg-primary" onPress={() => {}}>
<Text className="text-primary-foreground font-medium">Create new proforma</Text>
</Button>
<Text className="text-muted-foreground mb-2 text-sm">Your proforma requests</Text>
{MOCK_PROFORMA.map((pf) => (
<Pressable key={pf.id} onPress={() => router.push(`/proforma/${pf.id}`)}>
<Card className="mb-3">
<CardHeader>
<CardTitle>{pf.title}</CardTitle>
<CardDescription>{pf.description}</CardDescription>
<Text className="text-muted-foreground mt-1 text-xs">Deadline: {pf.deadline} · {pf.itemCount} items</Text>
</CardHeader>
<CardFooter className="flex-row justify-between">
<Text className="text-muted-foreground text-sm">Sent to {pf.sentCount} contacts</Text>
<Button variant="outline" size="sm" onPress={() => router.push(`/proforma/${pf.id}`)}>
<Text className="font-medium">Send to contacts</Text>
</Button>
</CardFooter>
</Card>
</Pressable>
))}
</ScrollView>
);
}