From 36c44357874c2209f77d426b4fba4e23f201b8ff Mon Sep 17 00:00:00 2001 From: VPS 4 Builder Date: Thu, 14 May 2026 20:53:48 +0200 Subject: [PATCH] =?UTF-8?q?feat(gto+agenda):=20busca=20de=20paciente=20por?= =?UTF-8?q?=20modal=20+=20bot=C3=A3o=20ATENDER=20na=20agenda?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - LancarGTO: substitui { - const p = pacientes.find(p => p.id === e.target.value); - store.setPaciente(p || null); - }} - className="w-full p-4 bg-gray-50 border-2 border-gray-100 rounded-2xl font-black text-gray-800 text-sm focus:border-blue-500 outline-none transition-all uppercase" - > - - {pacientes.map(p => )} - + {store.paciente ? ( +
+
+
+ {store.paciente.nome.charAt(0)} +
+ {store.paciente.nome} +
+ +
+ ) : ( + + )} {/* STEP 2: ESPECIALIDADE & PROCEDIMENTO */} @@ -529,6 +573,62 @@ export const LancarGTO: React.FC = () => { + + {/* MODAL DE BUSCA DE PACIENTE */} + {patientSearchOpen && ( +
+
+
+

+ BUSCAR PACIENTE +

+ +
+
+ setPatientSearchTerm(e.target.value.toUpperCase())} + placeholder="NOME OU CPF..." + className="w-full p-4 bg-gray-50 border-2 border-gray-100 rounded-2xl font-black text-gray-800 text-sm focus:border-blue-500 outline-none transition-all uppercase" + /> +
+ {filteredPatients.length === 0 ? ( +
+ {patientSearchTerm ? 'NENHUM PACIENTE ENCONTRADO' : 'CARREGANDO...'} +
+ ) : ( + filteredPatients.map(p => ( + + )) + )} +
+
+
+
+ )} ); };