## 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
46 lines
1.4 KiB
PHP
46 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\ManagedEnvironmentResource\Pages;
|
|
|
|
use App\Models\ManagedEnvironment;
|
|
use App\Support\ManagedEnvironmentLinks;
|
|
use Filament\Actions\Action;
|
|
|
|
class ManageEnvironmentAccessScopes extends ViewManagedEnvironment
|
|
{
|
|
protected static ?string $title = 'Manage environment access scope';
|
|
|
|
public function mount(int|string|ManagedEnvironment $environment): void
|
|
{
|
|
parent::mount($environment instanceof ManagedEnvironment ? (string) $environment->getRouteKey() : $environment);
|
|
}
|
|
|
|
public function getSubheading(): ?string
|
|
{
|
|
return 'Workspace membership defines the role. Explicit environment scopes only narrow which workspace members can see this environment.';
|
|
}
|
|
|
|
protected function getHeaderWidgets(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
$actions = array_values(array_filter(
|
|
parent::getHeaderActions(),
|
|
static fn ($action): bool => ! ($action instanceof Action && $action->getName() === 'memberships'),
|
|
));
|
|
|
|
array_unshift(
|
|
$actions,
|
|
Action::make('back_to_overview')
|
|
->label('Back to environment overview')
|
|
->color('gray')
|
|
->url(fn (): string => ManagedEnvironmentLinks::viewUrl($this->getRecord())),
|
|
);
|
|
|
|
return $actions;
|
|
}
|
|
}
|