Closed curtisdelicata closed 5 months ago
Here are the code search results. I'm now analyzing these search results to write the PR.
app/Providers/AppServiceProvider.php
Remove the registration of the incorrect EditProfile Livewire component.
---
+++
@@ -6,5 +6,4 @@
Livewire::component('people-search', PeopleSearch::class);
Livewire::component('pedigree-chart', PedigreeChart::class);
Livewire::component('create-team', CreateTeam::class);
- Livewire::component('edit-profile', EditProfile::class);
}
resources/views/filament/pages/edit-profile.blade.php
Replace the contents of the edit-profile view to properly utilize the Filament EditProfile page.
---
+++
@@ -1,35 +1,11 @@
-<x-filament-panels::page>
- @if (Laravel\Fortify\Features::canUpdateProfileInformation())
- @livewire(Laravel\Jetstream\Http\Livewire\UpdateProfileInformationForm::class)
+<x-filament::page>
+ <x-filament::form wire:submit.prevent="submit">
+ {{ $this->form }}
- <x-section-border/>
- @endif
-
- @if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::updatePasswords()))
- <div class="mt-10 sm:mt-0">
- @livewire(Laravel\Jetstream\Http\Livewire\UpdatePasswordForm::class)
- </div>
-
- <x-section-border/>
- @endif
-
- @if (Laravel\Fortify\Features::canManageTwoFactorAuthentication())
- <div class="mt-10 sm:mt-0">
- @livewire(Laravel\Jetstream\Http\Livewire\TwoFactorAuthenticationForm::class)
- </div>
-
- <x-section-border/>
- @endif
-
- <div class="mt-10 sm:mt-0">
- @livewire(Laravel\Jetstream\Http\Livewire\LogoutOtherBrowserSessionsForm::class)
- </div>
-
- @if (Laravel\Jetstream\Jetstream::hasAccountDeletionFeatures())
- <x-section-border/>
-
- <div class="mt-10 sm:mt-0">
- @livewire(Laravel\Jetstream\Http\Livewire\DeleteUserForm::class)
- </div>
- @endif
-</x-filament-panels::page>
+ <x-filament::form.actions>
+ <x-filament::button type="submit">
+ Save Changes
+ </x-filament::button>
+ </x-filament::form.actions>
+ </x-filament::form>
+</x-filament::page>
app/Http/Livewire/EditProfile.php
Delete the unused EditProfile Livewire component file.
---
+++
@@ -1,45 +0,0 @@
-<?php
-
-namespace App\Http\Livewire;
-
-use Illuminate\Support\Facades\Auth;
-use Livewire\Component;
-
-class EditProfile extends Component
-{
- public $name;
- public $email;
-
- protected $rules = [
- 'name' => 'required|string|max:255',
- 'email' => 'required|email|max:255|unique:users,email,' . Auth::id(),
- ];
-
- public function mount()
- {
- $user = Auth::user();
- $this->name = $user->name;
- $this->email = $user->email;
- }
-
- public function updateProfile()
- {
- $this->validate();
-
- try {
- Auth::user()->update([
- 'name' => $this->name,
- 'email' => $this->email,
- ]);
-
- $this->emit('profileUpdated');
- } catch (\Exception $e) {
- $this->emit('profileUpdateFailed', $e->getMessage());
- }
- }
-
- public function render()
- {
- return view('livewire.edit-profile');
- }
-}
Your changes have been successfully made to the branch sweep/edit_profile_bug_67226
. I have validated these changes using a syntax checker and a linter.
[!TIP] To recreate the pull request, edit the issue title or description.
This is an automated message generated by Sweep AI.
Details
Fix this bug:
Unable to find component: [Filament\Pages\EditProfile]
Happens on composer install. Believe page has syntax errors or issues with livewire components