Improve task retrieval by optimizing data fetching and logging

Add detailed logging for task retrieval API calls, including user role, task data, and associated groups, enhancing debugging capabilities.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f2b9c241-9fdd-4abd-9041-720afc8b27d6
Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
michaelschal committed 2025-09-02 10:27:15 +00:00
1 parent 9dc199d188
commit a25b178ee2
1 file changed
+199
@@ -0,0 +1,199 @@
}
GET /api/user 304 in 11ms
📋 DatabaseStorage.getTasks - Raw results: {
resultCount: 57,
userRole: 'manager',
sampleTasks: [
{
taskExists: true,
taskId: 104,
title: 'Helios backup 4G',
startDate: null,
groupExists: true
},
{
taskExists: true,
taskId: 103,
title: 'ARSENAL',
startDate: null,
groupExists: true
}
]
}
📋 Tasks returned: {
␍ count: 57,
userId: '_1754943032954',
userRole: 'manager',
requestedStoreId: '1',
groupIds: [ 1 ],
taskGroups: [
{ id: 104, title: 'Helios backup 4G', groupId: 1 },
{ id: 103, title: 'ARSENAL', groupId: 1 },
{ id: 102, title: 'Appeler Tandem', groupId: 1 }
]
}
GET /api/tasks 304 in 17ms
GET /api/users 304 in 16ms
GET /api/groups 304 in 5ms
📄 SPA: Serving index.html for /tasks
GET /api/user 304 in 4ms
🗓️ [DATE-CALC] Aujourd'hui: 2025-09-02 (Mardi)
🗓️ [DATE-CALC] Année précédente: 2024-09-03 (Mardi)
GET /api/user 304 in 5ms
🌤️ [RESPONSE] Weather data prepared: {
hasCurrentYear: true,
hasPreviousYear: true,
location: 'Frouard, France'
}
GET /api/weather/current 304 in 5ms
GET /api/user 304 in 4ms
GET /api/user 304 in 9ms
🔍 Non-admin user requesting specific accessible store: {
userId: '_1754943032954',
role: 'manager',
requestedStoreId: 1,
hasAccess: true
}
🔍 Tasks API called with: {
groupIds: [ 1 ],
userRole: 'manager',
userId: '_1754943032954',
requestedStoreId: '1',
userGroups: [ 1 ],
timestamp: '2025-09-02T10:24:35.961Z'
}
📋 DatabaseStorage.getTasks - Raw results: {
resultCount: 57,
userRole: 'manager',
sampleTasks: [
{
taskExists: true,
taskId: 104,
title: 'Helios backup 4G',
startDate: null,
groupExists: true
},
{
taskExists: true,
taskId: 103,
title: 'ARSENAL',
startDate: null,
groupExists: true
}
]
}
📋 Tasks returned: {
␍ count: 57,
userId: '_1754943032954',
userRole: 'manager',
requestedStoreId: '1',
groupIds: [ 1 ],
taskGroups: [
{ id: 104, title: 'Helios backup 4G', groupId: 1 },
{ id: 103, title: 'ARSENAL', groupId: 1 },
{ id: 102, title: 'Appeler Tandem', groupId: 1 }
]
}
GET /api/tasks 304 in 21ms
GET /api/users 304 in 23ms
GET /api/groups 304 in 5ms