Changelog: Dedek - 2026-06-19
Daily Changelog - Waste Vantage Legacy
Overview
Today's changes by Dedek focus on runsheet task management, re-sequencing, and database update concurrency. Key modifications include implementing sequential task reordering when runsheet tasks are assigned or updated, utilizing database pessimistic locking to avoid concurrency anomalies during task status updates, and standardizing exception logging and client-facing error responses.
Added
- Task Resequencing Functions (
app/Repositories/RunsheetRentalRepository.php)- Added
resequenceTasksByDateDriverAndCategory()andresequenceFutureTasks()to ensure runsheet task positions are consecutively ordered and updated when driver assignments or scheduling states change.
- Added
Changed
- Runsheet Task Position Resequencing (
app/Http/Controllers/Admin/TaskRunsheetController.php,app/Http/Controllers/Admin/RunsheetRentalController.php,app/Http/Controllers/Admin/RunsheetGroupController.php)- Integrated the new resequencing logic into runsheet update, creation, and assignment processes.
- Standardized JSON error responses and exception handling. Wrapped operations in
try-catchblocks and updated log formatting to include user identifier context and trace details.
- Runsheet Assignment UI Component (
resources/js/components/runsheets/Assign2.vue)- Updated runsheet assignment logic to support the new positioning parameters and task sequencing updates.
Fixed
- Concurrent Task Status Updates (
app/Http/Controllers/ApiApp/RunsheetController.php)- Implemented
lockForUpdate()onTaskandOrderDetailfetches to ensure updates are serialized, mitigating transaction conflicts during concurrent status updates from driver apps.
- Implemented
- Driver Unassignment Handling (
app/Http/Controllers/Admin/TaskRunsheetController.php)- Fixed logic when checks for unassigned drivers were bypassing correct null-state database writes, ensuring 0 and empty strings are correctly written to the database as
nulldrivers.
- Fixed logic when checks for unassigned drivers were bypassing correct null-state database writes, ensuring 0 and empty strings are correctly written to the database as
Removed
- None.