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:
@@ -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();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user