mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
no message
This commit is contained in:
1 parent
7964753a83
commit
0701a413fa
1 file changed
+11
-10
@@ -32,16 +32,17 @@ class SendNewSubTaskEmailNotification implements ShouldQueue
|
||||
public function handle(SubTaskCreated $event)
|
||||
{
|
||||
// ked je v subtasku viacej userov, tak poslem 1 email notifikaciu so vsetkymi usermi, ktori su v master tasku
|
||||
if (count($event->subtask->mastertask->subtasks) > 1) {
|
||||
$emails = $event->subtask->mastertask->all_users_in_master_task->pluck('email')->unique()->toArray();
|
||||
|
||||
if (empty($emails)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Mail::to($emails)->send(new NewTask($event->subtask));
|
||||
} else {
|
||||
// if (count($event->subtask->mastertask->subtasks) > 1) {
|
||||
// $emails = $event->subtask->mastertask->all_users_in_master_task->pluck('email')->unique()->toArray();
|
||||
//
|
||||
// if (empty($emails)) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// Mail::to($emails)->send(new NewTask($event->subtask));
|
||||
// } else {
|
||||
// Mail::to($event->subtask->user->email)->send(new NewTask($event->subtask));
|
||||
// }
|
||||
Mail::to($event->subtask->user->email)->send(new NewTask($event->subtask));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user