<?php $__env->startSection('contentSection'); ?>
    <div class="row">
        <div class="col-lg-8">
            <div class="row">
                <div class="col-lg-12">
                    <div class="card">
                        <div class="card-header">
                            <div class="row align-items-center">
                                <div class="col-md-4 text-center">
                                    <?php if($contact->image): ?>
                                        <img style="cursor: pointer" data-toggle="modal" data-target="#editProfileModal"
                                             class="header__banner__img"
                                             src="/<?php echo e($contact->image); ?>">
                                    <?php else: ?>
                                        <img style="cursor: pointer" data-toggle="modal" data-target="#editProfileModal"
                                             class="header__banner__img"
                                             src="<?php echo e(asset('back_assets/assets/images/avatars/avatar-13.jpg')); ?>">
                                    <?php endif; ?>
                                </div>
                                <div class="col-md-8">
                                    <h3><?php echo e($contact->name); ?></h3>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12 col-lg-12 text-right">
                                    <button data-toggle="modal" data-target="#editProfileModal" type="button"
                                            class="btn btn-secondary">
                                        <i class="fa fa-edit fa-lg"></i> Edit
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12">
                    <div class="card">
                        <ul class="nav nav-pills nav-pills-primary border-bottom-primary">
                            <li class="nav-item">
                                <a class="nav-link active" data-toggle="tab" href="#uContact">
                                    Contact</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab" href="#uDoc">
                                    Documents</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab" href="#uRp">
                                    Related Properties</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab" href="#uRc">
                                    Related Contacts</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab" href="#uRr">
                                    Related Requirements</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab" href="#uId">
                                    ID Check</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab" href="#uAml">
                                    AML Check</a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div id="uContact" class="container-fluid tab-pane active p-0">
                                <div class="card-header">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <h5 class="mb-3">Contact Details:</h5>
                                            <p><strong>Email: </strong><span
                                                    class="font-weight-normal"><?php echo e($contact->email ?? 'N/A'); ?></span>
                                            </p>
                                            <p><strong>Phone: </strong><span
                                                    class="font-weight-normal"><?php echo e($contact->phone ?? 'N/A'); ?></span>
                                            </p>
                                            <p><strong>Address: </strong><span
                                                    class="font-weight-normal"><?php echo e($contact->address ?? 'N/A'); ?></span>
                                            </p>
                                            <p><strong>Postal Address: </strong><span
                                                    class="font-weight-normal"><?php echo e($contact->postal_address ?? 'N/A'); ?></span>
                                            </p>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12 col-lg-12 text-right">
                                            <button data-toggle="modal" data-target="#editCDModal" type="button"
                                                    class="btn btn-secondary">
                                                <i class="fa fa-edit fa-lg"></i> Edit
                                            </button>
                                        </div>
                                    </div>
                                    <hr>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <h5 class="mb-3">Marketing:</h5>
                                            <p><strong>Gender: </strong><span
                                                    class="font-weight-normal">
                                                <?php if($contact->gender == 1): ?>
                                                        Male
                                                    <?php elseif($contact->gender == 2): ?>
                                                        Female
                                                    <?php else: ?>
                                                        N/A
                                                    <?php endif; ?>
                                                </span></p>
                                            <p><strong>Date of Birth: </strong><span
                                                    class="font-weight-normal"><?php echo e($contact->dob ?? 'N/A'); ?></span></p>
                                            <p><strong>Enquiry Source: </strong><span
                                                    class="font-weight-normal"><?php echo e($contact->enquiry_source ? $contact->enquiry_source->name : 'N/A'); ?></span>
                                            </p>
                                            <p><strong>Enquiry Method: </strong><span
                                                    class="font-weight-normal"><?php echo e($contact->enquiry_method ?? 'N/A'); ?></span>
                                            </p>
                                            <p><strong>Lead Source: </strong><span
                                                    class="font-weight-normal"><?php echo e($contact->source ? $contact->source->name : 'N/A'); ?></span>
                                            </p>
                                            <p><strong>Postcode: </strong><span
                                                    class="font-weight-normal"><?php echo e($contact->post_code ?? 'N/A'); ?></span>
                                            </p>
                                            <p><strong>Last Contact: </strong><span
                                                    class="font-weight-normal"><?php echo e($contact->last_contact ?? 'N/A'); ?></span>
                                            </p>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12 col-lg-12 text-right">
                                            <button data-toggle="modal" data-target="#editMarketingModal" type="button"
                                                    class="btn btn-secondary">
                                                <i class="fa fa-edit fa-lg"></i> Edit
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div id="uDoc" class="container-fluid tab-pane p-0">
                                <div class="card-header">
                                    <div class="row mb-3">
                                        <div class="col-md-12">
                                            <form action="<?php echo e(route('updateContact', $contact->id)); ?>" method="post"
                                                  enctype="multipart/form-data">
                                                <?php echo csrf_field(); ?>
                                                <input type="hidden" value="doc" name="type"/>
                                                <div class="row">
                                                    <div class="col-md-6">
                                                        <label>File Name*</label>
                                                        <input required type="text" name="doc_title" maxlength="100"
                                                               class="form-control">
                                                    </div>
                                                    <div class="col-md-6">
                                                        <label>Upload File*</label>
                                                        <input required style="padding: 3px" type="file"
                                                               class="form-control"
                                                               name="doc_file">
                                                    </div>
                                                </div>
                                                <button type="submit" class="btn btn-primary pull-right mt-3"><i
                                                        class="fa fa-save"></i> Save Document
                                                </button>
                                            </form>
                                        </div>
                                    </div>
                                    <table class="prop-data-table table table-striped table-hover table-bordered"
                                           style="width:100%">
                                        <thead>
                                        <tr>
                                            <th>File Name</th>
                                            <th>Date Uploaded</th>
                                            <th>Added By</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php $__currentLoopData = $contact->contact_documents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $document): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><a href="/<?php echo e($document->file); ?>"
                                                       target="_blank"><?php echo e($document->title); ?></a></td>
                                                <td><?php echo e(Carbon\Carbon::parse($document->created_at)->format('F j, Y, g:i a')); ?></td>
                                                <td><?php echo e($document->user ? $document->user->name : 'N/A'); ?></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div id="uRp" class="container-fluid tab-pane p-0">
                                <div class="card-header">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="card-title pull-left font-weight-bold">Related Properties</div>
                                            <div class="card-title pull-right">
                                                <button data-toggle="modal" data-target="#addRpModal"
                                                        class="btn btn-primary"><i class="fa fa-plus"></i> Add Related
                                                    Property
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <hr class="mt-0">
                                    <table class="prop-data-table table table-striped table-hover table-bordered"
                                           style="width:100%">
                                        <thead>
                                        <tr>
                                            <th>Property</th>
                                            <th>Assign To</th>
                                            <th>Relation</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php $__currentLoopData = $contact->contact_listings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cl): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($cl->listing ? $cl->listing->title : 'N/A'); ?></td>
                                                <td><?php echo e($cl->assignee ? $cl->assignee->name : 'N/A'); ?></td>
                                                <td><?php echo e($cl->relation ?? 'N/A'); ?></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div id="uRc" class="container-fluid tab-pane p-0">
                                <div class="card-header">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="card-title pull-left font-weight-bold">Related Contacts</div>
                                            <div class="card-title pull-right">
                                                <button data-toggle="modal" data-target="#addRcModal"
                                                        class="btn btn-primary"><i class="fa fa-plus"></i> Add Related
                                                    Contact
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <hr class="mt-0">
                                    <table class="prop-data-table table table-striped table-hover table-bordered"
                                           style="width:100%">
                                        <thead>
                                        <tr>
                                            <th>Related Contact</th>
                                            <th>Relation</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php $__currentLoopData = $contact->contact_relations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($cr->related_contact ? $cr->related_contact->name : 'N/A'); ?></td>
                                                <td><?php echo e($cr->relation ?? 'N/A'); ?></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div id="uRr" class="container-fluid tab-pane p-0">
                                <div class="card-header">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="card-title pull-left font-weight-bold">Related Requirements</div>
                                            <div class="card-title pull-right">
                                                <button data-toggle="modal" data-target="#addRrModal"
                                                        class="btn btn-primary"><i class="fa fa-plus"></i> Add Related
                                                    Requirement
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <hr class="mt-0">
                                    <table class="prop-data-table table table-striped table-hover table-bordered"
                                           style="width:100%">
                                        <thead>
                                        <tr>
                                            <th>Related Requirement</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php $__currentLoopData = $contact->contact_reqs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($rr->requirement ? $rr->requirement->title : 'N/A'); ?></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
							<div id="uId" class="container-fluid tab-pane p-0">
                                <div class="card-header">
									<div class="row">
                                        <div class="col-md-12">
                                            <div class="card-title font-weight-bold">ID Verification Status</div>
											<p>Fill out ID information before verifying ID. All fields marked with asterisk * are required to verify</p>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <form method="post" action="<?php echo e(route('updateContact', $contact->id)); ?>" data-toggle="validator"
                                                  autocomplete="off" class="form-styled">
                                                <?php echo csrf_field(); ?>
                                                <input type="hidden" name="type" value="idCheck">
                                                <div class="row">
                                                    <div class="col-xs-12 col-lg-4">
                                                        <div class="form-group">
                                                            <label class="control-label">Mark as Verified</label>
                                                            <select name="is_verified"
                                                                    class="form-control">
                                                                <option <?php echo e($contact->is_verified == 1 ? 'selected' : ''); ?> value="1">Yes</option>
                                                                <option <?php echo e($contact->is_verified == 2 ? 'selected' : ''); ?> value="2">No</option>
                                                            </select>
                                                            <span class="help-block with-errors"></span>
                                                        </div>
                                                    </div>
                                                </div>
												<div class="row">
                                                    <div class="col-xs-12 col-lg-4">
                                                        <div class="form-group">
                                                            <h5>Basic Information:</h5>
                                                        </div>
                                                    </div>
                                                </div>
												<div class="row">
                                                    <div class="col-xs-12 col-lg-4">
                                                        <div class="form-group">
															<label class="control-label">Title*</label>
                                                            <input value="<?php echo e($contact->id_title); ?>" type="text" name="id_title" required class="form-control" maxlength="50" />
															<span class="help-block with-errors"></span>
                                                        </div>
                                                    </div>
													<div class="col-xs-12 col-lg-4">
                                                        <div class="form-group">
															<label class="control-label">First*</label>
                                                            <input value="<?php echo e($contact->id_first_name); ?>" type="text" name="id_first_name" required class="form-control" maxlength="50" />
															<span class="help-block with-errors"></span>
                                                        </div>
                                                    </div>
													<div class="col-xs-12 col-lg-4">
                                                        <div class="form-group">
															<label class="control-label">Middle</label>
                                                            <input value="<?php echo e($contact->id_mid_name); ?>" type="text" name="id_mid_name" class="form-control" maxlength="50" />
                                                        </div>
                                                    </div>
													<div class="col-xs-12 col-lg-4">
                                                        <div class="form-group">
															<label class="control-label">Last*</label>
                                                            <input value="<?php echo e($contact->id_last_name); ?>" type="text" name="id_last_name" required class="form-control" maxlength="50" />
															<span class="help-block with-errors"></span>
                                                        </div>
                                                    </div>
													<div class="col-xs-12 col-lg-4">
                                                        <div class="form-group">
															<label class="control-label">Date of Birth</label>
                                                            <input value="<?php echo e($contact->id_dob); ?>" type="date" name="id_dob" class="form-control" maxlength="50" />
                                                        </div>
                                                    </div>
                                                </div>
												<div class="row">
                                                    <div class="col-xs-12 col-lg-4">
                                                        <div class="form-group">
                                                            <h5>Legal Address:</h5>
                                                        </div>
                                                    </div>
                                                </div>
												<div class="row">
                                                    <div class="col-xs-12 col-lg-6">
                                                        <div class="form-group">
															<label class="control-label">Unit no.*</label>
                                                            <input value="<?php echo e($contact->id_unit_no); ?>" type="text" name="id_unit_no" required class="form-control" maxlength="20" />
															<span class="help-block with-errors"></span>
                                                        </div>
                                                    </div>
													<div class="col-xs-12 col-lg-6">
                                                        <div class="form-group">
															<label class="control-label">Street no.*</label>
                                                            <input value="<?php echo e($contact->id_st_no); ?>" type="text" name="id_st_no" required class="form-control" maxlength="20" />
															<span class="help-block with-errors"></span>
                                                        </div>
                                                    </div>
													<div class="col-xs-12 col-lg-6">
                                                        <div class="form-group">
															<label class="control-label">Street name*</label>
                                                            <input value="<?php echo e($contact->id_st_name); ?>" type="text" name="id_st_name" required class="form-control" maxlength="50" />
															<span class="help-block with-errors"></span>
                                                        </div>
                                                    </div>
													<div class="col-xs-12 col-lg-6">
                                                        <div class="form-group">
															<label class="control-label">Suburb*</label>
                                                            <input value="<?php echo e($contact->id_suburb); ?>" type="text" name="id_suburb" required class="form-control" maxlength="50" />
															<span class="help-block with-errors"></span>
                                                        </div>
                                                    </div>
													<div class="col-xs-12 col-lg-12">
                                                        <div class="form-group">
															<label class="control-label">Custom Address</label>
                                                            <textarea name="id_address" class="form-control" maxlength="250"><?php echo e($contact->id_address); ?></textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-xs-12 col-lg-12">
                                                        <div class="form-group">
                                                            <button type="submit" name="submit" class="btn btn-success"><i
                                                                    class="fa fa-save fa-lg"> </i>&nbsp;Save
                                                            </button>
                                                        </div>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div id="uAml" class="container-fluid tab-pane p-0">
                                <div class="card-header">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <form method="post" action="<?php echo e(route('updateContact', $contact->id)); ?>" data-toggle="validator"
                                                  autocomplete="off" class="form-styled">
                                                <?php echo csrf_field(); ?>
                                                <input type="hidden" name="type" value="aml">
                                                <div class="row">
                                                    <div class="col-xs-12 col-lg-4">
                                                        <div class="form-group">
                                                            <label class="control-label">AML Check Status</label>
                                                            <select name="aml_check"
                                                                    class="form-control">
                                                                <option <?php echo e($contact->aml_check == 1 ? 'selected' : ''); ?> value="1">Complete</option>
                                                                <option <?php echo e($contact->aml_check == 2 ? 'selected' : ''); ?> value="2">Incomplete</option>
                                                            </select>
                                                            <span class="help-block with-errors"></span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col-xs-12 col-lg-12">
                                                        <div class="form-group">
                                                            <button type="submit" name="submit" class="btn btn-success"><i
                                                                    class="fa fa-save fa-lg"> </i>&nbsp;Save
                                                            </button>
                                                        </div>
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12">
                    <div class="card">
                        <ul class="nav nav-pills nav-pills-primary border-bottom-primary">
                            <li class="nav-item">
                                <a class="nav-link active" data-toggle="tab" href="#cStream">
                                    Stream</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab" href="#cAppointments">
                                    Appointments</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab" href="#cReminders">
                                    Reminders</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" data-toggle="tab" href="#cFeedback">
                                    Feedback</a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div id="cStream" class="container-fluid tab-pane active p-0">
                                <div class="card-header">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="card-title pull-left font-weight-bold">Stream</div>
                                            <div class="card-title pull-right">
                                                <button data-toggle="modal" data-target="#addStreamModal"
                                                        class="btn btn-primary"><i class="fa fa-plus"></i> Add a Note
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <hr class="mt-0">
                                    <table class="prop-data-table table table-striped table-hover table-bordered"
                                           style="width:100%">
                                        <thead>
                                        <tr>
                                            <th>Type</th>
                                            <th>Property</th>
                                            <th>Note</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php $__currentLoopData = $contact->contact_streams; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stream): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($stream->sub_type); ?></td>
                                                <td><?php echo e($stream->listing ? $stream->listing->title : 'N/A'); ?></td>
                                                <td><?php echo $stream->note ?? 'N/A'; ?></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div id="cAppointments" class="container-fluid tab-pane p-0">
                                <div class="card-header">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="card-title pull-left font-weight-bold">Appointments</div>
                                            <div class="card-title pull-right">
                                                <button data-toggle="modal" data-target="#addAppointmentModal"
                                                        class="btn btn-primary"><i class="fa fa-plus"></i> Add
                                                    Appointment
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <hr class="mt-0">
                                    <table class="prop-data-table table table-striped table-hover table-bordered"
                                           style="width:100%">
                                        <thead>
                                        <tr>
                                            <th>Title</th>
                                            <th>Start</th>
                                            <th>End</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php $__currentLoopData = $contact->appointments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $appointment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($appointment->title); ?></td>
                                                <td><?php echo e(Carbon\Carbon::parse($appointment->start)->format('F j, Y, g:i a')); ?></td>
                                                <td><?php echo e(Carbon\Carbon::parse($appointment->end)->format('F j, Y, g:i a')); ?></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div id="cReminders" class="container-fluid tab-pane p-0">
                                <div class="card-header">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="card-title pull-left font-weight-bold">Reminders</div>
                                            <div class="card-title pull-right">
                                                <button data-toggle="modal" data-target="#addReminderModal"
                                                        class="btn btn-primary"><i class="fa fa-plus"></i> Add Reminder
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <hr class="mt-0">
                                    <table class="prop-data-table table table-striped table-hover table-bordered"
                                           style="width:100%">
                                        <thead>
                                        <tr>
                                            <th>Type</th>
                                            <th>Due Date</th>
                                            <th>Priority</th>
                                            <th>Property</th>
                                            <th>Description</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php $__currentLoopData = $contact->contact_reminders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $reminder): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($reminder->sub_type); ?></td>
                                                <td><?php echo e($reminder->date ?? 'N/A'); ?></td>
                                                <td>
                                                    <?php if($reminder->priority == 1): ?>
                                                        High
                                                    <?php endif; ?>
                                                    <?php if($reminder->priority == 2): ?>
                                                        Medium
                                                    <?php endif; ?>
                                                    <?php if($reminder->priority == 3): ?>
                                                        Low
                                                    <?php endif; ?>
                                                </td>
                                                <td><?php echo e($reminder->listing ? $reminder->listing->title : 'N/A'); ?></td>
                                                <td><?php echo $reminder->note ?? 'N/A'; ?></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div id="cFeedback" class="container-fluid tab-pane p-0">
                                <div class="card-header">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="card-title pull-left font-weight-bold">Feedback</div>
                                            <div class="card-title pull-right">
                                                <button data-toggle="modal" data-target="#addFeedbackModal"
                                                        class="btn btn-primary"><i class="fa fa-plus"></i> Add Feedback
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                    <hr class="mt-0">
                                    <table class="prop-data-table table table-striped table-hover table-bordered"
                                           style="width:100%">
                                        <thead>
                                        <tr>
                                            <th>Type</th>
                                            <th>Date</th>
                                            <th>Agent</th>
                                            <th>Feedback</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <?php $__currentLoopData = $contact->contact_feedbacks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $feedback): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e($feedback->sub_type); ?></td>
                                                <td><?php echo e($feedback->date ?? 'N/A'); ?></td>
                                                <td><?php echo e($feedback->agent ? $feedback->agent->name : 'N/A'); ?></td>
                                                <td><?php echo $feedback->note ?? 'N/A'; ?></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-4">
            <div class="card">
                <div class="card-header">
                    <div class="card-title font-weight-bold">Contact Logs</div>
                    <hr class="mt-0">
                    <table id="logs-table" class="table table-striped table-hover table-bordered"
                           style="width:100%">
                        <thead>
                        <tr>
                            <th>Log</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php $__currentLoopData = $contact->logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($log->message); ?> by <?php echo e($log->user->name); ?></td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('pageSpecificScripts'); ?>
    <?php echo $__env->make('admin.contacts.modals.editProfileModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('admin.contacts.modals.editCDModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('admin.contacts.modals.editMarketingModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('admin.contacts.modals.addStreamModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('admin.contacts.modals.addAppointmentModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('admin.contacts.modals.addReminderModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('admin.contacts.modals.addFeedbackModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('admin.contacts.modals.addRpModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('admin.contacts.modals.addRcModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('admin.contacts.modals.addRrModal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <script src="<?php echo e(asset('back_assets/assets/plugins/bootstrap-datatable/js/jquery.dataTables.min.js')); ?>"></script>
    <script src="<?php echo e(asset('back_assets/assets/plugins/bootstrap-datatable/js/dataTables.bootstrap4.min.js')); ?>"></script>
    <script src="<?php echo e(asset('back_assets/assets/plugins/bootstrap-select/js/bootstrap-select.min.js')); ?>"></script>
    <script src="<?php echo e(asset('back_assets/assets/plugins/summernote/dist/summernote-bs4.min.js')); ?>"></script>
    <script src="<?php echo e(asset('back_assets/assets/js/app/leadsScript.js')); ?>?<?php echo e(app_version()); ?>"></script>
    <script type="text/javascript">
        $('.content_area').summernote({
            onCreateLink: function (originalLink) {
                return originalLink; // return original link
            },
            dialogsInBody: true,
            height: 200,
            tabsize: 2
        });
        $('.prop-data-table').DataTable({
            "ordering": false,
            "searching": false,
            "lengthMenu": [[5, 10, 50], [5, 10, 50]],
            "pageLength": 5,
        });
        $('#logs-table').DataTable({
            "ordering": false,
            "searching": false,
            "lengthMenu": [[20, 50, 100], [20, 50, 100]],
            "pageLength": 20,
        });
    </script>
    <?php if(Session::has('success')): ?>
        <script type="text/javascript">
            toastr.success('<?php echo e(Session::get('success')); ?>');
        </script>
    <?php endif; ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\xampp\htdocs\propco\resources\views/admin/contacts/contactDetails.blade.php ENDPATH**/ ?>