@include('layouts.appheader')
@else
@php
// Ensure we can search by value even if the array has custom keys
$selectedNumberText = 'Unknown Number';
$selectedAssistantText = 'Unknown Assistant/Workflow';
// Find selected phone number
foreach ($numbers as $num) {
if (isset($num['id']) && $num['id'] === $cust_pref->phone_number_id) {
$selectedNumberText = $num['formatted'] ?? $num['number'] ?? 'Unknown Number';
break;
}
}
// Find Assistant / Workflow name
if (Str::startsWith($cust_pref->assistant_or_workflow_id, 'A_')) {
$assistantId = Str::after($cust_pref->assistant_or_workflow_id, 'A_');
foreach ($assistants as $asst) {
if ($asst['id'] === $assistantId) {
$selectedAssistantText = $asst['name'];
break;
}
}
} elseif (Str::startsWith($cust_pref->assistant_or_workflow_id, 'W_')) {
$workflowId = Str::after($cust_pref->assistant_or_workflow_id, 'W_');
foreach ($workflows as $wf) {
if ($wf['id'] === $workflowId) {
$selectedAssistantText = $wf['name'];
break;
}
}
}
@endphp
@endif
@include('layouts.flashmsg')
Google Places Business Finder
@php use Illuminate\Support\Str; @endphp
@if(empty($cust_pref))
phone_in_talk {{ $selectedNumberText }}
supervisor_account {{ $selectedAssistantText }}
@if(session('error'))
{{ session('error') }}
@endif