@extends ('layouts/template')

@section('content')
<div class="p-3 mcp-theme-1" id="patients-list">
    <div class="card">

        <div class="card-header px-3 py-2 d-flex align-items-center">
            <strong class="mr-4">
                <i class="fas fa-calendar-alt"></i>
                My Clinical Teams
            </strong>
        </div>

        <div class="card-body p-0">
            <div class="p-3">
                <!-- Filters -->
            </div>
            <table class="table table-sm table-striped p-0 m-0">
                <thead class="bg-light border-top">
                    <tr>
                        <th class="border-0">Name</th>
                        <th class="border-0">Specialty</th>
                        <th class="border-0"># My Patients Assigned</th>
                        <th class="border-0">Upcoming Appts.</th>
                        <th class="border-0">Public Appointment Page</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach($teams as $team)
                    <tr>
                        <td><a href="{{ route('dna.my-clinical-teams.view.team-dashboard', $team) }}">{{ $team->internal_name }}</a></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td>
                        <a native target="_blank" href="{{config('app.stagfe6_url') . '/' . $team->slug}}">{{ $team->slug }}</a>
                        </td>
                    </tr>
                    @endforeach

                    @if(count($teams) === 0)
                    <tr>
                        <td colspan="5">No records found!</td>
                    </tr>
                    @endif
                </tbody>

            </table>
            @if($teams->hasPages())
                <div class="ml-2 mt-2">
                    {{ $teams->appends(request()->input())->links() }}
                </div>
            @endif
        </div>
    </div>
</div>
@endsection