@php($applicationNotes->loadMissing(['admin', 'agent', 'agentRun', 'integrationExchange']))
@csrf
@forelse($applicationNotes as $note)
@if($note->source === 'n8n') Automation Automation Update @if($note->agent) — {{ $note->agent->name }}@if($note->agent->agent_code) ({{ $note->agent->agent_code }})@endif @endif @else {{ $note->admin?->name ?: __('application_detail.notes.system') }} @endif

{{ $note->body }}

@if($note->source === 'n8n')
n8n / automation @if($note->agentRun) Agent Run #{{ $note->agentRun->getKey() }} @endif @if($note->integrationExchange) {{ $note->integrationExchange->http_method }} {{ $note->integrationExchange->endpoint_path ?: $note->integrationExchange->endpoint_key }} @endif @if($note->integration_exchange_id && auth('admin')->user()?->can('automation.inspect_payload')) View Automation Request @endif
@endif
{{ __('application_detail.notes.edit') }}
@csrf @method('PATCH')
@csrf @method('DELETE')
@empty
{{ __('application_detail.empty.notes') }}
@endforelse