fix: keep internal agribusiness delivery notes out of portal presentation
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-23 11:22:39 +02:00
parent 4ad1bf402b
commit 165c2f6171
9 changed files with 81 additions and 15 deletions
+7
View File
@@ -31,6 +31,13 @@ class Opportunity extends Model
protected $appends = ['maturity_catalogue_version'];
public function toArray(): array
{
$data = parent::toArray();
if (isset($data['description'])) $data['description'] = \App\Services\OpportunityPublicText::description($this, $data['description']);
return $data;
}
public function getMaturityCatalogueVersionAttribute(): ?string
{
// Only published metadata is public; never expose the current private draft.