From 52c0162fcd1d9332f5c380b6bad7f735b173954f Mon Sep 17 00:00:00 2001 From: Rodrigo Castro Date: Wed, 21 Oct 2026 16:30:18 -0300 Subject: [PATCH 01/11] feat(design): ativa registro customizado no painel de membro --- site_novo/app/Filament/Auth/Register.php | 47 +++++++++++++++++++ .../Filament/MemberPanelProvider.php | 2 + 2 files changed, 49 insertions(+) create mode 100644 site_novo/app/Filament/Auth/Register.php diff --git a/site_novo/app/Filament/Auth/Register.php b/site_novo/app/Filament/Auth/Register.php new file mode 100644 index 0000000..7b21274 --- /dev/null +++ b/site_novo/app/Filament/Auth/Register.php @@ -0,0 +1,47 @@ +components([ + $this->getNameFormComponent(), + $this->getEmailFormComponent(), + $this->getCargoFormComponent(), + $this->getPasswordFormComponent(), + $this->getPasswordConfirmationFormComponent(), + ]); + } + + protected function getCargoFormComponent(): Component + { + return TextInput::make('cargo') + ->label('Cargo') + ->placeholder('Ex: Desenvolvedor Back-End') + ->maxLength(255); + } + + /** + * @param array $data + * @return array + */ + protected function mutateFormDataBeforeRegister(array $data): array + { + $data['slug'] = Str::slug($data['name']).'-'.Str::lower(Str::random(6)); + $data['role'] = UserRole::Member; + + return $data; + } +} diff --git a/site_novo/app/Providers/Filament/MemberPanelProvider.php b/site_novo/app/Providers/Filament/MemberPanelProvider.php index 944f952..7d13498 100644 --- a/site_novo/app/Providers/Filament/MemberPanelProvider.php +++ b/site_novo/app/Providers/Filament/MemberPanelProvider.php @@ -3,6 +3,7 @@ namespace App\Providers\Filament; use App\Filament\Auth\Login; +use App\Filament\Auth\Register; use App\Filament\Member\Pages\Dashboard; use App\Filament\Member\Pages\EditProfile; use Filament\Enums\UserMenuPosition; @@ -31,6 +32,7 @@ public function panel(Panel $panel): Panel ->path('membro') ->viteTheme('resources/css/filament/membro/theme.css') ->login(Login::class) + ->registration(Register::class) ->colors([ 'primary' => Color::generatePalette('#1e8edb'), ]) From 7831f8f4c72b86eb79bf51b501e63af186d93aee Mon Sep 17 00:00:00 2001 From: Rodrigo Castro Date: Wed, 21 Oct 2026 16:30:20 -0300 Subject: [PATCH 02/11] test: cobre o fluxo de registro customizado do membro --- .../Feature/Filament/RegisterPageTest.php | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 site_novo/tests/Feature/Filament/RegisterPageTest.php diff --git a/site_novo/tests/Feature/Filament/RegisterPageTest.php b/site_novo/tests/Feature/Filament/RegisterPageTest.php new file mode 100644 index 0000000..e7210dd --- /dev/null +++ b/site_novo/tests/Feature/Filament/RegisterPageTest.php @@ -0,0 +1,44 @@ +get('/membro/register') + ->assertOk() + ->assertSee('fi-login-brand-panel', false) + ->assertSee('A comunidade PHP que conecta a Paraíba'); +}); + +test('the admin panel has no registration route', function () { + $this->get('/admin/register')->assertNotFound(); +}); + +test('the member login page links to the register page', function () { + $this->get('/membro/login') + ->assertOk() + ->assertSee('membro/register', false); +}); + +test('a visitor can register as a member and is logged in with the member role', function () { + Livewire::test(Register::class) + ->fillForm([ + 'name' => 'Nova Desenvolvedora', + 'email' => 'nova@example.com', + 'cargo' => 'Desenvolvedora Back-End', + 'password' => 'password-forte-123', + 'passwordConfirmation' => 'password-forte-123', + ]) + ->call('register') + ->assertHasNoFormErrors(); + + $user = User::where('email', 'nova@example.com')->first(); + + expect($user)->not->toBeNull() + ->and($user->role)->toBe(UserRole::Member) + ->and($user->slug)->not->toBeNull(); + + $this->assertAuthenticatedAs($user, 'web'); +}); From 665126346566809a9cca90aade57565066513652 Mon Sep 17 00:00:00 2001 From: Rodrigo Castro Date: Wed, 21 Oct 2026 17:01:07 -0300 Subject: [PATCH 03/11] fix(design): corrige largura do card de login/registro --- .../filament/auth/split-layout.blade.php | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/site_novo/resources/views/filament/auth/split-layout.blade.php b/site_novo/resources/views/filament/auth/split-layout.blade.php index 1f3a8ee..081c5f0 100644 --- a/site_novo/resources/views/filament/auth/split-layout.blade.php +++ b/site_novo/resources/views/filament/auth/split-layout.blade.php @@ -1,5 +1,12 @@ @php + use Filament\Support\Enums\Width; + $renderHookScopes = $livewire?->getRenderHookScopes(); + $maxContentWidth ??= (filament()->getSimplePageMaxContentWidth() ?? Width::Large); + + if (is_string($maxContentWidth)) { + $maxContentWidth = Width::tryFrom($maxContentWidth) ?? $maxContentWidth; + } @endphp @@ -63,7 +70,7 @@ -
+
@if (($hasTopbar ?? true) && filament()->auth()->check())
@if (filament()->hasDatabaseNotifications()) @@ -79,10 +86,13 @@
@endif -
-
- {{ $slot }} -
+
value}" : $maxContentWidth, + ]) + > + {{ $slot }}
From 8f9988fcf67d04e88c0ba1a13beabf22f91e20a4 Mon Sep 17 00:00:00 2001 From: Rodrigo Castro Date: Wed, 21 Oct 2026 17:08:53 -0300 Subject: [PATCH 04/11] feat(design): usa a cena completa do farol no painel de marca do login --- .../views/filament/auth/split-layout.blade.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/site_novo/resources/views/filament/auth/split-layout.blade.php b/site_novo/resources/views/filament/auth/split-layout.blade.php index 081c5f0..1c4abbf 100644 --- a/site_novo/resources/views/filament/auth/split-layout.blade.php +++ b/site_novo/resources/views/filament/auth/split-layout.blade.php @@ -29,13 +29,10 @@
- -