package components import ( "context" "fmt" "github.com/starfleetcptn/gomft/internal/db" ) // Dialog component for confirmation dialogs - copied from admin_tools.templ templ JobDialog(id string, title string, message string, confirmClass string, confirmText string, action string, jobID uint, jobName string) {
{ message }
if job.Name != "" { { job.Name } } else { { job.Config.Name } }
if job.GetEnabled() { Active } else { Inactive }Configs: if count, ok := data.ConfigCount[job.ID]; ok && count > 1 { { fmt.Sprintf("%d configurations", count) } } else if job.ConfigID > 0 { { job.Config.Name } } else { { "None" } }
Schedule: { job.Schedule }
if job.LastRun != nil {Last Run: { job.LastRun.Format("2006-01-02 15:04:05") }
}Next Run: { job.NextRun.Format("2006-01-02 15:04:05") }
Transfer jobs run according to their schedule and transfer files between configured sources and destinations