Add markdown editor toolbar and data year display on import page
CMS editor: formatting toolbar with H1-H3, bold, italic, strikethrough, links, images, lists, blockquotes, code blocks, horizontal rules. Keyboard shortcuts (Ctrl+B/I/D/K). Improved markdown preview rendering. Import page: shows current data summary with year badge, stats grid, last import date. Year input for new imports. Preview with sample table. Backend: added data_year and data_imported_at fields to TariffParams, returned in stats endpoint. Import sets data_imported_at automatically. Seed sets data_year=2018. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -56,6 +56,7 @@ class TariffParamsUpdate(BaseModel):
|
||||
recettes: float | None = None
|
||||
pmax: float | None = None
|
||||
vmax: float | None = None
|
||||
data_year: int | None = None
|
||||
|
||||
|
||||
class TariffParamsOut(BaseModel):
|
||||
@@ -64,6 +65,8 @@ class TariffParamsOut(BaseModel):
|
||||
recettes: float
|
||||
pmax: float
|
||||
vmax: float
|
||||
data_year: int | None = None
|
||||
data_imported_at: datetime | None = None
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
@@ -91,6 +94,8 @@ class HouseholdStats(BaseModel):
|
||||
avg_volume: float
|
||||
median_volume: float
|
||||
voted_count: int
|
||||
data_year: int | None = None
|
||||
data_imported_at: datetime | None = None
|
||||
|
||||
|
||||
class ImportPreview(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user