Actualizar lógica de contabilización de camas Fuera de Área según sala
This commit is contained in:
@@ -3,7 +3,7 @@ import { Bed, CheckCircle2, Clock, Wrench, User, Plus, Trash, Edit2, Save, X } f
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { formatDateDDMMYYYY, getNombreProfesional } from '@/lib/utils';
|
||||
import { formatDateDDMMYYYY, getNombreProfesional, isCamaFueraDeArea } from '@/lib/utils';
|
||||
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '@/components/ui/dialog';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
@@ -187,10 +187,10 @@ export function MapaCamas({
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Badge variant="outline" className="bg-green-50 text-green-700 dark:bg-green-900 dark:text-green-300 dark:border-green-700">
|
||||
{camas.filter(c => c.estado === 'Disponible').length} Disponibles
|
||||
{camas.filter(c => c.estado === 'Disponible' && !isCamaFueraDeArea(c, areas)).length} Disponibles
|
||||
</Badge>
|
||||
<Badge variant="outline" className="bg-red-50 text-red-700 dark:bg-red-900 dark:text-red-300 dark:border-red-700">
|
||||
{camas.filter(c => c.estado === 'Ocupada').length} Ocupadas
|
||||
{camas.filter(c => c.estado === 'Ocupada' && !isCamaFueraDeArea(c, areas)).length} Ocupadas
|
||||
</Badge>
|
||||
<div className="ml-4 flex items-center gap-2 flex-wrap sm:flex-nowrap">
|
||||
<Button variant="outline" onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user