From a25b178ee2b0e167fef9917bf8604fa53351f2f9 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Tue, 2 Sep 2025 10:27:15 +0000 Subject: [PATCH] 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 --- ...lts-result-1756808714183_1756808714183.txt | 199 ++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 attached_assets/Pasted--GET-api-user-304-in-11ms-DatabaseStorage-getTasks-Raw-results-result-1756808714183_1756808714183.txt diff --git a/attached_assets/Pasted--GET-api-user-304-in-11ms-DatabaseStorage-getTasks-Raw-results-result-1756808714183_1756808714183.txt b/attached_assets/Pasted--GET-api-user-304-in-11ms-DatabaseStorage-getTasks-Raw-results-result-1756808714183_1756808714183.txt new file mode 100644 index 0000000..9ce1b1a --- /dev/null +++ b/attached_assets/Pasted--GET-api-user-304-in-11ms-DatabaseStorage-getTasks-Raw-results-result-1756808714183_1756808714183.txt @@ -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 \ No newline at end of file