phase-6: alerts engine, scheduler, notifications, calibration popup, and dashboard
This commit is contained in:
@@ -31,6 +31,7 @@ from ..models import (
|
||||
Vendor,
|
||||
Warranty,
|
||||
)
|
||||
from ..services.alerts import run_alert_check
|
||||
from ..services.settings_service import ensure_default_settings
|
||||
|
||||
|
||||
@@ -775,6 +776,8 @@ def seed_database(db: Session, upload_dir: Path | None = None) -> dict[str, int]
|
||||
visit.complaints.append(complaints[3])
|
||||
db.add(visit)
|
||||
|
||||
db.flush()
|
||||
alert_res = run_alert_check(db)
|
||||
db.commit()
|
||||
return {
|
||||
"departments": len(departments),
|
||||
@@ -791,6 +794,7 @@ def seed_database(db: Session, upload_dir: Path | None = None) -> dict[str, int]
|
||||
"complaints": len(complaints),
|
||||
"demo_equipment": len(demo_items),
|
||||
"department_visits": 12,
|
||||
"notifications": int(alert_res["created"]),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user