feat: expor vertentes Casamentos/Corporate na jornada pública
Fecha o gap do MAN-126 na navegação e no portfólio: âncoras das duas vertentes no header/footer, filtro por event_type e empty state honesto para Corporate sem prova inventada. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
45
app/Domain/Marketing/PortfolioVertical.php
Normal file
45
app/Domain/Marketing/PortfolioVertical.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\Marketing;
|
||||
|
||||
/**
|
||||
* Public portfolio verticals used to separate Casamentos and Corporate proof.
|
||||
*
|
||||
* Matching is intentionally tolerant of free-text `event_type` values already
|
||||
* stored in the CMS (e.g. "Casamento", "Mini wedding", "Corporativo").
|
||||
*/
|
||||
enum PortfolioVertical: string
|
||||
{
|
||||
case Casamentos = 'casamentos';
|
||||
case Corporate = 'corporate';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Casamentos => 'Casamentos',
|
||||
self::Corporate => 'Corporate',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
*/
|
||||
public function eventTypePatterns(): array
|
||||
{
|
||||
return match ($this) {
|
||||
self::Casamentos => ['%casamento%', '%wedding%', '%social%'],
|
||||
self::Corporate => ['%corporat%', '%empresa%', '%business%'],
|
||||
};
|
||||
}
|
||||
|
||||
public static function tryFromQuery(?string $value): ?self
|
||||
{
|
||||
if ($value === null || $value === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return self::tryFrom($value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user