package components import ( "fmt" "github.com/starfleetcptn/gomft/internal/db" "context" ) type JobFormData struct { Job *db.Job Configs []db.TransferConfig IsNew bool } func getJobFormTitle(isNew bool) string { if isNew { return "New Job" } return "Edit Job" } func getJobTitle(isNew bool) string { if isNew { return "Create New Job" } return "Edit Job" } // configSelected checks if a config ID is selected for a job func configSelected(job *db.Job, configID uint) bool { // Check if the job has the config ID in its list for _, id := range job.GetConfigIDsList() { if id == configID { return true } } // As a fallback, check the primary ConfigID return job.ConfigID == configID } templ JobForm(ctx context.Context, data JobFormData) { @LayoutWithContext(getJobFormTitle(data.IsNew), ctx) {
Configure your scheduled transfer job
Jobs will run according to their schedule and execute the selected transfer configuration