Skip to content

feat: add profile editing with backend integration and UI improvements

yassine sabir a demandé de fusionner feature/Profile-Screen vers develop

Profile Editing Implementation

API Service & Endpoints

  • Create DriverApiService with getDriverDetails, updateDriver, uploadProfilePhoto
  • Add DRIVER_ENDPOINTS configuration for all driver operations
  • Update DriverDTO interface to match backend specifications
  • Implement proper TypeScript typing and error handling

Date Management

French Localization & Functionality

  • Create DatePickerInput component with French month names and toggle functionality
  • Implement convertToFrenchDate/convertToISODate for format conversion
  • Add platform-specific rendering (Modal iOS, Picker Android)
  • Convert DD/MM/YYYY to YYYY-MM-DDTHH:mm:ss for backend LocalDateTime

Address Preservation

Smart Address Handling

  • Implement address preservation when not modified during updates
  • Create buildAddressString/parseAddressString helper functions
  • Send addresses only when modified to prevent backend issues

Error Handling

User-Friendly Messages

  • Replace technical errors with French user-friendly messages
  • Add error type detection (network, validation, server)
  • Implement proper error state management and visual feedback

Code Quality

ConditionalComponent & Cleanup

  • Replace all conditional statements with ConditionalComponent usage
  • Remove console.logs and unnecessary comments
  • Implement consistent conditional rendering patterns
  • Add proper form validation and navigation fixes

Rapports de requête de fusion