Skip to content

Commit f58f5fa

Browse files
committed
Merge branch 'main' of github.com:vormkracht10/user-management
2 parents 3aed5dd + b4ca8e6 commit f58f5fa

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

src/Concerns/HasBackstageManagement.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@
99

1010
trait HasBackstageManagement
1111
{
12+
use CanResetPassword;
1213
use Concerns\Conditionals\HasConditionals;
1314
use Concerns\Relations\HasRelations;
15+
16+
// Scopes
1417
use Concerns\Scopes\HasScopes;
1518

1619
// Illuminate contracts:
1720
use Notifiable;
1821
use CanResetPassword;
1922

23+
24+
// Backstage contracts:
2025
use HasFields;
2126
}

src/Resources/UserResource.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use Backstage\UserManagement\Exports\UserExporter;
66
use Backstage\UserManagement\Imports\UserImporter;
7-
use Backstage\UserManagement\Widgets\StatsOverviewWidget;
87
use Backstage\UserManagement\Resources\UserResource\Pages;
8+
use Backstage\UserManagement\Widgets\StatsOverviewWidget;
99
use Filament\Facades\Filament;
1010
use Filament\Forms;
1111
use Filament\Forms\Form;
@@ -31,6 +31,7 @@ public static function form(Form $form): Form
3131
->schema(function ($livewire) {
3232
$livewire = $livewire;
3333

34+
<<<<<<< HEAD
3435
$formFields = $livewire->getFormFields();
3536

3637
return array_merge([
@@ -55,6 +56,18 @@ public static function form(Form $form): Form
5556
->live(debounce: 500),
5657
], $formFields);
5758
});
59+
=======
60+
Forms\Components\TextInput::make('password')
61+
->password()
62+
->label(__('Password'))
63+
->revealable(Filament::arePasswordsRevealable())
64+
->rule(Password::default())
65+
->autocomplete('new-password')
66+
->dehydrated(fn ($state): bool => filled($state))
67+
->dehydrateStateUsing(fn ($state): string => Hash::make($state))
68+
->live(debounce: 500),
69+
]);
70+
>>>>>>> b4ca8e6041979a6d83cd9392ccaefac7790d2916
5871
}
5972

6073
public static function table(Table $table): Table
@@ -119,7 +132,7 @@ public static function getPages(): array
119132
public static function getWidgets(): array
120133
{
121134
return [
122-
StatsOverviewWidget::class
135+
StatsOverviewWidget::class,
123136
];
124137
}
125138
}

src/Resources/UserResource/Pages/ViewUser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function getHeaderActions(): array
2424
return [
2525
Actions\ActionGroup::make([
2626
Actions\Action::make('send_verify_user_email')
27-
->visible(fn($record) => $record->isVerified() === false)
27+
->visible(fn ($record) => $record->isVerified() === false)
2828
->label(__('Send Verification Email'))
2929
->action(function ($record) {
3030
$notification = new VerifyEmail;
@@ -43,6 +43,7 @@ protected function getHeaderActions(): array
4343
$user = $this->record;
4444
/**
4545
* Broker
46+
*
4647
* @var \Illuminate\Auth\Passwords\PasswordBroker $broker
4748
*/
4849
$broker = app('auth.password.broker');
@@ -59,7 +60,6 @@ protected function getHeaderActions(): array
5960
->icon(false)
6061
->dropdownPlacement('bottom'),
6162

62-
6363
Actions\EditAction::make(),
6464
];
6565
}

0 commit comments

Comments
 (0)