@extends('layouts.portal') @section('title', 'Automations') @section('subtitle', 'When something happens, these steps run in order — receipts, reminders, certificates, alerts. Switch steps on or off and edit their emails here.') @section('actions') Run log
@csrf
@endsection @section('content') @if($failed)
{{ $failed }} step(s) failed in the last 7 days. Open the run log to see why.
@endif
Dark-numbered steps are core: they keep money and credentials correct and always run. Reminder timing: {{ implode(', ', config('infotics.installments.reminder_days_before')) }} day(s) before each due date; overdue notices repeat every {{ config('infotics.installments.overdue_repeat_days') }} days (scheduler, daily 09:05).
@foreach($events as $key => [$label, $desc]) @php($list = $rules[$key] ?? collect())

{{ $label }}

{{ $desc }} {{ $key }}
@forelse($list as $n => $r) @php($st = $stats[$r->id] ?? collect())
{{ $n + 1 }}
{{ $r->name }}
{{ $actions[$r->action][0] ?? $r->action }}@if($r->config['template'] ?? null) · template “{{ $templates[$r->config['template']] ?? $r->config['template'] }}”@endif @if($r->config['to'] ?? null) · to {{ $r->config['to'] }}@endif · 30d: {{ $st->firstWhere('status', 'ok')->c ?? 0 }} ok @if($st->firstWhere('status', 'failed')) · {{ $st->firstWhere('status', 'failed')->c }} failed@endif
@if($r->is_core)Core · always on@else @if(in_array($r->action, ['send_template', 'notify_admin', 'log'], true))@endif
@csrf
@endif
@if(! $r->is_core && in_array($r->action, ['send_template', 'notify_admin', 'log'], true)) @endif @empty
No steps yet.
@endforelse
@endforeach
@endsection