From 9dc3ec0bf8361bc45efe8ae8e291c31f8aa0441f Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 14 May 2024 12:45:21 +0200 Subject: [PATCH] chore: Refactor scheduled task view to improve code readability and maintainability --- .../shared/scheduled-task/all.blade.php | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/resources/views/livewire/project/shared/scheduled-task/all.blade.php b/resources/views/livewire/project/shared/scheduled-task/all.blade.php index 2d8b61df2..3ed22e5e7 100644 --- a/resources/views/livewire/project/shared/scheduled-task/all.blade.php +++ b/resources/views/livewire/project/shared/scheduled-task/all.blade.php @@ -7,17 +7,29 @@
@forelse($resource->scheduled_tasks as $task) - type() == 'application') href="{{ route('project.application.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}"> - @elseif ($resource->type() == 'service') - href="{{ route('project.service.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}"> @endif -
{{ $task->name }} + @if ($resource->type() == 'application') + + + {{ $task->name }} + Frequency: {{ $task->frequency }} + Last run: {{ data_get($task->latest_log, 'status', 'No runs yet') }} + + + + @elseif ($resource->type() == 'service') + + + {{ $task->name }} + Frequency: {{ $task->frequency }} + Last run: {{ data_get($task->latest_log, 'status', 'No runs yet') }} + + + + @endif + @empty +
No scheduled tasks configured.
+ @endforelse
-
Frequency: {{ $task->frequency }}
-
Last run: {{ data_get($task->latest_log, 'status', 'No runs yet') }}
- -@empty -
No scheduled tasks configured.
- @endforelse -