[Feature] Streamline Trip Logging: Two-Stage Draft & Confirmation Workflow, Single-Draft Integrity, and Inline Validation Feedback #2
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
JackPrince/GoBDLogBook#2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
1. Background & Problem Statement
User feedback indicates that input errors are difficult to diagnose and resolve due to ambiguous error handling. Code inspection revealed several architectural and UX bottlenecks:
status: 'confirmed'. Checking the confirmed box automatically injects a fictitious end time (now + 1 hour), which violates GoBD principles.vehicle_id,started_at,odometer_start), an HTML5requiredattribute onodometer_endprevents saving drafts in the frontend.The given data was invalid.) and discards field-level error messages (payload.errors).2. Proposed Architecture & Workflow
A. Two-Stage Trip Lifecycle
vehicle_id,started_at, andodometer_start.status: 'confirmed', requiring an audit change reason for subsequent edits.B. Single-Draft Integrity & Auto-Resume
C. Inline Feedback & Pre-Flight Checks
D. Transparent Geolocation State
LocationPicker("GPS captured", "Selected from bookmarks", "Manually edited — coordinates cleared").3. Acceptance Criteria
status: 'draft'. Fictitious+1hend-time calculation is removed.requiredattributes do not prevent submitting minimal drafts.Draft · 3 fields missing for confirmation).4. Affected Code References
client/src/features/trips/tripFormModel.tsclient/src/features/trips/TripFormCard.tsxclient/src/features/trips/TripsPage.tsxclient/src/components/LocationPicker.tsxclient/src/lib/api.tsapp/Services/TripIntegrityService.phpapp/Http/Requests/StoreTripRequest.phproutes/console.php