';
// Header del evento
$html .= '
'; // Cerrar evento-detalle
return $html;
}
?>
';
$html .= '';
$html .= '
';
// Información básica
$html .= '';
$html .= '
'; // Cerrar evento-info
$html .= '';
// Estado
$html .= '
'; // Cerrar info-grid
// Fechas específicas según el tipo
if ($tipo === 'correctivo') {
$html .= '';
$html .= 'Estado';
$html .= '
';
// Solicitante
$html .= '' . $evento['estado'] . '
';
$html .= '';
$html .= 'Solicitante';
$html .= '
';
// Cliente
if ($evento['cliente_nombre']) {
$html .= '' . htmlspecialchars($evento['solicitante']) . '
';
$html .= '';
$html .= 'Cliente';
$html .= '
';
}
// Proyecto
if ($evento['proyecto_nombre']) {
$html .= '' . htmlspecialchars($evento['cliente_nombre']) . '
';
$html .= '';
$html .= 'Proyecto';
$html .= '
';
}
// Asignado a
if ($evento['asignado_nombre']) {
$html .= '' . htmlspecialchars($evento['proyecto_nombre']) . '
';
$html .= '';
$html .= 'Asignado a';
$html .= '
';
}
$html .= '' . htmlspecialchars($evento['asignado_nombre']) . '
';
$html .= '';
$html .= '';
$html .= '
';
} else {
$html .= '';
$html .= '
';
$html .= '';
$html .= 'Fecha de Creación';
$html .= '
';
if ($evento['fecha_resolucion']) {
$html .= '' . date('d/m/Y H:i', strtotime($evento['fecha_creacion'] . ' ' . $evento['hora_creacion'])) . '
';
$html .= '';
$html .= 'Fecha de Resolución';
$html .= '
';
}
$html .= '' . date('d/m/Y H:i', strtotime($evento['fecha_resolucion'])) . '
';
$html .= '';
$html .= '';
$html .= '
';
}
// Descripción
if ($evento['descripcion']) {
$html .= '';
if ($evento['fecha_programada']) {
$html .= '
';
$html .= '';
$html .= 'Fecha Programada';
$html .= '
';
}
if ($evento['fecha_reprogramada']) {
$html .= '' . date('d/m/Y', strtotime($evento['fecha_programada']));
if ($evento['hora_programada']) {
$html .= ' ' . date('H:i', strtotime($evento['hora_programada']));
}
$html .= '
';
$html .= '';
$html .= 'Fecha Reprogramada';
$html .= '
';
}
$html .= '' . date('d/m/Y', strtotime($evento['fecha_reprogramada']));
if ($evento['hora_reprogramada']) {
$html .= ' ' . date('H:i', strtotime($evento['hora_reprogramada']));
}
$html .= '
';
$html .= '';
$html .= '';
$html .= '
';
}
// Resolución (solo para correctivos)
if ($tipo === 'correctivo' && $evento['resolucion']) {
$html .= '';
$html .= nl2br(htmlspecialchars($evento['descripcion']));
$html .= '
';
$html .= '';
$html .= '';
$html .= '
';
}
// Acciones
$html .= '';
$html .= nl2br(htmlspecialchars($evento['resolucion']));
$html .= '
';
$html .= '';
$html .= '';
$html .= ' Editar';
$html .= '';
if ($evento['estado'] !== 'Resuelto' && $evento['estado'] !== 'Cerrado') {
$html .= '';
$html .= ' Marcar Resuelto';
$html .= '';
}
$html .= '
';
$html .= '