|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/leadai/leadai.co.in/storage/framework/views/ |
Upload File : |
<?php $__env->startSection('content'); ?>
<!-- begin::main content -->
<style>
.input_upload{
width:100px;
height:35px;
position:absolute;
bottom:-34px;
right:350px;
}
.import-content p{
padding:0;
margin:0;
margin-bottom:8px;
font-size:13px;
}
.filter-form-box{
background-color:#FBFAFA;
padding:10px 24px;
position:absolute;
width:450px;
border:1px solid #ddd;
border-radius:5px;
top:71px;
z-index:20;
}
.filter-form-box input{
height:40px !important;
}
.diamond {
width: 20px;
height: 20px;
background-color: #FBFAFA;
transform: rotate(45deg);
position: relative;
top:-21px;
left:0px;
border-top:1px solid #ddd;
border-left:1px solid #ddd;
}
.seach-input:focus{
outline:none !important;
border-top:1px solid #ddd !important;
border-bottom:1px solid #ddd !important;
}
.seach-input{
height:40px !important;
border-top:1px solid #ddd !important;
border-bottom:1px solid #ddd !important;
border-left:1px solid #ddd !important;
}
</style>
<main class="main-content">
<div class="container">
<div class="toast d-none float-right" >
<div class="toast-body bg-success text-white">
<i class="fa fa-check fa-lg"></i>  Status Update Successfully
</div>
</div>
<!-- begin::page header -->
<div class="page-header">
<h3 class="text-capitalize"> <?php echo \App\Helpers\Frontend::deal_name(); ?> List</h3>
<div class="d-flex justify-content-between">
<div>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<?php echo e(asset('dashboard')); ?>"><?php echo e(__('message.dashboard')); ?></a></li>
<li class="breadcrumb-item active" aria-current="page"><?php echo e(__('message.list')); ?></li>
</ol>
</nav>
</div>
<div class="form-group mt-3">
<form class="pipeline_filter_form" action="<?php echo e(asset('deals/list')); ?>" method="get">
<select class="form-control form-control-sm change_pipeline" name="change_pipeline">
<option selected disabled>Select Pipeline</option>
<?php if(!empty($pipelines)): ?>
<?php $__currentLoopData = $pipelines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pipeline): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($pipeline->id); ?>"
<?php echo e(isset($_GET['change_pipeline']) ? ($pipeline->id == $_GET['change_pipeline'] ? 'selected' : '') : ''); ?>>
<?php echo e($pipeline->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</select>
</form>
</div>
</div>
</div>
<!-- end::page header -->
<div class="card">
<div class="card-header">
<?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
<div class="row">
<div class="col-md-4 py-3">
<form action="<?php echo e(asset('deals/list')); ?>" method="get">
<div class="company-field-box">
<div>
<div class="input-group">
<div class="input-group-prepend">
<button type="button" class="btn border input-group-text filter-company-btn">
<i class="ti-filter fa-lg px-2"></i>
</button>
</div>
<input type="search" value="<?php echo e(isset($_GET['search']) ? $_GET['search'] : null); ?>" name="search" class="form-control border-right-0 seach-input">
<button class="btn border border-left-0" type="submit" style="margin-left:-5px;">
<i class="ti-search fa-lg"></i>
</button>
</div>
<div class="filter-form-box d-none">
<div class="diamond"></div>
<form method="get" action="<?php echo e(asset('deals/list')); ?>">
<div class="form-group">
<label> <?php echo e(__('message.email')); ?></label>
<input type="text" name="email" value="<?php echo e(isset($_GET['email']) ? $_GET['email'] : null); ?>" class="form-control" id="email">
</div>
<div class="row">
<div class="form-group col-6">
<label><?php echo e(__('message.name')); ?> </label>
<input value="<?php echo e(isset($_GET['name']) ? $_GET['name'] : null); ?>" type="text" name="name" class="form-control" id="name">
</div>
<div class="form-group col-6">
<label><?php echo e(__('message.phone')); ?></label>
<input type="text" value="<?php echo e(isset($_GET['mobile']) ? $_GET['mobile'] : null); ?>" name="mobile" class="form-control" id="mobile">
</div>
</div>
<div class="row">
<div class="form-group col-6">
<label>Price</label>
<input type="number" value="<?php echo e(isset($_GET['price']) ? $_GET['price'] : null); ?>" name="price" class="form-control" id="price">
</div>
<div class="form-group col-6">
<label>Source</label>
<select class="form-control" name="source">
<option value="">Select Source</option>
<?php if(!$sources->isEmpty()): ?>
<?php $__currentLoopData = $sources; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $source): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($source->id); ?>"><?php echo e($source->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</select>
</div>
</div>
<div class="row">
<div class="form-group col-6">
<label>Course</label>
<select class="form-control" name="course">
<option value="">Select Course</option>
<?php if(!$products_list->isEmpty()): ?>
<?php $__currentLoopData = $products_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $products): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($products->id); ?>"><?php echo e($products->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</select>
</div>
<div class="form-group col-6">
<label>Pipline</label>
<select class="form-control" name="pipeline">
<option value="">Select Pipeline</option>
<?php if(!$pipelines->isEmpty()): ?>
<?php $__currentLoopData = $pipelines; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pipeline): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($pipeline->id); ?>"><?php echo e($pipeline->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</select>
</div>
</div>
<div class="row">
<div class="form-group col-6">
<label><?php echo e(__('message.start')); ?> <?php echo e(__('message.date')); ?></label>
<input type="date" name="start_date" value="<?php echo e(isset($_GET['start_date']) ? $_GET['start_date'] : null); ?>" class="form-control" id="start_date">
</div>
<div class="form-group col-6">
<label><?php echo e(__('message.end')); ?> <?php echo e(__('message.date')); ?></label>
<input type="date" name="end_date" value="<?php echo e(isset($_GET['end_date']) ? $_GET['end_date'] : null); ?>" class="form-control" id="end_date">
</div>
</div>
<div class="row">
<div class="form-group col-12">
<button type="submit" class="btn btn-success-lux mr-5 px-4 apply-button"><?php echo e(__('message.apply')); ?></button>
<a href="<?php echo e(asset('deals/list')); ?>" class="btn btn-primary-lux px-5 clear-button text-white"><?php echo e(__('message.clear')); ?></a>
</div>
</div>
</form>
</div>
</div>
</div>
</form>
</div>
<div class="col-md-8 d-flex justify-content-end py-3">
<div>
<?php if(Auth::user()->hasRole('admin') || Auth::user()->can('delete-deal')): ?>
<button data-toggle="tooltip" data-original-title="Delete Deals" class="btn btn-outline-secondary text-uppercase mr-2 multiple-delete-btn">
<i class="ti-trash fa-lg"></i>
</button>
<?php endif; ?>
</div>
<div>
<?php if(Auth::user()->hasRole('admin') || Auth::user()->can('add-deal')): ?>
<a data-bs-toggle="modal" data-bs-target="#dealModal"
class="btn btn-outline-secondary text-uppercase ">
<i class="ti-plus"></i>
</a>
<?php endif; ?>
<?php if(Auth::user()->hasRole('admin') || Auth::user()->can('view-deal')): ?>
<a data-toggle="tooltip" data-original-title="Kanban View"
href="<?php echo e(asset('deals')); ?>"
class="btn btn-outline-secondary mr-2"><i
class="ti-view-list" ></i>
</a>
<?php endif; ?>
</div>
<button type="button" class="btn btn-danger d-none" id="delete-multiple">
<i class="fa fa-trash fa-lg"></i>
</button>
</div>
</div>
</div>
<div class="card-body">
<?php if(isset($deals)): ?>
<div class="table-responsive">
<table class="table table-bordered" >
<thead style="background-color:#E9EEF1">
<tr>
<th>
<input type="checkbox" id="checkAll" />
</th>
<th>Si</th>
<th>Course</th>
<th>Stage</th>
<th>Price</th>
<th>Client Name</th>
<th>Client Email</th>
<th>Client Phone</th>
<th>Created On</th>
<th><?php echo e(__('message.action')); ?></th>
</tr>
</thead>
<tbody>
<?php if(!empty($deals)): ?>
<?php $__currentLoopData = $deals; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$deal): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<th>
<input type="checkbox" name="checkbox[]" class="userids" value="<?php echo e($deal->id); ?>" />
</th>
<td><?php echo e(++$key); ?></td>
<td><?php echo e($deal->course_name); ?></td>
<td><?php echo e($deal->stage); ?></td>
<td><?php echo e($deal->price); ?></td>
<td><?php echo e($deal->client_name); ?></td>
<td><?php echo e($deal->client_email); ?></td>
<td><?php echo e($deal->phone); ?></td>
<td>
<span class="btn btn-success btn-sm">
<?php echo e(date('d-m-Y', strtotime($deal->created_at))); ?>
</span>
</td>
<td>
<div class="btn-group">
<?php if(Auth::user()->hasRole('admin') || Auth::user()->can('view-deal')): ?>
<a class="btn btn-sm btn-primary text-white"
data-toggle="tooltip" data-original-title="Deal Detail"
href="<?php echo e(asset('deals/details/'.$deal->id)); ?>"><i
class="fa fa-eye fa-lg"></i>
</a>
<?php endif; ?>
<?php if(Auth::user()->hasRole('admin') || Auth::user()->can('edit-deal')): ?>
<a class="btn btn-sm btn-success text-white"
data-toggle="tooltip" data-original-title="Edit Deal"
href="<?php echo e(asset('deals/edit-deal/'.$deal->id)); ?>"><i
class="fa fa-edit fa-lg"></i>
</a>
<?php endif; ?>
<?php if(Auth::user()->hasRole('admin') || Auth::user()->can('delete-deal')): ?>
<button class="btn btn-sm btn-danger text-white emp-delete-btn"
data-toggle="tooltip" data-original-title="Delete Deal"
emp_id="<?php echo e($deal->id); ?>">
<i class="fa fa-trash fa-lg"></i>
</button>
<?php endif; ?>
<?php if(Auth::user()->hasRole('admin') || Auth::user()->can('add-task')): ?>
<div data-toggle="tooltip" data-original-title="Add Task">
<button lead_id="<?php echo e($deal->id); ?>" data-toggle="modal" data-target="#dealTaskModal" style="padding: 8px;"
class="btn btn-sm btn-outline-primary open_task_modal pull-right">
<i class="icon ti-plus"></i>
</button>
</div>
<?php endif; ?>
</div>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<h1>No Record Found!!</h1>
<?php endif; ?>
</tbody>
</table>
</div>
<div class="blade-pagination py-3 d-flex justify-content-center">
<?php echo e($deals->links()); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</main>
<?php echo $__env->make('deals.modal.create_modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('deals.modal.deal_task', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
<!-- begin::dataTable -->
<!-- end::dataTable -->
<script>
$(document).ready(function() {
$(".open_task_modal").click(function(){
$(".deal_taskadd_form").trigger('reset');
var lead_id = $(this).attr("lead_id");
$(".deal_task_id").val(lead_id);
});
$("#checkAll").click(function() {
$('.userids:checkbox').not(this).prop('checked', this.checked);
/*var length = $('.userids[type="checkbox"]:checked').length;
if($(".multiple-delete-btn").hasClass('d-none'))
{
$(".multiple-delete-btn").removeClass("d-none");
$(".multiple-delete-btn").html('<span class="">Delete ('+length+")</span>");
}
else
{
$(".multiple-delete-btn").addClass("d-none");
}*/
});
//employee delte button code
$(".emp-delete-btn").click(function(){
var emp_id = $(this).attr("emp_id");
swal({
title: 'Are you sure?',
text: 'Once deleted, you will not be recover!',
icon: 'warning',
dangerMode: true,
buttons: ["Cancel", "Yes!"],
}).then(function(value) {
if (value) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$.ajax({
type: "post",
data: {
"emp_id": emp_id
},
url: "<?php echo e(asset('deals/delete')); ?>",
dataType: "html",
success: function(result) {
//console.log(result);
swal("success!", "Successfully deleted!", "success");
window.location.reload();
},
error:function(error)
{
swal("Failed !", "Failed !", "error");
window.location.reload();
}
});
}
});
});
$(".input_file_upload").on("change",function(){
$(".import-company-form").submit();
});
$(".import-company-form").on("submit", function(event) {
// Prevent the default form submission
event.preventDefault();
$.ajax({
type: "POST",
url: "<?php echo e(asset('import-users')); ?>",
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
data: new FormData(this),
processData: false,
contentType: false,
cache:false,
beforeSend:function()
{
$(".import-content").html("<h5>Please wait uploading...</h5>");
},
success: function(response)
{
if(response.message=="success")
{
var div = `<div class='text-success text-center' style='font-size:50px'>
<i class='fa fa-check-circle' ></i>
<p style='font-size:20px'>Employee Import Successfully !</p>
</div>`;
$(".import-content").html(div);
setTimeout(function(){
window.location.reload();
},3000);
}
else
{
//console.log(error);
var div = `<div class='text-danger text-center' style='font-size:50px'>
<i class='fa fa-times-circle' ></i>
<p style='font-size:20px'>Please check the datasheet !</p>
</div>`;
$(".import-content").html(div);
}
},
error: function(xhr, status, error)
{
//console.log(error);
var div = `<div class='text-danger text-center' style='font-size:50px'>
<i class='fa fa-times-circle' ></i>
<p style='font-size:20px'>Please check the datasheet !</p>
</div>`;
$(".import-content").html(div);
}
});
});
// Delete Multiple
$(".multiple-delete-btn").click(function() {
var URL = "<?php echo e(asset('deals-delete-multiple')); ?>";
var user_ids = [];
$('.userids:checkbox:checked').each(function() {
user_ids.push($(this).val());
});
swal({
title: 'Are you sure?',
text: 'Once deleted, you will not be recover!',
icon: 'warning',
dangerMode: true,
buttons: ["Cancel", "Yes!"],
}).then(function(value) {
if (value) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$.ajax({
type: "post",
data: {
"ids": user_ids
},
url: URL,
dataType: "html",
success: function(result) {
console.log(result);
swal("success!", "Successfully deleted!", "success");
window.location.reload();
},
error:function(xhr,status,error)
{
swal("failed!", "Failed !", "error");
window.location.reload();
}
});
}
});
});
$(".change_pipeline").on("change",function(){
$(".pipeline_filter_form").submit();
});
});
$(".apply-button").click(function(){
$(".filter-form-box").addClass("d-none");
});
//filter company code
$(".filter-company-btn").click(function(){
if($(".filter-form-box").hasClass("d-none"))
{
$(".filter-form-box").removeClass("d-none");
}
else
{
$(".filter-form-box").addClass("d-none");
}
});
//change status code
$(".status-change").on("change",function(){
var check_val = 0;
if( $(this).is(":checked"))
{
check_val = 1;
}
var id = $(this).val();
$.ajax({
type: "post",
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url: "<?php echo e(asset('change-user-status')); ?>",
data:{
user_id:id,
status:check_val
},
dataType: "html",
success: function(result)
{ console.log(result);
var allData = JSON.parse(result);
if(allData.message=="success")
{
$('.toast').removeClass('d-none');
$('.toast').toast('show');
}
else
{
var div = `
<div class="toast-body bg-danger text-white">
<i class="fa fa-times-circle-o fa-lg"></i>  Status Update Failed
</div>
`;
$('.toast').removeClass('d-none');
$('.toast').toast('show');
$('.toast').html(div);
}
},
error:function(xhr,status,error)
{
console.log(error);
var div = `
<div class="toast-body bg-danger text-white">
<i class="fa fa-times-circle-o fa-lg"></i>  Status Update Failed
</div>
`;
$('.toast').removeClass('d-none');
$('.toast').toast('show');
$('.toast').html(div);
}
});
});
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/leadai/leadai.co.in/resources/views/deals/list.blade.php ENDPATH**/ ?>