@extends('layouts.cp') @section('title', 'Jobs') @section('content') @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Add Job --}}

Add Job

@csrf
{{-- Job List --}}
@forelse($jobs as $jobName => $envJobs)
{{-- Job Header --}}

{{ $jobName }}

@if($envJobs->first()->description)

{{ $envJobs->first()->description }}

@endif
{{-- Delete entire job --}}
@csrf @method('DELETE')
{{-- Per-environment cards --}}
@foreach($envJobs as $job)
{{ $job->environment }} {{ $job->is_enabled ? 'ON' : 'OFF' }}
{{-- Toggle --}}
@csrf @method('PATCH')
{{-- Last Run Info --}} @if($job->last_run_at)

Last run: {{ $job->last_run_at->format('d M Y H:i') }}

@if($job->last_run_status) {{ ucfirst($job->last_run_status) }} @endif @if($job->last_run_note)

{{ $job->last_run_note }}

@endif
@else

Never run

@endif
@endforeach
@empty

No jobs configured.

@endforelse
@endsection