backend y front actualizados se deja auditoria de cambios en chelists preguntas 1.0.34
This commit is contained in:
@@ -1909,12 +1909,12 @@ def get_dashboard_data(
|
||||
mechanic_ranking = [
|
||||
schemas.MechanicRanking(
|
||||
mechanic_id=m.id,
|
||||
mechanic_name=m.full_name,
|
||||
mechanic_name=m.full_name or "Sin nombre",
|
||||
total_inspections=m.total,
|
||||
avg_score=round(m.avg_score, 2) if m.avg_score else 0.0,
|
||||
completion_rate=round((m.completed / m.total * 100) if m.total > 0 else 0, 2)
|
||||
)
|
||||
for m in mechanic_stats
|
||||
for m in mechanic_stats if m.full_name
|
||||
]
|
||||
|
||||
# ESTADÍSTICAS POR CHECKLIST
|
||||
@@ -1955,11 +1955,11 @@ def get_dashboard_data(
|
||||
checklist_stats = [
|
||||
schemas.ChecklistStats(
|
||||
checklist_id=c.id,
|
||||
checklist_name=c.name,
|
||||
checklist_name=c.name or "Sin nombre",
|
||||
total_inspections=c.total,
|
||||
avg_score=round(c.avg_score, 2) if c.avg_score else 0.0
|
||||
)
|
||||
for c in checklist_stats_data
|
||||
for c in checklist_stats_data if c.name
|
||||
]
|
||||
|
||||
# INSPECCIONES POR FECHA (últimos 30 días)
|
||||
@@ -2099,8 +2099,8 @@ def get_inspections_report(
|
||||
"id": r.id,
|
||||
"vehicle_plate": r.vehicle_plate,
|
||||
"checklist_id": r.checklist_id,
|
||||
"checklist_name": r.checklist_name,
|
||||
"mechanic_name": r.mechanic_name,
|
||||
"checklist_name": r.checklist_name or "Sin nombre",
|
||||
"mechanic_name": r.mechanic_name or "Sin nombre",
|
||||
"status": r.status,
|
||||
"score": r.score,
|
||||
"max_score": r.max_score,
|
||||
|
||||
Reference in New Issue
Block a user