oportunidades 4
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-10 07:03:59 +02:00
parent e662230df7
commit 6ddafc95ba
179 changed files with 22750 additions and 933 deletions
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\Opportunity;
use App\Models\Sector;
use App\Services\CountryCatalogue;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Inertia\Response;
@@ -32,13 +33,13 @@ class PublicPortalController extends Controller
public function interest(?string $slug = null): Response
{
return $slug ? $this->detail($slug, 'interest') : Inertia::render('PortalInvestidor', ['initialView' => 'interest']);
return $slug ? $this->detail($slug, 'interest') : Inertia::render('PortalInvestidor', ['initialView' => 'interest', 'countries' => app(CountryCatalogue::class)->all()]);
}
private function detail(string $slug, string $view): Response
{
$opportunity = Opportunity::with('sector:id,name,slug')->published()->where('slug', $slug)->firstOrFail();
return Inertia::render('PortalInvestidor', ['initialView' => $view, 'initialOpportunity' => $opportunity]);
return Inertia::render('PortalInvestidor', ['initialView' => $view, 'initialOpportunity' => $opportunity, 'countries' => app(CountryCatalogue::class)->all()]);
}
}