Fortlaufende Zyklus-Planung und Periodenlogik einführen

This commit is contained in:
Kai
2026-02-16 15:06:34 +01:00
parent 2255318993
commit 67bd87e12a
9 changed files with 138 additions and 63 deletions

View File

@@ -5,6 +5,7 @@ import "database/sql"
type Settings struct {
DaysPerMonth int
CurrentMonth int
CurrentCycle int
CurrentDay int
}
@@ -48,10 +49,14 @@ type Plan struct {
CropID int64
CropName string
GrowMonths int
StartPeriod int
StartMonth int
StartDay int
StartCycle int
HarvestPeriod int
HarvestMonth int
HarvestDay int
HarvestCycle int
Notes string
RegrowEnabled bool
RegrowCycles int
@@ -75,9 +80,11 @@ type CustomTask struct {
ID int64
TemplateID sql.NullInt64
Title string
TaskPeriod int
Month int
Day int
YearOffset int
Cycle int
TargetName string
Notes string
}
@@ -104,6 +111,11 @@ type MonthOption struct {
Label string
}
type CycleOption struct {
Value int
Label string
}
type CalendarDay struct {
Day int
Tasks []Task
@@ -156,6 +168,7 @@ type PlanningPage struct {
BasePage
Settings Settings
Months []MonthOption
CycleOffsets []CycleOption
Crops []Crop
Plans []Plan
PlanningTargets []PlanningTarget