parent
284bdc6e33
commit
ff1bc8a44a
@ -206,18 +206,6 @@
|
||||
href="../tracks"
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">{editable.track.name}
|
||||
</a>
|
||||
|
|
||||
<label for="valid" class="block font-semibold text-gray-700">Station: </label>
|
||||
<a
|
||||
href="../scanstations/{editable.station.id}"
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">#{editable.station.id}
|
||||
</a>
|
||||
|
|
||||
<label for="valid" class="block font-semibold text-gray-700">Card: </label>
|
||||
<a
|
||||
href="TODO:"
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">#{editable.card.id}
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
<div class=" w-full">
|
||||
|
@ -22,7 +22,8 @@
|
||||
return id.toString() === searchvalue;
|
||||
}
|
||||
function format_laptime(laptime){
|
||||
if(laptime < 60){return laptime.toString}
|
||||
if(laptime == 0 || laptime == null){return "First scan of the day."}
|
||||
if(laptime < 60){return `${laptime}s`}
|
||||
if(laptime < 3600){return `${Math.floor(laptime / 60)}min ${laptime - (Math.floor(laptime / 60)*60)}s`}
|
||||
return `${Math.floor(laptime / 3600)}h ${laptime - (Math.floor(laptime / 3600)*3600)}min ${laptime - (Math.floor(laptime / 3600)*3600) - (Math.floor(laptime / 60)*60)}`
|
||||
}
|
||||
@ -119,9 +120,9 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
{#if scan.laptime}
|
||||
{#if scan.responseType === "TRACKSCAN"}
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
{format_laptime(scan.laptime)}
|
||||
{format_laptime(scan.lapTime)}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
|
Loading…
x
Reference in New Issue
Block a user