fix
This commit is contained in:
parent
d80b0f77c5
commit
3476d6087d
1 changed files with 3 additions and 2 deletions
|
|
@ -19,7 +19,6 @@ public function mount()
|
|||
public function viaEmail()
|
||||
{
|
||||
$this->generate_invite_link(isEmail: true);
|
||||
$this->emit('message', 'Invitation sent via email successfully.');
|
||||
}
|
||||
private function generate_invite_link(bool $isEmail = false)
|
||||
{
|
||||
|
|
@ -60,6 +59,9 @@ private function generate_invite_link(bool $isEmail = false)
|
|||
]);
|
||||
if ($isEmail) {
|
||||
$user->first()->notify(new InvitationLinkEmail());
|
||||
$this->emit('message', 'Invitation sent via email successfully.');
|
||||
} else {
|
||||
$this->emit('message', 'Invitation link generated.');
|
||||
}
|
||||
$this->emit('refreshInvitations');
|
||||
} catch (\Throwable $e) {
|
||||
|
|
@ -73,6 +75,5 @@ private function generate_invite_link(bool $isEmail = false)
|
|||
public function inviteByLink()
|
||||
{
|
||||
$this->generate_invite_link();
|
||||
$this->emit('message', 'Invitation link generated.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue