@lang('edit') @lang('timeline_filter'): {{ $timelineFilter->name }}

@isset($breadcrumbs) @endisset
@csrf @method('PUT')
private) ? 'checked' : '' }} class="h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500">
@php $recordTypes = ['employee' => 'Employee Filters', 'project' => 'Project Filters', 'projecttask' => 'Project Task Filters']; @endphp @foreach($recordTypes as $recordType => $sectionTitle)

{{ $sectionTitle }}

@php $hasFilters = false; $allFields = collect(); // Add list fields if (isset($customLists[$recordType])) { $customLists[$recordType]->each(function($field) use (&$allFields) { $allFields->push($field); }); } // Add record and text fields if (isset($customRecordFields[$recordType])) { $customRecordFields[$recordType]->each(function($field) use (&$allFields) { $allFields->push($field); }); } @endphp @if($allFields->isNotEmpty()) @foreach($allFields as $field) @php $fieldScriptId = $field->field_scriptid; $contentType = $field->content_type ?? 'list'; $formFieldKey = "{$recordType}_{$contentType}_{$fieldScriptId}"; $matchingFilter = collect($existingFilters)->first(function($filter) use ($fieldScriptId, $recordType, $contentType) { return $filter['field_scriptid'] === $fieldScriptId && $filter['record_type'] === $recordType && ($filter['content_type'] ?? 'list') === $contentType; }); $isEnabled = $matchingFilter !== null; $selectedValues = $isEnabled ? ($matchingFilter['selected_values'] ?? []) : []; @endphp

{{ $field->title ?? $field->label ?? $fieldScriptId }} ({{ ucfirst($contentType) }})

@if($contentType === 'record' && isset($field->references))

References: {{ $field->references }}

@endif
@if($contentType === 'list' && isset($field->listItems) && count($field->listItems) > 0)

Pre-select options (optional):

@foreach($field->listItems as $item)
refid, $selectedValues ?? []) ? 'checked' : '' }}>
@endforeach
@elseif($contentType === 'record')

@if($contentType === 'text') This is a text field. Users will be able to search for text content using fuzzy matching. @else This is a dynamic record reference field. Users will be able to search and select from {{ $field->references }} records when using this filter. @endif

@elseif($contentType === 'text')

This is a text field. Users will be able to search for text content using fuzzy matching.

@endif @if($contentType === 'list') @endif @if($contentType === 'record') @endif
@endforeach @else

No {{ strtolower($sectionTitle) }} available

@endif
@endforeach
Cancel