Skip to content

VSN-26857 feat(reports): add inspection mobile signing flow and real-time status sync

fatima senan a demandé de fusionner feature/VSN-2685-new vers develop

This MR adds changes to allow drivers to sign reports directly from the app, with real-time status updates.

Signing from mobile (reportDetailScreen)

  • "Signer le rapport" button displayed when driverSigned === false
  • Tapping the button: requests geolocation (non-blocking if denied), saves
    location to backend, fetches an embedded DocuSign signing URL, and opens
    it via WebBrowser.openAuthSessionAsync with deep link
    vsndriverfront://signing-complete for automatic browser dismissal
  • hasSigned state: button is hidden immediately upon returning from the
    browser (before the API refresh completes)
  • Screen auto-refreshes on focus via useFocusEffect — status updates
    automatically when navigating back from the browser or any other screen

Status synchronization (vehicleInspectionService.ts)

  • ReportResponseDto extended with signatureStatus, driverSigned,
  • mapStatus prioritizes signatureStatus when present, covering all
    signature states: PENDING_SIGNATURE, DRIVER_SIGNED, COMPANY_SIGNED, COMPLETED, DECLINED, FAILED
  • New API methods: getDriverSigningUrl, saveSignatureLocation

Status labels & colors (vehicleInspection.ts)

  • ReportStatus type extended with all signature states
  • GENERATED and PENDING_SIGNATURE unified under "En attente de signature"
  • DRIVER_SIGNED / COMPANY_SIGNED
  • COMPLETED: "Terminé"

Inspection detail (inspectionDetailScreen)

  • "Modifier" button hidden when inspection is in signing state
    (PENDING_SIGNATURE) to prevent edits during an active signature process

Rapports de requête de fusion