@extends('layouts.dashboard') @section('content') @php /** * Admin → Automated drips → one sequence's steps: the ordered messages and the wait before each. * * The step names a template key, so the words themselves are written in the Email templates * editor. A step whose template is switched off is called out here, because that is the one * misconfiguration that makes a live sequence queue nothing while looking healthy. * * @var array $seq the sequence being edited * @var array $steps its steps, in order, with the template's name + is_active * @var array $templates every email template, for the picker */ $seq = $seq ?? []; $steps = $steps ?? []; $templates = $templates ?? []; $seqId = (int) ($seq['id'] ?? 0); $nextOrder = $steps ? ((int) end($steps)['step_order'] + 1) : 1; @endphp @php /* .qm-d2: the dashboard density standard (app.css §35) */ @endphp

{{ t_raw('admin.drip.steps_heading') }}

{{ t_raw('admin.drip.trigger_' . e((string) ($seq['trigger_type'] ?? 'lapsed'))) }} · {{ t_raw('admin.drip.trigger_days_cell', [':days' => (int) ($seq['trigger_days'] ?? 0)]) }}

{{ t_raw('common.back') }}
@if ($steps) @foreach ($steps as $st) @php $order = (int) $st['step_order']; @endphp @endforeach @else @partial('table-empty', ['colspan' => 4, 'icon' => 'fa-list-ol', 'msg' => t('admin.drip.steps_empty')]) @endif
{{ t_raw('admin.drip.steps_heading') }}
{{ t_raw('admin.drip.col_step') }} {{ t_raw('admin.drip.col_wait') }} {{ t_raw('admin.drip.col_message') }} {{ t_raw('common.actions') }}
{{ $order }} {!! (int) $st['delay_days'] === 0 ? t('admin.drip.wait_immediate') : t('admin.drip.wait_days', [':days' => (int) $st['delay_days']]) !!} @if (!empty($st['template_name'])) {{ (string) $st['template_name'] }} @if ((int) ($st['template_active'] ?? 0) !== 1)
{{ t_raw('admin.drip.warn_template_off') }}
@endif @else {{ (string) $st['template_key'] }}
{{ t_raw('admin.drip.warn_template_missing') }}
@endif
@csrf

{{ t_raw('admin.drip.step_add_heading') }}

@csrf
@php /* /.qm-d2 */ @endphp @endsection