feat:add name field to onboarding flow
This commit is contained in:
+1
-1
@@ -360,7 +360,7 @@
|
||||
|
||||
"Hey again!": "Hey again!",
|
||||
"Before you can get started with Investbrain, let's complete your profile:": "Before you can get started with Investbrain, let's complete your profile:",
|
||||
"Create Password": "Create Password",
|
||||
"Get Started": "Get Started",
|
||||
|
||||
"You do not have access to that portfolio.": "You do not have access to that portfolio.",
|
||||
"Import starting...": "Import starting...",
|
||||
|
||||
+1
-1
@@ -360,7 +360,7 @@
|
||||
|
||||
"Hey again!": "¡Oye de nuevo!",
|
||||
"Before you can get started with Investbrain, let's complete your profile:": "Antes de poder comenzar a utilizar Investbrain, deberá crear una cuenta:",
|
||||
"Create Password": "Crear Contraseña",
|
||||
"Get Started": "Crear Contraseña",
|
||||
|
||||
"You do not have access to that portfolio.": "No tienes acceso a ese portafolio.",
|
||||
"Import starting...": "Iniciando la importación...",
|
||||
|
||||
@@ -12,6 +12,9 @@ new class extends Component {
|
||||
public Portfolio $portfolio;
|
||||
public User $user;
|
||||
|
||||
#[Rule('required|string')]
|
||||
public string $name;
|
||||
|
||||
#[Rule('required|string|min:8|confirmed')]
|
||||
public string $password;
|
||||
|
||||
@@ -19,11 +22,17 @@ new class extends Component {
|
||||
public string $password_confirmation;
|
||||
|
||||
// methods
|
||||
public function updatePassword()
|
||||
public function mount()
|
||||
{
|
||||
$this->name = $this->user->name;
|
||||
}
|
||||
|
||||
public function updateUserInformation()
|
||||
{
|
||||
|
||||
$this->validate();
|
||||
|
||||
$this->user->name = $this->name;
|
||||
$this->user->password = Hash::make($this->password);
|
||||
$this->user->email_verified_at = now();
|
||||
$this->user->save();
|
||||
@@ -35,11 +44,16 @@ new class extends Component {
|
||||
|
||||
}; ?>
|
||||
|
||||
<x-form wire:submit="updatePassword" class="">
|
||||
<x-form wire:submit="updateUserInformation" class="">
|
||||
|
||||
<div class="mt-2">
|
||||
|
||||
<x-input wire:model="password" label="{{ __('Password') }}" class="block mt-1 w-full" type="password" required autocomplete="new-password" autofocus />
|
||||
<x-input wire:model="name" label="{{ __('Name') }}" class="block mt-1 w-full" required autofocus />
|
||||
</div>
|
||||
|
||||
<div class="mt-2">
|
||||
|
||||
<x-input wire:model="password" label="{{ __('Password') }}" class="block mt-1 w-full" type="password" required autocomplete="new-password" />
|
||||
</div>
|
||||
|
||||
<div class="mt-2">
|
||||
@@ -50,7 +64,7 @@ new class extends Component {
|
||||
<div class="flex items-center justify-end mt-2">
|
||||
|
||||
<x-button class="btn-primary" type="submit">
|
||||
{{ __('Create Password') }}
|
||||
{{ __('Get Started') }}
|
||||
</x-button>
|
||||
</div>
|
||||
</x-form>
|
||||
Reference in New Issue
Block a user