mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Synchronize order and delivery statuses and dates in the calendar view
Fixes an issue where orders linked to delivered deliveries were not displaying the correct delivery date or status in the calendar. This includes updating the OrderDetailModal to show the correct dates, automatically updating order statuses when deliveries are marked as delivered, and providing a SQL script to correct existing data inconsistencies. Replit-Commit-Author: Agent Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/0tRkXvo
This commit is contained in:
1 parent
0e2f017305
commit
d14a4a31f6
6 files changed
+128
-2
No files matched your search
@@ -149,4 +149,17 @@ Preferred communication style: Simple, everyday language.
|
||||
- Enhanced validation schemas to accept `null` values for email fields
|
||||
- Created `fix-duplicate-empty-email.sql` script to clean existing database records
|
||||
- Improved error handling and logging for better production debugging
|
||||
- **Result**: Users can now be created and edited with optional email fields without constraint violations
|
||||
- **Result**: Users can now be created and edited with optional email fields without constraint violations
|
||||
|
||||
#### Calendar Order-Delivery Synchronization Fix
|
||||
- **Issue**: Orders linked to delivered deliveries were not showing proper status and dates in calendar view
|
||||
- **Root Cause**: Three interconnected problems:
|
||||
1. OrderDetailModal was displaying non-existent `plannedDate` instead of `scheduledDate`/`deliveredDate`
|
||||
2. Order status was not automatically updated when delivery status changed via updateDelivery method
|
||||
3. Delivered deliveries had missing `deliveredDate` field causing "Date non disponible" display
|
||||
- **Solution Implemented**:
|
||||
- Enhanced OrderDetailModal to display correct dates: `deliveredDate` for delivered items, `scheduledDate` for planned ones
|
||||
- Added automatic order status synchronization in `updateDelivery` method when delivery marked as delivered
|
||||
- Created `fix-delivery-order-sync.sql` script to correct existing production data inconsistencies
|
||||
- Improved Calendar date initialization to show current month instead of hardcoded July 2025
|
||||
- **Result**: Calendar now properly displays delivery dates and automatically synchronizes order statuses when deliveries are completed
|
||||
Reference in new issue
Block a user