@extends('layouts.landing')

@section('title',"Inicio")

@section('content')

<div class="container-fluid">
    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <h6 class="m-0 font-weight-bold text-primary">Asistencia</h6>
        </div>

        <div class="card-body">
            @if ($registros <= 3)

            <div style="min-height:300px">
                @livewire('code-scanner')
                @push('scripts')
                    <script src="https://unpkg.com/html5-qrcode" defer></script>
                @endpush
            </div>

            @endif

            <div class=" text-center">
            <h2 class="mb-3">Registros del dia {{ ucfirst(now()->locale('es')->translatedFormat('l d \d\e F \d\e Y')) }}</h2>
            @foreach ($codes as $code)
                <p>{{$code->registro->format('h:i A')}}</p>
            @endforeach
            </div>
        </div>


    </div>
</div>

@endsection
