@extends('vendor.layout.main')
@section('content')
<div class="row">
    <div class="col-lg-12" style="padding-left: 4px;padding-right: 4px;">
        <div class="card m-b-30" style="border-radius: 5px;">
            <div class="card-header">
                <h5 class="card-title" style="font-weight: bold; padding-top: 15px; font-size: 20px;">Agent List</h5>
            </div>
            <div class="card-body">
            <div class="table-responsive">
                <table id="datatable" class="display table table-striped table-bordered" style="width: 100%;">
                        <thead style="background: #1f3740;">
                            <tr>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">No.</th>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">Username</th>
                                <th style="color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">Name</th>
                                <th style="color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">Shop Name</th>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">Mobile</th>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">Points</th>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">Cash</th>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">Percent</th>
                                <th style="text-align: center; color: #fff;padding-top: 3px;padding-bottom: 3px;font-size: 13px;">Status</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $no=1; ?>
                            @foreach($agents as $mem)
                            <tr>
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: azure;">{{$no++}}</td>
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: azure;">{{$mem->username}}</td>
                                
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;color: azure;">{{$mem->name}}</td>
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px; color: azure;">{{$mem->shop_name}}</td>

                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: azure;">{{$mem->mobile}}</td>
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: azure;">{{$mem->point_bal}}</td>
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: azure;">{{$mem->cash_bal}}</td> 
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: azure;"> {{$mem->min_ratio}}</td>

                              
                                @if($mem->status == 0)
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: #8eff00;">Active</td>
                                @else
                                <td style="padding-top: 3px;padding-bottom: 3px;font-size: 13px;text-align: center; color: red;">Inactive</td>
                                @endif

                            </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!-- End col -->
   
</div>
@endsection