@php use Carbon\Carbon; function hasPassedWeek($trackingDate) { if ($trackingDate) { $trackingDate = Carbon::parse($trackingDate); $now = Carbon::now(); return $trackingDate->diffInDays($now) >= 7; } return false; } @endphp
# | ID | {{ __('customer.data.name') }} | {{ __('customer.data.phone') }} | {{ __('customer.data.email') }} | @if ($type != 0){{ __('customer.data.type') }} | Ultimo servicio | @else{{ __('customer.data.reason') }} | @endifUltimo seguimiento | {{ __('buttons.actions') }} | |
---|---|---|---|---|---|---|---|---|---|---|
{{ ++$index }} | {{ $customer->id }} | {{ $customer->name }} | {{ $customer->phone }} | {{ $customer->email ?? 'S/A' }} | @if ($type != 0) @php $last_order = $customer->ordersPlaced()->first(); @endphp{{ $customer->serviceType->name }} | {{ $last_order && $last_order->completed_date ? $last_order->completed_date : 'S/A' }} | @else{{ $customer->reason ?? 'S/A' }} | @endif @if ($last_tracking && $last_tracking->tracking_date)({{ $last_tracking->tracking_date }}) {{ $last_tracking->service->name }} | @elseS/A | @endif{{ __('buttons.show') }} @can('write_customer') {{ __('buttons.edit') }} @if ($type == 0) {{ __('buttons.convert') }} @endif @endcan |