Skip to content

Commit 735f08b

Browse files
wip
1 parent d1b1896 commit 735f08b

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

src/Resources/UserResource/Schemas/UserForm.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,40 @@ public static function configure(Schema $schema): Schema
3636

3737
TextInput::make('email')
3838
->label(__('Email'))
39-
->prefixIcon(fn (): BackedEnum => Heroicon::Envelope, true)
39+
->prefixIcon(fn(): BackedEnum => Heroicon::Envelope, true)
4040
->email()
4141
->required(),
4242

4343
Select::make('roles')
4444
->label(__('Roles'))
45-
->visible(fn (Page $livewire): bool => $livewire instanceof CreateRecord)
46-
->relationship(titleAttribute: fn (): string => 'name')
47-
->prefixIcon(fn (): BackedEnum => RoleResource::getActiveNavigationIcon(), true)
48-
->prefixIconColor(fn (): string => 'primary')
45+
->visible(fn(Page $livewire): bool => $livewire instanceof CreateRecord)
46+
->relationship(titleAttribute: fn(): string => 'name')
47+
->prefixIcon(fn(): BackedEnum => RoleResource::getActiveNavigationIcon(), true)
48+
->prefixIconColor(fn(): string => 'primary')
4949
->preload()
5050
->multiple()
5151
->required()
52-
->loadingMessage(fn (): string => __('Loading roles...'))
53-
->maxItemsMessage(fn (Select $component): string => __('You can select up to :count roles.', ['count' => $component->getMaxItems()]))
54-
->searchingMessage(fn (): string => __('Searching roles...'))
55-
->placeholder(fn (): string => __('Select roles'))
56-
->native(fn (): bool => false),
52+
->loadingMessage(fn(): string => __('Loading roles...'))
53+
->maxItemsMessage(fn(Select $component): string => __('You can select up to :count roles.', ['count' => $component->getMaxItems()]))
54+
->searchingMessage(fn(): string => __('Searching roles...'))
55+
->placeholder(fn(): string => __('Select roles'))
56+
->native(fn(): bool => false),
5757

5858
TextInput::make('password')
5959
->password()
60-
->hidden(fn (TextInput $component): bool => $component->getLivewire() instanceof CreateRecord)
61-
->prefixIcon(fn (): BackedEnum => Heroicon::LockClosed, true)
62-
->revealable(),
60+
->hidden(fn(TextInput $component): bool => $component->getLivewire() instanceof CreateRecord)
61+
->prefixIcon(fn(): BackedEnum => Heroicon::LockClosed, true)
62+
->revealable()
63+
->inlinePrefix()
64+
->inlineSuffix()
6365
])
6466
->columns(2)
6567
->columnSpanFull(),
6668
])
6769
->columnSpan(6),
6870

6971
Fieldset::make()
70-
->hidden(fn (Fieldset $component): bool => $component->getLivewire() instanceof CreateRecord)
72+
->hidden(fn(Fieldset $component): bool => $component->getLivewire() instanceof CreateRecord)
7173
->schema([
7274
Section::make(__('Email verification'))
7375
->description(__('Email verification is required for users.'))
@@ -76,8 +78,8 @@ public static function configure(Schema $schema): Schema
7678
DateTimePicker::make('email_verified_at')
7779
->label(__('Email Verified'))
7880
->live()
79-
->prefixIcon(fn (DateTimePicker $component): BackedEnum => ! $component->getState() ? Heroicon::XCircle : Heroicon::CheckCircle, true)
80-
->prefixIconColor(fn (DateTimePicker $component): string => ! $component->getState() ? 'danger' : 'success'),
81+
->prefixIcon(fn(DateTimePicker $component): BackedEnum => ! $component->getState() ? Heroicon::XCircle : Heroicon::CheckCircle, true)
82+
->prefixIconColor(fn(DateTimePicker $component): string => ! $component->getState() ? 'danger' : 'success'),
8183
])
8284
->columns(1)
8385
->columnSpanFull(),

0 commit comments

Comments
 (0)