## 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
27 lines
1.1 KiB
PHP
27 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Support\Badges\Domains;
|
|
|
|
use App\Models\ManagedEnvironmentTriageReview;
|
|
use App\Support\Badges\BadgeCatalog;
|
|
use App\Support\Badges\BadgeMapper;
|
|
use App\Support\Badges\BadgeSpec;
|
|
|
|
final class ManagedEnvironmentTriageReviewStateBadge implements BadgeMapper
|
|
{
|
|
public function spec(mixed $value): BadgeSpec
|
|
{
|
|
$state = BadgeCatalog::normalizeState($value);
|
|
|
|
return match ($state) {
|
|
ManagedEnvironmentTriageReview::DERIVED_STATE_NOT_REVIEWED => new BadgeSpec('Not reviewed', 'gray', 'heroicon-m-eye-slash'),
|
|
ManagedEnvironmentTriageReview::STATE_REVIEWED => new BadgeSpec('Reviewed', 'success', 'heroicon-m-check-circle'),
|
|
ManagedEnvironmentTriageReview::STATE_FOLLOW_UP_NEEDED => new BadgeSpec('Follow-up needed', 'danger', 'heroicon-m-exclamation-triangle'),
|
|
ManagedEnvironmentTriageReview::DERIVED_STATE_CHANGED_SINCE_REVIEW => new BadgeSpec('Changed since review', 'warning', 'heroicon-m-arrow-path'),
|
|
default => BadgeSpec::unknown(),
|
|
};
|
|
}
|
|
}
|