mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-14 10:49:10 +02:00
Improve order creation process and add detailed logging
Add more logging to the customer order form and mutation to help debug issues with order creation and role-based access. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 31f9bd88-0285-4787-81b3-31ceeea5a08b Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/31f9bd88-0285-4787-81b3-31ceeea5a08b/KTd2gcf
This commit is contained in:
1 parent
2fe5aac6c3
commit
c88a403d6d
4 files changed
+229
-7
No files matched your search
+201
@@ -0,0 +1,201 @@
|
||||
|
||||
isProduction: true,
|
||||
|
||||
hasDbUrl: true,
|
||||
|
||||
dbHost: 'logiflow-db:5432'
|
||||
|
||||
}
|
||||
|
||||
✅ Using DatabaseStorage (production PostgreSQL)
|
||||
|
||||
⏰ Automatic backup scheduled for 2:00 AM daily (native timer)
|
||||
|
||||
🔍 Using development storage and authentication
|
||||
|
||||
🐳 PRODUCTION: Starting LogiFlow application
|
||||
|
||||
🐳 Environment: { NODE_ENV: 'production', DATABASE_URL: 'Present', PORT: '3000' }
|
||||
|
||||
🔧 Registering all production routes...
|
||||
|
||||
🔄 Running automatic production migrations...
|
||||
|
||||
🔄 MIGRATION: Starting SAV production migrations...
|
||||
|
||||
🔄 MIGRATION: Database URL configured: postgresql://logiflow_admin:Lo...
|
||||
|
||||
✅ MIGRATION: Connected to PostgreSQL database
|
||||
|
||||
🔄 MIGRATION: Checking if priority column exists...
|
||||
|
||||
🔄 MIGRATION: Priority column check result: 1
|
||||
|
||||
✅ MIGRATION: Priority column already exists, skipping migration
|
||||
|
||||
🔌 MIGRATION: Database connection closed
|
||||
|
||||
🔧 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.
|
||||
|
||||
✅ All routes registered successfully for production
|
||||
|
||||
🐳 Serving static files from: /app/dist/public
|
||||
|
||||
🐳 PRODUCTION: LogiFlow serving on port 3000
|
||||
|
||||
HEAD /api/health 200 in 5ms
|
||||
|
||||
HEAD /api/health 200 in 0ms
|
||||
|
||||
HEAD /api/health 200 in 1ms
|
||||
|
||||
HEAD /api/health 200 in 1ms
|
||||
|
||||
HEAD /api/health 200 in 1ms
|
||||
|
||||
HEAD /api/health 200 in 0ms
|
||||
|
||||
HEAD /api/health 200 in 1ms
|
||||
|
||||
📄 SPA: Serving index.html for /sav
|
||||
|
||||
GET /api/user 401 in 1ms
|
||||
|
||||
📄 SPA: Serving index.html for /auth
|
||||
|
||||
GET /api/user 401 in 1ms
|
||||
|
||||
GET /api/user 401 in 1ms
|
||||
|
||||
GET /api/default-credentials-check 304 in 22ms
|
||||
|
||||
🔐 comparePasswords: {
|
||||
|
||||
supplied: 'HIDDEN',
|
||||
|
||||
stored: 'b23ec450a63faf3957a1...',
|
||||
|
||||
hasFormat: true
|
||||
|
||||
}
|
||||
|
||||
🔐 Password comparison result: true
|
||||
|
||||
POST /api/login 200 in 53ms
|
||||
|
||||
GET /api/user 200 in 5ms
|
||||
|
||||
GET /api/user 304 in 11ms
|
||||
|
||||
Deliveries API called with: {
|
||||
|
||||
startDate: undefined,
|
||||
|
||||
endDate: undefined,
|
||||
|
||||
storeId: undefined,
|
||||
|
||||
withBL: undefined,
|
||||
|
||||
userRole: 'employee'
|
||||
|
||||
}
|
||||
|
||||
Non-admin filtering deliveries with groupIds: [ 2 ]
|
||||
|
||||
📊 Calcul statistiques mensuelles: {
|
||||
|
||||
year: 2025,
|
||||
|
||||
month: 8,
|
||||
|
||||
startDate: '2025-08-01',
|
||||
|
||||
endDate: '2025-09-01',
|
||||
|
||||
groupIds: [ 2 ]
|
||||
|
||||
}
|
||||
|
||||
GET /api/user 304 in 85ms
|
||||
|
||||
Orders API called with: {
|
||||
|
||||
startDate: undefined,
|
||||
|
||||
endDate: undefined,
|
||||
|
||||
storeId: undefined,
|
||||
|
||||
userRole: 'employee'
|
||||
|
||||
}
|
||||
|
||||
Non-admin filtering with groupIds: [ 2 ]
|
||||
|
||||
Customer Orders API called with: { groupIds: [ 2 ], userRole: 'employee' }
|
||||
|
||||
Tasks API called with: { groupIds: [ 2 ], userRole: 'employee' }
|
||||
|
||||
GET /api/publicities 304 in 179ms
|
||||
|
||||
🔗 PRODUCTION: getDeliveries() récupéré 38 livraisons avec relations
|
||||
|
||||
Deliveries returned: 38 items
|
||||
|
||||
GET /api/dlc-products/stats 200 in 186ms
|
||||
|
||||
GET /api/deliveries 200 in 194ms
|
||||
|
||||
Customer Orders returned: 25 items
|
||||
|
||||
Tasks returned: 9 items
|
||||
|
||||
GET /api/customer-orders 200 in 249ms
|
||||
|
||||
GET /api/tasks 200 in 241ms
|
||||
|
||||
📊 Statistiques calculées: {
|
||||
|
||||
ordersCount: 8,
|
||||
|
||||
deliveriesCount: 21,
|
||||
|
||||
pendingOrdersCount: 4,
|
||||
|
||||
averageDeliveryTime: 0.17647058823529413,
|
||||
|
||||
totalPalettes: 57,
|
||||
|
||||
totalPackages: 17
|
||||
|
||||
}
|
||||
|
||||
GET /api/stats/monthly 200 in 279ms
|
||||
|
||||
🔗 PRODUCTION: getOrders() récupéré 18 commandes avec relations
|
||||
|
||||
Orders returned: 18 items
|
||||
|
||||
GET /api/orders 200 in 285ms
|
||||
|
||||
GET /api/user 304 in 8ms
|
||||
|
||||
GET /api/publicities 304 in 18ms
|
||||
|
||||
GET /api/groups 200 in 5ms
|
||||
|
||||
GET /api/user 304 in 3ms
|
||||
|
||||
GET /api/suppliers 304 in 6ms
|
||||
|
||||
GET /api/user 304 in 4ms
|
||||
|
||||
HEAD /api/health 200 in 1ms
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 232 KiB |
Reference in new issue
Block a user