diff --git a/frontend/views/PatientsView.tsx b/frontend/views/PatientsView.tsx index 91ee9aa..6ce9832 100644 --- a/frontend/views/PatientsView.tsx +++ b/frontend/views/PatientsView.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useCallback } from 'react'; -import { Search, Plus, DollarSign, X, Printer, CreditCard, Rocket, Loader2, FolderOpen, CalendarDays, RadioTower, Pencil, Wallet, PlusCircle, Banknote, History, FileText, Calendar } from 'lucide-react'; +import { Search, Plus, DollarSign, X, Printer, CreditCard, Rocket, Loader2, FolderOpen, CalendarDays, RadioTower, Pencil, Wallet, PlusCircle, Banknote, History, FileText, Calendar, Copy, CheckCircle2 } from 'lucide-react'; import { HybridBackend } from '../services/backend.ts'; import { Paciente, Dentista, Agendamento } from '../types.ts'; import { useHybridBackend } from '../hooks/useHybridBackend.ts'; @@ -375,6 +375,30 @@ const EditarPacienteModal: React.FC<{ patient: Paciente; onClose: () => void; on import { PageHeader } from '../components/PageHeader.tsx'; +const CopyField: React.FC<{ label: string; value?: string | null }> = ({ label, value }) => { + const [copied, setCopied] = useState(false); + const copy = () => { + if (!value) return; + navigator.clipboard.writeText(value).then(() => { + setCopied(true); + setTimeout(() => setCopied(false), 1500); + }); + }; + return ( +
{label}
+{value || '—'}
+{p.cpf}
-{p.telefone}
-{p.dataNascimento}
-{p.convenio}
-