VSN-26857 feat(reports): add inspection mobile signing flow and real-time status sync
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 viaWebBrowser.openAuthSessionAsyncwith deep link
vsndriverfront://signing-completefor automatic browser dismissal -
hasSignedstate: 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)
-
ReportResponseDtoextended withsignatureStatus,driverSigned, -
mapStatusprioritizessignatureStatuswhen present, covering all
signature states:PENDING_SIGNATURE,DRIVER_SIGNED,COMPANY_SIGNED,COMPLETED,DECLINED,FAILED - New API methods:
getDriverSigningUrl,saveSignatureLocation
Status labels & colors (vehicleInspection.ts)
-
ReportStatustype extended with all signature states -
GENERATEDandPENDING_SIGNATUREunified 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