Skip to main content

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-admin with query parameters: supplier_id, postcode, suburb, bin_size_id, waste_type_id, delivery_date, category, and customer_id.
    • Added computed properties emptyBinEnabled(), emptyReturnEnabled(), and changeOverEnabled() to dynamically verify if services are applicable to the current category.
    • Introduced helper methods postCodeNotFound(), confirmCekStockAvailable(), and cekOffDay() 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.

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-bin passing both category and waste_type_id parameters.
    • Disabled the Bin Size dropdown when no Waste Type is selected.
  • Contract Customer Validation (resources/js/components/contracts/ContractCreate.vue)
    • Removed strict email requirements for customerForm and billingForm validation rules, making it optional when building a contract.

Fixed

  • Redirect Bug in General Waste Bin Hire (app/Http/Controllers/Admin/GeneralWasteBinHireController.php)
    • Fixed a redirection loop bug in the index method of GeneralWasteBinHireController. When $wasteType was null or its category was not 'skip bin', the controller now correctly redirects to the route admin.binhires.binhire_main_view with type set to $wasteSkipBin->id rather than the null/original $wasteType->id.
  • Contract Form Validation Visuals (resources/js/components/contracts/ContractAddServiceModal.vue)
    • Realigned $v.serviceForm....$error check directly to the select/input classes to render Bootstrap's red is-invalid border properly.
    • Added specific error feedback messages and a SweetAlert2 warning dialog notifying the user of invalid input fields on submission attempt.

Removed

  • None.