diff --git a/attached_assets/Pasted--Database-initialization-NODE-ENV-production-isProduction-true-h-1755083906219_1755083906219.txt b/attached_assets/Pasted--Database-initialization-NODE-ENV-production-isProduction-true-h-1755083906219_1755083906219.txt new file mode 100644 index 0000000..d73adee --- /dev/null +++ b/attached_assets/Pasted--Database-initialization-NODE-ENV-production-isProduction-true-h-1755083906219_1755083906219.txt @@ -0,0 +1,140 @@ + + +🔗 Database initialization: { + + NODE_ENV: 'production', + + isProduction: true, + + hasDbUrl: true, + + dbHost: 'logiflow-db' + +} + +🐳 PRODUCTION: Using standard PostgreSQL + +✅ PostgreSQL connection test successful + +🐳 PRODUCTION: Using PostgreSQL storage + +🐳 PRODUCTION: Local auth configured with PostgreSQL sessions + +🐳 PRODUCTION: Starting LogiFlow application + +🐳 Environment: { NODE_ENV: 'production', DATABASE_URL: 'Present', PORT: '3000' } + +🔍 Using development storage and authentication + +🔧 Using memory session store for development + +Warning: connect.session() MemoryStore is not + +designed for a production environment, as it will leak + +memory, and will not scale past a single process. + +🐳 Serving static files from: /app/dist/public + +🐳 PRODUCTION: LogiFlow serving on port 3000 + +✅ Production admin user found: { id: 'admin_local', username: 'admin', passwordFormat: 'present' } + +✅ Admin user exists, preserving current password + +HEAD /api/health 200 in 5ms + +📄 SPA: Serving index.html for /bl-reconciliation + +🔍 PRODUCTION /api/user - req.user: { + + id: 'admin_local', + + role: 'admin', + + hasUserGroups: true, + + userGroupsLength: 0, + + userGroups: [] + +} + +GET /api/user 304 in 10ms + +🔍 PRODUCTION /api/user - req.user: { + + id: 'admin_local', + + role: 'admin', + + hasUserGroups: true, + + userGroupsLength: 0, + + userGroups: [] + +} + +GET /api/user 304 in 9ms + +GET /api/suppliers 304 in 19ms + +🔍 PRODUCTION /api/user - req.user: { + + id: 'admin_local', + + role: 'admin', + + hasUserGroups: true, + + userGroupsLength: 0, + + userGroups: [] + +} + +GET /api/user 304 in 20ms + +🔍 PRODUCTION /api/user - req.user: { + + id: 'admin_local', + + role: 'admin', + + hasUserGroups: true, + + userGroupsLength: 0, + + userGroups: [] + +} + +GET /api/user 304 in 8ms + +Deliveries API called with: { + + startDate: undefined, + + endDate: undefined, + + storeId: undefined, + + withBL: undefined, + + userRole: 'admin' + +} + +Admin filtering deliveries with groupIds: undefined + +Fetching all deliveries + +Deliveries returned: 81 items + +GET /api/deliveries 304 in 50ms + +GET /api/groups 304 in 36ms + +HEAD /api/health 200 in 1ms + diff --git a/attached_assets/{9D59854C-8390-4082-84F2-68DD6746FA20}_1755083891815.png b/attached_assets/{9D59854C-8390-4082-84F2-68DD6746FA20}_1755083891815.png new file mode 100644 index 0000000..a36100f Binary files /dev/null and b/attached_assets/{9D59854C-8390-4082-84F2-68DD6746FA20}_1755083891815.png differ diff --git a/client/src/pages/BLReconciliation.tsx b/client/src/pages/BLReconciliation.tsx index 95ccfee..74c5c29 100644 --- a/client/src/pages/BLReconciliation.tsx +++ b/client/src/pages/BLReconciliation.tsx @@ -142,9 +142,9 @@ export default function BLReconciliation() { supplier: delivery.supplier }); - if (!delivery.group?.nocodbTableName && !delivery.group?.nocodbConfigId) { + if (!delivery.group?.nocodbTableName && !delivery.group?.nocodbConfigId && !delivery.group?.webhookUrl) { toast({ - title: "Vérification non disponible", + title: "Vérification non disponible", description: "Ce magasin n'a pas de configuration NocoDB", variant: "destructive", }); @@ -178,6 +178,11 @@ export default function BLReconciliation() { } const deliveries = await response.json(); + + // Debug : examiner les données des groupes en production + console.log('🔍 DEBUG Production - Première livraison:', deliveries[0]); + console.log('🔍 DEBUG Production - Groupe de la première livraison:', deliveries[0]?.group); + console.log('🔍 DEBUG Production - Champs disponibles dans group:', deliveries[0]?.group ? Object.keys(deliveries[0].group) : 'Pas de groupe'); const filtered = Array.isArray(deliveries) ? deliveries.filter((d: any) => d.status === 'delivered') : []; return filtered.sort((a: any, b: any) => new Date(b.deliveredDate || b.updatedAt).getTime() - new Date(a.deliveredDate || a.updatedAt).getTime()); @@ -641,7 +646,7 @@ export default function BLReconciliation() { {/* Icône de vérification de facture */} - {(delivery.group?.nocodbTableName || delivery.group?.nocodbConfigId) && ( + {(delivery.group?.nocodbTableName || delivery.group?.nocodbConfigId || delivery.group?.webhookUrl) && (
{verifyingDeliveries.has(delivery.id) ? (