@extends('layouts.app')
@section('content')


    <div class="container-fluid mt-5">
        <div class="card">
            <div class="card-header">{{ __('Guest Attendance list') }}</div>
            <div class="card-body">

            <div class="row">
                <div class="col-md-12">
                    <table class="table table-striped mb-0 ">
                    <thead class="thead-light">
                        <tr>
                            <th>{{ __("No") }}</th>
                            <th>{{ __("Participant Name") }}</th>
                            <th>{{ __("Email") }}</th>
                            <th>{{ __("Registration") }}</th>
                            <th>{{ __("Goodies Collection") }}</th>
                            <th>{{ __("Attendance: Grand Opening") }}</th>
                            <th>{{ __("Attendance: Award Night") }}</th>
                            <th>{{ __("Attendance: Gala Dinner") }}</th>
                           
                           
                        </tr>
                    </thead>
                    <tbody>
                    <?php 

                        $strings = array('Jhonny','Nadia','Sofea','Suhaimi','Ahmad','Ikbal','Wan Zul','Zulkifly');
                        $rand_keys = array_rand($strings, 2);

                    ?>
                        @if($list)
                        @foreach($list as $list)
                       
                        <tr>
                            <td>{{ $loop->iteration }}</td>
                            <td>{{ $list->fullname }}</td>
                            <td>{{ $list->email }}</td>
                            <td>@if($list->registration_status == 1) Yes (Scan By : $input[$rand_keys[$loop->iteration]) @else Not Yet @endif</td>
                            <td>@if($list->goodies_status == 1) Yes (Scan By : shuffle($strings)) @else Not Yet @endif</td>
                            <td>@if($list->time) Yes (Scan By : shuffle($strings)) @else Not Yet @endif</td>
                            <td>@if($list->attendance_status == 1) Yes (Scan By : shuffle($strings)) @else Not Yet @endif</td>
                            <td>@if($list->lunch_status == 1) Yes (Scan By : shuffle($strings)) @else Not Yet @endif</td>

                            
                        </tr>
                        @endforeach
                       <!--  <tr>

                            <td></td>
                            <td>Rafezah Abd Ghani</td>
                            <td>rafezah@3fresources.com</td>
                            <td>Yes (Scanned by Rashdan)</td>
                            <td>Yes (Scanned by Amer)</td>
                            <td>Yes (Scanned by Amer) </td>
                            <td>Yes (Scanned by Rashdan)</td>
                            <td>Not Yet</td>

                        </tr> -->
                        @else
                        <tr>
                            <td colspan="6">No data</td>
                        </tr>
                        @endif
                    </tbody>
                </table>
                    
                </div>
            </div>

              
                
            </div>
            <div class="card-footer">
                <a href="{{ route('home') }}" class="btn btn-primary">{{ __('Kembali') }}</a>
            </div>
        </div>
    </div>

    
@endsection
