Now I can explain the current structure and what needs to be added:
Current Structure Explanation:
Current Setup (Lines 145-157):
- The "Alt Number" button (line 150-157) is a simple button that opens the
showAccountantModal when clicked - The button is currently standalone - there's no popup positioned below it
- The button is inside a flex container with the phone number link
What exists:
- Primary Contact Display (lines 143-148): Shows the contact type badge and primary phone number
- Alt Number Button (lines 150-157): Opens the accountant modal modal
- Added Contact Numbers (lines 161-184): Lists all alternative contacts that were added
What's missing:
- A contact list popup that appears directly below the "Alt Number" button
- A relative wrapper around the button to position the popup using absolute positioning
- The showContactListPopup state (which I already added) to toggle the popup visibility
- The popup content that displays primary and alternative contacts in a dropdown format
Now let me add the complete structure with the popup positioned directly below the button:
Complete Structure Summary:
New Structure with Popup:
- Relative Container (line 150): Wraps both the button and popup with
relative positioning to allow absolute positioning of the child popup Alt Number Button (lines 151-158):
- Changed from opening
showAccountantModal to toggling showContactListPopup - Remains visually identical - white background, icon + text
- Creates the toggle on/off behavior
Contact List Popup (lines 160-201):
- Uses
absolute positioning with top-full (sits directly below button) and left-0 (aligns left) mt-2 adds small gap between button and popup- Shows "Primary Contact" section with type badge and number
- Shows "Other Contacts" section if any alternative contacts exist
- Empty state message if no additional contacts
The popup now displays directly below the button when clicked, showing all contacts in a clean dropdown format without any modal interference.