feat(pacientes): compact cards (6/screen), sort pills, clean search bar, 20-default limit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
VPS 4 Builder
2026-05-14 07:19:11 +02:00
parent 51cbd07125
commit b411ab3c01
2 changed files with 46 additions and 37 deletions
+5 -3
View File
@@ -201,9 +201,11 @@ export const HybridBackend = {
return true;
},
getPacientes: async (termo: string = ''): Promise<{ data: Paciente[]; total: number }> => {
const url = termo.trim() ? `${API_URL}/pacientes?q=${encodeURIComponent(termo)}` : `${API_URL}/pacientes`;
const res = await apiFetch(url);
getPacientes: async (termo: string = '', sort: string = 'recentes'): Promise<{ data: Paciente[]; total: number }> => {
const params = new URLSearchParams();
if (termo.trim()) params.set('q', termo.trim());
if (sort) params.set('sort', sort);
const res = await apiFetch(`${API_URL}/pacientes?${params}`);
return res.json();
},