@php $platformMeta = \App\Services\UserDashboardMetrics::PLATFORM_META; $chip = function (string $key) use ($platformMeta) { [$label, $color, $short] = $platformMeta[$key] ?? [ucfirst($key), '#64748b', strtoupper(substr($key, 0, 2))]; return compact('label', 'color', 'short'); }; $statusChip = [ 'running' => 'bg-green-500/15 text-green-400', 'paused' => 'bg-amber-500/15 text-amber-400', 'draft' => 'bg-slate-500/15 text-slate-400', ]; $capText = $cap === null ? '∞' : number_format($cap); @endphp
{{-- Title row --}}

Automation

Publishing workflows that repost content from one platform to another.

{{-- KPI strip --}}
{{ $counts['running'] }}
Active automations
{{ $counts['all'] }} / {{ $capText }}
Workflow slots used
{{ number_format($usage->scheduled ?? 0) }}
Scheduled posts
{{ number_format($usage->queue ?? 0) }}
Jobs in queue
{{-- List --}}
{{-- Toolbar --}}
@foreach (['all' => 'All', 'running' => 'Active', 'paused' => 'Paused', 'draft' => 'Drafts'] as $key => $label) @endforeach
@if ($rows->count()) {{-- Header (desktop) --}}
@foreach ($rows as $a) @php($src = $chip($a->source_platform)) @php($dst = $chip($a->target_platform))
{{-- Name + route --}}
{{ $a->name }}
{{ $src['short'] }} {{ $src['label'] }} {{ $dst['short'] }} {{ $dst['label'] }}
{{-- Frequency --}}
{{ $a->frequencyLabel() }}
{{-- Posts --}}
{{ number_format($a->posts_published) }}
{{-- Success --}}
{{ $a->success_rate === null ? '—' : rtrim(rtrim(number_format($a->success_rate, 2), '0'), '.').'%' }}
{{-- Status --}}
@if ($a->isRunning())@endif {{ ucfirst($a->status) }}
{{ $a->last_run_at ? 'Ran '.$a->last_run_at->diffForHumans() : 'Not run yet' }}
{{-- Actions --}}
@endforeach
@if ($rows->hasPages())
{{ $rows->links('pagination.dark') }}
@endif @else
@if ($counts['all'] === 0)

No automations yet

Create your first workflow to repost content from one platform to another automatically.

@else

Nothing matches

No automations match your search or filter.

@endif
@endif

Automations run through the CC Publisher desktop app — changes here apply on its next sync, and run stats appear once it reports back.

{{-- Create modal --}} @if ($showCreate)

New automation

@error('name')

{{ $message }}

@enderror
@error('sourcePlatform')

{{ $message }}

@enderror
@error('targetPlatform')

{{ $message }}

@enderror
{{-- Route preview --}} @php($src = $chip($sourcePlatform)) @php($dst = $chip($targetPlatform))
{{ $src['short'] }} {{ $src['label'] }} {{ $dst['short'] }} {{ $dst['label'] }}
@error('frequency')

{{ $message }}

@enderror

The automation starts as Active and begins publishing on your desktop app's next sync.

@endif