fix: Klammern bei Signatur-Scoring in scoreTodayEntry
Stellt sicher, dass signSkipper und signCrew gemeinsam für den Punktewert bei der Auswahl des Tageseintrags ausgewertet werden. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -154,7 +154,7 @@ export async function loadEntry(logbookId: string, entryId: string): Promise<Loa
|
|||||||
|
|
||||||
function scoreTodayEntry(data: Record<string, unknown>): number {
|
function scoreTodayEntry(data: Record<string, unknown>): number {
|
||||||
const events = (data.events as unknown[] | undefined)?.length ?? 0
|
const events = (data.events as unknown[] | undefined)?.length ?? 0
|
||||||
const signed = data.signSkipper || data.signCrew ? 1 : 0
|
const signed = (data.signSkipper || data.signCrew) ? 1 : 0
|
||||||
const destination = String(data.destination || '').trim() ? 1 : 0
|
const destination = String(data.destination || '').trim() ? 1 : 0
|
||||||
return events * 10 + signed + destination
|
return events * 10 + signed + destination
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user