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

    <h3 class="d-flex my-3 px-3 stag-heading stag-heading-index">
        <div>Invitations: 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='/invitations/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>Pro Id</th>
<th>First Name</th>
<th>Last Name</th>
<th>Dob</th>
<th>Mcn</th>
<th>Email</th>
<th>Cell Number</th>
<th>Memo</th>
<th>Invitation Key</th>
<th>Last Email Sent At</th>
<th>Last Sms Sent At</th>
<th>Has Invitation Been Viewed</th>
<th>Guest First Name</th>
<th>Guest Last Name</th>
<th>Guest Dob</th>
<th>Guest Mcn</th>
<th>Is Client Already In System</th>
<th>Client Id</th>
<th>Created At</th>
<th>Is Active</th>
            </tr>
            </thead>
            <tbody>
            @foreach($records as $record)
                <tr>
<td><a href="/invitations/view/<?= $record->uid ?>"><i class="fas fa-share-square"></i></a></td>
<td><?= $record->pro_id ?></td>
<td><?= $record->first_name ?></td>
<td><?= $record->last_name ?></td>
<td><?= $record->dob ?></td>
<td><?= $record->mcn ?></td>
<td><?= $record->email ?></td>
<td><?= $record->cell_number ?></td>
<td><?= $record->memo ?></td>
<td><?= $record->invitation_key ?></td>
<td><?= friendly_date_time($record->last_email_sent_at) ?></td>
<td><?= friendly_date_time($record->last_sms_sent_at) ?></td>
<td><?= $record->has_invitation_been_viewed ?></td>
<td><?= $record->guest_first_name ?></td>
<td><?= $record->guest_last_name ?></td>
<td><?= $record->guest_dob ?></td>
<td><?= $record->guest_mcn ?></td>
<td><?= $record->is_client_already_in_system ?></td>
<td><?= $record->client_id ?></td>
<td><?= friendly_date_time($record->created_at) ?></td>
<td><?= $record->is_active ?></td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>

@endsection
