feat(tiers): add display-name layer, push.frequency entitlement, and rename pricing cards
Reconciles tier docs with `PlanSeeder` reality (basic has price_threshold and score_alerts; schema is stripe_price_id_monthly + stripe_price_id_annual) and introduces the display-name layer from pricing-plan.md v2. - PlanTier::label() + Plan::displayName() + PlanFeatures::displayName() expose user-facing names (Free/Daily/Smart/Pro); backend identifiers stay basic/plus/pro so every call site, Stripe mapping, and test keeps working. - push.frequency key added to features JSON (none/daily/triggered), mirroring email.frequency so Daily's daily push is distinguishable from Smart/Pro's triggered push. Seeder, factory, free-tier stubs, and Filament form updated. - Homepage pricing cards renamed: Basic→Daily, Plus→Smart; badge "Most Popular"→"Most pick this"; CTAs refreshed. - docs/tiers.md change log records the full diff. Fleet tier, 14-day trial copy, and Smart dark-card treatment deferred. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ final class PlanFeatures
|
||||
'features' => [
|
||||
'fuel_types' => ['max' => 1],
|
||||
'email' => ['enabled' => true, 'frequency' => 'weekly_digest'],
|
||||
'push' => ['enabled' => false],
|
||||
'push' => ['enabled' => false, 'frequency' => 'none'],
|
||||
'whatsapp' => ['enabled' => false, 'daily_limit' => 0, 'scheduled_updates' => 0],
|
||||
'sms' => ['enabled' => false, 'daily_limit' => 0],
|
||||
'ai_predictions' => false,
|
||||
@@ -195,4 +195,10 @@ final class PlanFeatures
|
||||
{
|
||||
return $this->plan->name ?? 'free';
|
||||
}
|
||||
|
||||
/** User-facing display label for the resolved tier (e.g. basic → "Daily"). */
|
||||
public function displayName(): string
|
||||
{
|
||||
return $this->plan->displayName();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user