update nullcheck a el log
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<table class="text-center w-full mx-8">
|
<table class="text-center w-full mx-8">
|
||||||
<tr class="border text-left">
|
<tr class="border text-left">
|
||||||
<th>Id</th>
|
<th hidden>Id</th>
|
||||||
<th>Compra</th>
|
<th>Compra</th>
|
||||||
<th>Fecha Inicio</th>
|
<th>Fecha Inicio</th>
|
||||||
<th>Fecha Final</th>
|
<th>Fecha Final</th>
|
||||||
@@ -17,32 +17,42 @@
|
|||||||
<th>Estado</th>
|
<th>Estado</th>
|
||||||
</tr>
|
</tr>
|
||||||
@foreach ($logs as $item)
|
@foreach ($logs as $item)
|
||||||
|
|
||||||
<tr class="border hover:bg-gray-200 hover:ring-gray-500 text-left text-sm">
|
<tr class="border hover:bg-gray-200 hover:ring-gray-500 text-left text-sm">
|
||||||
<td>{{$item->id}}</td>
|
<td hidden>{{ $item->id }}</td>
|
||||||
<td>{{\Carbon\Carbon::parse($item->created_at)->format('y/m/d h:i a')}}</td>
|
<td>{{ \Carbon\Carbon::parse($item->created_at ?? now())->format('y/m/d h:i a') }}</td>
|
||||||
<td>{{\Carbon\Carbon::parse($item->fecha_inicio)->format('d/m/Y') }}</td>
|
<td>{{ \Carbon\Carbon::parse($item->fecha_inicio ?? now())->format('d/m/Y') }}</td>
|
||||||
<td>{{\Carbon\Carbon::parse($item->fecha_final)->format('d/m/Y') }}</td>
|
<td>{{ \Carbon\Carbon::parse($item->fecha_final ?? now())->format('d/m/Y') }}</td>
|
||||||
<td>{{$item->valor}}</td>
|
<td>{{ $item->valor ?? '' }}</td>
|
||||||
<td>{{$item->vendedor->name}}</td>
|
<td>{{ $item->vendedor->name ?? 'Sin nombre' }}</td>
|
||||||
<td>{{$item->vendedor->email}}</td>
|
<td>{{ $item->vendedor->email ?? 'Sin correo' }}</td>
|
||||||
<td>{{$item->cliente->email}}</td>
|
<td>{{ $item->cliente->email ?? 'Sin correo' }}</td>
|
||||||
<td>@if(!empty($item->promocion_id)) {{$item->promocion->nombre}} @elseif(!empty($item->tarifa_id)) @if(empty($item->tarifa->servicio->por_tiempo)) {{$item->tarifa->pantallas}} P. de @endif {{$item->tarifa->servicio->nombre}} - {{$item->tarifa->dias}} d. @endif </td>
|
<td>
|
||||||
<td>{{$item->nombre_cliente ?? $item->cliente->name}}</td>
|
@if (!empty($item->promocion_id))
|
||||||
|
{{ $item->promocion->nombre ?? 'Sin promoción' }}
|
||||||
|
@elseif(!empty($item->tarifa_id))
|
||||||
|
@if (empty($item->tarifa->servicio->por_tiempo))
|
||||||
|
{{ $item->tarifa->pantallas ?? 'N/A' }} P. de
|
||||||
|
@endif
|
||||||
|
{{ $item->tarifa->servicio->nombre ?? 'Sin nombre' }} - {{ $item->tarifa->dias ?? 'N/A' }} d.
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>{{ $item->nombre_cliente ?? $item->cliente->name ?? 'Sin nombre' }}</td>
|
||||||
<td class="text-left">
|
<td class="text-left">
|
||||||
@if (!empty($item->cuentas_obsoletas->unique()))
|
@if (!empty($item->cuentas_obsoletas->unique()))
|
||||||
@foreach($item->cuentas_obsoletas->unique() as $cuenta) {{$cuenta->correo}} - {{$cuenta->password}} <br> @endforeach
|
@foreach ($item->cuentas_obsoletas->unique() as $cuenta)
|
||||||
|
{{ $cuenta->correo ?? 'Sin correo' }} - {{ $cuenta->password ?? 'Sin contraseña' }} <br>
|
||||||
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@if (!empty($item->cuentas->unique()))
|
@if (!empty($item->cuentas->unique()))
|
||||||
@foreach($item->cuentas->unique() as $cuenta1) {{$cuenta1->correo}} - {{$cuenta1->password}} <br> @endforeach
|
@foreach ($item->cuentas->unique() as $cuenta1)
|
||||||
|
{{ $cuenta1->correo ?? 'Sin correo' }} - {{ $cuenta1->password ?? 'Sin contraseña' }} <br>
|
||||||
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{$item->estado ?? ''}}
|
{{ $item->estado ?? 'Sin estado' }}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user