@php $lead = $lead ?? null; $d = $lead ? ($lead->turbo_app_data ?? []) : []; $fs = $d['fee_schedule'] ?? []; $doc = $d['docs_signing'] ?? []; $activeTab = request('tab', $lead->turbo_app_current_tab ?? 'business-info'); $steps = [ 'configuration' => [ 'label' => 'Configuration', 'icon' => 'bx-cog', 'tab' => null, 'done' => (bool) $lead, ], 'business-info' => [ 'label' => 'Business Information', 'icon' => 'bx-file-blank', 'tab' => 'business-info', 'done' => $lead && ($lead->dba || $lead->legal_name), ], 'owner-info' => [ 'label' => 'Owner Information', 'icon' => 'bx-user', 'tab' => 'owner-info', 'done' => $lead && isset($owners) && $owners->count() > 0, ], 'products-services' => [ 'label' => 'Products & Services', 'icon' => 'bx-credit-card', 'tab' => 'products-services', 'done' => !empty($d['products']), ], 'fee-schedule' => [ 'label' => 'Fee Schedule', 'icon' => 'bx-dollar-circle', 'tab' => 'fee-schedule', 'done' => !empty($fs['processing_type']), ], 'docs-signing' => [ 'label' => 'Docs & Signing', 'icon' => 'bx-pen', 'tab' => 'docs-signing', 'done' => isset($doc['send_esignature']), ], ]; $tabKeys = array_filter(array_column($steps, 'tab')); $tabKeys = array_values($tabKeys); $activeIdx = array_search($activeTab, $tabKeys); $prevTab = $activeIdx > 0 ? $tabKeys[$activeIdx - 1] : null; $nextTab = $activeIdx < count($tabKeys) - 1 ? $tabKeys[$activeIdx + 1] : null; $headerOption = \App\Http\Controllers\Controller::getHeaderOptions('', '', [], []); @endphp @extends('admin.layouts.layout', $headerOption) @push('page_css') @endpush @section('content')
{{-- ═══════════════ APP HEADER BAR ═══════════════ --}}
App ID: {{ $lead->id ?? '—' }}
DBA Name
{{ $lead->dba ?: '—' }}
Partner
{{ $lead->tsys_group ?: '—' }}
Association
{{ $lead->tsys_association ?: '—' }}
{{-- ═══════════════ BODY: FORM + SIDEBAR ═══════════════ --}}
{{-- ── Main form column ── --}}
{{-- Step sub-header --}}
{{ $steps[$activeTab]['label'] ?? '' }}
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Tab content --}}
@csrf @if($lead) @method('PUT') @endif @if($activeTab === 'business-info') @include('admin.turbo-app.partials.tabs.business-info') @elseif($activeTab === 'owner-info') @include('admin.turbo-app.partials.tabs.owner-info') @elseif($activeTab === 'products-services') @include('admin.turbo-app.partials.tabs.products-services') @elseif($activeTab === 'fee-schedule') @include('admin.turbo-app.partials.tabs.fee-schedule') @elseif($activeTab === 'docs-signing') @include('admin.turbo-app.partials.tabs.docs-signing') @endif {{-- Footer actions --}}
Save & Exit
@if($prevTab) Previous Step @else @endif @if($nextTab) @else @endif
{{-- end main form column --}} {{-- ── Application Steps Sidebar ── --}}
{{-- Sidebar header --}}
Application Steps
{{-- Steps list --}}
{{-- end sidebar --}}
{{-- end body row --}}
{{-- end project-box --}}
{{-- end col-12 --}} {{-- ═══════════════ MODALS ═══════════════ --}} @include('admin.turbo-app.partials.modals.add-owner') {{-- Re-open sidebar button (shown when sidebar is closed) --}} @endsection @push('page_script') @endpush