Improve date handling for task creation and retrieval

Update client-side and server-side logic to correctly process and store date values, ensuring compatibility with PostgreSQL timestamp types. This includes converting string dates to Date objects before insertion and ensuring string IDs are converted to numbers for API calls.

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:19:37 +00:00
1 parent 3ec315ddd2
commit 9dc199d188
4 files changed
+221 -5

No files matched your search

+2 -2
View File
@@ -52,7 +52,7 @@ export default function TasksSimplified() {
queryFn: () => {
const params = new URLSearchParams();
if (selectedStoreId) {
params.append('storeId', selectedStoreId);
params.append('storeId', selectedStoreId.toString());
}
return fetch(`/api/tasks?${params.toString()}`).then(res => res.json());
},
@@ -60,7 +60,7 @@ export default function TasksSimplified() {
});
// Récupération des magasins
const { data: stores = [] } = useQuery({
const { data: stores = [] } = useQuery<any[]>({
queryKey: ["/api/groups"],
enabled: !!user,
});