@include('Admin.include.export_header')
<table>
    <thead>
        <tr class="header">
            <th style="padding: 1px 10px; background-color: #82C202;  color: #1d1a1a;  width: 150px;  text-align: center;">S.No.</th>
            <th style="padding: 1px 10px; background-color: #82C202;  color: #1d1a1a;  width: 150px;  text-align: center;">Full Name</th>
            <th style="padding: 1px 10px; background-color: #82C202;  color: #1d1a1a;  width: 150px;  text-align: center;">User Name</th>
            <th style="padding: 1px 10px; background-color: #82C202;  color: #1d1a1a;  width: 150px;  text-align: center;">Personal Contact No</th>
            <th style="padding: 1px 10px; background-color: #82C202;  color: #1d1a1a;  width: 150px;  text-align: center;">Emergency Contact No.</th>
            <th style="padding: 1px 10px; background-color: #82C202;  color: #1d1a1a;  width: 150px;  text-align: center;">Address</th>
            <th style="padding: 1px 10px; background-color: #82C202;  color: #1d1a1a;  width: 150px;  text-align: center;">Status</th>
            <th style="padding: 1px 10px; background-color: #82C202;  color: #1d1a1a;  width: 150px;  text-align: center;">Created At</th>
            <th style="padding: 1px 10px; background-color: #82C202;  color: #1d1a1a;  width: 150px;  text-align: center;">Updated At</th>
            <th style="padding: 1px 10px; background-color: #82C202;  color: #1d1a1a;  width: 150px;  text-align: center;">Deleted At</th>
        </tr>
    </thead>
    <tbody>
        @if(count($data['data']) > 0)
        @foreach ($data['data'] as $k=>$v)
        
        <tr>
            <td>{{ $k }}</td>
            <td >{{ $v->name }}</td>
            <td>{{ $v->username }}</td>
            <td>{{ isset($v->userDetail->personal_contact_no)?$v->userDetail->personal_contact_no:"" }}</td>
            <td>{{ isset($v->userDetail->emergency_contact_no)?$v->userDetail->emergency_contact_no:"" }}</td>
            <td>{{ isset($v->userDetail->address)?$v->userDetail->address:"" }}</td>
            <td>{{ ($v->status == 1)?"Active":"Deactive" }}</td>
            <td>{{ !empty($v->created_at)?Date("d M, Y h:i A",strtotime($v->created_at)):"" }}</td>
            <td>{{ !empty($v->updated_at)?Date("d M, Y h:i A",strtotime($v->updated_at)):"" }}</td>
            <td>{{ !empty($v->deleted_at)?Date("d M, Y h:i A",strtotime($v->deleted_at)):"" }}</td>
        </tr>
        @endforeach
        @endif
    </tbody>
</table>

@include('Admin.include.export_footer')