@extends('layouts.pro-logged-in')
@section('content')

    <h3 class="d-flex my-3 px-3 stag-heading stag-heading-index">
        <div>Clients: List</div>
        <div class="ml-auto">
            <a class='btn btn-primary btn-sm ml-2' up-modal=".form-contents" up-preload up-delay="25" up-width="800" up-history="false" href='/clients/add_new?optimised=1'><i class='fa fa-plus-circle' aria-hidden='true'></i> Add New</a>
        </div>
    </h3>

    <div class="table-responsive p-0 bg-white border stag-table stag-table-index">
        <table class="table table-hover text-nowrap table-striped">
            <thead>
            <tr>
<th>&nbsp;</th>
<th>First Name</th>
<th>Last Name</th>
<th>Dob</th>
<th> Mcn</th>
<th>Is Mcn Valid Number</th>
<th>Is Part B Primary</th>
<th>Sex</th>
<th>MCP</th>
<th>CM Pro</th>
<th>RME Pro</th>
<th>RMM Pro</th>
            </tr>
            </thead>
            <tbody>
            @foreach($records as $record)
                <tr>
<td><a href="/clients/view/<?= $record->uid ?>"><i class="fas fa-share-square"></i></a></td>
<td><a href="/clients/view/<?= $record->uid ?>/SUB_dashboard"><?= $record->name_first ?></a></td>
<td><?= $record->name_last ?></td>
<td><?= $record->dob ?></td>
<td><?= $record-> mcn ?></td>
<td><?= $record->is_mcn_valid_number ?></td>
<td><?= $record->is_part_b_primary ?></td>
<td><?= $record->sex ?></td>
<td><a href="/pros/view/<?= $record->mcp_pro_id ?>"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->mcp_pro_id], ], 'all'); ?></a></td>
<td><a href="/pros/view/<?= $record->cm_pro_id ?>"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->cm_pro_id], ], 'all'); ?></a></td>
<td><a href="/pros/view/<?= $record->rme_pro_id ?>"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->rme_pro_id], ], 'all'); ?></a></td>
<td><a href="/pros/view/<?= $record->rmm_pro_id ?>"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->rmm_pro_id], ], 'all'); ?></a></td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>

@endsection
