Skip to content

Commit

Permalink
Merge pull request #407 from code4romania/399-specialist-staff-usabil…
Browse files Browse the repository at this point in the history
…ity-issue-in-the-accept-invitation-and-set-password-flow-for-the-user-added-in-more-than-1-centers

Welcome notification
  • Loading branch information
gheorghelupu17 authored Dec 12, 2024
2 parents c602cdc + 75909bb commit 7ea5fc7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 7 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ public function setFullPermission(int $organizationID): void

public function sendWelcomeNotificationInAnotherTenant(): void
{
$this->notify(new WelcomeNotificationInAnotherTenant);
if ($this->password_set_at) {
$this->notify(new WelcomeNotificationInAnotherTenant);

return;
}

$this->sendWelcomeNotification();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Illuminate\Notifications\Notification;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\HtmlString;
use Vite;

class WelcomeNotificationInAnotherTenant extends Notification
{
Expand All @@ -33,10 +32,8 @@ public function via(object $notifiable): array
*/
public function toMail(object $notifiable): MailMessage
{
// TODO: change line msg
return (new MailMessage)
->subject(__('email.organization.welcome_in_anther_tenant.subject'))
// ->line('![Logo](' . Vite::asset('resources/svg/logo.svg') . ')')
->greeting(__('email.organization.welcome_in_anther_tenant.greeting', ['name' => $notifiable->first_name]))
->line(
__('email.organization.welcome_in_anther_tenant.intro_line_1', [
Expand Down

0 comments on commit 7ea5fc7

Please sign in to comment.