trypost/app/Enums/User/Persona.php
Paulo Castellano bb6d0a2678 fix: Stripe webhook setup completion, notifications routing, billing UI
- Fix StripeEventListener: mark setup as Completed when subscription.created webhook fires
- Fix notifications routes: move outside subscribed middleware (non-critical feature)
- Fix NotificationBell: guard response.ok before parsing JSON
- Fix StripeEventListener: use data_get() for payload access
- Rewrite billing page to use SettingsLayout with download buttons on invoices
- Remove duplicate Unit/Listeners/StripeEventListenerTest (consolidated into Feature)
- Add comprehensive Stripe webhook tests (14 scenarios: happy path, setup transitions, edge cases, error handling)
- Update billing i18n: remove "no credit card" text, add status key
- Move auth layout logo to top-left corner
- Redesign onboarding Role page with compact list layout
- Add persona i18n translations (EN, PT-BR, ES)
- Update README with API, MCP, tech stack, quick start
2026-03-31 13:52:36 -03:00

53 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Enums\User;
enum Persona: string
{
case Founder = 'founder';
case Creator = 'creator';
case Agency = 'agency';
case Enterprise = 'enterprise';
case SmallBusiness = 'small_business';
case Personal = 'personal';
public function label(): string
{
return __("onboarding.personas.{$this->value}.label");
}
public function description(): string
{
return __("onboarding.personas.{$this->value}.description");
}
public function icon(): string
{
return match ($this) {
self::Founder => 'rocket',
self::Creator => 'sparkles',
self::Agency => 'building',
self::Enterprise => 'building-2',
self::SmallBusiness => 'store',
self::Personal => 'user',
};
}
/**
* @return array<array{value: string, label: string, description: string, icon: string}>
*/
public static function toSelectArray(): array
{
return array_map(
fn (self $case) => [
'value' => $case->value,
'label' => $case->label(),
'description' => $case->description(),
'icon' => $case->icon(),
],
self::cases()
);
}
}