feat: alinhar PerfilPaciente com PerfilMedico e remover dark mode
This commit is contained in:
parent
9bac06587d
commit
ad6fadc17a
@ -47,8 +47,11 @@ export function AvatarUpload({
|
|||||||
|
|
||||||
// Atualiza displayUrl quando currentAvatarUrl muda externamente
|
// Atualiza displayUrl quando currentAvatarUrl muda externamente
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log("[AvatarUpload] currentAvatarUrl:", currentAvatarUrl);
|
||||||
|
console.log("[AvatarUpload] userId:", userId);
|
||||||
|
console.log("[AvatarUpload] editable:", editable);
|
||||||
setDisplayUrl(currentAvatarUrl);
|
setDisplayUrl(currentAvatarUrl);
|
||||||
}, [currentAvatarUrl]);
|
}, [currentAvatarUrl, userId, editable]);
|
||||||
|
|
||||||
const handleFileSelect = async (e: React.ChangeEvent<HTMLInputElement>) => {
|
const handleFileSelect = async (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
const file = e.target.files?.[0];
|
const file = e.target.files?.[0];
|
||||||
|
|||||||
@ -20,7 +20,7 @@ import { format } from "date-fns";
|
|||||||
import { ptBR } from "date-fns/locale";
|
import { ptBR } from "date-fns/locale";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { useAuth } from "../hooks/useAuth";
|
import { useAuth } from "../hooks/useAuth";
|
||||||
import { appointmentService, doctorService, reportService, profileService } from "../services";
|
import { appointmentService, doctorService, reportService } from "../services";
|
||||||
import type { Report } from "../services/reports/types";
|
import type { Report } from "../services/reports/types";
|
||||||
import AgendamentoConsulta from "../components/AgendamentoConsulta";
|
import AgendamentoConsulta from "../components/AgendamentoConsulta";
|
||||||
import { Avatar } from "../components/ui/Avatar";
|
import { Avatar } from "../components/ui/Avatar";
|
||||||
@ -140,22 +140,6 @@ const AcompanhamentoPaciente: React.FC = () => {
|
|||||||
fetchConsultas();
|
fetchConsultas();
|
||||||
}, [fetchConsultas]);
|
}, [fetchConsultas]);
|
||||||
|
|
||||||
// Carregar avatar do perfil
|
|
||||||
useEffect(() => {
|
|
||||||
const loadAvatar = async () => {
|
|
||||||
if (!pacienteId) return;
|
|
||||||
try {
|
|
||||||
const profile = await profileService.getById(pacienteId);
|
|
||||||
if (profile?.avatar_url) {
|
|
||||||
setAvatarUrl(profile.avatar_url);
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
console.log("Perfil não encontrado, usando avatar padrão");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
loadAvatar();
|
|
||||||
}, [pacienteId]);
|
|
||||||
|
|
||||||
// Recarregar consultas quando mudar para a aba de consultas
|
// Recarregar consultas quando mudar para a aba de consultas
|
||||||
const fetchLaudos = useCallback(async () => {
|
const fetchLaudos = useCallback(async () => {
|
||||||
if (!pacienteId) return;
|
if (!pacienteId) return;
|
||||||
|
|||||||
@ -189,10 +189,10 @@ export default function PerfilPaciente() {
|
|||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-center min-h-screen bg-gray-50 dark:bg-gray-900">
|
<div className="flex items-center justify-center min-h-screen bg-gray-50">
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<div className="w-16 h-16 border-4 border-blue-600 border-t-transparent rounded-full animate-spin mx-auto mb-4" />
|
<div className="w-16 h-16 border-4 border-blue-600 border-t-transparent rounded-full animate-spin mx-auto mb-4" />
|
||||||
<p className="text-gray-600 dark:text-gray-400">
|
<p className="text-gray-600">
|
||||||
Carregando perfil...
|
Carregando perfil...
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -202,9 +202,9 @@ export default function PerfilPaciente() {
|
|||||||
|
|
||||||
if (!user?.id) {
|
if (!user?.id) {
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-center min-h-screen bg-gray-50 dark:bg-gray-900">
|
<div className="flex items-center justify-center min-h-screen bg-gray-50">
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<p className="text-red-600 dark:text-red-400 mb-4">
|
<p className="text-red-600 mb-4">
|
||||||
Usuário não identificado
|
Usuário não identificado
|
||||||
</p>
|
</p>
|
||||||
<button
|
<button
|
||||||
@ -219,12 +219,12 @@ export default function PerfilPaciente() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-50 dark:bg-gray-900 py-8 px-4">
|
<div className="min-h-screen bg-gray-50 py-8 px-4">
|
||||||
<div className="max-w-4xl mx-auto space-y-6">
|
<div className="max-w-4xl mx-auto space-y-6">
|
||||||
{/* Botão Voltar */}
|
{/* Botão Voltar */}
|
||||||
<button
|
<button
|
||||||
onClick={() => navigate("/acompanhamento")}
|
onClick={() => navigate("/acompanhamento")}
|
||||||
className="flex items-center gap-2 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors mb-4"
|
className="flex items-center gap-2 text-gray-600 hover:text-gray-900 transition-colors mb-4"
|
||||||
>
|
>
|
||||||
<ArrowLeft className="w-5 h-5" />
|
<ArrowLeft className="w-5 h-5" />
|
||||||
Voltar para o Painel
|
Voltar para o Painel
|
||||||
@ -233,10 +233,10 @@ export default function PerfilPaciente() {
|
|||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-3xl font-bold text-gray-900 dark:text-gray-100">
|
<h1 className="text-3xl font-bold text-gray-900">
|
||||||
Meu Perfil
|
Meu Perfil
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-gray-600 dark:text-gray-400">
|
<p className="text-gray-600">
|
||||||
Gerencie suas informações pessoais e médicas
|
Gerencie suas informações pessoais e médicas
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -254,7 +254,7 @@ export default function PerfilPaciente() {
|
|||||||
setIsEditing(false);
|
setIsEditing(false);
|
||||||
loadPatientData();
|
loadPatientData();
|
||||||
}}
|
}}
|
||||||
className="px-4 py-2 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors"
|
className="px-4 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors"
|
||||||
>
|
>
|
||||||
Cancelar
|
Cancelar
|
||||||
</button>
|
</button>
|
||||||
@ -270,10 +270,8 @@ export default function PerfilPaciente() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Avatar Card */}
|
{/* Avatar Card */}
|
||||||
<div className="bg-white dark:bg-gray-800 rounded-lg shadow p-6">
|
<div className="bg-white rounded-lg shadow p-6">
|
||||||
<h2 className="text-lg font-semibold mb-4 text-gray-900 dark:text-gray-100">
|
<h2 className="text-lg font-semibold mb-4">Foto de Perfil</h2>
|
||||||
Foto de Perfil
|
|
||||||
</h2>
|
|
||||||
<div className="flex items-center gap-6">
|
<div className="flex items-center gap-6">
|
||||||
<AvatarUpload
|
<AvatarUpload
|
||||||
userId={user?.id}
|
userId={user?.id}
|
||||||
@ -285,10 +283,10 @@ export default function PerfilPaciente() {
|
|||||||
onAvatarUpdate={(url) => setAvatarUrl(url || undefined)}
|
onAvatarUpdate={(url) => setAvatarUrl(url || undefined)}
|
||||||
/>
|
/>
|
||||||
<div>
|
<div>
|
||||||
<p className="font-medium text-gray-900 dark:text-gray-100">
|
<p className="font-medium text-gray-900">
|
||||||
{formData.full_name || "Carregando..."}
|
{formData.full_name || "Carregando..."}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-gray-500 dark:text-gray-400">
|
<p className="text-gray-500">
|
||||||
{formData.email || "Sem email"}
|
{formData.email || "Sem email"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -296,15 +294,15 @@ export default function PerfilPaciente() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Tabs */}
|
{/* Tabs */}
|
||||||
<div className="bg-white dark:bg-gray-800 rounded-lg shadow">
|
<div className="bg-white rounded-lg shadow">
|
||||||
<div className="border-b border-gray-200 dark:border-gray-700">
|
<div className="border-b border-gray-200">
|
||||||
<nav className="flex -mb-px">
|
<nav className="flex -mb-px">
|
||||||
<button
|
<button
|
||||||
onClick={() => setActiveTab("personal")}
|
onClick={() => setActiveTab("personal")}
|
||||||
className={`px-6 py-3 text-sm font-medium border-b-2 transition-colors ${
|
className={`px-6 py-3 text-sm font-medium border-b-2 transition-colors ${
|
||||||
activeTab === "personal"
|
activeTab === "personal"
|
||||||
? "border-blue-600 text-blue-600 dark:text-blue-400"
|
? "border-blue-600 text-blue-600"
|
||||||
: "border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600"
|
: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
Dados Pessoais
|
Dados Pessoais
|
||||||
@ -313,8 +311,8 @@ export default function PerfilPaciente() {
|
|||||||
onClick={() => setActiveTab("medical")}
|
onClick={() => setActiveTab("medical")}
|
||||||
className={`px-6 py-3 text-sm font-medium border-b-2 transition-colors ${
|
className={`px-6 py-3 text-sm font-medium border-b-2 transition-colors ${
|
||||||
activeTab === "medical"
|
activeTab === "medical"
|
||||||
? "border-blue-600 text-blue-600 dark:text-blue-400"
|
? "border-blue-600 text-blue-600"
|
||||||
: "border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600"
|
: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
Informações Médicas
|
Informações Médicas
|
||||||
@ -323,8 +321,8 @@ export default function PerfilPaciente() {
|
|||||||
onClick={() => setActiveTab("security")}
|
onClick={() => setActiveTab("security")}
|
||||||
className={`px-6 py-3 text-sm font-medium border-b-2 transition-colors ${
|
className={`px-6 py-3 text-sm font-medium border-b-2 transition-colors ${
|
||||||
activeTab === "security"
|
activeTab === "security"
|
||||||
? "border-blue-600 text-blue-600 dark:text-blue-400"
|
? "border-blue-600 text-blue-600"
|
||||||
: "border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600"
|
: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
Segurança
|
Segurança
|
||||||
@ -337,16 +335,16 @@ export default function PerfilPaciente() {
|
|||||||
{activeTab === "personal" && (
|
{activeTab === "personal" && (
|
||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<div>
|
<div>
|
||||||
<h3 className="text-lg font-semibold mb-4 text-gray-900 dark:text-gray-100">
|
<h3 className="text-lg font-semibold mb-4 text-gray-900">
|
||||||
Informações Pessoais
|
Informações Pessoais
|
||||||
</h3>
|
</h3>
|
||||||
<p className="text-sm text-gray-500 dark:text-gray-400 mb-4">
|
<p className="text-sm text-gray-500 mb-4">
|
||||||
Mantenha seus dados atualizados
|
Mantenha seus dados atualizados
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Nome Completo
|
Nome Completo
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -356,12 +354,12 @@ export default function PerfilPaciente() {
|
|||||||
handleChange("full_name", e.target.value)
|
handleChange("full_name", e.target.value)
|
||||||
}
|
}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Email
|
Email
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -369,12 +367,12 @@ export default function PerfilPaciente() {
|
|||||||
value={formData.email}
|
value={formData.email}
|
||||||
onChange={(e) => handleChange("email", e.target.value)}
|
onChange={(e) => handleChange("email", e.target.value)}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Telefone
|
Telefone
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -384,12 +382,12 @@ export default function PerfilPaciente() {
|
|||||||
handleChange("phone_mobile", e.target.value)
|
handleChange("phone_mobile", e.target.value)
|
||||||
}
|
}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
CPF
|
CPF
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -401,7 +399,7 @@ export default function PerfilPaciente() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Data de Nascimento
|
Data de Nascimento
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -411,19 +409,19 @@ export default function PerfilPaciente() {
|
|||||||
handleChange("birth_date", e.target.value)
|
handleChange("birth_date", e.target.value)
|
||||||
}
|
}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Sexo
|
Sexo
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
value={formData.sex}
|
value={formData.sex}
|
||||||
onChange={(e) => handleChange("sex", e.target.value)}
|
onChange={(e) => handleChange("sex", e.target.value)}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
>
|
>
|
||||||
<option value="">Selecione</option>
|
<option value="">Selecione</option>
|
||||||
<option value="M">Masculino</option>
|
<option value="M">Masculino</option>
|
||||||
@ -439,7 +437,7 @@ export default function PerfilPaciente() {
|
|||||||
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||||
<div className="md:col-span-2">
|
<div className="md:col-span-2">
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Rua
|
Rua
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -447,12 +445,12 @@ export default function PerfilPaciente() {
|
|||||||
value={formData.street}
|
value={formData.street}
|
||||||
onChange={(e) => handleChange("street", e.target.value)}
|
onChange={(e) => handleChange("street", e.target.value)}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Número
|
Número
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -460,12 +458,12 @@ export default function PerfilPaciente() {
|
|||||||
value={formData.number}
|
value={formData.number}
|
||||||
onChange={(e) => handleChange("number", e.target.value)}
|
onChange={(e) => handleChange("number", e.target.value)}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Complemento
|
Complemento
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -475,12 +473,12 @@ export default function PerfilPaciente() {
|
|||||||
handleChange("complement", e.target.value)
|
handleChange("complement", e.target.value)
|
||||||
}
|
}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Bairro
|
Bairro
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -490,12 +488,12 @@ export default function PerfilPaciente() {
|
|||||||
handleChange("neighborhood", e.target.value)
|
handleChange("neighborhood", e.target.value)
|
||||||
}
|
}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Cidade
|
Cidade
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -503,12 +501,12 @@ export default function PerfilPaciente() {
|
|||||||
value={formData.city}
|
value={formData.city}
|
||||||
onChange={(e) => handleChange("city", e.target.value)}
|
onChange={(e) => handleChange("city", e.target.value)}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Estado
|
Estado
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -517,12 +515,12 @@ export default function PerfilPaciente() {
|
|||||||
onChange={(e) => handleChange("state", e.target.value)}
|
onChange={(e) => handleChange("state", e.target.value)}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
maxLength={2}
|
maxLength={2}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
CEP
|
CEP
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -530,7 +528,7 @@ export default function PerfilPaciente() {
|
|||||||
value={formData.cep}
|
value={formData.cep}
|
||||||
onChange={(e) => handleChange("cep", e.target.value)}
|
onChange={(e) => handleChange("cep", e.target.value)}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -551,7 +549,7 @@ export default function PerfilPaciente() {
|
|||||||
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Tipo Sanguíneo
|
Tipo Sanguíneo
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
@ -560,7 +558,7 @@ export default function PerfilPaciente() {
|
|||||||
handleChange("blood_type", e.target.value)
|
handleChange("blood_type", e.target.value)
|
||||||
}
|
}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
>
|
>
|
||||||
<option value="">Selecione</option>
|
<option value="">Selecione</option>
|
||||||
<option value="A+">A+</option>
|
<option value="A+">A+</option>
|
||||||
@ -574,7 +572,7 @@ export default function PerfilPaciente() {
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Peso (kg)
|
Peso (kg)
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -585,12 +583,12 @@ export default function PerfilPaciente() {
|
|||||||
handleChange("weight_kg", e.target.value)
|
handleChange("weight_kg", e.target.value)
|
||||||
}
|
}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Altura (m)
|
Altura (m)
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -602,7 +600,7 @@ export default function PerfilPaciente() {
|
|||||||
}
|
}
|
||||||
disabled={!isEditing}
|
disabled={!isEditing}
|
||||||
placeholder="Ex: 1.75"
|
placeholder="Ex: 1.75"
|
||||||
className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 dark:disabled:bg-gray-700 disabled:text-gray-500 dark:disabled:text-gray-400 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 bg-white text-gray-900"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -621,7 +619,7 @@ export default function PerfilPaciente() {
|
|||||||
|
|
||||||
<div className="max-w-md space-y-4">
|
<div className="max-w-md space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Senha Atual
|
Senha Atual
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -639,7 +637,7 @@ export default function PerfilPaciente() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Nova Senha
|
Nova Senha
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -657,7 +655,7 @@ export default function PerfilPaciente() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
|
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||||
Confirmar Nova Senha
|
Confirmar Nova Senha
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
@ -690,3 +688,4 @@ export default function PerfilPaciente() {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user