groups and roles
This commit is contained in:
1 parent
f82d3f59e0
commit
0b78ea4d03
21 files changed
+412
-27
No files matched your search
@@ -2,8 +2,11 @@
|
||||
|
||||
namespace App\Filament\Resources\Users\Schemas;
|
||||
|
||||
use App\Filament\Resources\Groups\GroupResource;
|
||||
use App\Filament\Resources\Groups\Schemas\GroupForm;
|
||||
use Filament\Forms\Components\Checkbox;
|
||||
use Filament\Forms\Components\DateTimePicker;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
@@ -20,10 +23,23 @@ class UserForm
|
||||
->email()
|
||||
->required(),
|
||||
DateTimePicker::make('email_verified_at'),
|
||||
Checkbox::make('ordermanager'),
|
||||
TextInput::make('password')
|
||||
->password()
|
||||
->required(),
|
||||
->required()
|
||||
->visibleOn(['create']),
|
||||
Select::make('roles')
|
||||
->relationship('roles', 'title')
|
||||
->label('Rollen')
|
||||
->preload()
|
||||
->multiple(),
|
||||
Select::make('groups')
|
||||
->relationship('groups', 'name')
|
||||
->label('Gruppen')
|
||||
->preload()
|
||||
->createOptionForm(function(Schema $schema) {
|
||||
return GroupForm::configure($schema);
|
||||
})
|
||||
->multiple(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,10 @@ class UserInfolist
|
||||
TextEntry::make('name'),
|
||||
TextEntry::make('email')
|
||||
->label('Email address'),
|
||||
TextEntry::make('groups.title')
|
||||
->label('Gruppen'),
|
||||
TextEntry::make('roles.title')
|
||||
->label('Rollen'),
|
||||
TextEntry::make('email_verified_at')
|
||||
->dateTime()
|
||||
->placeholder('-'),
|
||||
|
||||
Reference in new issue
Block a user