Server : Apache System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64 User : tradze ( 1001) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/tradze/www/storage/framework/views/ |
<?php $__env->startSection('content'); ?>
<div class="page-content">
<!-- BEGIN PAGE HEADER-->
<div class="page-bar">
<ul class="page-breadcrumb">
<li>
<i class="fa fa-home"></i>
<a href="<?php echo url(''); ?>"><?php echo e(trans('general.breadcrumbs_home')); ?></a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<a href="<?php echo route('admin.users.therapists.index'); ?>"><?php echo e(trans('users::therapists.breadcrumbs_title')); ?></a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<a href="<?php echo route('admin.users.therapists.index'); ?>"><?php echo e(trans('users::therapists.page_title')); ?></a>
<i class="fa fa-angle-right"></i>
</li>
<li>
<a href="#"><?php echo e(trans('users::therapists.show_title')); ?></a>
</li>
</ul>
<div class="page-toolbar">
<a href="<?php echo e(route('admin.users.therapists.index')); ?>" class="btn blue">
<i class="fa fa-angle-left"></i>
<?php echo e(trans('general.action_back')); ?>
</a>
</div>
</div>
<!-- END PAGE HEADER-->
<!-- BEGIN PAGE CONTENT-->
<div class="row margin-top-20">
<div class="col-md-12">
<!-- BEGIN PROFILE SIDEBAR -->
<div class="profile-sidebar">
<!-- PORTLET MAIN -->
<div class="portlet light profile-sidebar-portlet">
<!-- SIDEBAR USERPIC -->
<div class="profile-userpic">
<?php if(isset($obj->avatar)): ?>
<img src="data:image/jpeg;base64,<?php echo e(base64_encode($obj->avatar)); ?>" class="img-responsive" alt="">
<?php endif; ?>
</div>
<!-- END SIDEBAR USERPIC -->
<!-- SIDEBAR USER TITLE -->
<div class="profile-usertitle">
<div class="profile-usertitle-name">
<!-- <?php echo e(isset($obj->name) ? $obj->name : ''); ?> -->
<?php echo e(isset($obj->profile->business_name) ? $obj->profile->business_name : $obj->name); ?>
</div>
<div class="profile-usertitle-job">
<?php echo e(isset($obj->role) ? $obj->role : ''); ?>
</div>
<div class="profile-usertitle-job">
Subscribed
<?php if(!empty($obj->is_subscribed) && $obj->is_subscribed == true): ?>
<i class="fa fa-check-circle text-success"></i>
<?php else: ?>
<i class="fa fa-times-circle text-danger"></i>
<?php endif; ?>
</div>
<div class="profile-usertitle-job">
Service Documents
<?php if(!empty($obj->is_doc_verified) && $obj->is_doc_verified == true): ?>
<i class="fa fa-check-circle text-success"></i>
<?php else: ?>
<i class="fa fa-times-circle text-danger"></i>
<?php endif; ?>
</div>
</div>
<!-- END SIDEBAR USER TITLE -->
<!-- SIDEBAR MENU -->
<div class="profile-usermenu">
<ul class="nav">
<li class="active">
<a href="<?php echo e(route('admin.users.therapists.show',['id'=>$obj->id])); ?>">
<i class="icon-home"></i>
<?php echo e(trans('users::therapists.overview_title')); ?>
</a>
</li>
<li>
<a href="<?php echo e(route('admin.users.therapists.edit',['id'=>$obj->id])); ?>">
<i class="icon-settings"></i>
<?php echo e(trans('users::therapists.settings_title')); ?>
</a>
</li>
</ul>
</div>
<!-- END MENU -->
<div class="portlet light">
<div>
<h4 class="profile-desc-title">About <?php echo e(isset($obj->name) ? $obj->name: ''); ?></h4>
<div class="margin-top-10 profile-desc-link">
<i class="fa fa-phone"></i>
<a href="tel:<?php echo e(isset($obj->profile->mobile_number) ? $obj->profile->mobile_number : ''); ?>"><?php echo e(isset($obj->profile->mobile_number) ? $obj->profile->mobile_number : ''); ?></a>
</div>
<div class="margin-top-10 profile-desc-link">
<i class="fa fa-envelope"></i>
<a href="mailto:<?php echo e(isset($obj->email) ? $obj->email : ''); ?>"><?php echo e(isset($obj->email) ? $obj->email : ''); ?></a>
</div>
<div class="margin-top-20">
<span class="profile-desc-text">
<?php echo e(isset($obj) && isset($obj->profile) && isset($obj->profile->about) ? $obj->profile->about : 'No description available.'); ?>
</span>
</div>
</div>
</div>
</div>
<!-- END PORTLET MAIN -->
</div>
<!-- END BEGIN PROFILE SIDEBAR -->
<!-- BEGIN PROFILE CONTENT -->
<div class="profile-content">
<?php if(session('success')): ?>
<div class="alert alert-success"><?php echo e(session('success')); ?></div>
<?php endif; ?>
<?php if(session('error')): ?>
<div class="alert alert-danger"><?php echo e(session('error')); ?></div>
<?php endif; ?>
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="portlet blue-hoki box">
<div class="portlet-title">
<div class="caption">
<i class="icon-info"></i> Add Internal Notes
</div>
</div>
<div class="portlet-body">
<form method="POST" action="<?php echo e(route('admin.users.therapists.internalNotes.add')); ?>">
<div class="form-group">
<textarea class="form-control" id="noteText" name="text_body" rows="4" required></textarea>
<input type="hidden" name="user_id" value="<?php echo e($obj->id); ?>"> <!-- Hidden field for user ID -->
<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
</div>
<button type="submit" class="btn btn-primary">Add Note</button>
</form>
</div>
</div>
</div>
</div>
<!--Internal Notes-->
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="portlet blue-hoki box">
<div class="portlet-title">
<div class="caption">
<i class="icon-info"></i> Internal Notes
</div>
</div>
<div class="portlet-body">
<?php if(isset($internal_notes) && count($internal_notes) > 0): ?>
<ul class="list-unstyled">
<?php foreach($internal_notes as $note): ?>
<li class="mb-2" style="border-bottom: 1px solid #eee; padding-bottom: 10px;">
<div style="display: flex; justify-content: space-between; align-items: center;">
<!-- Left side -->
<div>
<strong class="note-text-<?php echo e($note->id); ?>"><?php echo e($note->text_body); ?></strong>
</div>
<!-- Right side -->
<div style="display: flex; align-items: center; gap: 10px;">
<span class="text-muted" style="font-size: 12px;">
<?php echo e($note->created_at->format('d M Y, h:i A')); ?>
</span>
<button
class="btn btn-xs btn-danger btn-edit-note"
data-id="<?php echo e($note->id); ?>"
data-text="<?php echo e($note->text_body); ?>"
title="Edit Note">
<i class="fa fa-pencil"></i>
</button>
<button
class="btn btn-xs btn-danger btn-remove-note"
data-id="<?php echo e($note->id); ?>"
title="Remove Note">
<i class="fa fa-trash"></i>
</button>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<p>You have no internal notes.</p>
<?php endif; ?>
</div>
</div>
</div>
</div>
<!--End Internal Notes-->
</div>
<!-- END PROFILE CONTENT -->
</div>
<!-- END PAGE CONTENT-->
</div>
<!-- Edit Note Modal -->
<div class="modal fade" id="editUserNoteModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Edit Note</h5>
<button type="button" class="close" data-dismiss="modal">
×
</button>
</div>
<div class="modal-body">
<textarea id="editNoteInput" class="form-control" rows="4"></textarea>
<input type="hidden" id="editNoteId">
</div>
<div class="modal-footer">
<button class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button class="btn btn-primary" id="saveEditedNote">Save</button>
</div>
</div>
</div>
</div>
<?php echo $__env->make('users::admin.add_schedule_modal', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts_page'); ?>
@parent
<script src="<?php echo e(asset('/themes/admin/assets/global/plugins/bootstrap-wysihtml5/wysihtml5-0.3.0.js')); ?>"
type="text/javascript"></script>
<script src="<?php echo e(asset('/themes/admin/assets/global/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.js')); ?>"
type="text/javascript"></script>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts_custom2'); ?>
<script>
var CSRF_TOKEN = $('input[name="_token"]').val();
$('#modal_error').hide();
$("#add_schedule").click(function() {
$("#add_schedule_modal").modal('show');
});
$("#cancel_add_schedule").click(function() {
//reset error message
$("#modal_error").text('');
$("#modal_error").hide();
//close modal form
$("#add_schedule_modal").modal('hide');
//reset modal form
$('#form_add_schedule')[0].reset();
});
$(document).on('submit', '#form_add_schedule', function(e) {
e.preventDefault();
var url = $(this).attr('action');
var $html = $(this);
$.ajax({
url: url,
type: 'post',
dataType: 'json',
data: $(this).serialize(),
beforeSend: function() {
$html.find('#modal_error').text('');
$html.find('#modal_error').hide();
},
error: function(data) {
var response = jQuery.parseJSON(data.responseText);
$html.find('#modal_error').text('');
$html.find('#modal_error').removeClass('hidden');
$.each(response, function(index, value) {
$html.find('#modal_error').append('<div>' + value[0] + '</div>');
});
$html.find('#modal_error').show();
},
success: function(data) {
location.reload();
}
}); //end ajax
});
//edit modal
$('.modal_edit_error').hide();
$(document).on('submit', '.form_edit_schedule', function(e) {
e.preventDefault();
var url = $(this).attr('action');
var $html = $(this);
$.ajax({
url: url,
type: 'post',
dataType: 'json',
data: $(this).serialize(),
beforeSend: function() {
$html.find('.modal_edit_error').text('');
$html.find('.modal_edit_error').hide();
},
error: function(data) {
var response = jQuery.parseJSON(data.responseText);
$html.find('.modal_edit_error').text('');
$html.find('.modal_edit_error').removeClass('hidden');
$.each(response, function(index, value) {
$html.find('.modal_edit_error').append('<div>' + value[0] + '</div>');
});
$html.find('.modal_edit_error').show();
},
success: function(data) {
location.reload();
}
}); //end ajax
});
//delete schedule
$(".delete_schedule").click(function() {
//remove from doom
$(this).closest('tr').remove();
var del_url = $(this).attr('url');
//remove from db
$.ajax({
url: del_url,
type: 'get',
success: function(data) {
// location.reload();
}
}); //end ajax
});
</script>
<script>
$(document).on('click', '.btn-remove-note', function() {
var noteId = $(this).data('id');
var button = $(this);
if (confirm('Are you sure you want to delete this note?')) {
$.ajax({
url: '<?php echo e(route("admin.users.therapists.internalNotes.delete")); ?>', // adjust to your actual route name
method: 'POST',
data: {
_token: '<?php echo e(csrf_token()); ?>',
note_id: noteId
},
success: function(response) {
if (response.success) {
button.closest('li').fadeOut(300, function() {
$(this).remove();
});
} else {
alert(response.message);
window.location.reload();
}
},
error: function(xhr) {
alert('Something went wrong. Please try again.');
}
});
}
});
// Open modal on Edit button click
$(document).on("click", ".btn-edit-note", function() {
const id = $(this).data("id");
const text = $(this).data("text");
$("#editNoteId").val(id);
$("#editNoteInput").val(text);
$("#editUserNoteModal").modal("show");
});
// Save edited note
$("#saveEditedNote").on("click", function() {
const id = $("#editNoteId").val();
const newText = $("#editNoteInput").val();
$.ajax({
url: `<?php echo e(route("admin.users.therapists.internalNotes.update")); ?>`,
type: "POST",
data: {
id: id,
text_body: newText,
_token: '<?php echo e(csrf_token()); ?>'
},
success: function() {
// update UI
$(".note-text-" + id).text(newText);
// close modal
$("#editUserNoteModal").modal("hide");
}
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.profile', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>