From e9cf2bc8498fc02332059880d7a6994348165b76 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Mon, 1 May 2023 14:27:56 +0200 Subject: [PATCH] Full track table editing --- src/components/tracks/TracksOverview.svelte | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/components/tracks/TracksOverview.svelte b/src/components/tracks/TracksOverview.svelte index 0cfd6fad..67a25e0c 100644 --- a/src/components/tracks/TracksOverview.svelte +++ b/src/components/tracks/TracksOverview.svelte @@ -122,18 +122,46 @@
+ {#if editTracks.findIndex((tr) => tr.id === t.id) !== -1} + { + const i = editTracks.findIndex( + (tr) => tr.id === t.id + ); + editTracks[i].distance = parseInt(e.target.value); + }} + /> + {:else}
{t.distance}
+ {/if}
+ {#if editTracks.findIndex((tr) => tr.id === t.id) !== -1} + { + const i = editTracks.findIndex( + (tr) => tr.id === t.id + ); + editTracks[i].minimumLapTime = parseInt(e.target.value); + }} + /> + {:else}
{t.minimumLapTime}
+ {/if}