# Request Quote Button State Fix

## Issue
When clicking "Request Quote" on one package, ALL "Request Quote" buttons across both coverage check and products pages would show "Requesting..." state, which was confusing for users.

## Root Cause
Both pages were using the same `useRequestQuotation` hook, which has a global `isLoading` state. When one button triggered the mutation, the `isLoading` state became true for ALL components using this hook.

## Solution
Implemented per-package button state management:

### Changes Made

#### 1. Coverage Check Page (`afinet-portal/src/app/(portal)/coverage-check/page.js`)
- Added local state: `const [requestingPackageId, setRequestingPackageId] = useState(null)`
- Updated `handleRequestQuote` function:
  - Set `setRequestingPackageId(pkg.id)` when starting request
  - Clear `setRequestingPackageId(null)` on success/error
- Updated button state:
  - `disabled={requestingPackageId === pkg.id}` (instead of global `requestingQuote`)
  - `{requestingPackageId === pkg.id ? 'Requesting...' : 'Request Quote'}`

#### 2. Products Page (`afinet-portal/src/app/(portal)/products/page.js`)
- Added local state: `const [requestingPackageId, setRequestingPackageId] = useState(null)`
- Updated `handleRequestQuote` function:
  - Set `setRequestingPackageId(product.id)` when starting request
  - Clear `setRequestingPackageId(null)` on success/error
- Updated button state:
  - `disabled={requestingPackageId === product.id}` (instead of global `requestingQuote`)
  - `{requestingPackageId === product.id ? 'Requesting...' : 'Request Quote'}`

## Result
- Only the specific button clicked shows "Requesting..." state
- Other buttons remain clickable and show "Request Quote"
- Each page maintains independent button states
- Better user experience with clear visual feedback per package

## Testing
- Click "Request Quote" on one package - only that button shows "Requesting..."
- Other packages on the same page remain clickable
- Buttons on the other page (coverage check vs products) remain unaffected
- Button state clears properly on success or error

## Files Modified
- `afinet-portal/src/app/(portal)/coverage-check/page.js`
- `afinet-portal/src/app/(portal)/products/page.js`