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

    <h3 class="d-flex my-3 px-3 stag-heading stag-heading-index">
        <div>Pro Pro Access: List</div>
        <div class="ml-auto">
            <!-- _ADD_NEW_LINK_ -->
        </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>Owner Pro</th>
<th>Accessible Pro</th>
<th>Memo</th>
<th>Can Assign As Rme</th>
<th>Can Assign As Rmm</th>
<th>Can Assign As Mcp</th>
<th>Created At</th>
<th>Created By Session Id</th>
<th>Type</th>
<th>Is Active</th>
<th>Deactivated At</th>
<th>Deactivated By Session Id</th>
<th>Deactivation Memo</th>
<th>Reactivated At</th>
<th>Reactivated By Session Id</th>
<th>Reactivation Memo</th>
<th>Can Book Appointments</th>
            </tr>
            </thead>
            <tbody>
            @foreach($records as $record)
                <tr>
<td><a href="/pro_pro_access/view/<?= $record->uid ?>"><i class="fas fa-share-square"></i></a></td>
<td><a href="/pros/view/<?= $record->owner_pro_id ?>"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->owner_pro_id], ], 'all'); ?></a></td>
<td><a href="/pros/view/<?= $record->accessible_pro_id ?>"><?= value_from_rs($result_pros, 'name_display', [['id', '=', $record->accessible_pro_id], ], 'all'); ?></a></td>
<td><?= $record->memo ?></td>
<td><?= $record->can_assign_as_rme ?></td>
<td><?= $record->can_assign_as_rmm ?></td>
<td><?= $record->can_assign_as_mcp ?></td>
<td><?= friendly_date_time($record->created_at) ?></td>
<td><?= $record->created_by_session_id ?></td>
<td><?= $record->type ?></td>
<td><?= $record->is_active ?></td>
<td><?= friendly_date_time($record->deactivated_at) ?></td>
<td><?= $record->deactivated_by_session_id ?></td>
<td><?= $record->deactivation_memo ?></td>
<td><?= friendly_date_time($record->reactivated_at) ?></td>
<td><?= $record->reactivated_by_session_id ?></td>
<td><?= $record->reactivation_memo ?></td>
<td><?= $record->can_book_appointments ?></td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>

@endsection
