fix: store opened_at and closed_at as DATETIME (not DATE)

DATE columns lose time information, causing timeline to show 00:00 for
car reception and WO closure. Migrated both columns to DATETIME and
updated: model casts (date → datetime), form pickers (DatePicker →
DateTimePicker with seconds:false), default to now() instead of today(),
and cleaned up defensive Carbon::parse() in getTimeline().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-11 04:52:03 +00:00
parent ce9f082612
commit 5a3275c2cf
4 changed files with 29 additions and 6 deletions
+2 -2
View File
@@ -45,8 +45,8 @@ class WorkOrder extends Model implements HasMedia
];
protected $casts = [
'opened_at' => 'date',
'closed_at' => 'date',
'opened_at' => 'datetime',
'closed_at' => 'datetime',
'approved_at' => 'datetime',
'eta_at' => 'datetime',
'eta_promised' => 'datetime',