mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
admin add confirm user + show original media info when not meet the standard
This commit is contained in:
@@ -45,6 +45,9 @@ class UserProfile extends Page
|
||||
if ($this->record->two_step_secret) {
|
||||
$actions[] = $this->buildDisableTwoStepAuthenticationAction();
|
||||
}
|
||||
if ($this->record->status == User::STATUS_PENDING) {
|
||||
$actions[] = $this->buildConfirmAction();
|
||||
}
|
||||
$actions[] = $this->buildResetPasswordAction();
|
||||
$actions[] = $this->buildAssignExamAction();
|
||||
$actions[] = $this->buildGrantMedalAction();
|
||||
@@ -204,6 +207,20 @@ class UserProfile extends Page
|
||||
});
|
||||
}
|
||||
|
||||
private function buildConfirmAction()
|
||||
{
|
||||
return Actions\Action::make(__('admin.resources.user.actions.confirm_btn'))
|
||||
->modalHeading(__('admin.resources.user.actions.confirm_btn'))
|
||||
->requiresConfirmation()
|
||||
->action(function () {
|
||||
$this->record->status = User::STATUS_CONFIRMED;
|
||||
$this->record->info= null;
|
||||
$this->record->save();
|
||||
$this->notify('success', 'Success!');
|
||||
$this->emitSelf(self::EVENT_RECORD_UPDATED, $this->record->id);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user