@foreach($parents as $key=> $row)
<tr>
    <th scope="row">
        @if ($row->role == 'sub_admin')
            @if (auth()->parent()->id != $row->id)
                <div class="custom-control custom-checkbox">
                    <input type="checkbox" class="custom-control-input selectOne deleteCheck" id="customCheck{{$row->id}}" value="{{$row->id}}" name="id[]">
                    <label class="custom-control-label" for="customCheck{{$row->id}}"></label>
                </div>
            @endif
        @endif

    </th>
    <td>{{ $row->name .' '.$row->last_name }}</td>
    <td>{{ $row->phone }}</td>
    <td>{{ $row->id_number }}</td>
    <td>{{ $row->wallet > 0 ? __('parents.have_cash') : __('parents.havent_cash')  }}</td>
    <td colspan="2">{{ \Carbon\Carbon::parse($row->created_at)->format('Y/m/d') }}</td>
    <td>

        <div class="dropdown">
            <button class="icon_dots dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
                <i class="bi bi-three-dots-vertical"></i>
            </button>
            <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">


                    @if($row->deleted_at)
                                <a href="{{ route ('parents.restore', $row->id) }}" data-method="put" class="dropdown-item rowAction" title="{{ __('dashboard.restore') }}"> <i class="bi bi-pen ml-1"></i> {{ __('dashboard.restore') }} </a>
{{--                                <a href="{{ route ('parents.destroy', $row->id) }}" data-method="delete" class="dropdown-item rowAction" title="{{ __('dashboard.delete') }}"> <i class="bi bi-trash ml-1"></i> {{ __('dashboard.delete') }} </a>--}}

                    @else
                        <a href="{{ route ('parents.edit', $row->id) }}" class="dropdown-item" title="{{ __('dashboard.edit') }}"> <i class="bi bi-pen ml-1"></i> {{ __('dashboard.edit') }} </a>
{{--                        <a href="{{ route ('subscriptions.index') .'?user='.$row->name }}" class="dropdown-item" title="{{ __('subscriptions.head') }}"> <i class="bi bi-pen ml-1"></i> {{ __('subscriptions.head') }} </a>--}}
                        <a href="{{ route ('payment_logs.index') .'?acc_status='.$parent_status.'&id='.$row->id }}" class="dropdown-item" title="{{ __('payment_logs.head') }}"> <i class="bi bi-pen ml-1"></i> {{ __('payment_logs.head') }} </a>
                        <a href="{{ route ('orders.index') .'?parent='.$row->name }}" class="dropdown-item" title="{{ __('orders.head') }}"> <i class="bi bi-pen ml-1"></i> {{ __('orders.head') }} </a>
                        <a href="{{ route ('addresses.index').'?user_id='.$row->id }}" class="dropdown-item" title="{{ __('members.addresses') }}"> <i class="bi bi-pen ml-1"></i> {{ __('members.addresses') }} </a>
                        <a href="{{ route ('parents.destroy', $row->id) }}" data-method="delete" class="dropdown-item rowAction" title="{{ __('dashboard.trash') }}"> <i class="bi bi-slash-circle ml-1"></i> {{ __('dashboard.trash') }} </a>
                @endif
            </div>
        </div>



    </td>
</tr>
@endforeach

@if( count( $parents ) && $parents->hasPages() )
<tr> <td></td><td> {{ $parents->links() }} </td> </tr>
@endif
