mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Enhance delivery reconciliation to include webhook URLs for verification
Update BLReconciliation component to check for webhookUrl in delivery groups and add console logs for debugging production environment issues related to delivery data. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7c468936-2a88-4686-ac0a-84921a45222d Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/7c468936-2a88-4686-ac0a-84921a45222d/ehBF9El
This commit is contained in:
1 parent
7ebd84e0e1
commit
382fb4c112
3 files changed
+148
-3
No files matched your search
+140
@@ -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
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 510 KiB |
@@ -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() {
|
||||
</div>
|
||||
|
||||
{/* Icône de vérification de facture */}
|
||||
{(delivery.group?.nocodbTableName || delivery.group?.nocodbConfigId) && (
|
||||
{(delivery.group?.nocodbTableName || delivery.group?.nocodbConfigId || delivery.group?.webhookUrl) && (
|
||||
<div className="flex items-center">
|
||||
{verifyingDeliveries.has(delivery.id) ? (
|
||||
<Clock className="h-4 w-4 text-blue-500 animate-spin" title="Vérification en cours..." />
|
||||
|
||||
Reference in new issue
Block a user