@extends('layouts.user_type.auth') @section('content')

Update Tool

Tools List
{{-- Read the $type that was passed from the route --}} {{-- @php $tool = isset($type) ? $type : request('type'); @endphp --}} {{-- If the user clicked “TransferCall” --}} @if ($tool['type'] === 'transferCall')

Update TransferCall Tool

@csrf @method('PATCH') {{-- Type (read‐only or hidden) --}}
@if (isset($toolData['id'])) @endif
@if (!empty($toolData['destinations']) && is_array($toolData['destinations'])) @foreach ($toolData['destinations'] as $index => $destination)
{{-- --}}
@endforeach @else

No destinations added. Click “Add Destination” to start.

@endif
{{-- Function Section: Name, Description, Destination Type, Destination Description --}}
Function
Messages
@if (!empty($toolData['messages']) && is_array($toolData['messages'])) @foreach ($toolData['messages'] as $index => $message) @php $condition = $message['conditions'][0] ?? []; @endphp
@endforeach @endif
{{-- If the user clicked “Google Calendar” --}} @elseif($tool['type'] === 'googleCalendar')

Google Calendar

@csrf @if (isset($toolData['id'])) @method('PATCH') @endif
{{-- If the user clicked “Google Calendar Check Availability” --}} @elseif($tool['type'] === 'googleSheet')

Update Google Sheet Tool

@csrf

No messages configured. Click “Add Message” to add your first message.

@elseif($toolData['type'] === 'google-calendar-check')

Google Calendar Check Availability Form

{{-- If the user clicked “GHL Calendar” --}} @elseif($tool['type'] === 'booking')

Update GHL Calendar

@csrf @if (isset($toolData['id'])) @method('PATCH') @endif {{-- For update --}} @if (isset($toolData['id'])) @endif
{{-- If the user clicked “Query” --}} @elseif($tool['type'] === 'query')

Update Query Tool

@csrf @if (isset($toolData['id'])) @method('PATCH') @endif
Knowledge Bases
{{-- Preload existing KBs --}} @if (isset($toolData['knowledgeBases'])) @foreach ($toolData['knowledgeBases'] as $kb)
@foreach ($kb['fileIds'] as $fileId)
@endforeach
@endforeach @endif
@if (isset($toolData['messages']) && count($toolData['messages']))

Messages loaded via JS

{{-- JS will populate --}} @else

No messages configured. Click “Add Message” to add your first message.

@endif
{{-- If the user clicked “Send Text” --}} @elseif($tool['type'] === 'send_text')

Update Send Text

@csrf

No messages configured. Click “Add Message” to add your first message.

{{-- If the user clicked “DTMF” --}} @elseif($toolData['type'] === 'dtmf')

Update DTMF Tool

Parameters

No properties configured. Click “Add Property” to add your first property.

Messages

No messages configured. Click “Add Message” to add your first message.

{{-- If the user clicked “End Call” --}} @elseif($toolData['type'] === 'end-call')

Update End Call

Parameters

No properties configured. Click “Add Property” to add your first property.

Messages

No messages configured. Click “Add Message” to add your first message.

@else
Unknown tool: “{{ $tool }}”.
Please pick a valid tool from the dropdown.
@endif
@endsection @section('script') @endsection