TenantAtlas/apps/platform/app/Support/Onboarding/OnboardingCheckpoint.php
ahmido 292d555eac refactor: consolidate internal tenant model naming (#355)
## Summary
- consolidate internal platform naming from `Tenant` to `Environment` / `ManagedEnvironment` across models, controllers, services, and Filament resources
- rename environment-scoped UI surfaces such as dashboards, chooser flows, navigation, and related widgets to match the updated environment-first domain language
- align middleware, onboarding/review lifecycle services, jobs, and route/context controllers with the new environment-scoped architecture

## Validation
- not rerun as part of this commit/push/PR request

## Notes
- branch is 1 commit ahead of `platform-dev`
- main commit: `refactor: consolidate internal tenant model naming`

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #355
2026-05-14 11:13:28 +00:00

60 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Support\Onboarding;
enum OnboardingCheckpoint: string
{
case Identify = 'identify';
case ConnectProvider = 'connect_provider';
case VerifyAccess = 'verify_access';
case Bootstrap = 'bootstrap';
case CompleteActivate = 'complete_activate';
public function label(): string
{
return match ($this) {
self::Identify => 'Identify managed environment',
self::ConnectProvider => 'Connect provider',
self::VerifyAccess => 'Verify access',
self::Bootstrap => 'Bootstrap',
self::CompleteActivate => 'Complete / Activate',
};
}
public function wizardStep(): int
{
return match ($this) {
self::Identify => 1,
self::ConnectProvider => 2,
self::VerifyAccess => 3,
self::Bootstrap => 4,
self::CompleteActivate => 5,
};
}
public static function fromCurrentStep(?string $step): ?self
{
return match ($step) {
'identify' => self::Identify,
'connection' => self::ConnectProvider,
'verify' => self::VerifyAccess,
'bootstrap' => self::Bootstrap,
'complete' => self::CompleteActivate,
default => null,
};
}
/**
* @return array<int, string>
*/
public static function values(): array
{
return array_map(
static fn (self $case): string => $case->value,
self::cases(),
);
}
}