phase-6: alerts engine, scheduler, notifications, calibration popup, and dashboard

This commit is contained in:
Atharv1705
2026-11-12 14:39:22 +05:30
parent ba4777b182
commit aec1b6ad41
25 changed files with 2743 additions and 58 deletions
+4
View File
@@ -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"]),
}