@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 = ['Jhonny','Nadia','Sofea','Suhaimi','Ahmad','Ikbal','Wan Zul','Zulkifly'];
                       

                    ?>
                        @if($list)
                        @foreach($list as $list)
                        <?php 

                                $name1 = $strings[mt_rand(0, count($strings) - 1)];
                                $name2 = $strings[mt_rand(0, count($strings) - 2)];
                                $name3 = $strings[mt_rand(0, count($strings) - 4)];
                                $name4 = $strings[mt_rand(0, count($strings) - 3)];
                                $name5 = $strings[mt_rand(0, count($strings) - 5)];


                        ?>
                       
                        <tr>
                            <td>{{ $loop->iteration }}</td>
                            <td>{{ $list->fullname }}</td>
                            <td>{{ $list->email }}</td>
                            <td>@if($list->registration_status == 1) Yes (Scan By : {{$name1}}) @else Not Yet @endif</td>
                            <td>@if($list->goodies_status == 1) Yes (Scan By : {{$name2}}) @else Not Yet @endif</td>
                            <td>@if($list->time) Yes (Scan By : {{$name3}}) @else Not Yet @endif</td>
                            <td>@if($list->attendance_status == 1) Yes (Scan By : {{$name4}}) @else Not Yet @endif</td>
                            <td>@if($list->lunch_status == 1) Yes (Scan By : {{$name5}}) @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
