{{define "prompts"}}

{{if .TargetDossier}}{{.TargetDossier.Name}}'s {{end}}Daily Check-in

Track daily measurements and observations

Enter what you want to track (e.g., "I take vitamin D every morning" or "walked 30 minutes today"). The system will learn patterns and create tracking prompts.

{{if .Error}}
{{.Error}}
{{end}} {{if .Success}}
{{.Success}}
{{end}} {{if or .AllPrompts .Entries .FreeformPrompts}}
{{/* 1. FILLED CARDS - Entries from today (SHOW FIRST) */}} {{range .Entries}}
{{.Question}}
edit {{.Category}} {{.TimeFormatted}}
{{if .Groups}} {{if eq .Layout "two-column"}} {{/* Two-column layout - first two groups side-by-side */}}
{{range $i, $g := .Groups}} {{if lt $i 2}}
{{if $g.Title}}
{{$g.Title}}
{{end}}
{{range $g.Fields}} {{if eq .Type "number"}}
{{if .Label}}{{.Label}}:{{end}} {{if .Unit}}{{.Unit}}{{end}}
{{end}} {{end}}
{{end}} {{end}}
{{/* Remaining groups below (index 2+) */}} {{range $i, $g := .Groups}} {{if ge $i 2}}
{{if $g.Title}}
{{$g.Title}}
{{end}} {{range $g.Fields}} {{if eq .Type "text"}} {{if .Value}}
{{.Value}}
{{end}} {{end}} {{end}}
{{end}} {{end}} {{else}} {{/* Regular grouped fields */}} {{range .Groups}}
{{if .Title}}
{{.Title}}
{{end}}
{{range .Fields}} {{if eq .Type "number"}}
{{if .Label}}{{.Label}}:{{end}} {{if .Unit}}{{.Unit}}{{end}}
{{else if eq .Type "text"}} {{if .Value}}
{{.Value}}
{{end}} {{end}} {{end}}
{{end}} {{end}} {{else if .Fields}} {{/* Flat fields */}}
{{range .Fields}} {{if eq .Type "number"}} {{if .Label}}{{.Label}}{{end}} {{if .Unit}}{{.Unit}}{{end}} {{else if eq .Type "checkbox"}} {{end}} {{end}}
{{end}}
{{if .SourceInput}}
Created from: "{{.SourceInput}}"
{{end}}
{{end}} {{/* 2. ALL PROMPTS - Unfilled prompts (due + upcoming) */}} {{range .AllPrompts}} {{if not .HasResponse}} {{template "prompt_card.tmpl" .}} {{end}} {{end}} {{/* 3. FREEFORM CARD - Always last */}} {{range .FreeformPrompts}}
{{.Question}} optional
or press Ctrl+Enter
{{end}}
{{else}}

✨ No tracking prompts yet

Start by logging something below, and the system will learn your patterns.

Examples:

{{end}}
← Back to dossier
{{template "footer"}}
{{end}}