# Portfolio-in-Dashboards + Rentec multi-account — apply

    cp -R dashboard-portfolio/app/*       ./app/
    cp -R dashboard-portfolio/resources/* ./resources/
    cp -R dashboard-portfolio/tests/*     ./tests/

Overwrites DashboardsController and resources/js/pages/dashboards/index.tsx.

## 1. Routes — add inside the auth group:
    Route::post('/data-manager/rentec/connect', [\App\Http\Controllers\RentecConnectController::class, 'store'])->name('data-manager.rentec.connect');
    Route::post('/data-manager/rentec/{account}/key', [\App\Http\Controllers\RentecConnectController::class, 'update'])->name('data-manager.rentec.key');
    Route::delete('/data-manager/rentec/{account}', [\App\Http\Controllers\RentecConnectController::class, 'destroy'])->name('data-manager.rentec.disconnect');

## 2. Sidebar — REMOVE the standalone "Portfolio" entry from mainNavItems in
   resources/js/components/app-sidebar.tsx. It now lives under Dashboards.

## 3. Data Manager page — wire the modal:
   import { RentecConnectModal } from '@/components/data-manager/RentecConnectModal';
   Add state:  const [rentecModal, setRentecModal] = useState(false);
   For the Rentec card's Connect button:  onClick={() => setRentecModal(true)}
   Render:  {rentecModal && <RentecConnectModal existingCount={rentecAccounts} onClose={() => setRentecModal(false)} />}
   (The controller should pass how many rentec accounts already exist.)

## 4. Test + build
    php artisan route:clear
    php artisan test --filter=DashboardPortfolio
    node node_modules/vite/bin/vite.js build

## What changes
- /dashboards now shows a "Reports" section with the Portfolio Report card carrying
  live figures (locations, units, occupancy %, expiring ≤90d), above custom dashboards.
- The card is hidden from users with no location assignments — consistent with the
  fail-closed scoping used everywhere else.
- Rentec connects via a modal that takes a name + API key, verifies the key against
  Rentec BEFORE storing, and supports multiple portfolios as separate accounts that
  sync independently. Keys can be rotated in place.
