Add 52-week planting calendar with month fallback
Add indoor_sowing_weeks, direct_sowing_weeks, transplanting_weeks, glasshouse_weeks, harvesting_weeks (integer[]) to backend Cultivar and CreateCultivar structs with INSERT/UPDATE SQL bindings. Frontend PlantingCalendar component rewritten as a compact 52-column Gantt-style grid grouped by month headers. Prefers week data when available, falls back to expanding month data into week ranges. Calendar displayed full-width on cultivar detail page with color legend.
This commit is contained in:
@@ -250,6 +250,11 @@ pub struct Cultivar {
|
||||
pub transplanting_months: Option<Vec<i32>>,
|
||||
pub glasshouse_months: Option<Vec<i32>>,
|
||||
pub harvesting_months: Option<Vec<i32>>,
|
||||
pub indoor_sowing_weeks: Option<Vec<i32>>,
|
||||
pub direct_sowing_weeks: Option<Vec<i32>>,
|
||||
pub transplanting_weeks: Option<Vec<i32>>,
|
||||
pub glasshouse_weeks: Option<Vec<i32>>,
|
||||
pub harvesting_weeks: Option<Vec<i32>>,
|
||||
pub succession_planting_days: Option<i32>,
|
||||
pub planting_notes: Option<String>,
|
||||
pub propagation_methods: Option<Vec<String>>,
|
||||
@@ -318,6 +323,11 @@ pub struct CreateCultivar {
|
||||
pub transplanting_months: Option<Vec<i32>>,
|
||||
pub glasshouse_months: Option<Vec<i32>>,
|
||||
pub harvesting_months: Option<Vec<i32>>,
|
||||
pub indoor_sowing_weeks: Option<Vec<i32>>,
|
||||
pub direct_sowing_weeks: Option<Vec<i32>>,
|
||||
pub transplanting_weeks: Option<Vec<i32>>,
|
||||
pub glasshouse_weeks: Option<Vec<i32>>,
|
||||
pub harvesting_weeks: Option<Vec<i32>>,
|
||||
pub succession_planting_days: Option<i32>,
|
||||
pub planting_notes: Option<String>,
|
||||
pub propagation_methods: Option<Vec<String>>,
|
||||
|
||||
Reference in New Issue
Block a user