From 47ea415862ff758eee257e3276feca95ab0355d6 Mon Sep 17 00:00:00 2001 From: Michal Feher Date: Tue, 10 Oct 2023 15:03:12 +0200 Subject: [PATCH 1/2] pri edite mastertasku zrusit ten if ktory maze subtasky --- .../Http/Controllers/MasterTaskController.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/be/app/Http/Controllers/MasterTaskController.php b/be/app/Http/Controllers/MasterTaskController.php index 2ac4ac9..e1c90a1 100644 --- a/be/app/Http/Controllers/MasterTaskController.php +++ b/be/app/Http/Controllers/MasterTaskController.php @@ -214,17 +214,17 @@ class MasterTaskController extends Controller // pre existujuce subtasky // Pre sub tasky s natrackovaným časom - Ukončia sa sub tasky pôvodného teamu // Pre sub tasky s nenatrackovaným časom budú tieto tasky zmazané - foreach ($mastertask->subtasks as $subtask) { - if ($subtask->timesheets()->exists()) { - $subtask->is_finished = 1; - $subtask->save(); - } else { - $subtask->delete(); - } - } +// foreach ($mastertask->subtasks as $subtask) { +// if ($subtask->timesheets()->exists()) { +// $subtask->is_finished = 1; +// $subtask->save(); +// } else { +// $subtask->delete(); +// } +// } // vytvorim subtasky nanovo - $mastertask->subtasks()->createMany($request->all()['data']['employees']); +// $mastertask->subtasks()->createMany($request->all()['data']['employees']); return response()->json([ 'message' => 'Master Task updated successfully', From 4c35390e925231080a66a2962c75c3123f4557a1 Mon Sep 17 00:00:00 2001 From: Michal Feher Date: Tue, 10 Oct 2023 15:03:22 +0200 Subject: [PATCH 2/2] no message --- be/app/Console/Kernel.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/be/app/Console/Kernel.php b/be/app/Console/Kernel.php index 001b201..f531d1f 100644 --- a/be/app/Console/Kernel.php +++ b/be/app/Console/Kernel.php @@ -18,9 +18,9 @@ class Kernel extends ConsoleKernel if (env('APP_ENV') === 'stage' && env('LXC') === '1') { $schedule->command('intranet:sync-vacations')->twiceDaily(); //$schedule->command('karat:sync-users')->daily(); - $schedule->command('karat:sync-clients')->hourly(); - $schedule->command('karat:sync-projects')->hourly(); - $schedule->command('karat:sync-timesheets')->everyFiveMinutes(); + $schedule->command('karat:sync-clients')->daily(); + $schedule->command('karat:sync-projects')->daily(); + $schedule->command('karat:sync-timesheets')->daily(); } if (env('APP_ENV') === 'prod' && env('LXC') === '1') {