@php $projectOptions = $projects->mapWithKeys(fn ($project) => [$project->id => is_array($project->name) ? ($project->name['en'] ?? $project->name['ar'] ?? $project->id) : $project->name])->toArray(); $clientTypeOptions = $clientTypes->mapWithKeys(fn ($type) => [$type->id => method_exists($type, 'getTranslation') ? $type->getTranslation('name', app()->getLocale()) : (is_array($type->name) ? ($type->name[app()->getLocale()] ?? reset($type->name)) : $type->name)])->toArray(); $importanceOptions = $importanceLevels->mapWithKeys(fn ($level) => [$level->id => method_exists($level, 'getTranslation') ? $level->getTranslation('name', app()->getLocale()) : (is_array($level->name) ? ($level->name[app()->getLocale()] ?? reset($level->name)) : $level->name)])->toArray(); $activityOptions = $activities->mapWithKeys(fn ($activity) => [$activity->id => method_exists($activity, 'getTranslation') ? $activity->getTranslation('name', app()->getLocale()) : (is_array($activity->name) ? ($activity->name[app()->getLocale()] ?? reset($activity->name)) : $activity->name)])->toArray(); $hasActiveFilters = filled($filter_name) || filled($filter_project_id) || filled($filter_client_type_id) || filled($filter_importance_level_id) || filled($filter_activity_id) || filled($filter_status) || filled($filter_contract_start_from) || filled($filter_contract_end_to); @endphp
| {{ __('#') }} | {{ __('Serial') }} | {{ __('Client Name') }} | {{ __('Project') }} | {{ __('Client Type') }} | {{ __('Importance Level') }} | {{ __('Activity') }} | {{--{{ __('Company') }} | --}}{{ __('Mobile') }} | {{ __('Contacts') }} | {{ __('Reminder Days') }} | {{ __('Status') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration + ($clients->currentPage() - 1) * $clients->perPage() }} | {{ $c->client_code }} | {{ method_exists($c, 'getTranslation') ? $c->getTranslation('name', app()->getLocale()) : ($c->name ?? '') }} | {{ $c->project?->name ?? '-' }} | {{ $c->clientType?->name ?? '-' }} | {{ $c->importanceLevel?->name ?? '-' }} | {{ $c->activity?->name ?? '-' }} | {{--{{ method_exists($c, 'getTranslation') ? $c->getTranslation('company_name', app()->getLocale()) : ($c->company_name ?? '') }} | --}}{{ $c->local_mobile }} | {{ $c->contacts_count }} | {{ $c->reminder_days_before_end }} | {{ __(ucfirst($c->status)) }} |
@can("clients show")
{{ __('Show') }}
@endcan
@can("clients edit")
@endcan
@can("clients delete")
@endcan
|