Changelog: Dwi - 2026-05-26
Daily Changelog - Waste Vantage Legacy
Overview
Today's changes by Dwi focus on introducing a structured BinWeightRepository to manage tare weights across tasks and runsheets, re-enabling the suburb/postcode export feature, refining the interactive setup wizard database updates, and adding test coverage for check day-off APIs and bin weight repositories.
Added
- Bin Weight Repository (
app/Repositories/BinWeightRepository.php)- Created
BinWeightRepositoryprovidinggetBinWeightByAddressandgetBinWeightByAddressParamBinWightsmethods to resolve tare weights matching waste type, container size, and yard ID.
- Created
- Day Off API Integration Tests (
tests/Feature/Apis/CheckDayOffTest.php)- Added feature tests validating endpoint routing, input validations (fails on missing date), day available scenarios, and non-delivery day responses under safe database transactions.
- Bin Weight Repository Unit Tests (
tests/Unit/Repositories/BinWeightRepositoryTest.php)- Added unit tests verifying weight matching directly from the database and using cached collections.
Changed
- Task Weight Resolution (
app/Http/Controllers/Admin/TaskController.php,app/Repositories/TaskRepository.php)- Refactored weight lookup logic in
TaskControllerto delegate toBinWeightRepository::getBinWeightByAddress. - Updated
TaskRepositoryto injecttare_weighton retrieved tasks when missing, usingBinWeightRepository::getBinWeightByAddressParamBinWights.
- Refactored weight lookup logic in
- System Setup Wizard Command (
app/Console/Commands/SystemSetupWizardCommand.php)- Replaced
updateOrCreateonSupplierandPartnermodels with fetching the first model instance and callingupdate(). - Expanded Partner details fields (slug, phone, email, ABN, website) synchronized from the Setup inputs.
- Replaced
- Chore Assets Compile (
public/js/...,public/mix-manifest.json)- Updated compiled files for Tinymce, silver theme, stripe-client, icons, models, and assets versioning manifest.
Fixed
- Task Runsheet API Exception Logging (
app/Http/Controllers/Admin/TaskRunsheetController.php)- Un-commented the try-catch block surrounding runsheet task loading to log exceptions to storage and return fallback client errors without interrupting executions.
- Suburb Export Restoration (
app/Exports/SuburbPostcodeExport.php)- Re-enabled the Suburb & Postcode export feature by commenting out the
abort(403)call in the class constructor.
- Re-enabled the Suburb & Postcode export feature by commenting out the
Removed
- None.