Fix compressed draft saves provenance and Beira documentary continuity
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-23 15:41:37 +02:00
parent c3f7c3ad10
commit 6b544548d3
16 changed files with 145 additions and 15 deletions
@@ -105,6 +105,7 @@ class InvestmentPortfolioController extends Controller
$opportunities = Opportunity::published()->where(function ($query) use ($record) {
$query->whereRaw('false');
$query->orWhereIn('id', app(\App\Services\CorridorAgribusinessOpportunities::class)->portfolioOpportunityIds($record));
foreach (['clusters' => 'cluster_id', 'corridors' => 'corridor_id', 'projects' => 'project_id'] as $relation => $foreign) {
if ($record->$foreign) {
$query->orWhereIn('id', DB::table('opportunity_'.$relation)->where($foreign, $record->$foreign)->select('opportunity_id'));