feat(itinerary): reorder Add button after day header + comprehensive docs

- Move Add button to appear immediately after Day header (before games)
- Split games out of dayHeader into separate row for correct ordering
- Add 600+ lines of inline documentation to ItineraryTableViewController
- Document architecture decisions, data flow, constraints, and algorithms
- Add function-level comments explaining drag/drop, sortOrder calculation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-17 10:07:37 -06:00
parent 2a8bfeeff8
commit f84addb39d
3 changed files with 671 additions and 130 deletions

View File

@@ -837,14 +837,14 @@ struct TripDetailView: View {
// Custom items for this day (sorted by sortOrder)
if allowCustomItems {
// Add button first - always right after day header
sections.append(.addButton(day: dayNum))
let dayItems = customItems.filter { $0.day == dayNum }
.sorted { $0.sortOrder < $1.sortOrder }
for item in dayItems {
sections.append(.customItem(item))
}
// One add button per day
sections.append(.addButton(day: dayNum))
}
}