Add interactive citizen page with sidebar, display settings, and adaptive CSS
Major rework of the citizen-facing page: - Chart + sidebar layout (auth/vote/countdown in right sidebar) - DisplaySettings component (font size, chart density, color palettes) - Adaptive CSS with clamp() throughout, responsive breakpoints at 480/768/1024 - Baseline charts zoomed on first tier for small consumption detail - Marginal price chart with dual Y-axes (foyers left, €/m³ right) - Key metrics banner (5 columns: recettes, palier, prix palier, prix médian, mon prix) - Client-side p0/impacts computation, draggable median price bar - Household dots toggle, vote overlay curves - Auth returns volume_m3, vote captures submitted_at - Cleaned header nav (removed Accueil/Super Admin for public visitors) - Terminology: foyer for bills, électeur for votes - 600m³ added to impact reference volumes - Realistic seed votes (50 votes, 3 profiles) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ class Token(BaseModel):
|
||||
token_type: str = "bearer"
|
||||
role: str
|
||||
commune_slug: str | None = None
|
||||
volume_m3: float | None = None
|
||||
|
||||
|
||||
# ── Commune ──
|
||||
@@ -58,6 +59,7 @@ class TariffParamsUpdate(BaseModel):
|
||||
recettes: float | None = None
|
||||
pmax: float | None = None
|
||||
vmax: float | None = None
|
||||
differentiated_tariff: bool | None = None
|
||||
data_year: int | None = None
|
||||
|
||||
|
||||
@@ -67,12 +69,30 @@ class TariffParamsOut(BaseModel):
|
||||
recettes: float
|
||||
pmax: float
|
||||
vmax: float
|
||||
differentiated_tariff: bool = False
|
||||
data_year: int | None = None
|
||||
data_imported_at: datetime | None = None
|
||||
published_vinf: float | None = None
|
||||
published_a: float | None = None
|
||||
published_b: float | None = None
|
||||
published_c: float | None = None
|
||||
published_d: float | None = None
|
||||
published_e: float | None = None
|
||||
published_p0: float | None = None
|
||||
published_at: datetime | None = None
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class PublishCurveRequest(BaseModel):
|
||||
vinf: float = Field(ge=0)
|
||||
a: float = Field(ge=0, le=1)
|
||||
b: float = Field(ge=0, le=1)
|
||||
c: float = Field(ge=0, le=1)
|
||||
d: float = Field(ge=0, le=1)
|
||||
e: float = Field(ge=0, le=1)
|
||||
|
||||
|
||||
# ── Household ──
|
||||
|
||||
class HouseholdOut(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user