⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.139
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Server Software:
Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.25
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
erp.dev-unit.com
/
storage
/
framework
/
views
/
View File Name :
3637d365475c6ffab277c31e7e228ce7.php
<?php $__env->startSection('page-title'); ?> <?php echo e($lead->name); ?> <?php $__env->stopSection(); ?> <?php $__env->startPush('css'); ?> <style> .nav-tabs .nav-link-tabs.active { background: none; } </style> <link rel="stylesheet" href="<?php echo e(asset('assets/js/plugins/summernote-0.8.18-dist/summernote-lite.min.css')); ?>"> <link rel="stylesheet" href="<?php echo e(asset('packages/workdo/Lead/src/Resources/assets/css/dropzone.min.css')); ?>"> <?php $__env->stopPush(); ?> <?php $lead->activities = $lead->activities->load('user'); $lead->discussions = $lead->discussions->load('user'); $lead->calls = $lead->calls->load('getLeadCallUser'); ?> <?php $__env->startPush('scripts'); ?> <script> var scrollSpy = new bootstrap.ScrollSpy(document.body, { target: '#useradd-sidenav', offset: 300 }) </script> <script src="<?php echo e(asset('packages/workdo/Lead/src/Resources/assets/js/dropzone.min.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/plugins/summernote-0.8.18-dist/summernote-lite.min.js')); ?>"></script> <script> <?php if(!Auth::user()->hasRole('client')): ?> Dropzone.autoDiscover = false; myDropzone2 = new Dropzone("#dropzonewidget2", { maxFiles: 20, maxFilesize: 20, parallelUploads: 1, acceptedFiles: ".jpeg,.jpg,.png,.pdf,.doc,.txt", url: "<?php echo e(route('leads.file.upload', $lead->id)); ?>", success: function(file, response) { if (response.is_success) { dropzoneBtn(file, response); } else { myDropzone2.removeFile(file); toastrs('Error', response.error, 'error'); } }, error: function(file, response) { myDropzone2.removeFile(file); if (response.error) { toastrs('Error', response.error, 'error'); } else { toastrs('Error', response, 'error'); } } }); myDropzone2.on("sending", function(file, xhr, formData) { formData.append("_token", $('meta[name="csrf-token"]').attr('content')); formData.append("lead_id", <?php echo e($lead->id); ?>); }); function dropzoneBtn(file, response) { var download = document.createElement('a'); download.setAttribute('href', response.download); download.setAttribute('class', "btn btn-sm btn-primary m-1"); download.setAttribute('data-toggle', "tooltip"); download.setAttribute('download', file.name); download.setAttribute('data-original-title', "<?php echo e(__('Download')); ?>"); download.innerHTML = "<i class='ti ti-download'></i>"; var del = document.createElement('a'); del.setAttribute('href', response.delete); del.setAttribute('class', "btn btn-sm btn-danger mx-1"); del.setAttribute('data-toggle', "tooltip"); del.setAttribute('data-original-title', "<?php echo e(__('Delete')); ?>"); del.innerHTML = "<i class='ti ti-trash'></i>"; del.addEventListener("click", function(e) { e.preventDefault(); e.stopPropagation(); if (confirm("Are you sure ?")) { var btn = $(this); $.ajax({ url: btn.attr('href'), data: { _token: $('meta[name="csrf-token"]').attr('content') }, type: 'DELETE', success: function(response) { if (response.is_success) { btn.closest('.dz-image-preview').remove(); btn.closest('.dz-file-preview').remove(); toastrs('Success', response.success, 'success'); } else { toastrs('Error', response.error, 'error'); } }, error: function(response) { response = response.responseJSON; if (response.error) { toastrs('Error', response.error, 'error'); } else { toastrs('Error', response, 'error'); } } }) } }); var html = document.createElement('div'); html.appendChild(download); <?php if(!Auth::user()->hasRole('client')): ?> <?php if (app('laratrust')->hasPermission('lead edit')) : ?> html.appendChild(del); <?php endif; // app('laratrust')->permission ?> <?php endif; ?> file.previewTemplate.appendChild(html); } <?php $__currentLoopData = $lead->files; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $file): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> // Create the mock file: var mockFile2 = { name: "<?php echo e($file->file_name); ?>", size: "<?php echo e(get_size(get_file($file->file_path))); ?>" }; // Call the default addedfile event handler myDropzone2.emit("addedfile", mockFile2); // And optionally show the thumbnail of the file: myDropzone2.emit("thumbnail", mockFile2, "<?php echo e(get_file($file->file_path)); ?>"); myDropzone2.emit("complete", mockFile2); dropzoneBtn(mockFile2, { download: "<?php echo e(get_file($file->file_path)); ?>", delete: "<?php echo e(route('leads.file.delete', [$lead->id, $file->id])); ?>" }); <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <?php if (app('laratrust')->hasPermission('lead task edit')) : ?> $(document).on("click", ".task-checkbox", function() { var chbox = $(this); var lbl = chbox.parent().parent().find('label'); $.ajax({ url: chbox.attr('data-url'), data: { _token: $('meta[name="csrf-token"]').attr('content'), status: chbox.val() }, type: 'PUT', success: function(response) { if (response.is_success) { chbox.val(response.status); if (response.status) { lbl.addClass('strike'); lbl.find('.badge').removeClass('bg-warning').addClass('bg-success'); } else { lbl.removeClass('strike'); lbl.find('.badge').removeClass('bg-success').addClass('bg-warning'); } lbl.find('.badge').html(response.status_label); toastrs('Success', response.success, 'success'); } else { toastrs('Error', response.error, 'error'); } }, error: function(response) { response = response.responseJSON; if (response.is_success) { toastrs('Error', response.error, 'error'); } else { toastrs('Error', response, 'error'); } } }) }); <?php endif; // app('laratrust')->permission ?> $(document).ready(function() { var tab = 'general'; <?php if($tab = Session::get('status')): ?> var tab = '<?php echo e($tab); ?>'; <?php endif; ?> $("#myTab2 .nav-link-tabs[href='#" + tab + "']").trigger("click"); }); </script> <?php if(Laratrust::hasPermission('lead edit')): ?> <script> $(document).ready(function() { $('.summernote').on('summernote.blur', function() { $.ajax({ url: "<?php echo e(route('leads.note.store', $lead->id)); ?>", data: { _token: $('meta[name="csrf-token"]').attr('content'), notes: $(this).val() }, type: 'POST', success: function(response) { if (response.is_success) {} else { toastrs('Error', response.error, 'error'); } }, error: function(response) { response = response.responseJSON; if (response.is_success) { toastrs('Error', response.error, 'error'); } else { toastrs('Error', response, 'error'); } } }) }); }); </script> <?php else: ?> <script> $('.summernote').hide('disable'); </script> <?php endif; ?> <script> if ($(".summernote").length > 0) { $('.summernote').summernote({ toolbar: [ ['style', ['style']], ['font', ['bold', 'italic', 'underline', 'strikethrough']], ['list', ['ul', 'ol', 'paragraph']], ['insert', ['link', 'unlink']], ], height: 230, }); } </script> <script> document.querySelectorAll('.description-container').forEach(function(container) { container.addEventListener('click', function() { var shortDescription = container.querySelector('.shortDescription'); var fullDescription = container.querySelector('.fullDescription'); if (shortDescription.style.display === 'block' || shortDescription.style.display === '') { shortDescription.style.display = 'none'; fullDescription.style.display = 'block'; } else { shortDescription.style.display = 'block'; fullDescription.style.display = 'none'; } }); }); </script> <?php $__env->stopPush(); ?> <?php $__env->startSection('page-breadcrumb'); ?> <?php echo e(__('Leads')); ?>, <?php echo e($lead->name); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('page-action'); ?> <div class="d-flex"> <?php echo $__env->yieldPushContent('addButtonHook'); ?> <?php if (app('laratrust')->hasPermission('lead edit')) : ?> <a class="btn btn-sm btn-primary btn-icon me-2" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Labels')); ?>" data-ajax-popup="true" data-size="md" data-title="<?php echo e(__('Label')); ?>" data-url="<?php echo e(URL::to('leads/' . $lead->id . '/labels')); ?>"><i class="ti ti-tag text-white"></i></a> <a class="btn btn-sm btn-info btn-icon me-2" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Edit')); ?>" data-ajax-popup="true" data-size="lg" data-title="<?php echo e(__('Edit Lead')); ?>" data-url="<?php echo e(URL::to('leads/' . $lead->id . '/edit')); ?>"><i class="ti ti-pencil text-white"></i></a> <?php endif; // app('laratrust')->permission ?> <?php if (app('laratrust')->hasPermission('lead to deal convert')) : ?> <?php if(!empty($deal)): ?> <a href="<?php if (app('laratrust')->hasPermission('deal show')) : ?> <?php if($deal->is_active): ?> <?php echo e(route('deals.show', $deal->id)); ?> <?php else: ?> # <?php endif; ?> <?php else: ?> # <?php endif; // app('laratrust')->permission ?>" class="btn btn-sm btn-primary btn-icon " data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Already Converted To Deal')); ?>"><i class="ti ti-exchange text-white"></i></a> <?php else: ?> <a class="btn btn-sm btn-primary btn-icon " data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Convert To Deal')); ?>" data-ajax-popup="true" data-size="md" data-title="<?php echo e(__('Convert [') . $lead->subject . '] To Deal'); ?>" data-url="<?php echo e(URL::to('leads/' . $lead->id . '/show_convert')); ?>"><i class="ti ti-exchange text-white"></i></a> <?php endif; ?> <?php endif; // app('laratrust')->permission ?> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="row"> <div class="col-12 mb-3"> <div class="row"> <div class="col-3"> <div class="card sticky-top" style="top:30px"> <div class="list-group list-group-flush" id="useradd-sidenav"> <a class="list-group-item list-group-item-action border-0" href="#general"><?php echo e(__('General')); ?> <div class="float-end"><i class="ti ti-chevron-right"></i></div> </a> <?php if(!Auth::user()->hasRole('client')): ?> <a class="list-group-item list-group-item-action border-0" href="#tasks"><?php echo e(__('Tasks')); ?> <div class="float-end"><i class="ti ti-chevron-right"></i></div> </a> <?php endif; ?> <?php if(!Auth::user()->hasRole('client')): ?> <a class="list-group-item list-group-item-action border-0" href="#users-products"><?php echo e(__('Users | Products')); ?> <div class="float-end"><i class="ti ti-chevron-right"></i></div> </a> <?php endif; ?> <?php if(!Auth::user()->hasRole('client')): ?> <a class="list-group-item list-group-item-action border-0" href="#sources-emails"><?php echo e(__('Sources | Emails')); ?> <div class="float-end"><i class="ti ti-chevron-right"></i></div> </a> <?php endif; ?> <a class="list-group-item list-group-item-action border-0" href="#discussion-notes"><?php echo e(__('Discussion | Notes')); ?> <div class="float-end"><i class="ti ti-chevron-right"></i></div> </a> <?php if(!Auth::user()->hasRole('client')): ?> <a class="list-group-item list-group-item-action border-0" href="#files"><?php echo e(__('Files')); ?> <div class="float-end"><i class="ti ti-chevron-right"></i></div> </a> <?php endif; ?> <?php if(!Auth::user()->hasRole('client')): ?> <a class="list-group-item list-group-item-action border-0" href="#calls"><?php echo e(__('Calls')); ?> <div class="float-end"><i class="ti ti-chevron-right"></i></div> </a> <?php endif; ?> <?php if(!Auth::user()->hasRole('client')): ?> <a class="list-group-item list-group-item-action border-0" href="#activity"><?php echo e(__('Activity')); ?> <div class="float-end"><i class="ti ti-chevron-right"></i></div> </a> <?php endif; ?> <?php echo $__env->yieldPushContent('indiamart_tab'); ?> </div> </div> </div> <div class="col-9"> <div id="general"> <?php $tasks = $lead->tasks; $products = $lead->products(); $sources = $lead->sources(); $calls = $lead->calls; $emails = $lead->emails; ?> <div class="card"> <div class="card-body"> <div class="row"> <div class="col-md-4 col-sm-4"> <div class="d-flex align-items-start"> <div class="theme-avtar bg-primary badge"> <i class="ti ti-mail"></i> </div> <div class="ms-2"> <strong><?php echo e(__('Email')); ?></strong> <h5 class="mb-0 text-primary"><?php echo e($lead->email); ?></h5> </div> </div> </div> <div class="col-md-4 col-sm-4"> <div class="d-flex align-items-start"> <div class="theme-avtar bg-warning badge"> <i class="ti ti-phone"></i> </div> <div class="ms-2"> <strong><?php echo e(__('Phone')); ?></strong> <h5 class="mb-0 text-warning"><?php echo e($lead->phone); ?></h5> </div> </div> </div> <div class="col-md-4 col-sm-4"> <div class="d-flex align-items-start"> <div class="theme-avtar bg-info badge"> <i class="ti ti-test-pipe"></i> </div> <div class="ms-2"> <strong><?php echo e(__('Pipeline')); ?></strong> <h5 class="mb-0 text-info"><?php echo e($lead->pipeline->name); ?></h5> </div> </div> </div> <div class="col-md-4 col-sm-4 mt-4"> <div class="d-flex align-items-start"> <div class="theme-avtar bg-primary badge"> <i class="ti ti-server"></i> </div> <div class="ms-2"> <strong><?php echo e(__('Stage')); ?></strong> <h5 class="mb-0 text-primary"><?php echo e($lead->stage->name); ?></h5> </div> </div> </div> <div class="col-md-4 col-sm-4 mt-4"> <div class="d-flex align-items-start"> <div class="theme-avtar bg-warning badge"> <i class="ti ti-calendar"></i> </div> <div class="ms-2"> <strong><?php echo e(__('Created')); ?></strong> <h5 class="mb-0 text-warning"> <?php echo e(company_date_formate($lead->created_at)); ?></h5> </div> </div> </div> <div class="col-md-4 col-sm-4 mt-4"> <div class="d-flex align-items-start"> <div class="theme-avtar bg-info badge"> <i class="ti ti-chart-bar"></i> </div> <div class="ms-2"> <h3 class="mb-0 text-info"><?php echo e($precentage); ?>%</h3> <div class="progress"> <div class="progress-bar bg-info" style="width: <?php echo e($precentage); ?>%;"></div> </div> </div> </div> </div> <div class="col-md-4 col-sm-4 mt-4"> <div class="d-flex align-items-start"> <div class="theme-avtar bg-primary badge"> <i class="ti ti-calendar-time"></i> </div> <div class="ms-2"> <strong><?php echo e(__('Follow Up Date')); ?></strong> <h5 class="mb-0 <?php echo e($lead->follow_up_date != null && $lead->follow_up_date < date('Y-m-d') ? 'text-danger' : 'text-primary'); ?>"> <?php echo e(isset($lead->follow_up_date) && !empty($lead->follow_up_date) ? company_date_formate($lead->follow_up_date) : '-'); ?> </h5> </div> </div> </div> <?php if(!empty($customFields) && count($lead->customField) > 0): ?> <?php $__currentLoopData = $customFields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="col-md-4 col-sm-4 mt-4"> <div class="d-flex align-items-start"> <?php if($key % 3 === 2): ?> <div class="theme-avtar bg-primary badge <?php echo e($field->type == 'textarea' && !empty($lead->customField[$field->id]) ? 'mt-2' : ''); ?>"> <i class="ti ti-circle-plus"></i> </div> <div class="ms-2"> <strong><?php echo e(Str::ucfirst($field->name)); ?></strong><br> <?php if($field->type == 'attachment'): ?> <a href="<?php echo e(!empty($lead->customField[$field->id]) ? get_file($lead->customField[$field->id]) : get_file('packages/workdo/Lead/src/Resources/assets/upload/default-img.png')); ?>" target=_blank class="btn btn-md p-0" data-bs-toggle="tooltip" title="<?php echo e(__('Preview')); ?>"> <h5 class="text-primary"> <?php echo e(__('Preview Attachment')); ?> <i class="ti ti-arrow-up-right"></i> </h5> </a> <?php else: ?> <?php if($field->type == 'textarea'): ?> <div class="description-container" data-key="<?php echo e($key); ?>"> <h5 class="text-primary shortDescription" id="shortDescription<?php echo e($key); ?>"> <?php echo e(\Illuminate\Support\Str::limit(!empty($lead->customField[$field->id]) ? $lead->customField[$field->id] : '-', 40)); ?> </h5> <h5 class="text-primary fullDescription" style="display: none;"> <?php echo e(!empty($lead->customField[$field->id]) ? $lead->customField[$field->id] : '-'); ?> </h5> </div> <?php else: ?> <h5 class="text-primary"> <?php echo e(!empty($lead->customField[$field->id]) ? $lead->customField[$field->id] : '-'); ?> </h5> <?php endif; ?> <?php endif; ?> </div> <?php elseif($key % 3 === 0): ?> <div class="theme-avtar bg-warning badge <?php echo e($field->type == 'textarea' && !empty($lead->customField[$field->id]) ? 'mt-2' : ''); ?>"> <i class="ti ti-circle-plus"></i> </div> <div class="ms-2"> <strong><?php echo e(Str::ucfirst($field->name)); ?></strong><br> <?php if($field->type == 'attachment'): ?> <a href="<?php echo e(!empty($lead->customField[$field->id]) ? get_file($lead->customField[$field->id]) : get_file('packages/workdo/Lead/src/Resources/assets/upload/default-img.png')); ?>" target=_blank class="btn btn-md p-0" data-bs-toggle="tooltip" title="<?php echo e(__('Preview')); ?>"> <h5 class="text-warning"> <?php echo e(__('Preview Attachment')); ?> <i class="ti ti-arrow-up-right"></i> </h5> </a> <?php else: ?> <?php if($field->type == 'textarea'): ?> <div class="description-container" data-key="<?php echo e($key); ?>"> <h5 class="text-warning shortDescription" id="shortDescription<?php echo e($key); ?>"> <?php echo e(\Illuminate\Support\Str::limit(!empty($lead->customField[$field->id]) ? $lead->customField[$field->id] : '-', 40)); ?> </h5> <h5 class="text-warning fullDescription" style="display: none;"> <?php echo e(!empty($lead->customField[$field->id]) ? $lead->customField[$field->id] : '-'); ?> </h5> </div> <?php else: ?> <h5 class="text-warning"> <?php echo e(!empty($lead->customField[$field->id]) ? $lead->customField[$field->id] : '-'); ?> </h5> <?php endif; ?> <?php endif; ?> </div> <?php elseif($key % 3 === 1): ?> <div class="theme-avtar bg-info badge <?php echo e($field->type == 'textarea' && !empty($lead->customField[$field->id]) ? 'mt-2' : ''); ?>"> <i class="ti ti-circle-plus"></i> </div> <div class="ms-2"> <strong><?php echo e(Str::ucfirst($field->name)); ?></strong><br> <?php if($field->type == 'attachment'): ?> <a href="<?php echo e(!empty($lead->customField[$field->id]) ? get_file($lead->customField[$field->id]) : get_file('packages/workdo/Lead/src/Resources/assets/upload/default-img.png')); ?>" target=_blank class="btn btn-md p-0" data-bs-toggle="tooltip" title="<?php echo e(__('Preview')); ?>"> <h5 class="text-info"><?php echo e(__('Preview Attachment')); ?> <i class="ti ti-arrow-up-right"></i> </h5> </a> <?php else: ?> <?php if($field->type == 'textarea'): ?> <div class="description-container" data-key="<?php echo e($key); ?>"> <h5 class="text-info shortDescription" id="shortDescription<?php echo e($key); ?>"> <?php echo e(\Illuminate\Support\Str::limit(!empty($lead->customField[$field->id]) ? $lead->customField[$field->id] : '-', 40)); ?> </h5> <h5 class="text-info fullDescription" style="display: none;"> <?php echo e(!empty($lead->customField[$field->id]) ? $lead->customField[$field->id] : '-'); ?> </h5> </div> <?php else: ?> <h5 class="text-info"> <?php echo e(!empty($lead->customField[$field->id]) ? $lead->customField[$field->id] : '-'); ?> </h5> <?php endif; ?> <?php endif; ?> </div> <?php endif; ?> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </div> </div> </div> <div class="col-xxl-12"> <div class="row"> <div class="col-lg-3 col-6"> <div class="card report_card"> <div class="card-body"> <div class="row align-items-center justify-content-between"> <div class="col-auto mb-3 mb-sm-0"> <small class="text-muted"><?php echo e(__('Tasks')); ?></small> <h3 class="mb-0"><?php echo e(count($tasks)); ?></h3> </div> <div class="col-auto"> <div class="theme-avtar bg-danger badge"> <i class="ti ti-subtask text-white"></i> </div> </div> </div> </div> </div> </div> <div class="col-lg-3 col-6"> <div class="card report_card"> <div class="card-body"> <div class="row align-items-center justify-content-between"> <div class="col-auto mb-3 mb-sm-0"> <small class="text-muted"><?php echo e(__('Product')); ?></small> <h3 class="mb-0"><?php echo e(count($products)); ?></h3> </div> <div class="col-auto"> <div class="theme-avtar bg-info badge"> <i class="ti ti-shopping-cart text-white"></i> </div> </div> </div> </div> </div> </div> <div class="col-lg-3 col-6"> <div class="card report_card"> <div class="card-body"> <div class="row align-items-center justify-content-between"> <div class="col-auto mb-3 mb-sm-0"> <small class="text-muted"><?php echo e(__('Source')); ?></small> <h3 class="mb-0"><?php echo e(count($sources)); ?></h3> </div> <div class="col-auto"> <div class="theme-avtar bg-success badge"> <i class="ti ti-social text-white"></i> </div> </div> </div> </div> </div> </div> <div class="col-lg-3 col-6"> <div class="card report_card"> <div class="card-body"> <div class="row align-items-center justify-content-between"> <div class="col-auto mb-3 mb-sm-0"> <small class="text-muted"><?php echo e(__('Files')); ?></small> <h3 class="mb-0"><?php echo e(count($lead->files)); ?></h3> </div> <div class="col-auto"> <div class="theme-avtar bg-warning badge"> <i class="ti ti-file-invoice text-white"></i> </div> </div> </div> </div> </div> </div> </div> <div id="tasks"> <div class="col-md-12"> <div class="row"> <div class="col-md-12"> <div class="card table-card"> <div class="card-header"> <div class="d-flex justify-content-between align-items-center"> <div> <h5><?php echo e(__('Tasks')); ?></h5> </div> <?php if (app('laratrust')->hasPermission('lead task create')) : ?> <div class="float-end"> <a class="btn btn-sm btn-primary float-end " data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Create')); ?>" data-url="<?php echo e(route('leads.tasks.create', $lead->id)); ?>" data-ajax-popup="true" data-title="<?php echo e(__('Create Task')); ?>"> <i class="ti ti-plus text-white"></i> </a> </div> <?php endif; // app('laratrust')->permission ?> </div> </div> <div class="card-body pt-0 table-border-style bg-none" style ="height:300px;overflow: auto;"> <div class=""> <table class="table align-items-center mb-0" id="tasks"> <tbody class="list"> <?php $__empty_1 = true; $__currentLoopData = $tasks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $task): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td> <div class="custom-control custom-switch form-check form-switch mb-2"> <?php if (app('laratrust')->hasPermission('lead task edit')) : ?> <input type="checkbox" class="form-check-input task-checkbox" role="switch" id="task_<?php echo e($task->id); ?>" <?php if($task->status): ?> checked="checked" <?php endif; ?> type="checkbox" value="<?php echo e($task->status); ?>" data-url="<?php echo e(route('leads.tasks.update.status', [$lead->id, $task->id])); ?>" /> <?php endif; // app('laratrust')->permission ?> <label for="task_<?php echo e($task->id); ?>" class="custom-control-label ml-4 <?php if($task->status): ?> strike <?php endif; ?>"> <h6 class="media-title text-sm form-check-label"> <?php echo e($task->name); ?> <?php if($task->status): ?> <div class="badge p-2 px-3 bg-success mb-1"> <?php echo e(__(Workdo\Lead\Entities\LeadTask::$status[$task->status])); ?> </div> <?php else: ?> <div class="badge p-2 px-3 bg-warning mb-1"> <?php echo e(__(Workdo\Lead\Entities\LeadTask::$status[$task->status])); ?> </div> <?php endif; ?> </h6> <div class="text-xs text-muted"> <?php echo e(__(Workdo\Lead\Entities\LeadTask::$priorities[$task->priority])); ?> - <span class="text-primary"><?php echo e(company_datetime_formate($task->date . ' ' . $task->time)); ?></span> </div> </label> </div> </td> <td class="Action text-end"> <span> <?php if (app('laratrust')->hasPermission('lead task edit')) : ?> <div class="action-btn me-2"> <a data-size="md" data-url="<?php echo e(route('leads.tasks.edit', [$lead->id, $task->id])); ?>" data-ajax-popup="true" data-title="<?php echo e(__('Edit Task')); ?>" class="mx-3 btn btn-sm align-items-center bg-info" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Edit')); ?>"><i class="ti ti-pencil text-white"></i></a> </div> <?php endif; // app('laratrust')->permission ?> <?php if (app('laratrust')->hasPermission('lead task delete')) : ?> <div class="action-btn"> <?php echo Form::open([ 'method' => 'DELETE', 'route' => ['leads.tasks.destroy', $lead->id, $task->id], 'id' => 'delete-form-' . $task->id, ]); ?> <a href="#!" class="mx-3 btn btn-sm align-items-center show_confirm bg-danger" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Delete')); ?>" data-confirm="<?php echo e(__('Are You Sure?')); ?>" data-text="<?php echo e(__('This action can not be undone. Do you want to continue?')); ?>"> <span class="text-white"> <i class="ti ti-trash"></i></span></a> <?php echo Form::close(); ?> </div> <?php endif; // app('laratrust')->permission ?> </span> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php echo $__env->make('layouts.nodatafound', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div id="users-products"> <div class="row"> <?php if(!Auth::user()->hasRole('client')): ?> <div class="col-md-6"> <div class="card table-card deal-card"> <div class="card-header"> <div class="d-flex justify-content-between align-items-center"> <div> <h5><?php echo e(__('Users')); ?></h5> </div> <?php if (app('laratrust')->hasPermission('lead edit')) : ?> <div class="float-end"> <a class="btn btn-sm btn-primary float-end " data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Add User')); ?>" data-url="<?php echo e(route('leads.users.edit', $lead->id)); ?>" data-ajax-popup="true" data-title="<?php echo e(__('Add User')); ?>"> <i class="ti ti-plus text-white"></i> </a> </div> <?php endif; // app('laratrust')->permission ?> </div> </div> <div class="card-body pt-0 table-border-style bg-none" style ="height:300px;overflow: auto;"> <div class=""> <table class="table align-items-center mb-0"> <tbody class="list"> <?php $__empty_1 = true; $__currentLoopData = $lead->users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td> <a <?php if($user->avatar): ?> href="<?php echo e(get_file($user->avatar)); ?>" <?php else: ?> href="<?php echo e(get_file('uploads/users-avatar/avatar.png')); ?>" <?php endif; ?> target="_blnak"> <img <?php if($user->avatar): ?> src="<?php echo e(get_file($user->avatar)); ?>" <?php else: ?> src="<?php echo e(get_file('uploads/users-avatar/avatar.png')); ?>" <?php endif; ?> class="rounded border-2 border border-primary" width="40" height="40"> </a> </td> <td> <span class="number-id"><?php echo e($user->name); ?></span> </td> <?php if (app('laratrust')->hasPermission('lead edit')) : ?> <td> <?php if($lead->created_by == \Auth::user()->id): ?> <div class="action-btn float-end"> <?php echo Form::open([ 'method' => 'DELETE', 'route' => ['leads.users.destroy', $lead->id, $user->id], 'id' => 'delete-form-' . $lead->id, ]); ?> <a href="#!" class="mx-3 btn btn-sm align-items-center show_confirm bg-danger" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Delete User')); ?>" data-confirm="<?php echo e(__('Are You Sure?')); ?>" data-text="<?php echo e(__('This action can not be undone. Do you want to continue?')); ?>"> <span class="text-white"> <i class="ti ti-trash"></i></span></a> <?php echo Form::close(); ?> </div> <?php endif; ?> </td> <?php endif; // app('laratrust')->permission ?> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php echo $__env->make('layouts.nodatafound', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> <?php endif; ?> <?php if(!Auth::user()->hasRole('client')): ?> <div class="col-md-6"> <div class="card table-card deal-card"> <div class="card-header"> <div class="d-flex justify-content-between align-items-center"> <div> <h5><?php echo e(__('Products')); ?></h5> </div> <?php if (app('laratrust')->hasPermission('lead edit')) : ?> <div class="float-end"> <a class="btn btn-sm btn-primary float-end " data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Add Products')); ?>" data-url="<?php echo e(route('leads.products.edit', $lead->id)); ?>" data-ajax-popup="true" data-title="<?php echo e(__('Add Products')); ?>"> <i class="ti ti-plus text-white"></i> </a> </div> <?php endif; // app('laratrust')->permission ?> </div> </div> <div class="card-body pt-0 table-border-style bg-none" style ="height:300px;overflow: auto;"> <div class=""> <table class="table align-items-center mb-0"> <tbody class="list"> <?php $__empty_1 = true; $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td> <?php if (check_file($product->image) == false) { $path = asset('packages/workdo/ProductService/src/Resources/assets/image/img01.jpg'); } else { $path = get_file($product->image); } ?> <a href="<?php echo e($path); ?>" target="_blank" class="image-fixsize"> <img style="width: 50px; height: 40px;" src="<?php echo e($path); ?>" class="rounded border-2 border border-primary"> </a> </td> <td> <span class="number-id"><?php echo e($product->name); ?> </span> (<span class="text-muted"><?php echo e(currency_format_with_sym($product->sale_price)); ?></span>) </td> <?php if (app('laratrust')->hasPermission('lead edit')) : ?> <td> <div class="action-btn float-end"> <?php echo Form::open([ 'method' => 'DELETE', 'route' => ['leads.products.destroy', $lead->id, $product->id], 'id' => 'delete-form-' . $lead->id, ]); ?> <a href="#!" class="mx-3 btn btn-sm align-items-center show_confirm bg-danger" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Delete Product')); ?>" data-confirm="<?php echo e(__('Are You Sure?')); ?>" data-text="<?php echo e(__('This action can not be undone. Do you want to continue?')); ?>"> <span class="text-white"> <i class="ti ti-trash"></i></span> </a> <?php echo Form::close(); ?> </div> </td> <?php endif; // app('laratrust')->permission ?> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php echo $__env->make('layouts.nodatafound', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> <?php endif; ?> </div> </div> <?php if(!Auth::user()->hasRole('client')): ?> <div id="sources-emails"> <div class="row pt-2"> <div class="col-6"> <div class="card table-card"> <div class="card-header"> <div class="d-flex justify-content-between align-items-center"> <div> <h5><?php echo e(__('Sources')); ?></h5> </div> <?php if (app('laratrust')->hasPermission('lead edit')) : ?> <div class="float-end"> <a class="btn btn-sm btn-primary float-end " data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Edit Sources')); ?>" data-url="<?php echo e(route('leads.sources.edit', $lead->id)); ?>" data-ajax-popup="true" data-title="<?php echo e(__('Edit Sources')); ?>"> <i class="ti ti-plus text-white"></i> </a> </div> <?php endif; // app('laratrust')->permission ?> </div> </div> <div class="card-body pt-0 table-border-style bg-none" style ="height:300px;overflow: auto;"> <div class=""> <table class="table align-items-center mb-0"> <tbody class="list"> <?php $__empty_1 = true; $__currentLoopData = $sources; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $source): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td> <span class="text-dark"><?php echo e($source->name); ?></span> </td> <td> <?php if (app('laratrust')->hasPermission('lead edit')) : ?> <div class="action-btn float-end"> <?php echo Form::open([ 'method' => 'DELETE', 'route' => ['leads.sources.destroy', $lead->id, $source->id], 'id' => 'delete-form-' . $lead->id, ]); ?> <a href="#!" class="mx-3 btn btn-sm align-items-center show_confirm bg-danger" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Delete Sources')); ?>" data-confirm="<?php echo e(__('Are You Sure?')); ?>" data-text="<?php echo e(__('This action can not be undone. Do you want to continue?')); ?>"> <span class="text-white"> <i class="ti ti-trash"></i></span> </a> <?php echo Form::close(); ?> </div> <?php endif; // app('laratrust')->permission ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php echo $__env->make('layouts.nodatafound', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> <div class="col-6"> <div class="card table-card"> <div class="card-header"> <div class="d-flex justify-content-between align-items-center"> <div> <h5><?php echo e(__('Email')); ?></h5> </div> <?php if (app('laratrust')->hasPermission('lead email create')) : ?> <div class="float-end"> <a class="btn btn-sm btn-primary float-end " data-size="md" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Add Email')); ?>" data-url="<?php echo e(route('leads.emails.create', $lead->id)); ?>" data-ajax-popup="true" data-title="<?php echo e(__('Add Email')); ?>"> <i class="ti ti-plus text-white"></i> </a> </div> <?php endif; // app('laratrust')->permission ?> </div> </div> <div class="card-body table-border-style bg-none" style="height:300px;overflow: auto;"> <ul class="list-unstyled list-unstyled-border"> <?php $__empty_1 = true; $__currentLoopData = $emails; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $email): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <li class="media mt-3"> <div style="margin-right: 10px;"> <a href="<?php echo e(get_file('uploads/users-avatar/avatar.png')); ?>" target="_blank"> <img src="<?php echo e(get_file('uploads/users-avatar/avatar.png')); ?>" class="avatar-sm rounded border-2 border border-primary" width="40" height="40"> </a> </div> <div class="media-body"> <div class="mt-0 mb-1 font-weight-bold text-sm fw-bold"> <?php echo e($email->subject); ?> <small><?php echo e($email->to); ?></small> <small class="float-end"><?php echo e($email->created_at->diffForHumans()); ?></small> </div> <div class="text-xs text-break text-wrap"> <?php echo e(strip_tags($email->description)); ?></div> </div> </li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php echo $__env->make('layouts.nodatafound', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> </ul> </div> </div> </div> </div> </div> <?php endif; ?> <div id="discussion-notes"> <div class="row pt-2"> <div class="col-6"> <div class="card table-card"> <div class="card-header"> <div class="d-flex justify-content-between align-items-center"> <div> <h5><?php echo e(__('Discussion')); ?></h5> </div> <div class="float-end"> <a class="btn btn-sm btn-primary float-end " data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Add Message')); ?>" data-url="<?php echo e(route('leads.discussions.create', $lead->id)); ?>" data-ajax-popup="true" data-title="<?php echo e(__('Add Message')); ?>"> <i class="ti ti-plus text-white"></i> </a> </div> </div> </div> <div class="card-body table-border-style bg-none" style="height:330px;overflow: auto;"> <ul class="list-unstyled list-unstyled-border"> <?php $__empty_1 = true; $__currentLoopData = $lead->discussions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $discussion): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <li class="media mt-3"> <div style="margin-right: 10px;"> <a <?php if($discussion->user->avatar): ?> href="<?php echo e(get_file($discussion->user->avatar)); ?>" <?php else: ?> href="<?php echo e(get_file('uploads/users-avatar/avatar.png')); ?>" <?php endif; ?> target="_blnak"> <img <?php if($discussion->user->avatar): ?> src="<?php echo e(get_file($discussion->user->avatar)); ?>" <?php else: ?> src="<?php echo e(get_file('uploads/users-avatar/avatar.png')); ?>" <?php endif; ?> width="40" height="40" class="avatar-sm rounded border-2 border border-primary"> </a> </div> <div class="media-body"> <div class="mt-0 mb-1 font-weight-bold text-sm fw-bold"> <?php echo e($discussion->user->name); ?> <small><?php echo e($discussion->user->type); ?></small> <small class="float-end"><?php echo e($discussion->created_at->diffForHumans()); ?></small> </div> <div class="text-xs "> <?php echo e($discussion->comment); ?></div> </div> </li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php echo $__env->make('layouts.nodatafound', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> </ul> </div> </div> </div> <div class="col-6"> <div class="card"> <div class="card-header"> <div class="d-flex justify-content-between align-items-center"> <h5><?php echo e(__('Notes')); ?></h5> <div class="col-6 text-end"> <?php if(module_is_active('AIAssistant')): ?> <?php echo $__env->make('aiassistant::ai.generate_ai_btn', [ 'template_module' => 'lead_notes', 'module' => 'Lead', ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> </div> </div> </div> <div class="card-body" style="height:330px;"> <textarea name="notes" class="form-control summernote <?php echo e(!empty($errors->first('description')) ? 'is-invalid' : ''); ?>" required id="lead-summernote"><?php echo $lead->notes; ?></textarea> </div> </div> </div> </div> </div> <?php if(!Auth::user()->hasRole('client')): ?> <div id="files"> <div class="row pt-2"> <div class="col-12"> <div class="card table-card"> <div class="card-header"> <h5><?php echo e(__('Files')); ?></h5> </div> <div class="card-body"> <div class="card-body bg-none"> <div class="col-md-12 dropzone browse-file" id="dropzonewidget2"></div> </div> </div> </div> </div> </div> </div> <?php endif; ?> <?php if(!Auth::user()->hasRole('client')): ?> <div id="calls"> <div class="row pt-2"> <div class="col-12"> <div class="card table-card"> <div class="card-header"> <div class="d-flex justify-content-between align-items-center"> <div> <h5><?php echo e(__('Calls')); ?></h5> </div> <?php if (app('laratrust')->hasPermission('lead call create')) : ?> <div class="float-end"> <a data-size="lg" class="btn btn-sm btn-primary float-end " data-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Create')); ?>" data-url="<?php echo e(route('leads.calls.create', $lead->id)); ?>" data-ajax-popup="true" data-title="<?php echo e(__('Create Call')); ?>"> <i class="ti ti-plus text-white"></i> </a> </div> <?php endif; // app('laratrust')->permission ?> </div> </div> <div class=" card-body table-border-style"> <div class=""> <table class="table mb-0 pc-dt-simple" id="leadCall"> <thead> <tr> <th width=""><?php echo e(__('Subject')); ?></th> <th><?php echo e(__('Call Type')); ?></th> <th><?php echo e(__('Duration')); ?></th> <th><?php echo e(__('User')); ?></th> <th class="text-end"><?php echo e(__('Action')); ?></th> </tr> </thead> <tbody> <?php $__empty_1 = true; $__currentLoopData = $calls; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $call): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td><?php echo e($call->subject); ?></td> <td><?php echo e(ucfirst($call->call_type)); ?></td> <td><?php echo e($call->duration); ?></td> <td><?php echo e(isset($call->getLeadCallUser) ? $call->getLeadCallUser->name : '-'); ?> </td> <td class="text-end"> <?php if (app('laratrust')->hasPermission('lead call edit')) : ?> <div class="action-btn me-2"> <a data-size="lg" data-url="<?php echo e(URL::to('leads/' . $lead->id . '/call/' . $call->id . '/edit')); ?>" data-ajax-popup="true" data-title="<?php echo e(__('Edit Call')); ?>" class="mx-3 btn btn-sm align-items-center bg-info" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Edit')); ?>"> <i class="ti ti-pencil text-white"></i> </a> </div> <?php endif; // app('laratrust')->permission ?> <?php if (app('laratrust')->hasPermission('lead call delete')) : ?> <div class="action-btn"> <?php echo Form::open([ 'method' => 'DELETE', 'route' => ['leads.calls.destroy', $lead->id, $call->id], 'id' => 'delete-form-' . $call->id, ]); ?> <a href="#!" class="mx-3 btn btn-sm align-items-center show_confirm bg-danger" data-bs-toggle="tooltip" data-bs-placement="top" title="<?php echo e(__('Delete')); ?>" data-confirm="<?php echo e(__('Are You Sure?')); ?>" data-text="<?php echo e(__('This action can not be undone. Do you want to continue?')); ?>"> <span class="text-white"> <i class="ti ti-trash"></i> </span> </a> <?php echo Form::close(); ?> </div> <?php endif; // app('laratrust')->permission ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php echo $__env->make('layouts.nodatafound', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <?php endif; ?> <div class="row"> <?php if(!Auth::user()->hasRole('client')): ?> <div id="activity"> <div class="col-12"> <div class="card"> <div class="card-header"> <h5><?php echo e(__('Activity')); ?></h5> </div> <div class="card-body height-450 "> <div class="row" style="height:350px !important;overflow-y: scroll;"> <ul class="event-cards list-group list-group-flush mt-3 w-100"> <?php $__empty_1 = true; $__currentLoopData = $lead->activities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $activity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <li class="list-group-item card mb-3"> <div class="row align-items-center justify-content-between"> <div class="col-auto mb-3 mb-sm-0"> <div class="d-flex align-items-center"> <div class="theme-avtar bg-primary badge"> <i class="fas <?php echo e($activity->logIcon()); ?>"></i> </div> <div class="ms-3"> <h6 class="m-0"><?php echo $activity->getLeadRemark(); ?> </h6> <small class="text-muted"><?php echo e($activity->created_at->diffForHumans()); ?></small> </div> </div> </div> <div class="col-auto"> </div> </div> </li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php echo $__env->make('layouts.nodatafound', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php endif; ?> </ul> </div> </div> </div> </div> </div> <?php endif; ?> </div> <?php echo $__env->yieldPushContent('indiamart_div'); ?> </div> </div> </div> </div> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/id/erp.dev-unit.com/packages/workdo/Lead/src/Providers/../Resources/views/leads/show.blade.php ENDPATH**/ ?>