Changelog: Dwi - 2026-06-05
Daily Changelog - Waste Vantage Legacy
Overview
Today's changes by Dwi focus on runsheet and database administration utilities. This includes creating console commands and queue jobs to reset and regenerate schedules for Runsheet groups, implementing a demo customer data purge command with full safety backups and transactional deletes, fixing skip bin redirection loops, and refactoring setup wizard database reset scripts to safely remove ad-hoc orders while preserving contract/rental records.
Added
- Runsheet Rebuilding Utilities (
app/Console/Commands/ResetAllScheduleGroupsCommand.php,app/Jobs/ResetAllScheduleGroupsJob.php)- Added the
runsheet:reset-allconsole command to clean up future schedules and dispatch worker tasks per group. - Added the
ResetAllScheduleGroupsJobqueued job to process RunsheetGroup schedules asynchronously viaRunsheetRentalRepository::changeTaskGroups().
- Added the
- Demo Data Purging Utility (
app/Console/Commands/PurgeDemoDataCommand.php)- Introduced the
demo:purgeconsole command to purge customer records created after a specified cutoff date, along with all cascaded order/invoice children. - Implemented automatic pre-purge database dump (via
mysqldump), transaction execution blocks, and temporary disablement of foreign key constraints for safe deletions.
- Introduced the
Changed
- General Waste Bin Hire Index Page (
resources/views/admin/bin-hire/index.blade.php)- Refactored category and bin type dropdown callbacks to store and trace the last visited category filter, preventing navigation bugs where selection events failed to trigger.
Fixed
- General Waste Bin Hire Controller (
app/Http/Controllers/Admin/GeneralWasteBinHireController.php)- Fixed a redirect loop in the
indexaction when the category was not skip-bin, correctly routing back to the main view with the waste type parameters.
- Fixed a redirect loop in the
- System Setup Wizard Reset Script (
app/Console/Commands/SystemSetupWizardCommand.php)- Updated
processSpecificDeletions()to replace unconditional table truncates with specific SQL queries targeting ad-hoc orders (is_rental = 0) and their child entities (bin locations, invoice extras, invoice details) to protect rental contract details.
- Updated
Removed
- None.