feat(logs): Ereignis-Uhrzeit vorbelegen und 24h-Format vereinheitlichen

Neue Ereignisse starten mit der aktuellen Uhrzeit; Datums-/Zeitanzeigen und Zeit-Picker nutzen durchgängig das 24-Stunden-Format.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-31 10:57:47 +02:00
parent dee2f7b95b
commit 658bc6c0c9
9 changed files with 69 additions and 16 deletions
+7
View File
@@ -17,6 +17,13 @@ export interface LogEventPayload {
remarks: string
}
/** Local time as HH:MM for HTML `<input type="time">`. */
export function currentLocalTimeHHMM(date: Date = new Date()): string {
const hours = String(date.getHours()).padStart(2, '0')
const minutes = String(date.getMinutes()).padStart(2, '0')
return `${hours}:${minutes}`
}
const LOG_EVENT_FIELDS: (keyof LogEventPayload)[] = [
'time', 'mgk', 'rwk', 'windPressure', 'windDirection', 'windStrength', 'seaState',
'weatherIcon', 'current', 'heel', 'sailsOrMotor', 'logReading', 'distance',