From 332a623d6fbd289e7fd64eaf54469ecc5120dac8 Mon Sep 17 00:00:00 2001 From: Thomas Reitz Date: Wed, 11 Mar 2026 11:12:32 +0100 Subject: [PATCH] =?UTF-8?q?fix(crm):=20fix=20Lexware=20import=20duplicate?= =?UTF-8?q?=20detection=20=E2=80=94=20pageSize=20500=20exceeded=20backend?= =?UTF-8?q?=20max=20100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- packages/frontend/src/crm/lexware/LexwareSyncPage.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/crm/lexware/LexwareSyncPage.tsx b/packages/frontend/src/crm/lexware/LexwareSyncPage.tsx index 6469292..1ff5252 100644 --- a/packages/frontend/src/crm/lexware/LexwareSyncPage.tsx +++ b/packages/frontend/src/crm/lexware/LexwareSyncPage.tsx @@ -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();