@foreach($triggers as $t) @endforeach
Template Trigger Applies to Condition Dedupe Active
{{ $t->template?->name ?? '—' }} {{ $t->trigger_type->label() }} {{ $availableModels[$t->model_type] ?? class_basename($t->model_type ?? 'Any') }} @php $parts = []; $resolveNames = fn($ids, $map) => collect((array)$ids) ->map(fn($id) => $map[$id] ?? "#{$id}") ->implode(', '); if (!empty($t->conditions['to_status_id'])) { $parts[] = 'To: ' . $resolveNames($t->conditions['to_status_id'], $statusMap); } if (!empty($t->conditions['from_status_id'])) { $parts[] = 'From: ' . $resolveNames($t->conditions['from_status_id'], $statusMap); } if (!empty($t->conditions['tag_id'])) { $parts[] = 'Tag: ' . $resolveNames($t->conditions['tag_id'], $tagMap); } @endphp {{ implode(' · ', $parts) ?: '—' }} {{ $t->dedupe_window_minutes }}m @if($t->is_active) active @else off @endif
@if($editingId !== null)
{{ $editingId ? 'Edit trigger' : 'New trigger' }}
{{-- Contextual condition builder --}}
@if($form['trigger_type'] === 'status_changed')

From status (fires if changing from any ticked status)

@forelse($statuses as $s)
@empty No statuses configured. @endforelse

To status (fires if changing to any ticked status)

@forelse($statuses as $s)
@empty No statuses configured. @endforelse
@elseif(in_array($form['trigger_type'], ['tag_added', 'tag_removed']))
@forelse($tags as $tag)
@empty No tags configured. @endforelse
@else

No conditions are available for this trigger type — it will fire every time the event occurs.

@endif @if($showAdvancedConditions) Editing JSON directly overrides the checkboxes above when saving. @endif
Prevents duplicate messages. Default: 60.
@endif