fix change user class + medal display

This commit is contained in:
xiaomlove
2023-01-10 17:25:53 +08:00
parent 3612edbb5b
commit d7d63c8fd2
20 changed files with 249 additions and 16 deletions

View File

@@ -160,7 +160,7 @@ class UserProfile extends ViewRecord
->hidden(fn (\Closure $get) => $get('field') != 'tmp_invites')
,
Forms\Components\Textarea::make('reason')
Forms\Components\TextInput::make('reason')
->label(__('admin.resources.user.actions.change_bonus_etc_reason_label'))
,
])
@@ -365,7 +365,7 @@ class UserProfile extends ViewRecord
->label(__('admin.resources.user.actions.change_class_btn'))
->form([
Forms\Components\Select::make('class')
->options(User::listClass())
->options(User::listClass(User::CLASS_PEASANT, Auth::user()->class - 1))
->default($this->record->class)
->label(__('user.labels.class'))
->required()