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:
Yvv
2026-02-21 18:05:18 +01:00
parent 1365f4c86c
commit 2af95ebcf1
6 changed files with 564 additions and 29 deletions

View File

@@ -3,6 +3,7 @@
import asyncio
import sys
import os
from datetime import datetime
sys.path.insert(0, os.path.dirname(__file__))
@@ -44,6 +45,8 @@ async def seed():
recettes=75000,
pmax=20,
vmax=2100,
data_year=2018,
data_imported_at=datetime.utcnow(),
)
db.add(params)