@extends('admin.layouts.app')
@section('title', __('admin.agents.approvals.title') . ' - ' . __('admin.brand.name'))
@section('page_title', __('admin.agents.approvals.title'))
@push('styles')
@endpush
@section('content')
@php
$clean = static function ($value) {
$value = trim((string) $value);
return $value === '' || in_array($value, ['-', '—', '—', 'â€â€'], true) ? null : $value;
};
$readable = static function ($value) use ($clean) {
$value = $clean($value);
return $value === null ? 'Not set' : \Illuminate\Support\Str::of($value)->replace(['_', '-'], ' ')->headline()->toString();
};
@endphp
@if (session('status'))
{{ session('status') }}
@endif
@if (session('error'))
{{ session('error') }}
@endif
Human review for Agent actions
An item appears here when an Agent proposes an action whose policy is Needs approval. Review the requested change before allowing it to execute.
1. Open request→
2. Review change→
3. Approve or reject
{{ number_format($approvals->total()) }} request(s) in this viewOpen a pending request to make the decision.
@if ($approvals->isEmpty())
No approval requests found
Change the status or date filters to view a different set of requests.
@else
| Request | Subject / Application | Agent | Requested change | Risk | Status | Decision |
@foreach ($approvals as $approval)
@php
$isInvestor = $approval->investor_id !== null;
$subjectName = $isInvestor
? ($approval->investor?->full_name_en ?: $approval->investor?->full_name_ar ?: '#'.$approval->investor_id)
: ($approval->startup?->name ?: '#'.$approval->startup_id);
$applicationNumber = $isInvestor ? $approval->investorApplication?->application_number : $approval->startupApplication?->round_number;
$applicationId = $isInvestor ? $approval->investor_application_id : $approval->startup_investment_round_id;
$from = $readable($approval->current_group ?: $approval->current_status);
$to = $readable($approval->proposed_group ?: $approval->proposed_status ?: $approval->proposed_action);
@endphp
| #{{ $approval->id }} {{ optional($approval->created_at)->format('d M Y, H:i') ?: 'No date' }} Run #{{ $approval->agent_run_id }} |
{{ $subjectName }} {{ $isInvestor ? 'Investor' : 'Startup' }} application {{ $applicationNumber ? '#'.$applicationNumber : '' }} · ID {{ $applicationId ?: 'N/A' }} |
{{ $approval->agent?->name ?? $approval->agent_key }} {{ $approval->agent?->agent_code ?? $approval->agent_key }} |
Current{{ $from }} → Proposed{{ $to }} Operation: {{ $approval->action_key }} |
{{ ucfirst($approval->risk_level) }} |
{{ ucfirst($approval->status) }} |
{{ $approval->isPending() ? 'Review & decide' : 'View details' }} |
@endforeach
@endif
@if ($approvals->hasPages())@endif
@endsection