mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 23:56:40 +02:00
fix(crm): fix Lexware import duplicate detection — pageSize 500 exceeded backend max 100
The backend DTO validation enforces @Max(100) on pageSize. The ImportTab was requesting pageSize=500, causing a 400 Bad Request. This left the linkedMap empty and showed import buttons for already-imported contacts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6e77bf43b0
commit
332a623d6f
1 changed files with 3 additions and 2 deletions
|
|
@ -75,8 +75,9 @@ function ImportTab() {
|
|||
const createContact = useCreateContact();
|
||||
|
||||
// Load CRM entities to detect already-imported Lexware contacts
|
||||
const companiesQuery = useCompanies({ page: 1, pageSize: 500, sort: 'name', order: 'asc' });
|
||||
const contactsQuery = useContacts({ page: 1, pageSize: 500, sort: 'lastName', order: 'asc' });
|
||||
// pageSize max 100 (backend DTO validation @Max(100))
|
||||
const companiesQuery = useCompanies({ page: 1, pageSize: 100, sort: 'name', order: 'asc' });
|
||||
const contactsQuery = useContacts({ page: 1, pageSize: 100, sort: 'lastName', order: 'asc' });
|
||||
|
||||
// Build lookup: lexwareContactId → { type, name, id }
|
||||
const linkedMap = new Map<string, { type: 'company' | 'contact'; name: string; id: string }>();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue