Formatear fecha de cultivos y fecha de resultado parcial y definitivo como dd-mm-yyyy
This commit is contained in:
@@ -2397,7 +2397,14 @@ function SeccionCultivos({ cults, patient, internacionId, add, update, del, canE
|
||||
|
||||
const handleParcial = () => {
|
||||
if (!selected) return;
|
||||
update(selected.id, { protocolo, estado: 'Parcial', germen, sensible, resistente });
|
||||
update(selected.id, {
|
||||
protocolo,
|
||||
estado: 'Parcial',
|
||||
germen,
|
||||
sensible,
|
||||
resistente,
|
||||
fechaResultado: selected.fechaResultado || new Date().toISOString().split('T')[0]
|
||||
});
|
||||
setResDialog(false);
|
||||
resetRes();
|
||||
};
|
||||
@@ -2504,7 +2511,7 @@ function SeccionCultivos({ cults, patient, internacionId, add, update, del, canE
|
||||
<Microscope className={`h-5 w-5 ${c.estado === 'NAF/Pendiente' ? 'text-amber-600' : c.estado === 'Parcial' ? 'text-orange-600' : c.estado === 'Positivo' ? 'text-red-600' : 'text-green-600'}`} />
|
||||
</div>
|
||||
<div>
|
||||
<p className="font-medium">{c.fechaToma}</p>
|
||||
<p className="font-medium">{formatDateDDMMYYYY(c.fechaToma)}</p>
|
||||
<div className="flex items-center gap-2 text-sm text-gray-500">
|
||||
<Badge variant="outline">{c.tipoMuestra}</Badge>
|
||||
<Badge className={getEstadoColor(c.estado)}>{getEstadoLabel(c.estado)}</Badge>
|
||||
@@ -2529,8 +2536,10 @@ function SeccionCultivos({ cults, patient, internacionId, add, update, del, canE
|
||||
</div>
|
||||
</div>
|
||||
{c.protocolo && <p className="text-xs text-gray-500 dark:text-gray-400">Protocolo: {c.protocolo}</p>}
|
||||
{c.fechaResultado && (c.estado === 'Positivo' || c.estado === 'Negativo') && (
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400">Fecha Resultado Definitivo: {formatDateDDMMYYYY(c.fechaResultado)}</p>
|
||||
{c.fechaResultado && (c.estado === 'Positivo' || c.estado === 'Negativo' || c.estado === 'Parcial') && (
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400">
|
||||
Fecha Resultado {c.estado === 'Parcial' ? 'Parcial' : 'Definitivo'}: {formatDateDDMMYYYY(c.fechaResultado)}
|
||||
</p>
|
||||
)}
|
||||
{c.observaciones && <p className="text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 p-2 rounded">{c.observaciones}</p>}
|
||||
{c.estado === 'Parcial' && c.germen && (
|
||||
|
||||
Reference in New Issue
Block a user