feat: Add Canadian fraction management dialog, implement debounced search for historical fractions and sectors, and enhance USA fraction search with description support.

This commit is contained in:
Galindo97
2026-02-17 11:50:50 -06:00
parent 2a0480a7f3
commit da43659eb3
7 changed files with 345 additions and 43 deletions

View File

@@ -41,7 +41,15 @@ export async function getHistoricalFractions(
if (historicalFraction) params.append('historical_fraction', historicalFraction);
const response = await api.get<HistoricalFractionList>(`/v1/a76/general_catalogs/fractions/historical-tariff-fractions/?${params.toString()}`);
const response = await api.get<{ message?: string, items?: HistoricalFraction[], total?: number }>(`/v1/a76/fractions/historical-tariff-fractions/?${params.toString()}`);
// Handle potential wrapper response
if (response.data && 'items' in response.data) {
return response.data as unknown as HistoricalFractionList;
}
if (!response.data) throw new Error('Error fetching historical fractions');
return response.data;
// Fallback
return response.data as unknown as HistoricalFractionList;
}