Solucionar perdida de relacion entre internacion y paciente al actualizar pagina preservando IDs en backend y refrescando estado en Internaciones
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useState } from 'react';
|
||||
import { useState, useEffect } from 'react';
|
||||
import { ClipboardList, Plus, Search, LogOut, CheckCircle2, MoreHorizontal, FileText, Trash2, Bed, User, Calendar, IdCard, Activity, CalendarDays, Clock, Settings, ListTodo } from 'lucide-react';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
@@ -50,7 +50,11 @@ export function Internaciones({
|
||||
onNuevoIngreso,
|
||||
onVerPendientesDeSala,
|
||||
}: InternacionesProps) {
|
||||
const { currentUser } = useHospitalStore();
|
||||
const { currentUser, refreshState } = useHospitalStore();
|
||||
|
||||
useEffect(() => {
|
||||
refreshState();
|
||||
}, [refreshState]);
|
||||
const [filtroEstado, setFiltroEstado] = useState<'todas' | 'activas' | 'finalizadas'>('todas');
|
||||
const [dialogoNuevaAbierto, setDialogoNuevaAbierto] = useState(false);
|
||||
const [dialogoEgresoAbierto, setDialogoEgresoAbierto] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user