mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-14 17:12:25 +00:00
feat: improve transactions API pagination and search
- Update backend /transactions endpoint to use PaginatedResponse - Change from limit/offset to page/per_page parameters for consistency - Implement server-side pagination with proper metadata - Add search debouncing to prevent excessive API calls (300ms delay) - Add First/Last page buttons to pagination controls - Fix pagination state reset when filters return 0 results - Reset pagination to page 1 when filters are applied - Add visual loading indicator during search debouncing - Update frontend types and API client to handle new response structure - Fix TypeScript errors and improve type safety
This commit is contained in:
@@ -124,6 +124,14 @@ export interface ApiResponse<T> {
|
||||
data: T;
|
||||
message?: string;
|
||||
success: boolean;
|
||||
pagination?: {
|
||||
total: number;
|
||||
page: number;
|
||||
per_page: number;
|
||||
total_pages: number;
|
||||
has_next: boolean;
|
||||
has_prev: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PaginatedResponse<T> {
|
||||
|
||||
Reference in New Issue
Block a user