@extends('admin.layouts.app') @section('title', __('admin.automations.title') . ' — ' . __('admin.brand.name')) @section('page_title', __('admin.automations.title')) @php use App\Models\Automation; /* Channel chip meta — small icon squares on each automation row. */ $channelMeta = [ 'email' => [ 'label' => __('admin.automations.channels.email'), 'fg' => '#1d4ed8', 'bg' => '#dbeafe', 'svg' => '', ], 'sms' => [ 'label' => __('admin.automations.channels.sms'), 'fg' => '#9a3412', 'bg' => '#fed7aa', 'svg' => '', ], 'whatsapp' => [ 'label' => __('admin.automations.channels.whatsapp'), 'fg' => '#15803d', 'bg' => '#bbf7d0', 'svg' => '', ], 'notification' => [ 'label' => __('admin.automations.channels.notification'), 'fg' => '#4338ca', 'bg' => '#e0e7ff', 'svg' => '', ], ]; $triggerSvg = [ 'registered_booked_meeting' => '', 'registered_no_meeting' => '', 'meeting_reminder' => '', 'committee_reminder' => '', 'committee_created' => '', 'demo_created' => '', 'demo_reminder' => '', // Check-circle — RSVP / attendance-confirmed semantic. 'demo_confirmation' => '', ]; $audiences = [Automation::AUDIENCE_INVESTOR, Automation::AUDIENCE_STARTUP]; /* All FOUR automation categories surface for BOTH audiences. The legacy `?type=new → reminder` coercion was removed when the startup audience grew its own Registrations / Creations options in 2026-06. A category that legitimately has zero rows for an audience renders an empty card rather than disappearing. `confirmation` was added 2026-06-18 to house the new attendance-RSVP triggers (demo_confirmation, future committee_confirmation, etc.). */ $types = [ 'new' => [ 'svg' => '', ], 'reminder' => [ 'svg' => '', ], 'creation' => [ 'svg' => '', ], 'confirmation' => [ // Check-circle — semantically tied to attendance/RSVP confirmation. 'svg' => '', ], ]; $rows = ($automationsByAudience[$activeAudience] ?? collect()); $rowsByType = $rows->groupBy('type'); $activeRows = ($rowsByType[$activeType] ?? collect()); @endphp @push('styles') @endpush @section('content') @include('admin.partials.flash') {{-- ── Audience tabs (Investors / Startups) ── --}}
{{-- ══ Left: automation types ══ --}}

{{ __('admin.automations.types_panel') }}

{{ count($types) }}
{{-- ══ Right: automations of the selected type ══ --}}
@endsection