@cannot('sale_expert')
|
|
@if ($item->status == 'pending')
@endif
|
@endcannot
{{ ++$key }} |
{{ $item->name ?? '---' }} |
{{ $item->family ?? '---' }} |
{{ $item->phone_number }} |
{{ collect(json_decode($item->majors, true))->unique()->map(fn($major) => $major === 'sayer' ? 'سایر' : ($majors[$major] ?? $major))->implode(', ') ?: '---' }}
@if($item->custom_major)
({{ $item->custom_major }})
@endif
|
{{ $item->type == 0 ? '---' : $item->type }} |
{{ $item->expert ? $item->expert->FullName : '---' }} |
{{-- --}}
{{-- @if($item->user)--}}
{{-- {{ $item->user->is_farhangian == 1 ? 'تایید شده' : 'تایید نشده' }}--}}
{{-- @else--}}
{{-- تایید نشده--}}
{{-- @endif--}}
{{-- | --}}
{{-- @can('admin')--}}
{{-- --}}
{{-- {{ $item->farhangian_done ? 'انجام شده' : 'انجام نشده' }}--}}
{{-- | --}}
{{-- @endcan--}}
{{ phoneStatusTitle($item) }}
|
@php
$lastHistory = $item->history()->latest()->first();
$descReason = $lastHistory ? ($lastHistory->reason_title ?: '') : '';
$descDescription = $lastHistory ? $lastHistory->reason_description : '';
$descOpt = $lastHistory ? $lastHistory->description : '';
@endphp
@if($lastHistory && ($lastHistory->reason_title ?? null))
{{ Str::limit($lastHistory->reason_title, 30) }}
@else
---
@endif
|
@if($descDescription || $descOpt)
{{ $descDescription ? Str::limit($descDescription, 30, '...') : Str::limit($descOpt, 30, '...') }}
@else
---
@endif
|
{{ verta($item->created_at)->format('H:i Y/m/d') }} |
{{ $item->date ? \Verta::parse($item->date)->format('H:i Y/m/d') : '---' }} |
{{ $item->takmil_variz ? \Verta::parse($item->takmil_variz)->format('H:i Y/m/d') : '---' }} |
|
@cannot('sale_expert')
|
@endcannot
|
@can('admin')
|
@endcan
@cannot('sale_expert')
|
@endcannot
@endforeach