Edit Agency

Update agency information and manage staff assignments

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf @method('PUT')

Agency Information

@error('name')

{{ $message }}

@enderror

Agency code cannot be changed

@error('phone')

{{ $message }}

@enderror
@error('agent_type')

{{ $message }}

@enderror

Address Information

Status & Onboarding

is_active) ? 'checked' : '' }} class="rounded border-gray-300 text-green-600 focus:ring-green-500 w-5 h-5">
is_onboarded) ? 'checked' : '' }} class="rounded border-gray-300 text-teal-600 focus:ring-teal-500 w-5 h-5">
is_flynas_onboarded) ? 'checked' : '' }} class="rounded border-gray-300 text-blue-600 focus:ring-blue-500 w-5 h-5">
Cancel

Assigned Staff

Manage staff assignments

@if($assignedStaff->count() > 0)

Current Staff ({{ $assignedStaff->count() }})

@foreach($assignedStaff as $staff)
{{ strtoupper(substr($staff->name, 0, 1)) }}

{{ $staff->name }}

{{ $staff->email }}

@if($staff->pivot->assigned_at)

{{ \Carbon\Carbon::parse($staff->pivot->assigned_at)->format('M d, Y') }}

@endif
@csrf @method('DELETE')
@endforeach
@else

No staff assigned yet

@endif @if($availableStaff->count() > 0)

Assign New Staff

@csrf
@else

All available staff members are already assigned to this agency.

@endif
@if(isset($callHistory) && $callHistory->count() > 0)

Call History

{{ $callHistory->count() }} total calls

@foreach($callHistory as $call)
@if($call->call_status === 'picked')
@elseif($call->call_status === 'missed')
@elseif($call->call_status === 'call_back')
@elseif($call->call_status === 'declined')
@else
@endif

{{ ucfirst(str_replace('_', ' ', $call->call_status)) }}

{{ $call->user->name ?? 'Unknown' }} • {{ $call->called_at->format('M d, Y') }} • {{ $call->called_at->format('h:i A') }}

@if($call->call_duration)

Duration: {{ $call->call_duration }}s

@endif @if($call->notes)

{{ $call->notes }}

@endif @if($call->follow_up_date && !$call->follow_up_completed)

Follow-up: {{ \Carbon\Carbon::parse($call->follow_up_date)->format('M d, Y') }}

@endif
@endforeach
@endif