@extends('adminlte::page') @section('title', 'Dashboard') @section('content_header')

@stop @section('content')
@foreach(['G','F', 'E', 'D', 'C', 'B', 'A'] as $rowLabel)
{{ $rowLabel }}
@endforeach
@php $itemsPerRow = 42; $rows = ['G','F', 'E', 'D', 'C', 'B', 'A']; $rowIndex = 0; @endphp @foreach($nichos->chunk($itemsPerRow) as $chunk) @php $buttonIndex = 1; @endphp
@foreach($chunk as $nicho)
@php $buttonClass = ''; switch($nicho->estado_nicho) { case 'Ocupado': $buttonClass = 'btn-danger'; $route = ''; // No se necesita ruta porque se muestra alerta break; case 'Reservado': $buttonClass = 'btn-warning'; $route = route('nichos.create', ['id_nicho' => $nicho->id]); break; case 'Libre': $buttonClass = 'btn-success'; $route = route('recibo.create', ['id_nicho' => $nicho->id]); break; } @endphp
{{ $buttonIndex }}
@php $buttonIndex++; @endphp @endforeach
@php $rowIndex++; @endphp @endforeach
@stop @section('css') @stop @section('js') @stop