Skip to content

feat(mobile): implement employee live incident tracking, editing and dispatched team view (#117) - #144

Merged
Decuayer merged 1 commit into
mainfrom
feat/SDDC-81-employee-live-incident-tracking
Sep 1, 2026
Merged

feat(mobile): implement employee live incident tracking, editing and dispatched team view (#117)#144
Decuayer merged 1 commit into
mainfrom
feat/SDDC-81-employee-live-incident-tracking

Conversation

@Decuayer

@Decuayer Decuayer commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

Resolves #117 (Jira: SDDC-81) by implementing employee live incident tracking, detail editing for active reports, and dispatched team proximity monitoring on the Flutter mobile dashboard.

Key Changes

Backend:

  • GetIncidentsQuery & Handler: Added ReporterId query filter to fetch user's own reports with assigned team operational metadata (Leader, Phone, Member count).
  • UpdateIncidentCommandHandler: Enforced domain validation ensuring resolved or canceled incidents cannot be edited.
  • SignalR Hubs & Handlers: Aligned broadcast event names (TeamLocationUpdated, TeamDispatched, IncidentStatusChanged, IncidentUpdated) for real-time mobile listeners.

Flutter Mobile:

  • Model & Repository: Added TrackedIncidentModel (with isEditable, durationSinceDispatch), EmployeeIncidentRepository, and EmployeeTrackingHubService (signalr_netcore).
  • BLoC State Management: Created EmployeeTrackingBloc with reactive streams updating dynamic team coordinates, recalculating route points, distance (km), and ETA.
  • UI & Widgets:
    • ActiveIncidentCard: Color-coded emergency code badge, status pill, category icon, and elapsed time counter on EmployeeHomeView.
    • IncidentTrackingDetailView: Comprehensive tracking screen with incident metadata and photo proof gallery.
    • LiveRouteMiniMap: Dynamic flutter_map displaying incident point, moving responder unit, and polyline with live ETA badge overlay.
    • AssignedTeamInfoCard: Operational responder status (Forwarded, En Route, On Scene) and direct 1-tap phone call via url_launcher.
    • EditIncidentView: Form allowing active description modification and supplementary photo upload to MinIO S3 object storage.
  • Lifecycle & Dependency Injection: Wired providers in main.dart and app.dart with automatic SignalR initialization and teardown on login/logout.

Verification

  • dotnet test backend/SocarDispatch.slnx passed (118/118 application & infrastructure tests).
  • flutter test passed (35/35 unit and widget tests).
  • flutter analyze completed with 0 issues.

Closes #117
Ref: SDDC-81

…dispatched team view

- Add ReporterId filter and assigned team operational details to GetIncidentsQuery and IncidentDto
- Guard against editing resolved or canceled incidents in UpdateIncidentCommandHandler
- Broadcast dual real-time SignalR events on IncidentsHub and LocationHub for mobile listeners
- Implement TrackedIncidentModel, EmployeeIncidentRepository, and EmployeeTrackingHubService
- Implement EmployeeTrackingBloc with live OSRM route recalculation on team location updates
- Add 'My Reported Incidents' section and active incident card to EmployeeHomeView
- Implement IncidentTrackingDetailView with LiveRouteMiniMap, AssignedTeamInfoCard, and direct call action
- Implement EditIncidentView with situational description editing and supplementary media uploads
- Register repositories and blocs in main.dart and app.dart with proper authentication lifecycle
- Add unit and widget tests for backend queries, authorization, BLoC, and UI cards

Closes #117
Ref: SDDC-81
@Decuayer
Decuayer merged commit e4ee7b2 into main Sep 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SDDC-81] Implement Employee Live Incident Tracking, Detail Editing, and Dispatched Team Proximity View

1 participant