feat: Implement document management features
- Added a new DocumentsScreen for managing user documents with search and date filtering capabilities. - Created AddDocumentModal for uploading documents with file selection and custom title options. - Introduced SiteDocumentsScreen to display documents related to specific construction sites. - Implemented SitesScreen for listing construction sites with search functionality. - Updated ProfileScreen to link to the new DocumentsScreen. - Refactored RangePickerModal for selecting date ranges in document filtering. - Improved date formatting utilities for better timestamp handling. - Added necessary API calls for document and site management. - Updated types to reflect changes in document structure and site information. - Added expo-document-picker dependency for document selection functionality.
This commit is contained in:
@ -1,8 +1,7 @@
|
||||
import { useRouter } from 'expo-router';
|
||||
import { ChevronLeft, LogOut, Mail, Settings, Smartphone, User } from 'lucide-react-native';
|
||||
import { ChevronLeft, FileText, LogOut, Mail, Settings, User } from 'lucide-react-native';
|
||||
import React, { useContext } from 'react';
|
||||
import { ScrollView, Text, TouchableOpacity, View } from 'react-native';
|
||||
import { MOCK_USER } from '@/data/data';
|
||||
import { AuthContext } from '@/utils/authContext';
|
||||
|
||||
export default function ProfileScreen() {
|
||||
@ -58,17 +57,6 @@ export default function ProfileScreen() {
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/* // TODO: Rimuovere telefono, si potrebbe sostituire con altro dato? */}
|
||||
{/* <View className="flex-row items-center gap-5">
|
||||
<View className="w-14 h-14 bg-gray-100 rounded-2xl items-center justify-center">
|
||||
<Smartphone size={24} color="#374151" />
|
||||
</View>
|
||||
<View>
|
||||
<Text className="text-lg text-gray-700 font-bold">Telefono</Text>
|
||||
<Text className="text-gray-500 text-base">{phone}</Text>
|
||||
</View>
|
||||
</View> */}
|
||||
|
||||
<View className="flex-row items-center gap-5">
|
||||
<View className="w-14 h-14 bg-gray-100 rounded-2xl items-center justify-center">
|
||||
<User size={24} color="#374151" />
|
||||
@ -85,14 +73,14 @@ export default function ProfileScreen() {
|
||||
<View>
|
||||
<Text className="text-gray-800 text-2xl font-bold mb-5 px-1">Azioni</Text>
|
||||
|
||||
<TouchableOpacity onPress={() => router.push('/permits')} className="bg-white p-4 rounded-3xl shadow-sm flex-row items-center justify-between border border-gray-100 mb-4">
|
||||
<TouchableOpacity onPress={() => router.push('/profile/documents')} className="bg-white p-4 rounded-3xl shadow-sm flex-row items-center justify-between border border-gray-100 mb-4">
|
||||
<View className="flex-row items-center gap-5">
|
||||
<View className="bg-[#099499]/10 p-3.5 rounded-2xl">
|
||||
<Settings size={26} color="#099499" />
|
||||
<FileText size={26} color="#099499" />
|
||||
</View>
|
||||
<View>
|
||||
<Text className="text-lg text-gray-800 font-bold">I miei permessi</Text>
|
||||
<Text className="text-base text-gray-400 mt-0.5">Richiedi o controlla lo stato</Text>
|
||||
<Text className="text-lg text-gray-800 font-bold">I miei documenti</Text>
|
||||
<Text className="text-base text-gray-400 mt-0.5">Gestisci i tuoi documenti</Text>
|
||||
</View>
|
||||
</View>
|
||||
<Text className="text-[#099499] text-base font-bold">Apri</Text>
|
||||
|
||||
Reference in New Issue
Block a user