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" } templ JobForm(ctx context.Context, data JobFormData) { @LayoutWithContext(getJobFormTitle(data.IsNew), ctx) {

{ getJobTitle(data.IsNew) }

Configure your scheduled transfer job

if data.IsNew {

Descriptive name for this job (optional). If not provided, the config name will be used.

Use standard cron expression format. Example: */15 * * * * (every 15 minutes)

Disabled jobs will not run automatically.

Cancel
} else {

Descriptive name for this job (optional). If not provided, the config name will be used.

Use standard cron expression format. Example: */15 * * * * (every 15 minutes)

Disabled jobs will not run automatically.

Cancel
}

Jobs will run according to their schedule and execute the selected transfer configuration

Need help with cron expressions? Try crontab.guru
} }