diff --git a/be/app/Listeners/SendEditedMasterTaskNotification.php b/be/app/Listeners/SendEditedMasterTaskNotification.php index 97737e4..fffa569 100644 --- a/be/app/Listeners/SendEditedMasterTaskNotification.php +++ b/be/app/Listeners/SendEditedMasterTaskNotification.php @@ -50,8 +50,7 @@ class SendEditedMasterTaskNotification implements ShouldQueue // znovuotvorenie tasku if ($key == 'is_finished' && $diff == 0) { foreach ( $event->mastertask->subtasks as $subtask ) { -// Mail::to( $subtask->user->email )->send( new \App\Mail\MasterTaskEdited( $event->mastertask, $difference ) ); - Mail::to( 'feher@studiotem.com' )->send( new \App\Mail\MasterTaskReopened( $event->mastertask ) ); + Mail::to( $subtask->user->email )->send( new \App\Mail\MasterTaskEdited( $event->mastertask, $difference ) ); return; } @@ -71,8 +70,7 @@ class SendEditedMasterTaskNotification implements ShouldQueue // send notification to all users foreach ( $event->mastertask->subtasks as $subtask ) { -// Mail::to( $subtask->user->email )->send( new \App\Mail\MasterTaskEdited( $event->mastertask, $difference ) ); - Mail::to( 'feher@studiotem.com' )->send( new \App\Mail\MasterTaskEdited( $event->mastertask, $difference ) ); + Mail::to( $subtask->user->email )->send( new \App\Mail\MasterTaskEdited( $event->mastertask, $difference ) ); } diff --git a/be/app/Listeners/SendEditedSubTaskNotification.php b/be/app/Listeners/SendEditedSubTaskNotification.php index ff9ac70..3313096 100644 --- a/be/app/Listeners/SendEditedSubTaskNotification.php +++ b/be/app/Listeners/SendEditedSubTaskNotification.php @@ -59,10 +59,9 @@ class SendEditedSubTaskNotification implements ShouldQueue // ukoncenie sub tasku - Pokiaľ je sub task ukončený s vyšším počtom vykázaných hodín ako bol pôvodne zadaný, posiela sa e-mailová notifikácia o tejto skutočnosti zadávateľovi master tasku (soft warning). if ($key == 'is_finished' && $diff == 1 && $event->subtask->tracked_time > $event->subtask->estimated_time) { -// $creatorEmail = User::find($event->subtask->created_by)->email; + $creatorEmail = User::find($event->subtask->created_by)->email; -// Mail::to( $creatorEmail )->send( new \App\Mail\SubTaskFinishedWithHigherTrackedTime( $event->subtask ) ); - Mail::to( 'feher@studiotem.com' )->send( new \App\Mail\SubTaskFinishedWithHigherTrackedTime( $event->subtask ) ); + Mail::to( $creatorEmail )->send( new \App\Mail\SubTaskFinishedWithHigherTrackedTime( $event->subtask ) ); } @@ -73,8 +72,6 @@ class SendEditedSubTaskNotification implements ShouldQueue return; } - // Mail::to( $subtask->user->email )->send( new \App\Mail\SubTaskEdited( $event->subtask, $difference ) ); - Mail::to( 'feher@studiotem.com' )->send( new \App\Mail\SubTaskEdited( $event->subtask, $difference ) ); - + Mail::to( $event->subtask->user->email )->send( new \App\Mail\SubTaskEdited( $event->subtask, $difference ) ); } } diff --git a/be/app/Listeners/SendNewSubTaskEmailNotification.php b/be/app/Listeners/SendNewSubTaskEmailNotification.php index 31524ab..085d6ad 100644 --- a/be/app/Listeners/SendNewSubTaskEmailNotification.php +++ b/be/app/Listeners/SendNewSubTaskEmailNotification.php @@ -29,7 +29,6 @@ class SendNewSubTaskEmailNotification implements ShouldQueue */ public function handle(SubTaskCreated $event) { -// Mail::to( $event->subtask->user->email )->send( new NewTask( $event->subtask ) ); - Mail::to( 'feher@studiotem.com' )->send( new NewTask( $event->subtask ) ); + Mail::to( $event->subtask->user->email )->send( new NewTask( $event->subtask ) ); } }