@ -10,10 +10,12 @@ import templruntime "github.com/a-h/templ/runtime"
import (
import (
"strconv"
"strconv"
"track-gopher/db"
"track-gopher/derby"
"track-gopher/models"
"track-gopher/models"
)
)
func Heats ( groups [ ] models . Group , racers [ ] models . Racer , selectedGroupID int64 ) templ . Component {
func Heats ( groups [ ] models . Group , racers [ ] models . Racer , selectedGroupID int64 , db * db . DB ) templ . Component {
return templruntime . GeneratedTemplate ( func ( templ_7745c5c3_Input templruntime . GeneratedComponentInput ) ( templ_7745c5c3_Err error ) {
return templruntime . GeneratedTemplate ( func ( templ_7745c5c3_Input templruntime . GeneratedComponentInput ) ( templ_7745c5c3_Err error ) {
templ_7745c5c3_W , ctx := templ_7745c5c3_Input . Writer , templ_7745c5c3_Input . Context
templ_7745c5c3_W , ctx := templ_7745c5c3_Input . Writer , templ_7745c5c3_Input . Context
if templ_7745c5c3_CtxErr := ctx . Err ( ) ; templ_7745c5c3_CtxErr != nil {
if templ_7745c5c3_CtxErr := ctx . Err ( ) ; templ_7745c5c3_CtxErr != nil {
@ -58,7 +60,7 @@ func Heats(groups []models.Group, racers []models.Racer, selectedGroupID int64)
var templ_7745c5c3_Var3 string
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3 , templ_7745c5c3_Err = templ . JoinStringErrs ( strconv . FormatInt ( group . ID , 10 ) )
templ_7745c5c3_Var3 , templ_7745c5c3_Err = templ . JoinStringErrs ( strconv . FormatInt ( group . ID , 10 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 2 6 , Col : 53 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 2 8 , Col : 53 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var3 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var3 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
@ -81,7 +83,7 @@ func Heats(groups []models.Group, racers []models.Racer, selectedGroupID int64)
var templ_7745c5c3_Var4 string
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4 , templ_7745c5c3_Err = templ . JoinStringErrs ( group . Name )
templ_7745c5c3_Var4 , templ_7745c5c3_Err = templ . JoinStringErrs ( group . Name )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 2 7 , Col : 19 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 2 9 , Col : 19 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var4 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var4 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
@ -97,7 +99,7 @@ func Heats(groups []models.Group, racers []models.Racer, selectedGroupID int64)
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
if selectedGroupID > 0 {
if selectedGroupID > 0 {
templ_7745c5c3_Err = HeatsContent ( selectedGroupID , groups , racers ) . Render ( ctx , templ_7745c5c3_Buffer )
templ_7745c5c3_Err = HeatsContent ( selectedGroupID , groups , db ) . Render ( ctx , templ_7745c5c3_Buffer )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
@ -121,7 +123,7 @@ func Heats(groups []models.Group, racers []models.Racer, selectedGroupID int64)
} )
} )
}
}
func HeatsContent ( groupID int64 , groups [ ] models . Group , allRacers [ ] models . Racer ) templ . Component {
func HeatsContent ( groupID int64 , groups [ ] models . Group , db * db . DB ) templ . Component {
return templruntime . GeneratedTemplate ( func ( templ_7745c5c3_Input templruntime . GeneratedComponentInput ) ( templ_7745c5c3_Err error ) {
return templruntime . GeneratedTemplate ( func ( templ_7745c5c3_Input templruntime . GeneratedComponentInput ) ( templ_7745c5c3_Err error ) {
templ_7745c5c3_W , ctx := templ_7745c5c3_Input . Writer , templ_7745c5c3_Input . Context
templ_7745c5c3_W , ctx := templ_7745c5c3_Input . Writer , templ_7745c5c3_Input . Context
if templ_7745c5c3_CtxErr := ctx . Err ( ) ; templ_7745c5c3_CtxErr != nil {
if templ_7745c5c3_CtxErr := ctx . Err ( ) ; templ_7745c5c3_CtxErr != nil {
@ -142,81 +144,70 @@ func HeatsContent(groupID int64, groups []models.Group, allRacers []models.Racer
templ_7745c5c3_Var5 = templ . NopComponent
templ_7745c5c3_Var5 = templ . NopComponent
}
}
ctx = templ . ClearChildren ( ctx )
ctx = templ . ClearChildren ( ctx )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 10 , "var groupRacers []models.Racer " )
groupRacers , _ := db . GetRacersByGroup ( groupID )
if templ_7745c5c3_Err != nil {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 10 , "<div class=\"bg-white shadow-md rounded-lg p-6\"><div class=\"flex justify-between items-center mb-6\"><h2 class=\"text-xl font-semibold\">Heats for " )
return templ_7745c5c3_Err
}
for _ , racer := range allRacers {
if racer . GroupID == groupID {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 11 , "groupRacers = append(groupRacers, racer)" )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 12 , "<div class=\"bg-white shadow-md rounded-lg p-6\"><div class=\"flex justify-between items-center mb-6\"><h2 class=\"text-xl font-semibold\">Heats for " )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var6 string
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6 , templ_7745c5c3_Err = templ . JoinStringErrs ( getGroupName ( groups , groupID ) )
templ_7745c5c3_Var6 , templ_7745c5c3_Err = templ . JoinStringErrs ( getGroupName ( groups , groupID ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 5 8 , Col : 45 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 55 , Col : 45 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var6 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var6 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 3 , " (" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 1 , " (" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var7 string
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7 , templ_7745c5c3_Err = templ . JoinStringErrs ( strconv . Itoa ( len ( groupRacers ) ) )
templ_7745c5c3_Var7 , templ_7745c5c3_Err = templ . JoinStringErrs ( strconv . Itoa ( len ( groupRacers ) ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 5 8 , Col : 81 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 5 5 , Col : 81 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var7 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var7 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 4 , " racers)</h2><div><button class=\"bg-indigo-600 text-white px-4 py-2 rounded-md hover:bg-indigo-700 mr-2\" hx-post=\"" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 2 , " racers)</h2><div><button class=\"bg-indigo-600 text-white px-4 py-2 rounded-md hover:bg-indigo-700 mr-2\" hx-post=\"" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var8 string
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8 , templ_7745c5c3_Err = templ . JoinStringErrs ( "/api/heats/generate?group_id=" + strconv . FormatInt ( groupID , 10 ) )
templ_7745c5c3_Var8 , templ_7745c5c3_Err = templ . JoinStringErrs ( "/api/heats/generate?group_id=" + strconv . FormatInt ( groupID , 10 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 6 3 , Col : 79 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 6 0 , Col : 79 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var8 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var8 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 5 , "\" hx-target=\"#heats-list\" hx-swap=\"innerHTML\">Regenerate Heats</button> <button class=\"bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700\" hx-post=\"" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 3 , "\" hx-target=\"#heats-list\" hx-swap=\"innerHTML\">Regenerate Heats</button> <button class=\"bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700\" hx-post=\"" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var9 string
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9 , templ_7745c5c3_Err = templ . JoinStringErrs ( "/api/heats/save?group_id=" + strconv . FormatInt ( groupID , 10 ) )
templ_7745c5c3_Var9 , templ_7745c5c3_Err = templ . JoinStringErrs ( "/api/heats/save?group_id=" + strconv . FormatInt ( groupID , 10 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 71 , Col : 75 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 68 , Col : 75 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var9 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var9 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 6 , "\" hx-target=\"#save-status\">Save Heats</button></div></div><div id=\"save-status\" class=\"mb-4\"></div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 4 , "\" hx-target=\"#save-status\">Save Heats</button></div></div><div id=\"save-status\" class=\"mb-4\"></div>" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
if len ( groupRacers ) == 0 {
if len ( groupRacers ) == 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 7 , "<div class=\"bg-yellow-100 p-4 rounded-lg mb-6\"><p class=\"text-yellow-800\">No racers in this group. Add racers to generate heats.</p></div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 5 , "<div class=\"bg-yellow-100 p-4 rounded-lg mb-6\"><p class=\"text-yellow-800\">No racers in this group. Add racers to generate heats.</p></div>" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
} else {
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 8 , "<div id=\"heats-list\" class=\"space-y-6\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 6 , "<div id=\"heats-list\" class=\"space-y-6\">" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
@ -224,12 +215,12 @@ func HeatsContent(groupID int64, groups []models.Group, allRacers []models.Racer
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 9 , "</div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 1 7 , "</div>" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 20 , "</div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 18 , "</div>" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
@ -258,154 +249,147 @@ func GeneratedHeats(racers []models.Racer) templ.Component {
templ_7745c5c3_Var10 = templ . NopComponent
templ_7745c5c3_Var10 = templ . NopComponent
}
}
ctx = templ . ClearChildren ( ctx )
ctx = templ . ClearChildren ( ctx )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 21 , "var derbyRacers []derby.Racer " )
if templ_7745c5c3_Err != nil {
var derbyRacers [ ] derby . Racer
return templ_7745c5c3_Err
}
for _ , racer := range racers {
for _ , racer := range racers {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 22 , "derbyRacers = append(derbyRacers, derby.CreateRacer(racer.ID, racer.FirstName, racer.LastName, racer.CarNumber)) " )
derbyRacers = append ( derbyRacers , derby . CreateRacer ( racer . ID , racer . FirstName , racer . LastName , racer . CarNumber ) )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 23 , "var heats = derby.GenerateHeats(derbyRacers) " )
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
var heats = derby . GenerateHeats ( derbyRacers )
if len ( heats ) == 0 {
if len ( heats ) == 0 {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 24 , "<div class=\"bg-yellow-100 p-4 rounded-lg\"><p class=\"text-yellow-800\">No heats could be generated. Please add more racers.</p></div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 19 , "<div class=\"bg-yellow-100 p-4 rounded-lg\"><p class=\"text-yellow-800\">No heats could be generated. Please add more racers.</p></div>" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
} else {
} else {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 2 5 , "<div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 2 0 , "<div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6\">" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
for _ , heat := range heats {
for _ , heat := range heats {
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 2 6 , "<div class=\"bg-gray-50 p-4 rounded-lg shadow\"><h3 class=\"text-lg font-semibold mb-3\">Heat " )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 2 1 , "<div class=\"bg-gray-50 p-4 rounded-lg shadow\"><h3 class=\"text-lg font-semibold mb-3\">Heat " )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var11 string
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11 , templ_7745c5c3_Err = templ . JoinStringErrs ( strconv . Itoa ( heat . HeatNum ) )
templ_7745c5c3_Var11 , templ_7745c5c3_Err = templ . JoinStringErrs ( strconv . Itoa ( heat . HeatNum ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 1 1 0, Col : 77 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 1 08 , Col : 77 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var11 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var11 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 2 7 , "</h3><table class=\"w-full\"><thead><tr class=\"bg-gray-200\"><th class=\"px-2 py-1 text-left\">Lane</th><th class=\"px-2 py-1 text-left\">Racer</th><th class=\"px-2 py-1 text-left\">Car #</th></tr></thead> <tbody><tr><td class=\"px-2 py-1\">1</td><td class=\"px-2 py-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 2 2 , "</h3><table class=\"w-full\"><thead><tr class=\"bg-gray-200\"><th class=\"px-2 py-1 text-left\">Lane</th><th class=\"px-2 py-1 text-left\">Racer</th><th class=\"px-2 py-1 text-left\">Car #</th></tr></thead> <tbody><tr><td class=\"px-2 py-1\">1</td><td class=\"px-2 py-1\">" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var12 string
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerName ( racers , heat . Lane1ID ) )
templ_7745c5c3_Var12 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerName ( racers , heat . Lane1ID ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 12 2 , Col : 66 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 12 0 , Col : 66 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var12 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var12 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 2 8 , "</td><td class=\"px-2 py-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 2 3 , "</td><td class=\"px-2 py-1\">" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var13 string
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerCarNumber ( racers , heat . Lane1ID ) )
templ_7745c5c3_Var13 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerCarNumber ( racers , heat . Lane1ID ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 12 3 , Col : 71 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 12 1 , Col : 71 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var13 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var13 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 2 9 , "</td></tr><tr><td class=\"px-2 py-1\">2</td><td class=\"px-2 py-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 2 4 , "</td></tr><tr><td class=\"px-2 py-1\">2</td><td class=\"px-2 py-1\">" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var14 string
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerName ( racers , heat . Lane2ID ) )
templ_7745c5c3_Var14 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerName ( racers , heat . Lane2ID ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 12 7 , Col : 66 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 12 5 , Col : 66 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var14 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var14 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 30 , "</td><td class=\"px-2 py-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 25 , "</td><td class=\"px-2 py-1\">" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var15 string
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerCarNumber ( racers , heat . Lane2ID ) )
templ_7745c5c3_Var15 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerCarNumber ( racers , heat . Lane2ID ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 12 8 , Col : 71 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 12 6 , Col : 71 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var15 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var15 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 31 , "</td></tr><tr><td class=\"px-2 py-1\">3</td><td class=\"px-2 py-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 26 , "</td></tr><tr><td class=\"px-2 py-1\">3</td><td class=\"px-2 py-1\">" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var16 string
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerName ( racers , heat . Lane3ID ) )
templ_7745c5c3_Var16 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerName ( racers , heat . Lane3ID ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 13 2 , Col : 66 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 13 0 , Col : 66 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var16 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var16 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 3 2, "</td><td class=\"px-2 py-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 27 , "</td><td class=\"px-2 py-1\">" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var17 string
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerCarNumber ( racers , heat . Lane3ID ) )
templ_7745c5c3_Var17 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerCarNumber ( racers , heat . Lane3ID ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 13 3 , Col : 71 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 13 1 , Col : 71 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var17 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var17 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 33 , "</td></tr><tr><td class=\"px-2 py-1\">4</td><td class=\"px-2 py-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 28 , "</td></tr><tr><td class=\"px-2 py-1\">4</td><td class=\"px-2 py-1\">" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var18 string
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerName ( racers , heat . Lane4ID ) )
templ_7745c5c3_Var18 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerName ( racers , heat . Lane4ID ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 13 7 , Col : 66 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 13 5 , Col : 66 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var18 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var18 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 34 , "</td><td class=\"px-2 py-1\">" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 29 , "</td><td class=\"px-2 py-1\">" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
var templ_7745c5c3_Var19 string
var templ_7745c5c3_Var19 string
templ_7745c5c3_Var19 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerCarNumber ( racers , heat . Lane4ID ) )
templ_7745c5c3_Var19 , templ_7745c5c3_Err = templ . JoinStringErrs ( getRacerCarNumber ( racers , heat . Lane4ID ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 13 8 , Col : 71 }
return templ . Error { Err : templ_7745c5c3_Err , FileName : ` web/templates/heats.templ ` , Line : 13 6 , Col : 71 }
}
}
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var19 ) )
_ , templ_7745c5c3_Err = templ_7745c5c3_Buffer . WriteString ( templ . EscapeString ( templ_7745c5c3_Var19 ) )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 3 5 , "</td></tr></tbody></table></div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 3 0 , "</td></tr></tbody></table></div>" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}
}
}
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 3 6 , "</div>" )
templ_7745c5c3_Err = templruntime . WriteString ( templ_7745c5c3_Buffer , 3 1 , "</div>" )
if templ_7745c5c3_Err != nil {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
return templ_7745c5c3_Err
}
}