mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Adjust task date handling to correctly manage start and end dates
Modify the task creation logic in `TasksSimplified.tsx` to properly initialize `startDate` to null and ensure `dueDate` is set to null when not provided, resolving an issue with date range selection. Replit-Commit-Author: Agent Replit-Commit-Session-Id: f2b9c241-9fdd-4abd-9041-720afc8b27d6 Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
1 parent
a4a6f302ae
commit
a9564c513a
2 files changed
+239
-1
No files matched your search
+237
@@ -0,0 +1,237 @@
|
||||
|
||||
|
||||
User-related
|
||||
|
||||
|
||||
Environment-related
|
||||
|
||||
Registries
|
||||
|
||||
Logs
|
||||
|
||||
Notifications
|
||||
|
||||
Settings
|
||||
|
||||
New version available 2.33.1
|
||||
DismissSee what's new
|
||||
Community Edition
|
||||
2.27.6 LTS
|
||||
Containers>logiflow-logiflow-1>Logs
|
||||
Container logs
|
||||
|
||||
|
||||
admin
|
||||
Log viewer settings
|
||||
Auto-refresh logs
|
||||
Wrap lines
|
||||
Display timestamps
|
||||
Fetch
|
||||
All logs
|
||||
Search
|
||||
Filter...
|
||||
Lines
|
||||
100
|
||||
Actions
|
||||
|
||||
|
||||
|
||||
|
||||
title: 'Rangement et faire prix podium Meuble',
|
||||
|
||||
description: 'Rangement et faire prix podium Meuble',
|
||||
|
||||
priority: 'medium',
|
||||
|
||||
status: 'pending',
|
||||
|
||||
assignedTo: 'Non assigné',
|
||||
|
||||
startDate: null,
|
||||
|
||||
dueDate: null,
|
||||
|
||||
groupId: 2,
|
||||
|
||||
createdBy: 'admin_local'
|
||||
|
||||
},
|
||||
|
||||
dueDate: null,
|
||||
|
||||
dueDateType: 'object',
|
||||
|
||||
dueDateValue: null
|
||||
|
||||
}
|
||||
|
||||
💾 DatabaseStorage.createTask - Input: {
|
||||
|
||||
taskData: {
|
||||
|
||||
title: 'Rangement et faire prix podium Meuble',
|
||||
|
||||
description: 'Rangement et faire prix podium Meuble',
|
||||
|
||||
priority: 'medium',
|
||||
|
||||
status: 'pending',
|
||||
|
||||
assignedTo: 'Non assigné',
|
||||
|
||||
startDate: null,
|
||||
|
||||
dueDate: null,
|
||||
|
||||
groupId: 2,
|
||||
|
||||
createdBy: 'admin_local'
|
||||
|
||||
},
|
||||
|
||||
dueDate: null,
|
||||
|
||||
dueDateType: 'object',
|
||||
|
||||
dueDateISO: null
|
||||
|
||||
}
|
||||
|
||||
💾 DatabaseStorage.createTask - Result: {
|
||||
|
||||
taskId: 107,
|
||||
|
||||
title: 'Rangement et faire prix podium Meuble',
|
||||
|
||||
dueDate: null,
|
||||
|
||||
dueDateType: 'object'
|
||||
|
||||
}
|
||||
|
||||
✅ Task created: {
|
||||
|
||||
id: 107,
|
||||
|
||||
title: 'Rangement et faire prix podium Meuble',
|
||||
|
||||
dueDate: null,
|
||||
|
||||
dueDateType: 'object'
|
||||
|
||||
}
|
||||
|
||||
POST /api/tasks 200 in 7ms
|
||||
|
||||
📄 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 11ms
|
||||
|
||||
🌤️ [RESPONSE] Weather data prepared: {
|
||||
|
||||
hasCurrentYear: true,
|
||||
|
||||
hasPreviousYear: true,
|
||||
|
||||
location: 'Frouard, France'
|
||||
|
||||
}
|
||||
|
||||
GET /api/weather/current 304 in 12ms
|
||||
|
||||
GET /api/user 304 in 3ms
|
||||
|
||||
GET /api/user 304 in 7ms
|
||||
|
||||
GET /api/users 304 in 14ms
|
||||
|
||||
GET /api/groups 304 in 6ms
|
||||
|
||||
🔍 Admin tasks filtering: { storeId: '2', groupIds: [ 2 ], message: 'Filtering by store 2' }
|
||||
|
||||
🔍 Tasks API called with: {
|
||||
|
||||
groupIds: [ 2 ],
|
||||
|
||||
userRole: 'admin',
|
||||
|
||||
userId: 'admin_local',
|
||||
|
||||
requestedStoreId: '2',
|
||||
|
||||
userGroups: 'all',
|
||||
|
||||
timestamp: '2025-09-02T09:49:55.103Z'
|
||||
|
||||
}
|
||||
|
||||
📋 DatabaseStorage.getTasks - Raw results: {
|
||||
|
||||
resultCount: 1,
|
||||
|
||||
userRole: 'admin',
|
||||
|
||||
sampleTasks: [
|
||||
|
||||
{
|
||||
|
||||
taskExists: true,
|
||||
|
||||
taskId: 107,
|
||||
|
||||
title: 'Rangement et faire prix podium Meuble',
|
||||
|
||||
startDate: null,
|
||||
|
||||
groupExists: true
|
||||
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
📋 Tasks returned: {
|
||||
|
||||
count: 1,
|
||||
|
||||
userId: 'admin_local',
|
||||
|
||||
userRole: 'admin',
|
||||
|
||||
requestedStoreId: '2',
|
||||
|
||||
groupIds: [ 2 ],
|
||||
|
||||
taskGroups: [
|
||||
|
||||
{
|
||||
|
||||
id: 107,
|
||||
|
||||
title: 'Rangement et faire prix podium Meuble',
|
||||
|
||||
groupId: 2
|
||||
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
GET /api/tasks 200 in 9ms
|
||||
|
||||
GET /api/weather/current 401 in 2ms
|
||||
|
||||
📄 SPA: Serving index.html for /auth
|
||||
|
||||
GET /api/user 401 in 1ms
|
||||
|
||||
GET /api/user 401 in 3ms
|
||||
|
||||
@@ -418,7 +418,8 @@ function TaskForm({ onSubmit, initialData, isEditing = false }: {
|
||||
description: description.trim() || undefined,
|
||||
assignedTo: assignedTo?.trim() || "Non assigné",
|
||||
priority,
|
||||
dueDate: dueDate ? new Date(dueDate).toISOString() : undefined,
|
||||
startDate: null, // Toujours inclure startDate même si null
|
||||
dueDate: dueDate ? new Date(dueDate).toISOString() : null,
|
||||
};
|
||||
|
||||
onSubmit(taskData);
|
||||
|
||||
Reference in new issue
Block a user