feat:add name field to onboarding flow
This commit is contained in:
+1
-1
@@ -360,7 +360,7 @@
|
|||||||
|
|
||||||
"Hey again!": "Hey again!",
|
"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:",
|
"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.",
|
"You do not have access to that portfolio.": "You do not have access to that portfolio.",
|
||||||
"Import starting...": "Import starting...",
|
"Import starting...": "Import starting...",
|
||||||
|
|||||||
+1
-1
@@ -360,7 +360,7 @@
|
|||||||
|
|
||||||
"Hey again!": "¡Oye de nuevo!",
|
"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:",
|
"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.",
|
"You do not have access to that portfolio.": "No tienes acceso a ese portafolio.",
|
||||||
"Import starting...": "Iniciando la importación...",
|
"Import starting...": "Iniciando la importación...",
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ new class extends Component {
|
|||||||
public Portfolio $portfolio;
|
public Portfolio $portfolio;
|
||||||
public User $user;
|
public User $user;
|
||||||
|
|
||||||
|
#[Rule('required|string')]
|
||||||
|
public string $name;
|
||||||
|
|
||||||
#[Rule('required|string|min:8|confirmed')]
|
#[Rule('required|string|min:8|confirmed')]
|
||||||
public string $password;
|
public string $password;
|
||||||
|
|
||||||
@@ -19,11 +22,17 @@ new class extends Component {
|
|||||||
public string $password_confirmation;
|
public string $password_confirmation;
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
public function updatePassword()
|
public function mount()
|
||||||
|
{
|
||||||
|
$this->name = $this->user->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateUserInformation()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->validate();
|
$this->validate();
|
||||||
|
|
||||||
|
$this->user->name = $this->name;
|
||||||
$this->user->password = Hash::make($this->password);
|
$this->user->password = Hash::make($this->password);
|
||||||
$this->user->email_verified_at = now();
|
$this->user->email_verified_at = now();
|
||||||
$this->user->save();
|
$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">
|
<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>
|
||||||
|
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
@@ -50,7 +64,7 @@ new class extends Component {
|
|||||||
<div class="flex items-center justify-end mt-2">
|
<div class="flex items-center justify-end mt-2">
|
||||||
|
|
||||||
<x-button class="btn-primary" type="submit">
|
<x-button class="btn-primary" type="submit">
|
||||||
{{ __('Create Password') }}
|
{{ __('Get Started') }}
|
||||||
</x-button>
|
</x-button>
|
||||||
</div>
|
</div>
|
||||||
</x-form>
|
</x-form>
|
||||||
Reference in New Issue
Block a user