Full track table editing
This commit is contained in:
		@@ -122,18 +122,46 @@
 | 
			
		||||
                <td class="px-6 py-4 whitespace-nowrap">
 | 
			
		||||
                  <div class="flex items-center">
 | 
			
		||||
                    <div class="ml-4">
 | 
			
		||||
                      {#if editTracks.findIndex((tr) => tr.id === t.id) !== -1}
 | 
			
		||||
                      <input
 | 
			
		||||
                          class="shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-0.5"
 | 
			
		||||
                          type="number"
 | 
			
		||||
                          value={t.distance}
 | 
			
		||||
                          on:input={(e) => {
 | 
			
		||||
                            const i = editTracks.findIndex(
 | 
			
		||||
                              (tr) => tr.id === t.id
 | 
			
		||||
                            );
 | 
			
		||||
                            editTracks[i].distance = parseInt(e.target.value);
 | 
			
		||||
                          }}
 | 
			
		||||
                        />
 | 
			
		||||
                      {:else}
 | 
			
		||||
                      <div class="text-sm font-medium text-gray-900">
 | 
			
		||||
                        {t.distance}
 | 
			
		||||
                      </div>
 | 
			
		||||
                      {/if}
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td class="px-6 py-4 whitespace-nowrap">
 | 
			
		||||
                  <div class="flex items-center">
 | 
			
		||||
                    <div class="ml-4">
 | 
			
		||||
                      {#if editTracks.findIndex((tr) => tr.id === t.id) !== -1}
 | 
			
		||||
                      <input
 | 
			
		||||
                          class="shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-0.5"
 | 
			
		||||
                          type="number"
 | 
			
		||||
                          value={t.minimumLapTime}
 | 
			
		||||
                          on:input={(e) => {
 | 
			
		||||
                            const i = editTracks.findIndex(
 | 
			
		||||
                              (tr) => tr.id === t.id
 | 
			
		||||
                            );
 | 
			
		||||
                            editTracks[i].minimumLapTime = parseInt(e.target.value);
 | 
			
		||||
                          }}
 | 
			
		||||
                        />
 | 
			
		||||
                      {:else}
 | 
			
		||||
                      <div class="text-sm font-medium text-gray-900">
 | 
			
		||||
                        {t.minimumLapTime}
 | 
			
		||||
                      </div>
 | 
			
		||||
                      {/if}
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
                </td>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user