diff --git a/app/Filament/Pages/Profile.php b/app/Filament/Pages/Profile.php index ccd3889..5453d87 100644 --- a/app/Filament/Pages/Profile.php +++ b/app/Filament/Pages/Profile.php @@ -2,9 +2,11 @@ namespace App\Filament\Pages; +use App\Filament\Support\SystemNotification; use Filament\Auth\Pages\EditProfile; use Filament\Facades\Filament; use Filament\Forms\Components\TextInput; +use Filament\Notifications\Notification; use Filament\Schemas\Components\Section; use Filament\Schemas\Components\Utilities\Get; use Filament\Schemas\Schema; @@ -14,6 +16,8 @@ class Profile extends EditProfile { + protected bool $hasPasswordChanged = false; + public function form(Schema $schema): Schema { return $schema @@ -92,6 +96,11 @@ public function form(Schema $schema): Schema ]); } + protected function getSavedNotification(): ?Notification + { + return SystemNotification::update(); + } + protected function handleRecordUpdate(Model $record, array $data): Model { $shouldLogout = false; @@ -99,6 +108,7 @@ protected function handleRecordUpdate(Model $record, array $data): Model $data['password'] = $data['new_password']; unset($data['new_password']); $shouldLogout = true; + $this->hasPasswordChanged = true; } $record->update($data);