fix(f4): require current checklist before inspection execution

This commit is contained in:
2026-09-08 14:43:02 -03:00
parent 4df8f40dd4
commit 3bfa3bce1b
2 changed files with 7 additions and 1 deletions
@@ -302,6 +302,12 @@ export class InspectionVisitLifecycleService {
message: 'Definí Área/Yacimiento, Operadora, Inspector responsable y fecha de inicio antes de planificar',
});
}
if (!visit.checklistGeneratedAt || visit.checklistGeneration < 1) {
throw new BadRequestException({
code: 'INSPECTION_CHECKLIST_REQUIRED',
message: 'Generá el checklist automático antes de confirmar la planificación',
});
}
const [relation] = await manager.query(`
SELECT 1
FROM area_company_relations