<table class="table table-striped table-bordered table-hover" id="dataTables">
    <thead>
    <tr>
        <th>S/No</th>
        <th>Member</th>
        {{--<th>Collection Center</th>--}}
        <th>Team</th>
        <th>Amount</th>
        <th>Date</th>
        <th>Status</th>
        <th>Action</th>
    </tr>
    </thead>
    <tbody>

    <?php $i = 0; ?>
    @foreach($orders as $order)
        <tr>
            <td><?= ++$i; ?></td>
            <td>{!!$order->membership_id!!}</td>
            {{--                                <td>{!!$order->store->name!!}</td>--}}
            <td>{!!$order->team!!}</td>
            <td>{!!$order->amount!!}</td>
            <td>{!!$order->created_at!!}</td>
            <td>{!!$order->status!!}</td>
            <td>

                @if(auth()->user() !== null && auth()->user()->is_admin)
                    <div class="btn-group">
                        <button type="button" class="btn btn-primary btn-raised">
                            Action</button>
                        <button type="button" class="btn btn-primary btn-raised dropdown-toggle"
                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="zmdi zmdi-chevron-down right only"></i>
                        </button>
                        <ul class="dropdown-menu dropdown-menu-primary">
                            <li>
                                <a href="{{route('orderDetails', $order->id)}}">
                                    Details
                                </a>
                            </li>
                            <li role="separator" class="divider"></li>
                        </ul>
                    </div>
                @endif

                @if(auth()->user() !== null && auth()->user()->store_id)
                    <div class="btn-group">
                        <button type="button" class="btn btn-primary btn-raised">Action</button>
                        <button type="button" class="btn btn-primary btn-raised dropdown-toggle"
                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="zmdi zmdi-chevron-down right only"></i>
                        </button>
                        <ul class="dropdown-menu dropdown-menu-primary">
                            <li>
                                <a href="{{route('storeOrderDetails', $order->id)}}">Details</a>
                            </li>
                            <li>
                                <a href="{{route('storeOrderIssue', $order->id)}}">Issue Out</a>
                            </li>
                            <li role="separator" class="divider"></li>
                            <li>
                            </li>
                        </ul>
                    </div>
                @endif

            </td>
        </tr>
    @endforeach
    </tbody>

</table>