From f734d9de7fc60de039b70a8ce6636d28e08932cf Mon Sep 17 00:00:00 2001 From: Michal Feher Date: Mon, 17 Apr 2023 09:23:55 +0200 Subject: [PATCH 1/2] no message --- be/app/Console/Kernel.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/be/app/Console/Kernel.php b/be/app/Console/Kernel.php index d8bc1d2..837f08a 100644 --- a/be/app/Console/Kernel.php +++ b/be/app/Console/Kernel.php @@ -15,7 +15,14 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - // $schedule->command('inspire')->hourly(); + if (env('APP_ENV') === 'stage' && env('LXC') === 1) { +// $schedule->command('karat:sync-timesheets')->everyFiveMinutes(); + $schedule->command('intranet:sync-vacations')->twiceDaily(); + $schedule->command('karat:sync-users')->daily(); + $schedule->command('karat:sync-clients')->hourly(); + $schedule->command('karat:sync-projects')->hourly(); + } + } /** From 7d45d19174791d25f19cb742558909c41b181421 Mon Sep 17 00:00:00 2001 From: Michal Feher Date: Mon, 17 Apr 2023 09:26:44 +0200 Subject: [PATCH 2/2] no message --- be/app/Listeners/SendEditedMasterTaskNotification.php | 6 ++---- be/app/Listeners/SendEditedSubTaskNotification.php | 9 +++------ be/app/Listeners/SendNewSubTaskEmailNotification.php | 3 +-- 3 files changed, 6 insertions(+), 12 deletions(-) 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 ) ); } }