@extends('admin.layouts.layout', $headerOption) @section('content')
{{-- Toolbar --}}
Viewing {{ $totalForms }} Web Form{{ $totalForms !== 1 ? 's' : '' }}
{{-- Group filter --}} {{-- Search + Gear icon --}}
{{-- Gear / settings icon (WF_016) --}} @if($search) @endif
{{-- Table --}} @php $wfSortLink = function(string $col, string $label, string $curSort, string $curDir): string { $nextDir = ($curSort === $col && $curDir === 'asc') ? 'desc' : 'asc'; $icon = $curSort === $col ? ($curDir === 'asc' ? '' : '') : ''; $url = request()->fullUrlWithQuery(['sort_by' => $col, 'sort_dir' => $nextDir, 'page' => 1]); return '' . e($label) . $icon . ''; }; @endphp
@forelse($forms as $form) @empty @endforelse
{!! $wfSortLink('name', 'Form Name', $sortBy, $sortDir) !!} {!! $wfSortLink('group_name', 'Group', $sortBy, $sortDir) !!} {!! $wfSortLink('form_sender_name','Form Sender', $sortBy, $sortDir) !!} E-Sign Docs Status {!! $wfSortLink('created_by_name', 'Created By', $sortBy, $sortDir) !!} {!! $wfSortLink('created_at', 'Created At', $sortBy, $sortDir) !!} {!! $wfSortLink('updated_at', 'Updated At', $sortBy, $sortDir) !!} Actions
{{ $form->name }} {{ $form->group_name ?: '—' }} {{ $form->form_sender_name ?: 'N/A' }} @forelse($form->esignMaps as $map) @if($map->document) {{ $map->document->title }} @endif @empty None @endforelse @if($form->status) Active @else Inactive @endif {{ $form->created_by_name ?: 'N/A' }} {{ $form->created_at ? $form->created_at->format('M d, Y') : '—' }} {{ $form->updated_at ? $form->updated_at->format('M d, Y') : '—' }}
{{-- View Sample Form (WF_019 / WF_020 / WF_033) --}} {{-- Share --}} {{-- Settings (WF_034) — icon changed from bx-edit to bx-cog --}} {{-- Form Builder --}} {{-- Duplicate --}} {{-- Delete --}}

@if($search) No web forms match “{{ $search }}”. Clear search @elseif($groupId) No web forms in the selected group. @else No web forms found. Create your first form or create a group. @endif

{{-- Pagination footer --}}
@if($forms->total() > 0) Showing {{ $forms->firstItem() }}–{{ $forms->lastItem() }} of {{ $forms->total() }} result{{ $forms->total() !== 1 ? 's' : '' }} @else No results @endif {{ $forms->links('pagination::bootstrap-5') }}
@endsection @push('page_script') @endpush