<div id="dashboard-measurements-pending-stamping">
@if($flaggedMeasurementsPendingStamping && count($flaggedMeasurementsPendingStamping))
    <table class="table table-sm table-striped mb-0">
        <thead>
        <tr>
            <th class="border-bottom-0 border-top-0 text-secondary">Patient</th>
            <th class="border-bottom-0 border-top-0 text-secondary">Type</th>
            <th class="border-bottom-0 border-top-0 text-secondary">Value</th>
            <th class="border-bottom-0 border-top-0 text-secondary">Timestamp</th>
        </tr>
        </thead>
        <tbody>
        @foreach($flaggedMeasurementsPendingStamping as $row)
            <tr>
                <td class="pl-2">
                    <a href="{{ route('patients.view.dashboard', $row->client) }}">
                        {{$row->client->displayName()}}
                    </a>
                </td>
                <td class="text-nowrap">
                    {{$row->label}}
                </td>
                <td>
                    @include('app.patient.partials.measurement-value', ['measurement' => $row])
                </td>
                <td class="text-secondary">
                    <a href="/mc/patients/view/{{$row->client->uid}}/care-months/view/{{$row->careMonth->uid}}"
                       native target="_blank"
                       title="Care Month: {{date('M Y', strtotime($row->careMonth->start_date))}}">
                        {{ friendly_date_time_short_with_tz_from_timestamp_divide1000($row->ts, 'EASTERN') }} EST
                    </a>
                </td>
            </tr>
        @endforeach
        </tbody>
    </table>
    <div class="m-2">
        {{ $flaggedMeasurementsPendingStamping->onEachSide(0)->withQueryString()->links() }}
    </div>
@else
    <div class="p-3">
        No flagged measurement pending stamping
    </div>
@endif
</div>