@extends ('layouts.patient')

@section('inner-content')

<style>
    .eligible-table td {
        white-space: nowrap;
    }
</style>

<div>
    <div class="d-flex align-items-center">
        <h4 class="font-weight-bold m-0 font-size-16">Insurance Coverage History</h4>
    </div>

    <table class="table table-sm table-striped table-bordered mt-3 mb-0">
        <thead>
            <tr>
                <th class="border-0">Created At</th>
                <th class="border-0">Plan Type</th>
                <th class="border-0">Creation Strategy</th>
                <th class="border-0">Is Covered</th>
                <th class="border-0">Is Manually Determined</th>
                <th class="border-0"></th>
            </tr>
        </thead>
        <tbody>
            @foreach($insuranceCoverageHistory as $coverage)
            <tr>
                <td>{{ friendly_date($coverage->created_at) }}</td>
                <td>{{ $coverage->plan_type }}</td>
                <td>{{ $coverage->creation_strategy }}</td>
                <td>{{ $coverage->is_covered ? 'YES':'NO' }}</td>
                <td>{{ $coverage->is_manually_determined ? 'YES':'NO' }}</td>
                <td>
                    <div moe relative wide class="ml-2 hide-inside-popup">
                        <a start show>
                        <i class="fa fa-info-circle on-hover-opaque"></i>
                        </a>
                        <form url="" class="mcp-theme-1" right>
                        @include('app.patient.partials.display-coverage-details', ['displayCoverage' => $coverage ])
                        </form>
                    </div>
                </td>
            </tr>
            @endforeach
        </tbody>
    </table>
</div>
@endsection