An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
chore: Refactor scheduled task view to improve code readability and maintainability
Andras Bacsai9dc3ec0bf836
diff --git a/resources/views/livewire/project/shared/scheduled-task/all.blade.php b/resources/views/livewire/project/shared/scheduled-task/all.blade.phpindex 2d8b61df2b..3ed22e5e7b 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 @@</div><div class="flex flex-wrap gap-2 pt-4">@forelse($resource->scheduled_tasks as $task)- <a class="flex flex-col box"- @if ($resource->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- <div><span class="font-bold dark:text-warning">{{ $task->name }}<span>+ @if ($resource->type() == 'application')+ <a class="box"+ href="{{ route('project.application.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}">+ <span class="flex flex-col">+ <span class="font-bold">{{ $task->name }}</span>+ <span>Frequency: {{ $task->frequency }}</span>+ <span>Last run: {{ data_get($task->latest_log, 'status', 'No runs yet') }}+ </span>+ </span>+ </a>+ @elseif ($resource->type() == 'service')+ <a class="box"+ href="{{ route('project.service.scheduled-tasks', [...$parameters, 'task_uuid' => $task->uuid]) }}">+ <span class="flex flex-col">+ <span class="font-bold">{{ $task->name }}</span>+ <span>Frequency: {{ $task->frequency }}</span>+ <span>Last run: {{ data_get($task->latest_log, 'status', 'No runs yet') }}+ </span>+ </span>+ </a>+ @endif+ @empty+ <div>No scheduled tasks configured.</div>+ @endforelse</div>- <div>Frequency: {{ $task->frequency }}</div>- <div>Last run: {{ data_get($task->latest_log, 'status', 'No runs yet') }}</div>- </a>-@empty- <div>No scheduled tasks configured.</div>- @endforelse-</div></div>