- Add Lucide React Native icon library and use across tabs and screens
- Mobile-like design: rounded cards (xl/2xl), section dividers, icon chips, chevrons
- New pages from swagger: register, invoices/[id], reports, documents, settings
- Invoice detail: amount, bill to, items, Share/PDF actions (GET /invoices/{id})
- Register screen with link to login (POST /auth/register)
- Reports list with mock data and download (GET /reports)
- Documents list with upload CTA (GET /documents)
- Settings: notifications link, language, about
- Profile: links to Notifications, Reports, Documents, Settings
- Home: invoice rows navigate to /invoices/[id]
- Login ↔ Register navigation
- Keep orange (#ea580c) and dark navbar (#2d2d2d) theme throughout
- README: update screens table with new routes
Co-authored-by: Cursor <cursoragent@cursor.com>
54 lines
2.2 KiB
TypeScript
54 lines
2.2 KiB
TypeScript
import { View, ScrollView, Pressable } from 'react-native';
|
|
import { router } from 'expo-router';
|
|
import { Text } from '@/components/ui/text';
|
|
import { Card, CardContent } from '@/components/ui/card';
|
|
import { Button } from '@/components/ui/button';
|
|
import { FileText, ChevronRight, FolderOpen, Upload } from '@/lib/icons';
|
|
import { MOCK_DOCUMENTS } from '@/lib/mock-data';
|
|
|
|
const PRIMARY = '#ea580c';
|
|
|
|
export default function DocumentsScreen() {
|
|
return (
|
|
<ScrollView
|
|
className="flex-1 bg-[#f5f5f5]"
|
|
contentContainerStyle={{ padding: 20, paddingBottom: 40 }}
|
|
showsVerticalScrollIndicator={false}
|
|
>
|
|
<View className="mb-4 flex-row items-center gap-2">
|
|
<FolderOpen color="#18181b" size={22} strokeWidth={2} />
|
|
<Text className="text-xl font-semibold text-gray-900">Documents</Text>
|
|
</View>
|
|
<Text className="text-muted-foreground mb-5 text-sm">
|
|
Uploaded invoices, scans, and attachments. Synced with your account.
|
|
</Text>
|
|
|
|
<Button variant="outline" className="mb-5 min-h-12 rounded-xl border-border" onPress={() => {}}>
|
|
<Upload color={PRIMARY} size={20} strokeWidth={2} />
|
|
<Text className="ml-2 font-medium text-gray-700">Upload document</Text>
|
|
</Button>
|
|
|
|
{MOCK_DOCUMENTS.map((d) => (
|
|
<Card key={d.id} className="mb-2.5 overflow-hidden rounded-xl border border-border bg-white">
|
|
<Pressable>
|
|
<CardContent className="flex-row items-center py-4 pl-4 pr-3">
|
|
<View className="mr-3 rounded-xl bg-primary/10 p-2">
|
|
<FileText color={PRIMARY} size={22} strokeWidth={2} />
|
|
</View>
|
|
<View className="flex-1">
|
|
<Text className="font-medium text-gray-900" numberOfLines={1}>{d.name}</Text>
|
|
<Text className="text-muted-foreground mt-0.5 text-sm">{d.size} · {d.uploadedAt}</Text>
|
|
</View>
|
|
<ChevronRight color="#71717a" size={20} strokeWidth={2} />
|
|
</CardContent>
|
|
</Pressable>
|
|
</Card>
|
|
))}
|
|
|
|
<Button variant="outline" className="mt-4 rounded-xl border-border" onPress={() => router.back()}>
|
|
<Text className="font-medium">Back</Text>
|
|
</Button>
|
|
</ScrollView>
|
|
);
|
|
}
|