fix
This commit is contained in:
parent
d80b0f77c5
commit
3476d6087d
@ -19,7 +19,6 @@ class InviteLink extends Component
|
|||||||
public function viaEmail()
|
public function viaEmail()
|
||||||
{
|
{
|
||||||
$this->generate_invite_link(isEmail: true);
|
$this->generate_invite_link(isEmail: true);
|
||||||
$this->emit('message', 'Invitation sent via email successfully.');
|
|
||||||
}
|
}
|
||||||
private function generate_invite_link(bool $isEmail = false)
|
private function generate_invite_link(bool $isEmail = false)
|
||||||
{
|
{
|
||||||
@ -60,6 +59,9 @@ class InviteLink extends Component
|
|||||||
]);
|
]);
|
||||||
if ($isEmail) {
|
if ($isEmail) {
|
||||||
$user->first()->notify(new InvitationLinkEmail());
|
$user->first()->notify(new InvitationLinkEmail());
|
||||||
|
$this->emit('message', 'Invitation sent via email successfully.');
|
||||||
|
} else {
|
||||||
|
$this->emit('message', 'Invitation link generated.');
|
||||||
}
|
}
|
||||||
$this->emit('refreshInvitations');
|
$this->emit('refreshInvitations');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
@ -73,6 +75,5 @@ class InviteLink extends Component
|
|||||||
public function inviteByLink()
|
public function inviteByLink()
|
||||||
{
|
{
|
||||||
$this->generate_invite_link();
|
$this->generate_invite_link();
|
||||||
$this->emit('message', 'Invitation link generated.');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user