Description
When creating a new policy, the system requires the user to search for and select an existing customer by entering the customer's name, email address, or phone number. The search field is expected to display matching registered customers in an autocomplete dropdown.
Steps to Reproduce
1. Go to Annuity Policies 2. Click on Add new policies 3. Input Customer's name / email add / phone no
Expected Result
When a user enters the name, email address, or phone number of an existing registered customer in the customer search field, the system should display matching customer records in the autocomplete dropdown, allowing the user to select the appropriate customer and continue with policy creation.
Actual Result
The autocomplete dropdown does not display any matching customer records even though the customer exists in the database. Consequently, the user cannot select the customer, preventing the creation of a new policy.
Developer Resolution Notes
Root cause: /api/customers/search returns a {data: [...]} envelope, but the policy create/edit JavaScript was treating the response as a flat array. This caused a TypeError when .forEach() was called on an object, which the catch block silently handled by setting results=[]. Fix: policy create.blade.php and edit.blade.php now extract responseData.data before assigning to results.
Bug Details
- Priority
- High
- Severity
- High
- Module
- Annuity Policies
- Browser
- Chrome 148.0.7778.217
- Operating System
- Windows 10
- Reported By
- CLAAPP Super Admin
- Reported At
- Jun 8, 2026 at 7:16 PM
Update Status
Additional Comments
Use this section to add testing notes, additional context, or follow-up information.
Quick Actions
Danger Zone
Once you delete a bug, there is no going back. Please be certain.