Changelog: Dwi - 2026-06-04
Daily Changelog - Waste Vantage Legacy
Overview
Today's changes by Dwi focus on improving the contract creation form user interface and integration. This includes implementing dynamic pricing search by postcode and suburb, filtering bin sizes based on selected waste types, automatically enabling specific service pricing categories based on category rules, adding visual invalid input indicators with a warning dialog on the contract form, and fixing a redirection bug in the admin skip bin view when the waste type is not a skip bin.
Added
- Dynamic Pricing Lookup (
resources/js/components/contracts/ContractAddServiceModal.vue)- Added the
findBinPrice()method to look up bin price using API/api/bin-price-adminwith query parameters:supplier_id,postcode,suburb,bin_size_id,waste_type_id,delivery_date,category, andcustomer_id. - Added computed properties
emptyBinEnabled(),emptyReturnEnabled(), andchangeOverEnabled()to dynamically verify if services are applicable to the current category. - Introduced helper methods
postCodeNotFound(),confirmCekStockAvailable(), andcekOffDay()to handle API warnings, non-delivery days, and stock unavailability with interactive SweetAlert2 dialogs. - Linked
findBinPrice()to input changes (site selection, bin size selection, waste type changes) to keep service prices updated.
- Added the
Changed
- Bin Size Retrieval (
resources/js/components/contracts/ContractAddServiceModal.vue,resources/js/components/product-packages/AddServicePricing.vue)- Replaced
/api/bin-sizes?category=endpoint query with/api/bin-/get-new-binpassing bothcategoryandwaste_type_idparameters. - Disabled the Bin Size dropdown when no Waste Type is selected.
- Replaced
- Contract Customer Validation (
resources/js/components/contracts/ContractCreate.vue)- Removed strict email requirements for
customerFormandbillingFormvalidation rules, making it optional when building a contract.
- Removed strict email requirements for
Fixed
- Redirect Bug in General Waste Bin Hire (
app/Http/Controllers/Admin/GeneralWasteBinHireController.php)- Fixed a redirection loop bug in the
indexmethod ofGeneralWasteBinHireController. When$wasteTypewas null or its category was not'skip bin', the controller now correctly redirects to the routeadmin.binhires.binhire_main_viewwithtypeset to$wasteSkipBin->idrather than the null/original$wasteType->id.
- Fixed a redirection loop bug in the
- Contract Form Validation Visuals (
resources/js/components/contracts/ContractAddServiceModal.vue)- Realigned
$v.serviceForm....$errorcheck directly to the select/input classes to render Bootstrap's redis-invalidborder properly. - Added specific error feedback messages and a SweetAlert2 warning dialog notifying the user of invalid input fields on submission attempt.
- Realigned
Removed
- None.