fix: corrigir pequenos problemas na seção de profissionais #43
@ -5,9 +5,9 @@ import SignatureCanvas from "react-signature-canvas";
|
||||
import Link from "next/link";
|
||||
import ProtectedRoute from "@/components/ProtectedRoute";
|
||||
import { useAuth } from "@/hooks/useAuth";
|
||||
import { buscarPacientes, listarPacientes, buscarPacientePorId, type Paciente } from "@/lib/api";
|
||||
import { listarPacientes, buscarPacientePorId, type Paciente } from "@/lib/api";
|
||||
import { useReports } from "@/hooks/useReports";
|
||||
import { CreateReportData, ReportFormData } from "@/types/report-types";
|
||||
import { CreateReportData } from "@/types/report-types";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
@ -31,23 +31,6 @@ import {
|
||||
import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"
|
||||
import { User, FolderOpen, X, Users, MessageSquare, ClipboardList, Plus, Edit, Trash2, ChevronLeft, ChevronRight, Clock, FileCheck, Upload, Download, Eye, History, Stethoscope, Pill, Activity, Search } from "lucide-react"
|
||||
import { Calendar as CalendarIcon, FileText, Settings } from "lucide-react";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||
import interactionPlugin from "@fullcalendar/interaction";
|
||||
import ptBrLocale from "@fullcalendar/core/locales/pt-br";
|
||||
|
||||
const FullCalendar = dynamic(() => import("@fullcalendar/react"), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
const pacientes = [
|
||||
{ nome: "Ana Souza", cpf: "123.456.789-00", idade: 42, statusLaudo: "Finalizado" },
|
||||
@ -126,12 +109,6 @@ const ProfissionalPage = () => {
|
||||
|
||||
// Estados para funcionalidades do prontuário
|
||||
const [consultasRegistradas, setConsultasRegistradas] = useState<any[]>([]);
|
||||
const [historicoMedico, setHistoricoMedico] = useState<any[]>([]);
|
||||
const [prescricoesMedicas, setPrescricoesMedicas] = useState<any[]>([]);
|
||||
const [examesSolicitados, setExamesSolicitados] = useState<any[]>([]);
|
||||
const [diagnosticos, setDiagnosticos] = useState<any[]>([]);
|
||||
const [evolucaoQuadro, setEvolucaoQuadro] = useState<any[]>([]);
|
||||
const [anexos, setAnexos] = useState<any[]>([]);
|
||||
const [abaProntuarioAtiva, setAbaProntuarioAtiva] = useState('nova-consulta');
|
||||
|
||||
// Estados para campos principais da consulta
|
||||
@ -215,12 +192,6 @@ const ProfissionalPage = () => {
|
||||
setPacienteSelecionado(null);
|
||||
};
|
||||
|
||||
const handleEditarLaudo = (paciente: any) => {
|
||||
setPatientForLaudo(paciente);
|
||||
setIsEditingLaudoForPatient(true);
|
||||
setActiveSection('laudos');
|
||||
};
|
||||
|
||||
|
||||
const navigateDate = (direction: 'prev' | 'next') => {
|
||||
const newDate = new Date(currentCalendarDate);
|
||||
@ -698,32 +669,6 @@ const ProfissionalPage = () => {
|
||||
};
|
||||
|
||||
|
||||
const renderEventContent = (eventInfo: any) => {
|
||||
const bg = eventInfo.event.backgroundColor || eventInfo.event.extendedProps?.color || "#4dabf7";
|
||||
|
||||
return (
|
||||
<div
|
||||
className="flex items-center gap-1 text-xs p-1 rounded cursor-pointer"
|
||||
style={{
|
||||
backgroundColor: bg,
|
||||
color: "#fff",
|
||||
maxWidth: "100%",
|
||||
whiteSpace: "nowrap",
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis"
|
||||
}}
|
||||
title={`${eventInfo.event.title} • ${eventInfo.event.extendedProps.type} • ${eventInfo.event.extendedProps.time}`}
|
||||
>
|
||||
<span className="truncate">{eventInfo.event.title}</span>
|
||||
<span>•</span>
|
||||
<span className="truncate">{eventInfo.event.extendedProps.type}</span>
|
||||
<span>•</span>
|
||||
<span>{eventInfo.event.extendedProps.time}</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
const renderCalendarioSection = () => {
|
||||
const todayEvents = getTodayEvents();
|
||||
|
||||
@ -1705,6 +1650,7 @@ const ProfissionalPage = () => {
|
||||
<Button className="flex items-center gap-2 cursor-pointer">
|
||||
<Upload className="h-4 w-4" />
|
||||
Adicionar Anexo
|
||||
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -2114,13 +2060,14 @@ Nevo melanocítico benigno. Seguimento clínico recomendado.
|
||||
setLaudoSelecionado(laudo);
|
||||
setIsViewing(true);
|
||||
}}
|
||||
className="flex items-center gap-1 hover:bg-blue-50 dark:hover:bg-accent dark:hover:text-accent-foreground"
|
||||
className="flex items-center gap-1"
|
||||
disabled={!laudo?.id}
|
||||
>
|
||||
<Eye className="w-4 h-4" />
|
||||
Ver Laudo
|
||||
<Eye className="h-3 w-3" />
|
||||
Visualizar
|
||||
</Button>
|
||||
<Button
|
||||
variant="default"
|
||||
variant="destructive"
|
||||
size="sm"
|
||||
onClick={() => {
|
||||
setPatientForLaudo(laudo);
|
||||
@ -2129,7 +2076,7 @@ Nevo melanocítico benigno. Seguimento clínico recomendado.
|
||||
className="flex items-center gap-1 bg-green-600 hover:bg-green-700 text-white"
|
||||
title="Editar laudo para este paciente"
|
||||
>
|
||||
<Edit className="w-4 h-4" />
|
||||
<Edit className="h-4 w-4" />
|
||||
Editar Laudo
|
||||
</Button>
|
||||
</div>
|
||||
@ -2700,6 +2647,7 @@ Nevo melanocítico benigno. Seguimento clínico recomendado.
|
||||
<div>
|
||||
<span className="font-medium">Sexo:</span> {pacienteSelecionado.sexo}
|
||||
</div>
|
||||
{campos.cid && <p><strong>CID:</strong> {campos.cid}</p>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -2777,6 +2725,58 @@ Nevo melanocítico benigno. Seguimento clínico recomendado.
|
||||
<Button variant="outline" size="sm" onClick={() => formatText("underline") } title="Sublinhado" className="hover:bg-blue-50 dark:hover:bg-accent"><u>U</u></Button>
|
||||
</div>
|
||||
|
||||
{/* Templates */}
|
||||
<div className="mt-3">
|
||||
<p className="text-xs text-muted-foreground mb-2">Frases rápidas:</p>
|
||||
defaultValue={14}
|
||||
onBlur={e => formatText('font-size', e.target.value)}
|
||||
className="w-14 border rounded px-1 py-0.5 text-xs mr-2"
|
||||
title="Tamanho da fonte"
|
||||
/>
|
||||
{/* Família da fonte */}
|
||||
<label className="text-xs mr-1">Fonte</label>
|
||||
<select
|
||||
defaultValue={'Arial'}
|
||||
onBlur={e => formatText('font-family', e.target.value)}
|
||||
className="border rounded px-1 py-0.5 text-xs mr-2"
|
||||
title="Família da fonte"
|
||||
>
|
||||
<option value="Arial">Arial</option>
|
||||
<option value="Helvetica">Helvetica</option>
|
||||
<option value="Times New Roman">Times New Roman</option>
|
||||
<option value="Courier New">Courier New</option>
|
||||
<option value="Verdana">Verdana</option>
|
||||
<option value="Georgia">Georgia</option>
|
||||
</select>
|
||||
{/* Cor da fonte */}
|
||||
<label className="text-xs mr-1">Cor</label>
|
||||
<input
|
||||
type="color"
|
||||
defaultValue="#222222"
|
||||
onBlur={e => formatText('font-color', e.target.value)}
|
||||
className="w-6 h-6 border rounded mr-2"
|
||||
title="Cor da fonte"
|
||||
/>
|
||||
{/* Alinhamento */}
|
||||
<Button variant="outline" size="sm" onClick={() => formatText('align-left')} title="Alinhar à esquerda" className="px-1"><svg width="16" height="16" fill="none"><rect x="2" y="4" width="12" height="2" rx="1" fill="currentColor"/><rect x="2" y="7" width="8" height="2" rx="1" fill="currentColor"/><rect x="2" y="10" width="10" height="2" rx="1" fill="currentColor"/></svg></Button>
|
||||
<Button variant="outline" size="sm" onClick={() => formatText('align-center')} title="Centralizar" className="px-1"><svg width="16" height="16" fill="none"><rect x="4" y="4" width="8" height="2" rx="1" fill="currentColor"/><rect x="2" y="7" width="12" height="2" rx="1" fill="currentColor"/><rect x="3" y="10" width="10" height="2" rx="1" fill="currentColor"/></svg></Button>
|
||||
<Button variant="outline" size="sm" onClick={() => formatText('align-right')} title="Alinhar à direita" className="px-1"><svg width="16" height="16" fill="none"><rect x="6" y="4" width="8" height="2" rx="1" fill="currentColor"/><rect x="2" y="7" width="12" height="2" rx="1" fill="currentColor"/><rect x="4" y="10" width="10" height="2" rx="1" fill="currentColor"/></svg></Button>
|
||||
<Button variant="outline" size="sm" onClick={() => formatText('align-justify')} title="Justificar" className="px-1"><svg width="16" height="16" fill="none"><rect x="2" y="4" width="12" height="2" rx="1" fill="currentColor"/><rect x="2" y="7" width="12" height="2" rx="1" fill="currentColor"/><rect x="2" y="10" width="12" height="2" rx="1" fill="currentColor"/></svg></Button>
|
||||
{/* Listas */}
|
||||
<Button variant="outline" size="sm" onClick={() => formatText('list-ol')} title="Lista numerada" className="px-1">1.</Button>
|
||||
<Button variant="outline" size="sm" onClick={() => formatText('list-ul')} title="Lista com marcadores" className="px-1">•</Button>
|
||||
{/* Recuo */}
|
||||
<Button variant="outline" size="sm" onClick={() => formatText('indent')} title="Aumentar recuo" className="px-1">→</Button>
|
||||
<Button variant="outline" size="sm" onClick={() => formatText('outdent')} title="Diminuir recuo" className="px-1">←</Button>
|
||||
{/* Desfazer/Refazer */}
|
||||
<Button variant="outline" size="sm" onClick={handleUndo} title="Desfazer" className="px-1">↺</Button>
|
||||
<Button variant="outline" size="sm" onClick={handleRedo} title="Refazer" className="px-1">↻</Button>
|
||||
{/* Negrito, itálico, sublinhado */}
|
||||
<Button variant="outline" size="sm" onClick={() => formatText("bold") } title="Negrito" className="hover:bg-blue-50 dark:hover:bg-accent"><strong>B</strong></Button>
|
||||
<Button variant="outline" size="sm" onClick={() => formatText("italic") } title="Itálico" className="hover:bg-blue-50 dark:hover:bg-accent"><em>I</em></Button>
|
||||
<Button variant="outline" size="sm" onClick={() => formatText("underline") } title="Sublinhado" className="hover:bg-blue-50 dark:hover:bg-accent"><u>U</u></Button>
|
||||
</div>
|
||||
|
||||
{/* Templates */}
|
||||
<div className="mt-3">
|
||||
<p className="text-xs text-muted-foreground mb-2">Frases rápidas:</p>
|
||||
|
||||
@ -55,9 +55,12 @@ type Medico = {
|
||||
opinioes: { id: number; paciente: string; data: string; nota: number; comentario: string }[]
|
||||
}
|
||||
|
||||
type MedicoBase = Omit<Medico, 'experiencia' | 'planosSaude' | 'consultorios' | 'servicos' | 'opinioes'> &
|
||||
Partial<Pick<Medico, 'experiencia' | 'planosSaude' | 'consultorios' | 'servicos' | 'opinioes'>>;
|
||||
|
||||
const especialidadesHero = ['Psicólogo', 'Médico clínico geral', 'Pediatra', 'Dentista', 'Ginecologista', 'Veja mais']
|
||||
|
||||
const medicosBase: Medico[] = [
|
||||
const medicosBase: MedicoBase[] = [
|
||||
{
|
||||
id: 1,
|
||||
nome: 'Paula Pontes',
|
||||
@ -578,7 +581,6 @@ export default function ResultadosPage() {
|
||||
const [especialidadeHero, setEspecialidadeHero] = useState<string>(params.get('especialidade') || 'Psicólogo')
|
||||
const [convenio, setConvenio] = useState<string>('Todos')
|
||||
const [bairro, setBairro] = useState<string>('Todos')
|
||||
const [modalFiltrosAberto, setModalFiltrosAberto] = useState(false)
|
||||
const [agendasExpandida, setAgendasExpandida] = useState<Record<number, boolean>>({})
|
||||
const [medicoSelecionado, setMedicoSelecionado] = useState<Medico | null>(null)
|
||||
const [abaDetalhe, setAbaDetalhe] = useState('experiencia')
|
||||
|
||||
15
susconecta/package-lock.json
generated
15
susconecta/package-lock.json
generated
@ -9403,6 +9403,21 @@
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-ia32-msvc": {
|
||||
"version": "14.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.16.tgz",
|
||||
"integrity": "sha512-jhPl3nN0oKEshJBNDAo0etGMzv0j3q3VYorTSFqH1o3rwv1MQRdor27u1zhkgsHPNeY1jxcgyx1ZsCkDD1IHgg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user