Feat/VSN-1274 : Add demande system
Architecture & Navigation
-
Add comprehensive demande types and Zustand store for centralized request management
-
Implement smart navigation with proper routing structure under (tabs)/demandes/
-
Create modular demande system with 3 focused screens (DemandesScreen, DemandeDetailScreen, AddDemandeScreen)
-
Update navigation routing across all demande screens for smooth user flow
-
Maintain clean folder structure with separated components, types, and store organization
-
Implement code using TypeScript throughout for type safety and better development experience
Demande Management Features
-
Add complete request system with filtering by status (pending, accepted, refused)
-
Show simplified demande cards with title, period, and status for better readability
-
Update demande details with comprehensive info sections (attachments, comments, actions)
-
Add search capabilities across demande titles, descriptions, and employee comments
-
Create demande submission with multi-source justification upload (camera, gallery, files)
-
Implement working date picker with validation ensuring start date < end date
-
Add demande preview with attachment download and status tracking functionality
Components Architecture
-
Main Screens: DemandesScreen, DemandeDetailScreen, AddDemandeScreen
-
Core Components: DemandeCard, DemandeForm, DemandeTypeSelector, AttachmentManager
-
Specialized Components: DemandeFilterModal (simplified status-only filtering)
-
Interactive Elements: SearchModal integration, RefreshControl, DateTimePicker, ConditionalComponent usage
Key Features
-
Responsive Design: Full dark/light theme support with dynamic color schemes
-
Smooth Animations: Stagger animations for demande cards and view transitions
-
Date Validation: Smart date picker preventing invalid date ranges with user feedback
-
Simplified UI: Removed urgent functionality and complex filters for cleaner interface
-
Navigation Integration: Seamless routing between demande views and home screen
-
Data Management: Comprehensive state management with Zustand store and realistic mock data
-
User Experience: Pull-to-refresh, statistics cards, and streamlined 3-step submission process
Technical Implementation
-
State Management: Zustand store with CRUD operations and status filtering capabilities
-
Type Safety: Complete TypeScript implementation with proper demande type definitions
-
Theme Integration: Dynamic theming with useThemeColors hook throughout all components
-
Mock Data: Realistic demande scenarios with various statuses and attachment examples
-
Form Validation: Comprehensive validation with justification requirements based on demande type
-
Date Control: Working DateTimePicker with proper constraints and validation logic
-
Sidebar Simplification: Clean navigation with only "All requests" and "New request" options
Closes VSN-1274