Fix task stats consistency and improve residence card UI
- Compute task stats locally from kanban data for both summary card and residence cards - Filter out completed_tasks and cancelled_tasks columns from counts - Use startOfDay for accurate date comparisons (overdue, due this week, next 30 days) - Add parseDate helper to DateUtils - Make address tappable to open in Apple Maps - Remove navigation title from residences list - Update CLAUDE.md with Go backend references and DataManager architecture 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -177,6 +177,16 @@ enum DateUtils {
|
||||
return date < today
|
||||
}
|
||||
|
||||
/// Parse a date string (YYYY-MM-DD or ISO datetime) into a Date object
|
||||
static func parseDate(_ dateString: String?) -> Date? {
|
||||
guard let dateString = dateString, !dateString.isEmpty else { return nil }
|
||||
|
||||
// Extract date part if it includes time
|
||||
let datePart = dateString.components(separatedBy: "T").first ?? dateString
|
||||
|
||||
return isoDateFormatter.date(from: datePart)
|
||||
}
|
||||
|
||||
// MARK: - Timezone Conversion Utilities
|
||||
|
||||
/// Convert a local hour (0-23) to UTC hour
|
||||
|
||||
Reference in New Issue
Block a user