|
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;
}
.kanban-board {
display: flex;
justify-content: space-between;
}
.kanban-column {
background-color: #ddd;
padding: 10px;
min-height: 300px;
}
.kanban-task {
z-index:2;
width:100%;
background-color: white;
margin-bottom: 10px;
padding: 10px;
cursor: move;
}
.highlight {
border: 2px dashed #06b6d4;
background-color: #86efac;
}
.processing-lead{
width:300px;
position:absolute;
left:60%;
top:28%;
transform:translate(-50%,50%);
z-index:1000;
}
</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>
<section class='main-section1'>
<!-- begin::page header -->
<div class="page-header d-flex justify-content-between align-items-center">
<div>
<h3>Manage Deals - Sales</h3>
<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"><a href="<?php echo e(asset('dashboard')); ?>">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page">Deals</li>
</ol>
</nav>
</div>
<ul class='nav-item dropdown d-flex'>
<div class="dropdown show" style='margin-right:20px;'>
<select class="form-control change_pipeline">
<?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($pipeline->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</select>
<div class="dropdown-menu " aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 26px, 0px); top: 0px; left: 0px; will-change: transform;">
<a class="dropdown-item" href="#">Sales</a>
</div>
</div>
<!-- Modal Create user-->
<?php echo $__env->make('leads.modal.create_modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<!-- Modal Import Lead CV-->
<li>
<a href="<?php echo e(asset('deals/list')); ?>">
<span class="icon-block bg-blue text-white icon-block-floating icon-block-sm m-r-10">
<i class="fa fa-list" aria-hidden="true"></i>
</span>
</a>
</li>
<li data-bs-toggle="modal" data-bs-target="#leadModal" class='cursor-pointer'>
<span class="icon-block bg-blue text-white icon-block-floating icon-block-sm m-r-10 cursor-pointer" style='cursor:pointer;'>
<i class="fa fa-plus" aria-hidden="true"></i>
</span>
</li>
</ul>
</div>
<!-- end::page 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; ?>
<?php if($errors->any()): ?>
<div class="alert alert-danger">
<ul>
<?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li><?php echo e($error); ?></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ul>
</div>
<?php endif; ?>
<?php
$count =0;
?>
<div class="processing-lead text-center display-5 alert-info alert d-none" >Processing...</div>
<div class="row kanban-board">
<?php if(isset($stages)): ?>
<?php $__currentLoopData = $stages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $st): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="col-md-4 py-3" >
<div class="card p-3 kanban-column" data-drop-id="<?php echo e($st->id); ?>">
<div class="d-flex justify-content-between ">
<h5 class="font-size-18 text-capitalize"><?php echo e($st->name); ?></h5>
<?php $__currentLoopData = $deals; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(isset($value->stage_details)): ?>
<?php if($value->stage_details->name == $st->name): ?>
<?php $count++; ?>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<a href="#" class="btn btn-sm bg-primary btn-uppercase waves-effect waves-button waves-light text-white stage-<?php echo e($st->id); ?>"><?php echo e($count); ?></a>
</div>
<?php $__currentLoopData = $deals; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(isset($value->stage_details)): ?>
<?php if($value->stage_details->name == $st->name): ?>
<div class="card p-3 mt-3 kanban-task" data-lead-id="<?php echo e($value->id); ?>" data-stage-id="<?php echo e($st->id); ?>">
<div class='d-flex justify-content-between ghm-hotel'>
<h6 class="card-title"><?php echo e($value->name); ?></h6>
<div class="apexcharts-menu-icon" title="Menu">
<i class="fa fa-menu font-size-16"></i>
<i class="fa fa-ellipsis-v" aria-hidden="true"></i>
</div>
</div>
<div class='d-flex justify-content-between mt-4'>
<div class='d-flex justify-content-between'>
<h5 class='mb-0 ms-3'>0</h5>
<h5 class='mb-0 ms-3'>0</h5>
</div>
<div class="avatar-group">
<figure class="avatar">
<span class="avatar-title bg-success rounded-circle" style='width:28px;height:28px;font-size:12px;'>E</span>
</figure>
<figure class="avatar">
<span class="avatar-title bg-danger rounded-circle" style='width:28px;height:28px;font-size:12px;'>S</span>
</figure>
<figure class="avatar">
<span class="avatar-title bg-primary rounded-circle" style='width:28px;height:28px;font-size:12px;'>C</span>
</figure>
</div>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php $count=0; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</div>
</section>
<section class='main-section '>
<!-- begin::page header -->
<div class="page-header d-flex justify-content-between align-items-center">
<div>
<h3>Manage Leads - Sales</h3>
<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">Lead</li>
<li class="breadcrumb-item"><a href="<?php echo e(asset('dashboard')); ?>">Lead</a></li>
</ol>
</nav>
</div>
<ul class='nav-item dropdown d-flex'>
<div class="dropdown show" style='margin-right:20px;'>
<button class="btn btn-light dropdown-toggle waves-effect waves-button waves-light" type="button" data-toggle="dropdown" aria-expanded="false">
Sales
</button>
<div class="dropdown-menu " aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 26px, 0px); top: 0px; left: 0px; will-change: transform;">
<a class="dropdown-item" href="#">Sales</a>
</div>
</div>
<!-- Modal Import Lead CV-->
<div class="modal fade" id="exampleModal2" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="" >Import Lead CSV file</h5>
<button type="button" class="btn-close bg-blue text-white" data-bs-dismiss="modal" aria-label="Close"style='border:none;margin-right:10px;' >
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</div>
<div class="modal-body">
<div class="d-flex">
<p>Download sample Lead CSV file</p>
<button class="btn btn-primary waves-effect waves-button waves-light" type="submit" style='margin-left:20px;'>Submit form</button>
</div>
<div class="form-group">
<label for="exampleFormControlFile1">Example file input</label>
<input type="file" class="form-control-file" id="exampleFormControlFile1">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary">Create</button>
</div>
</div>
</div>
</div>
<li>
<a href="<?php echo e(route('lead.list')); ?>">
<span class="icon-block bg-blue text-white icon-block-floating icon-block-sm m-r-10">
<i class="fa fa-list" aria-hidden="true"></i>
</span>
</a>
</li>
<li data-bs-toggle="modal" data-bs-target="#exampleModal2" class='cursor-pointer'>
<span class="icon-block bg-blue text-white icon-block-floating icon-block-sm m-r-10 cursor-pointer" style='cursor:pointer;'>
<i class="fa fa-cloud-upload" aria-hidden="true"></i>
</span>
</li>
<li>
<span class="icon-block bg-blue text-white icon-block-floating icon-block-sm m-r-10">
<i class="fa fa-file-o" aria-hidden="true"></i>
</span>
</li>
<li data-bs-toggle="modal" data-bs-target="#dealModal" class='cursor-pointer'>
<span class="icon-block bg-blue text-white icon-block-floating icon-block-sm m-r-10 cursor-pointer" style='cursor:pointer;'>
<i class="fa fa-plus" aria-hidden="true"></i>
</span>
</li>
</ul>
</div>
<!-- end::page header -->
</section>
</div>
</main>
<!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
<!-- begin::dataTable -->
<!-- end::dataTable -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<!-- jQuery UI CSS for styling draggable elements -->
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<!-- end::select2 -->
<script>
$(function() {
// Make the tasks draggable
$(".kanban-task").draggable({
revert: "invalid", // If dropped outside a droppable, the task returns to its original position
snap:true,
helper: "clone",
start: function(event, ui) {
$(this).css('opacity', '0.7');
},
stop: function(event, ui) {
$(this).css('opacity', '1');
}
});
// Make the columns droppable
$(".kanban-column").droppable({
accept: ".kanban-task",
hoverClass: "highlight", // Highlight the column on hover
drop: function(event, ui) {
$(this).append(ui.draggable);
ui.draggable.css({
top: "auto",
left: "auto"
});
var leadId = ui.draggable.data('lead-id');
var stageId = ui.draggable.data('stage-id');
var drop_stage_id = $(this).data("drop-id");
//alert(leadId);
$.ajax({
type: "post",
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
data: {
"deal_id": leadId,
"stage_id": stageId,
"drop_stage_id":drop_stage_id
},
url: "<?php echo e(asset('change-deal-status')); ?>",
dataType: "html",
beforeSend:function()
{
$(".processing-lead").removeClass("d-none");
},
success: function(result)
{
$(".processing-lead").addClass("d-none");
var allData = JSON.parse(result);
console.log(allData);
var drag_count = allData.data.drag_count;
var drop_count = allData.data.drop_count;
$(".stage-"+stageId).html(drag_count);
$(".stage-"+drop_stage_id).html(drop_count);
},
error:function(xhr,error,status)
{
console.log(xhr);
}
});
}
});
});
</script>
<script>
$(document).ready(function() {
$("#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="pt-1">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('delete-distributor')); ?>",
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-distributor')); ?>",
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'>Dealer/Partner 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('distributor-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();
}
});
}
});
});
});
$(".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_pipeline").on("change",function(){
var change_pipeline = $('.change_pipeline').val();
alert(change_pipeline);;
});
//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);
}
});
});
$(".main-section").hide();
$(".ghm-hotel").click(function(){
$(".main-section").show();
$(".main-section1").hide();
});
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/leadai/admin.leadai.co.in/resources/views/deals/index.blade.php ENDPATH**/ ?>