fix changes

This commit is contained in:
Ritikesh yadav
2024-04-26 18:40:07 +05:30
parent c6101d6de8
commit e98dbee59a
16 changed files with 2904 additions and 3118 deletions

View File

@@ -196,6 +196,7 @@ class DashboardController extends Controller
$investingUserCount = MonthlyUpdateMaster::distinct('users_id')->count('users_id');
$totalProductCount = Product::count();
$leads = Lead::with('leadSource')->where('lead_owner', auth()->user()->id)->latest()->get();
// dd($leads);
$tasks = LeadTasksMeeting::where('owner', auth()->user()->id)->tasks()->get();
$meetings = LeadTasksMeeting::where('host', (string)auth()->user()->id)->meetings()->get();
// dd($meetings);

View File

@@ -51,6 +51,14 @@ class ManageLeadController extends Controller
]);
}
public function getInvestorDetail(Request $request)
{
$id = $request->id;
return response()->json([
'status'=>200,
'data'=>User::where('id',$id)->select('contact_number','email','name')->first(),
]);
}
public function ongoing_leads()
{
// return view('Admin.Pages.manage_leads.ongoing_leads');

View File

@@ -114,7 +114,7 @@ class OverviewController extends Controller
public function interestedBuyers($id, $table)
{
$interestedBuyers = MarketplaceBuyerForm::where(['associated_id' => $id, 'table' => $table])->get();
$interestedBuyers = MarketplaceBuyerForm::where(['associated_id' => $id, 'table' => $table])->orderBy('updated_at','DESC')->get();
if ($table == 'marketplace_fre_sellers') {
$data = MarketplaceFractionalRealEstateSeller::with('seller')->where('id', $id)->firstOrFail();

View File

@@ -62,7 +62,9 @@ class DashboardController extends Controller
// $row['marketplace_aif_sellers_data'] = MarketplaceAlternativeInvestmentFundSeller::where('id', $row->associated_id)->first();
// }
// return $market_place_data;
$sellerData = MarketplaceSellerForm::has('aif')->with('aif')->where('users_id',$id)->get();
// $sellerData = MarketplaceSellerForm::has('aif')->with('aif')->where('users_id',$id)->get();
$sellerData = MarketplaceSellerForm::with('aif')->where('users_id',$id)->get();
// dd($sellerData);
// return $sellerData[0]->aif['name_of_the_aif_fund'];
if(count($sellerData->toArray()))
{
@@ -117,7 +119,7 @@ class DashboardController extends Controller
// $row['marketplace_fre_sellers_data'] = MarketplaceFractionalRealEstateSeller::where('id', $row->associated_id)->first();
// }
// return $market_place_data;
$sellerData = MarketplaceSellerForm::has('fre')->with('fre')->where('users_id',$id)->get();
$sellerData = MarketplaceSellerForm::with('fre')->where('users_id',$id)->get();
// dd(count($sellerData->toArray()));
if(count($sellerData->toArray()))
{

View File

@@ -45,7 +45,7 @@ class StoreMeetingRequest extends FormRequest
return array_merge(parent::validated(), [
'status' => $this->status ? '1' : '0',
'created_by' => auth()->user()->id,
'Type' => 'Meeting',
'type' => 'Meeting',
]);
}
}

View File

@@ -16,7 +16,7 @@ class Lead extends Model
// for getting lead source name
public function leadSource()
{
return $this->belongsTo(User::class, 'lead_source', 'id');
return $this->belongsTo(User::class,'lead_owner','id');
}
public function user()
@@ -34,7 +34,7 @@ class Lead extends Model
}
public function attachment(){
return $this->hasMany(LeadAttachment::class, 'leads_id');
return $this->hasMany(LeadAttachment::class, 'leads_id')->latest();
}
public function tasks_meetings(){
@@ -46,7 +46,7 @@ class Lead extends Model
}
public function kyc(){
return $this->hasMany(UserKyc::class,'users_id');
return $this->belongsTo(UserKyc::class,'users_id');
}
public function owner(){

View File

@@ -16,8 +16,8 @@ class MarketplaceSellerForm extends Model
}
public function aif(){
// return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id')->where('listing_status', '!=','Hide');
return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id');
return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id')->where('listing_status', '!=','Hide');
// return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id');
}
public function fre(){

View File

@@ -13,6 +13,7 @@ class LeadService{
public function getAllLeads(){
return Lead::with('kyc','user', 'product.category')->latest()->get();
// dd(Lead::with('kyc','user', 'product.category')->latest()->first());
}
public function totalLead(){
@@ -89,6 +90,7 @@ class LeadService{
public function show($id){
return Lead::with('user', 'owner', 'notes.admin', 'attachment.admin', 'tasks_meetings.admin', 'calls.admin', 'product.category')->FindOrFail($id);
// dd(Lead::with('user', 'owner', 'notes.admin', 'attachment.admin', 'tasks_meetings.admin', 'calls.admin', 'product.category')->FindOrFail($id));
}
public function edit($id){

View File

@@ -977,7 +977,7 @@ select.listing_status {
.app-page .app-sidebar div#kt_app_sidebar_logo {
background-color: #1b243d;
border-right: 1px solid #ffffff73;
border-style: dashed;
border: none;
}
.app-sidebar-logo .btn.btn-active-color-primary:hover:not(.btn-active) {
color: #1b243d !important;
@@ -1051,7 +1051,13 @@ select.listing_status {
.menu-title {
color: #fff;
}
[kt-app-layout=dark-sidebar] .app-sidebar .menu .menu-item .menu-link .menu-icon .svg-icon {
[kt-app-layout="dark-sidebar"]
.app-sidebar
.menu
.menu-item
.menu-link
.menu-icon
.svg-icon {
color: #fff;
}
@@ -1097,8 +1103,6 @@ select.listing_status {
display: flex;
}
/* table.dataTable tbody td {
text-align: center;
} */
@@ -1124,9 +1128,6 @@ span.select2-selection.form-select-view {
left: 6px;
}
ul,
ol {
list-style-type: none;
@@ -1260,3 +1261,7 @@ nav {
width: 100%;
margin-top: 8px;
}
.app-sidebar-logo .app-sidebar-logo-minimize {
position: relative;
right: 16px;
}

View File

@@ -35,10 +35,10 @@ window.$('#currently').DataTable({
});
$("#recipes-popbtn-four").on("click", function () {
// var investNowUrl = '{{route("investNow")}}';
var investNowUrl = "{{route('investNow')}}";
$.ajax({
url : '/jericho_28_march/invest-now',
// url : '{{route("investNow")}}',
// url : "{{route('investNow')}}",
// url : investNowUrl,
type: 'get',
data : {
@@ -47,21 +47,26 @@ $("#recipes-popbtn-four").on("click", function () {
// data : $(this).data('product-id'),
dataType : 'json',
success: function (result) {
console.log("result",result);
// console.log("result",result);
// console.log("result",result.status);
// return result.status;
// alert('hello');
if(result.status == 201)
{
$('#login-pop-up').modal('show');
}
if(result.status === 403){
if(result.status == 403){
$('#blocked-popup').modal('show');
}
if(result.status === 200) {
$('#view_details').modal('hide');
$('#recipes-pop-four').modal('show');
if(result.status == 200) {
// console.log("Hii 2000000")
// $('#view_details').modal('hide');
// $('#recipes-pop-four').modal('show');
$('#investmodal-pop').modal('show');
}
if(result.status === 400){
if(result.status == 400){
toastr.warning(result.message);
}
if(result.status == 401)

View File

@@ -68,7 +68,7 @@
<div class="col-md-6 fv-row">
<label class=" fs-6 fw-semibold mb-2">Email</label>
<!--pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"-->
<input type="email" class="form-control form-control-solid" placeholder="Enter Email" name="email" id="email"/>
<input type="email" class="form-control form-control-solid" readonly placeholder="Enter Email" name="email" id="email"/>
</div>
<div class="col-md-6 fv-row">
<label class=" fs-6 fw-semibold mb-2">Title</label>
@@ -80,7 +80,7 @@
</div>
<div class="col-md-6 fv-row">
<label class=" fs-6 fw-semibold mb-2">Phone</label>
<input type="tel" minlength="10" maxlength="10" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1');" class="form-control form-control-solid" placeholder="Enter Phone Number" name="phone" />
<input type="tel" minlength="10" readonly maxlength="10" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1');" class="form-control form-control-solid" placeholder="Enter Phone Number" name="phone" id="phone" />
</div>
<div class="col-md-6 fv-row mb-7">
<label class=" fs-6 fw-semibold mb-2">Lead Status</label>
@@ -95,7 +95,7 @@
</div>
<div class="col-md-6 fv-row">
<label class=" fs-6 fw-semibold mb-2">Full Name</label>
<input type="text" class="form-control form-control-solid" placeholder="Enter First Name" name="first_name" onkeydown="return /^[a-zA-Z\s]+$/i.test(event.key)" />
<input type="text" class="form-control form-control-solid" readonly placeholder="Enter First Name" id="name" name="first_name" onkeydown="return /^[a-zA-Z\s]+$/i.test(event.key)" />
</div>
{{--<div class="col-md-6 fv-row">
<label class=" fs-6 fw-semibold mb-2">Last Name</label>
@@ -222,6 +222,24 @@
@endsection
@section('scripts')
<script>
$('#investor').on('change',function(){
id = $(this).val();
$.ajax({
url:"{{route('get-investor-detail')}}",
type:'get',
data:{'id':id},
success:function(result){
if(result.status == 200)
{
// console.log(result.data);
$('#phone').val(result.data.contact_number);
$('#email').val(result.data.email);
$('#name').val(result.data.name);
}
}
})
})
$(document).ready(function() {
$('.lead_status').select2();
$('.lead_source').select2();

File diff suppressed because it is too large Load Diff

View File

@@ -1,322 +1,383 @@
@extends('Admin.layouts.master')
@section('title', 'Manage Leads')
@section('style')
<style>
.dataTables_filter {
display: none;
}
<style>
.dataTables_filter {
display: none;
}
.dt-buttons {
display: none;
}
</style>
.dt-buttons {
display: none;
}
</style>
@endsection
@section('content')
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
<div class="d-flex flex-column flex-column-fluid">
<div id="kt_app_content_container" class="app-container container-xxl">
<div class="row max-w-100 mt-10 gap-4">
<div class="col-md-3 index-box">
<a href="{{ route('new_leads') }}">
<div class="card card-flush mb-5 mb-xl-10">
<div class="card-header pt-5">
<div class="card-title d-flex flex-column">
<span class="fs-2x fw-bold text-white me-2 lh-1 ls-n2">{{$newCount}}</span>
<span class="text-white opacity-75 pt-1 fw-semibold fs-7">New Leads</span>
</div>
<div class="title_icon_area">
<span class="svg-icon svg-icon-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff" xmlns="http://www.w3.org/2000/svg">
<path d="M6.28548 15.0861C7.34369 13.1814 9.35142 12 11.5304 12H12.4696C14.6486 12 16.6563 13.1814 17.7145 15.0861L19.3493 18.0287C20.0899 19.3618 19.1259 21 17.601 21H6.39903C4.87406 21 3.91012 19.3618 4.65071 18.0287L6.28548 15.0861Z" fill="#fff" />
<rect opacity="0.4" x="8" y="3" width="8" height="8" rx="4" fill="#fff" />
</svg>
</span>
</div>
</div>
<div class="card-body d-flex align-items-end pt-0">
<div class="d-flex align-items-center flex-column mt-3 w-100">
<div class="h-8px mx-3 w-100 bg-white bg-opacity-50 rounded">
<div class="bg-white rounded h-8px" role="progressbar" style="width: 72%;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-3 index-box">
<a href="{{ route('ongoing_leads') }}">
<div class="card card-flush mb-5 mb-xl-10">
<div class="card-header pt-5">
<div class="card-title d-flex flex-column">
<span class="fs-2x fw-bold text-white me-2 lh-1 ls-n2">{{$ongoingCount}}</span>
<span class="text-white opacity-75 pt-1 fw-semibold fs-7">Ongoing Leads</span>
</div>
<div class="title_icon_area">
<span class="svg-icon svg-icon-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff" xmlns="http://www.w3.org/2000/svg">
<path d="M6.28548 15.0861C7.34369 13.1814 9.35142 12 11.5304 12H12.4696C14.6486 12 16.6563 13.1814 17.7145 15.0861L19.3493 18.0287C20.0899 19.3618 19.1259 21 17.601 21H6.39903C4.87406 21 3.91012 19.3618 4.65071 18.0287L6.28548 15.0861Z" fill="#fff" />
<rect opacity="0.4" x="8" y="3" width="8" height="8" rx="4" fill="#fff" />
</svg>
</span>
</div>
</div>
<div class="card-body d-flex align-items-end pt-0">
<div class="d-flex align-items-center flex-column mt-3 w-100">
<div class="h-8px mx-3 w-100 bg-white bg-opacity-50 rounded">
<div class="bg-white rounded h-8px" role="progressbar" style="width: 72%;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-3 index-box">
<a href="{{ route('completed_leads') }}">
<div class="card card-flush mb-5 mb-xl-10">
<div class="card-header pt-5">
<div class="card-title d-flex flex-column">
<span class="fs-2x fw-bold text-white me-2 lh-1 ls-n2">{{$completedCount}}</span>
<span class="text-white opacity-75 pt-1 fw-semibold fs-7">Completed Leads</span>
</div>
<div class="title_icon_area">
<span class="svg-icon svg-icon-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff" xmlns="http://www.w3.org/2000/svg">
<path d="M6.28548 15.0861C7.34369 13.1814 9.35142 12 11.5304 12H12.4696C14.6486 12 16.6563 13.1814 17.7145 15.0861L19.3493 18.0287C20.0899 19.3618 19.1259 21 17.601 21H6.39903C4.87406 21 3.91012 19.3618 4.65071 18.0287L6.28548 15.0861Z" fill="#fff" />
<rect opacity="0.4" x="8" y="3" width="8" height="8" rx="4" fill="#fff" />
</svg>
</span>
</div>
</div>
<div class="card-body d-flex align-items-end pt-0">
<div class="d-flex align-items-center flex-column mt-3 w-100">
<div class="h-8px mx-3 w-100 bg-white bg-opacity-50 rounded">
<div class="bg-white rounded h-8px" role="progressbar" style="width: 72%;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-3 index-box">
<a href="{{ route('old_leads') }}">
<div class="card card-flush mb-5 mb-xl-10">
<div class="card-header pt-5">
<div class="card-title d-flex flex-column">
<span class="fs-2x fw-bold text-white me-2 lh-1 ls-n2">{{$oldCount}}</span>
<span class="text-white opacity-75 pt-1 fw-semibold fs-7">Old Leads</span>
</div>
<div class="title_icon_area">
<span class="svg-icon svg-icon-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff" xmlns="http://www.w3.org/2000/svg">
<path d="M6.28548 15.0861C7.34369 13.1814 9.35142 12 11.5304 12H12.4696C14.6486 12 16.6563 13.1814 17.7145 15.0861L19.3493 18.0287C20.0899 19.3618 19.1259 21 17.601 21H6.39903C4.87406 21 3.91012 19.3618 4.65071 18.0287L6.28548 15.0861Z" fill="#fff" />
<rect opacity="0.4" x="8" y="3" width="8" height="8" rx="4" fill="#fff" />
</svg>
</span>
</div>
</div>
<div class="card-body d-flex align-items-end pt-0">
<div class="d-flex align-items-center flex-column mt-3 w-100">
<div class="h-8px mx-3 w-100 bg-white bg-opacity-50 rounded">
<div class="bg-white rounded h-8px" role="progressbar" style="width: 72%;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-3 index-box">
<a href="{{ route('lost_leads') }}">
<div class="card card-flush mb-5 mb-xl-10">
<div class="card-header pt-5">
<div class="card-title d-flex flex-column">
<span class="fs-2x fw-bold text-white me-2 lh-1 ls-n2">{{$lostCount}}</span>
<span class="text-white opacity-75 pt-1 fw-semibold fs-7">Lost Leads</span>
</div>
<div class="title_icon_area">
<span class="svg-icon svg-icon-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff" xmlns="http://www.w3.org/2000/svg">
<path d="M6.28548 15.0861C7.34369 13.1814 9.35142 12 11.5304 12H12.4696C14.6486 12 16.6563 13.1814 17.7145 15.0861L19.3493 18.0287C20.0899 19.3618 19.1259 21 17.601 21H6.39903C4.87406 21 3.91012 19.3618 4.65071 18.0287L6.28548 15.0861Z" fill="#fff" />
<rect opacity="0.4" x="8" y="3" width="8" height="8" rx="4" fill="#fff" />
</svg>
</span>
</div>
</div>
<div class="card-body d-flex align-items-end pt-0">
<div class="d-flex align-items-center flex-column mt-3 w-100">
<div class="h-8px mx-3 w-100 bg-white bg-opacity-50 rounded">
<div class="bg-white rounded h-8px" role="progressbar" style="width: 72%;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</a>
</div>
</div>
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
<div class="d-flex flex-column flex-column-fluid">
<div id="kt_app_content_container" class="app-container container-xxl">
<div class="row max-w-100 mt-10 gap-4">
<div class="col-md-3 index-box">
<a href="{{ route('new_leads') }}">
<div class="card card-flush mb-5 mb-xl-10">
<div class="card-header pt-5">
<div class="card-title d-flex flex-column">
<span class="fs-2x fw-bold text-white me-2 lh-1 ls-n2">{{ $newCount }}</span>
<span class="text-white opacity-75 pt-1 fw-semibold fs-7">New Leads</span>
</div>
<div class="title_icon_area">
<span class="svg-icon svg-icon-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff"
xmlns="http://www.w3.org/2000/svg">
<path
d="M6.28548 15.0861C7.34369 13.1814 9.35142 12 11.5304 12H12.4696C14.6486 12 16.6563 13.1814 17.7145 15.0861L19.3493 18.0287C20.0899 19.3618 19.1259 21 17.601 21H6.39903C4.87406 21 3.91012 19.3618 4.65071 18.0287L6.28548 15.0861Z"
fill="#fff" />
<rect opacity="0.4" x="8" y="3" width="8" height="8"
rx="4" fill="#fff" />
</svg>
</span>
</div>
</div>
<div class="card-body d-flex align-items-end pt-0">
<div class="d-flex align-items-center flex-column mt-3 w-100">
<div class="h-8px mx-3 w-100 bg-white bg-opacity-50 rounded">
<div class="bg-white rounded h-8px" role="progressbar" style="width: 72%;"
aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-3 index-box">
<a href="{{ route('ongoing_leads') }}">
<div class="card card-flush mb-5 mb-xl-10">
<div class="card-header pt-5">
<div class="card-title d-flex flex-column">
<span class="fs-2x fw-bold text-white me-2 lh-1 ls-n2">{{ $ongoingCount }}</span>
<span class="text-white opacity-75 pt-1 fw-semibold fs-7">Ongoing Leads</span>
</div>
<div class="title_icon_area">
<span class="svg-icon svg-icon-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff"
xmlns="http://www.w3.org/2000/svg">
<path
d="M6.28548 15.0861C7.34369 13.1814 9.35142 12 11.5304 12H12.4696C14.6486 12 16.6563 13.1814 17.7145 15.0861L19.3493 18.0287C20.0899 19.3618 19.1259 21 17.601 21H6.39903C4.87406 21 3.91012 19.3618 4.65071 18.0287L6.28548 15.0861Z"
fill="#fff" />
<rect opacity="0.4" x="8" y="3" width="8" height="8"
rx="4" fill="#fff" />
</svg>
</span>
</div>
</div>
<div class="card-body d-flex align-items-end pt-0">
<div class="d-flex align-items-center flex-column mt-3 w-100">
<div class="h-8px mx-3 w-100 bg-white bg-opacity-50 rounded">
<div class="bg-white rounded h-8px" role="progressbar" style="width: 72%;"
aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-3 index-box">
<a href="{{ route('completed_leads') }}">
<div class="card card-flush mb-5 mb-xl-10">
<div class="card-header pt-5">
<div class="card-title d-flex flex-column">
<span class="fs-2x fw-bold text-white me-2 lh-1 ls-n2">{{ $completedCount }}</span>
<span class="text-white opacity-75 pt-1 fw-semibold fs-7">Completed Leads</span>
</div>
<div class="title_icon_area">
<span class="svg-icon svg-icon-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff"
xmlns="http://www.w3.org/2000/svg">
<path
d="M6.28548 15.0861C7.34369 13.1814 9.35142 12 11.5304 12H12.4696C14.6486 12 16.6563 13.1814 17.7145 15.0861L19.3493 18.0287C20.0899 19.3618 19.1259 21 17.601 21H6.39903C4.87406 21 3.91012 19.3618 4.65071 18.0287L6.28548 15.0861Z"
fill="#fff" />
<rect opacity="0.4" x="8" y="3" width="8" height="8"
rx="4" fill="#fff" />
</svg>
</span>
</div>
</div>
<div class="card-body d-flex align-items-end pt-0">
<div class="d-flex align-items-center flex-column mt-3 w-100">
<div class="h-8px mx-3 w-100 bg-white bg-opacity-50 rounded">
<div class="bg-white rounded h-8px" role="progressbar" style="width: 72%;"
aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-3 index-box">
<a href="{{ route('old_leads') }}">
<div class="card card-flush mb-5 mb-xl-10">
<div class="card-header pt-5">
<div class="card-title d-flex flex-column">
<span class="fs-2x fw-bold text-white me-2 lh-1 ls-n2">{{ $oldCount }}</span>
<span class="text-white opacity-75 pt-1 fw-semibold fs-7">Old Leads</span>
</div>
<div class="title_icon_area">
<span class="svg-icon svg-icon-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff"
xmlns="http://www.w3.org/2000/svg">
<path
d="M6.28548 15.0861C7.34369 13.1814 9.35142 12 11.5304 12H12.4696C14.6486 12 16.6563 13.1814 17.7145 15.0861L19.3493 18.0287C20.0899 19.3618 19.1259 21 17.601 21H6.39903C4.87406 21 3.91012 19.3618 4.65071 18.0287L6.28548 15.0861Z"
fill="#fff" />
<rect opacity="0.4" x="8" y="3" width="8" height="8"
rx="4" fill="#fff" />
</svg>
</span>
</div>
</div>
<div class="card-body d-flex align-items-end pt-0">
<div class="d-flex align-items-center flex-column mt-3 w-100">
<div class="h-8px mx-3 w-100 bg-white bg-opacity-50 rounded">
<div class="bg-white rounded h-8px" role="progressbar" style="width: 72%;"
aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</a>
</div>
<div class="col-md-3 index-box">
<a href="{{ route('lost_leads') }}">
<div class="card card-flush mb-5 mb-xl-10">
<div class="card-header pt-5">
<div class="card-title d-flex flex-column">
<span class="fs-2x fw-bold text-white me-2 lh-1 ls-n2">{{ $lostCount }}</span>
<span class="text-white opacity-75 pt-1 fw-semibold fs-7">Lost Leads</span>
</div>
<div class="title_icon_area">
<span class="svg-icon svg-icon-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff"
xmlns="http://www.w3.org/2000/svg">
<path
d="M6.28548 15.0861C7.34369 13.1814 9.35142 12 11.5304 12H12.4696C14.6486 12 16.6563 13.1814 17.7145 15.0861L19.3493 18.0287C20.0899 19.3618 19.1259 21 17.601 21H6.39903C4.87406 21 3.91012 19.3618 4.65071 18.0287L6.28548 15.0861Z"
fill="#fff" />
<rect opacity="0.4" x="8" y="3" width="8" height="8"
rx="4" fill="#fff" />
</svg>
</span>
</div>
</div>
<div class="card-body d-flex align-items-end pt-0">
<div class="d-flex align-items-center flex-column mt-3 w-100">
<div class="h-8px mx-3 w-100 bg-white bg-opacity-50 rounded">
<div class="bg-white rounded h-8px" role="progressbar" style="width: 72%;"
aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</a>
</div>
</div>
<div class="row max-w-100">
<div class="top_header d-flex justify-content-between align-items-center">
<p class='fs-2 fw-bold mb-0'>Manage Leads</p>
<div class="table_right_options d-flex">
<button type="button" class="btn btn-light-primary me-3" id="ExportReporttoExcel">
<span class="svg-icon svg-icon-2">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect opacity="0.3" x="12.75" y="4.25" width="12" height="2" rx="1" transform="rotate(90 12.75 4.25)" fill="currentColor"></rect>
<path d="M12.0573 6.11875L13.5203 7.87435C13.9121 8.34457 14.6232 8.37683 15.056 7.94401C15.4457 7.5543 15.4641 6.92836 15.0979 6.51643L12.4974 3.59084C12.0996 3.14332 11.4004 3.14332 11.0026 3.59084L8.40206 6.51643C8.0359 6.92836 8.0543 7.5543 8.44401 7.94401C8.87683 8.37683 9.58785 8.34458 9.9797 7.87435L11.4427 6.11875C11.6026 5.92684 11.8974 5.92684 12.0573 6.11875Z" fill="currentColor"></path>
<path opacity="0.3" d="M18.75 8.25H17.75C17.1977 8.25 16.75 8.69772 16.75 9.25C16.75 9.80228 17.1977 10.25 17.75 10.25C18.3023 10.25 18.75 10.6977 18.75 11.25V18.25C18.75 18.8023 18.3023 19.25 17.75 19.25H5.75C5.19772 19.25 4.75 18.8023 4.75 18.25V11.25C4.75 10.6977 5.19771 10.25 5.75 10.25C6.30229 10.25 6.75 9.80228 6.75 9.25C6.75 8.69772 6.30229 8.25 5.75 8.25H4.75C3.64543 8.25 2.75 9.14543 2.75 10.25V19.25C2.75 20.3546 3.64543 21.25 4.75 21.25H18.75C19.8546 21.25 20.75 20.3546 20.75 19.25V10.25C20.75 9.14543 19.8546 8.25 18.75 8.25Z" fill="currentColor"></path>
</svg>
</span>
Export
</button>
<a type="button" href="{{route('add-lead')}}" class="btn btn-light-primary me-3" data-kt-menu-trigger="click" data-kt-menu-attach="parent" data-kt-menu-placement="bottom-start">
<span class="svg-icon svg-icon-2">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect opacity="0.5" x="11.364" y="20.364" width="16" height="2" rx="1" transform="rotate(-90 11.364 20.364)" fill="currentColor"></rect>
<rect x="4.36396" y="11.364" width="16" height="2" rx="1" fill="currentColor"></rect>
</svg>
</span>
Create Lead
</a>
<div class="d-flex align-items-center position-relative">
<span class="svg-icon svg-icon-1 position-absolute ms-6">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect opacity="0.5" x="17.0365" y="15.1223" width="8.15546" height="2" rx="1" transform="rotate(45 17.0365 15.1223)" fill="currentColor" />
<path d="M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z" fill="currentColor" />
</svg>
</span>
<input type="text" data-kt-user-table-filter="search" class="form-control bg-white form-control-solid w-250px ps-14" placeholder="Search Leads" id="searchbox" />
</div>
</div>
</div>
</div>
<div class="row max-w-100">
<div class="top_header d-flex justify-content-between align-items-center">
<p class='fs-2 fw-bold mb-0'>Manage Leads</p>
<div class="table_right_options d-flex">
<button type="button" class="btn btn-light-primary me-3" id="ExportReporttoExcel">
<span class="svg-icon svg-icon-2">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
<rect opacity="0.3" x="12.75" y="4.25" width="12" height="2"
rx="1" transform="rotate(90 12.75 4.25)" fill="currentColor"></rect>
<path
d="M12.0573 6.11875L13.5203 7.87435C13.9121 8.34457 14.6232 8.37683 15.056 7.94401C15.4457 7.5543 15.4641 6.92836 15.0979 6.51643L12.4974 3.59084C12.0996 3.14332 11.4004 3.14332 11.0026 3.59084L8.40206 6.51643C8.0359 6.92836 8.0543 7.5543 8.44401 7.94401C8.87683 8.37683 9.58785 8.34458 9.9797 7.87435L11.4427 6.11875C11.6026 5.92684 11.8974 5.92684 12.0573 6.11875Z"
fill="currentColor"></path>
<path opacity="0.3"
d="M18.75 8.25H17.75C17.1977 8.25 16.75 8.69772 16.75 9.25C16.75 9.80228 17.1977 10.25 17.75 10.25C18.3023 10.25 18.75 10.6977 18.75 11.25V18.25C18.75 18.8023 18.3023 19.25 17.75 19.25H5.75C5.19772 19.25 4.75 18.8023 4.75 18.25V11.25C4.75 10.6977 5.19771 10.25 5.75 10.25C6.30229 10.25 6.75 9.80228 6.75 9.25C6.75 8.69772 6.30229 8.25 5.75 8.25H4.75C3.64543 8.25 2.75 9.14543 2.75 10.25V19.25C2.75 20.3546 3.64543 21.25 4.75 21.25H18.75C19.8546 21.25 20.75 20.3546 20.75 19.25V10.25C20.75 9.14543 19.8546 8.25 18.75 8.25Z"
fill="currentColor"></path>
</svg>
</span>
Export
</button>
<a type="button" href="{{ route('add-lead') }}" class="btn btn-light-primary me-3"
data-kt-menu-trigger="click" data-kt-menu-attach="parent"
data-kt-menu-placement="bottom-start">
<span class="svg-icon svg-icon-2">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
<rect opacity="0.5" x="11.364" y="20.364" width="16" height="2"
rx="1" transform="rotate(-90 11.364 20.364)" fill="currentColor">
</rect>
<rect x="4.36396" y="11.364" width="16" height="2" rx="1"
fill="currentColor"></rect>
</svg>
</span>
Create Lead
</a>
<div class="d-flex align-items-center position-relative">
<span class="svg-icon svg-icon-1 position-absolute ms-6">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
<rect opacity="0.5" x="17.0365" y="15.1223" width="8.15546" height="2"
rx="1" transform="rotate(45 17.0365 15.1223)" fill="currentColor" />
<path
d="M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z"
fill="currentColor" />
</svg>
</span>
<input type="text" data-kt-user-table-filter="search"
class="form-control bg-white form-control-solid w-250px ps-14"
placeholder="Search Leads" id="searchbox" />
</div>
</div>
</div>
</div>
<div class="dataTable_area my-5 mb-0">
<div class="card">
<div class="card-header border-0 pt-0 h-0">
<div class="card-toolbar">
<div class="d-flex justify-content-end" data-kt-user-table-toolbar="base">
<div class="d-flex justify-content-end align-items-center d-none" data-kt-user-table-toolbar="selected">
<button type="button" class="btn btn-danger" data-kt-user-table-select="delete_selected">Delete Selected</button>
</div>
</div>
</div>
</div>
<div class="card-body py-4">
<div class="table-responsive">
<table class="table align-middle table-row-dashed fs-6 gy-5" id="manage-leads">
<thead>
<tr class="text-start text-muted fw-bold fs-7 text-uppercase gs-0">
<th class="w-50px min-w-50px pe-2 align-top">Sr. No.</th>
<th class="min-w-125px w-100px align-top">Investor name</th>
<th class="min-w-125px w-125px align-top">Email</th>
<th class="min-w-50px w-200px align-top">Product Name</th>
<th class="min-w-50px w-200px align-top">Product Category</th>
<th class="min-w-50px w-200px align-top">Status</th>
<th class="min-w-50px w-75px align-top">Contact Number</th>
<th class="min-w-50px w-75px align-top">Lead Status</th>
<th class="min-w-50px w-75px align-top">Created Date</th>
<th class="text-center min-w-100px align-top notexport">Actions</th>
</tr>
</thead>
<tbody class="text-gray-600 fw-semibold">
{{-- @dd($leads[0]) --}}
@foreach($leads as $lead)
<tr>
<td>
<div class="form-check form-check-sm form-check-custom form-check-solid">
{{$loop->iteration}}
</div>
</td>
<td>{{$lead->user->name}}
</td>
<td>{{$lead->email}}</td>
<td>{{$productName[$loop->index]['product_name']}}</td>
<td>{{$lead->product == false ? 'No category' : $lead->product->category->category_name}}</td>
<td>
@if($lead->kyc->isNotEmpty())
@foreach($lead->kyc as $kyc)
<div class="dataTable_area my-5 mb-0">
<div class="card">
<div class="card-header border-0 pt-0 h-0">
<div class="card-toolbar">
<div class="d-flex justify-content-end" data-kt-user-table-toolbar="base">
<div class="d-flex justify-content-end align-items-center d-none"
data-kt-user-table-toolbar="selected">
<button type="button" class="btn btn-danger"
data-kt-user-table-select="delete_selected">Delete Selected</button>
</div>
</div>
</div>
</div>
<div class="card-body py-4">
<div class="table-responsive">
<table class="table align-middle table-row-dashed fs-6 gy-5" id="manage-leads">
<thead>
<tr class="text-start text-muted fw-bold fs-7 text-uppercase gs-0">
<th class="w-50px min-w-50px pe-2 align-top">Sr. No.</th>
<th class="min-w-125px w-100px align-top">Investor name</th>
<th class="min-w-125px w-125px align-top">Email</th>
<th class="min-w-50px w-200px align-top">Product Name</th>
<th class="min-w-50px w-200px align-top">Product Category</th>
<th class="min-w-50px w-200px align-top">Status</th>
<th class="min-w-50px w-75px align-top">Contact Number</th>
<th class="min-w-50px w-75px align-top">Lead Status</th>
<th class="min-w-50px w-75px align-top">Created Date</th>
<th class="text-center min-w-100px align-top notexport">Actions</th>
</tr>
</thead>
<tbody class="text-gray-600 fw-semibold">
{{-- @dd($leads[0]) --}}
@foreach ($leads as $lead)
<tr>
<td>
<div
class="form-check form-check-sm form-check-custom form-check-solid">
{{ $loop->iteration }}
</div>
</td>
<td>{{ $lead->user->name }}
</td>
<td>{{ $lead->email }}</td>
<td>{{ $productName[$loop->index]['product_name'] }}</td>
<td>{{ $lead->product == false ? 'No category' : $lead->product->category->category_name }}
</td>
@if ($lead->kyc != null)
<td>
{{ $lead->kyc->status }}
</td>
{{-- @foreach ($lead->kyc as $kyc)
{{$kyc->status}}
@endforeach
@else
N/A
@endif
</td>
<td class='w-75px'>{{$lead->mobile}}</td>
<td>{{$lead->lead_status}}</td>
<td>
<div class="badge badge-light fw-bold">{{$lead->created_at->format('d/m/Y')}}</div>
</td>
<td class="text-end d-flex align-items-center justify-content-around">
<a href='{{route("view-lead",$lead->id)}}' class="action_icon" title="View lead">
<i class="fa-regular fa-eye"></i>
</a>
<a href="{{route('edit-lead',$lead->id)}}" title="Edit lead" class="action_icon" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" data-kt-initialized="1">
<svg class="svg-inline--fa fa-pen-to-square" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="pen-to-square" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg="">
<path fill="currentColor" d="M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.8 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"></path>
</svg>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
@endforeach --}}
@else
<td>
N/A
</td>
@endif
<td class='w-75px'>{{ $lead->mobile }}</td>
<td>{{ $lead->lead_status }}</td>
<td>
<div class="badge badge-light fw-bold">
{{ $lead->created_at->format('d/m/Y') }}</div>
</td>
<td class="text-end d-flex align-items-center justify-content-around">
<a href='{{ route('view-lead', $lead->id) }}' class="action_icon"
title="View lead">
<i class="fa-regular fa-eye"></i>
</a>
<a href="{{ route('edit-lead', $lead->id) }}" title="Edit lead"
class="action_icon" data-bs-toggle="tooltip"
data-bs-custom-class="tooltip-inverse" data-bs-placement="top"
data-kt-initialized="1">
<svg class="svg-inline--fa fa-pen-to-square" aria-hidden="true"
focusable="false" data-prefix="fas" data-icon="pen-to-square"
role="img" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512" data-fa-i2svg="">
<path fill="currentColor"
d="M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.8 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z">
</path>
</svg>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('scripts')
<script type="text/javascript">
$(function() {
var table = $('#manage-leads').DataTable({
dom: "Bfrtip",
buttons: [{
extend: "excel",
title: "Leads List",
text: "Export Search Results",
className: "btn btn-default",
exportOptions: {
columns: ":not(.notexport)",
},
}, ],
});
$("#ExportReporttoExcel").on("click", function() {
table.button(".buttons-excel").trigger();
});
$("#searchbox").keyup(function() {
table.search($(this).val()).draw();
});
<script type="text/javascript">
$(function() {
var table = $('#manage-leads').DataTable({
dom: "Bfrtip",
buttons: [{
extend: "excel",
title: "Leads List",
text: "Export Search Results",
className: "btn btn-default",
exportOptions: {
columns: ":not(.notexport)",
},
}, ],
});
$("#ExportReporttoExcel").on("click", function() {
table.button(".buttons-excel").trigger();
});
$("#searchbox").keyup(function() {
table.search($(this).val()).draw();
});
});
$(document).ready(function(){
// var ids = $('.current).attr('#data-dt-idx');
// alert(ids);
// console.log($('.previous span:first'))
//$('.previous').each(function(){
//console.log($(this).find('span a:first'));
// console.log($(this).prop('span'));
//})
console.log($('.previous > span > a:first').attr('#data-dt-idx'));
$('#manage-leads_previous').addClass('d-none');
});
// $('.paginate_button').on('click',function(){
// alert('hello');
// var id = $(this).data('dt-idx');
// alert(id);
// if(id == 0)
// {
// $('#manage-leads_previous').addClass('d-none');
// }
// else
// {
// $('#manage-leads_previous').removeClass('d-none');
// }
// });
</script>
@endsection
});
$(document).ready(function() {
// var ids = $('.current).attr('#data-dt-idx');
// alert(ids);
// console.log($('.previous span:first'))
//$('.previous').each(function(){
//console.log($(this).find('span a:first'));
// console.log($(this).prop('span'));
//})
console.log($('.previous > span > a:first').attr('#data-dt-idx'));
$('#manage-leads_previous').addClass('d-none');
});
// $('.paginate_button').on('click',function(){
// alert('hello');
// var id = $(this).data('dt-idx');
// alert(id);
// if(id == 0)
// {
// $('#manage-leads_previous').addClass('d-none');
// }
// else
// {
// $('#manage-leads_previous').removeClass('d-none');
// }
// });
</script>
@endsection

View File

@@ -494,7 +494,7 @@
<td>Lead Owner</td>
<td>Category</td>
<td>Title</td>
<td>Name</td>
<td>Full Name</td>
<td>Phone</td>
<td>Mobile</td>
<td>Lead Source</td>
@@ -509,7 +509,7 @@
<td><i class="fa fa-phone-square" aria-hidden="true"></i><a href="">{{$lead->phone ? $lead->phone:'--'}}</a></td>
<td><i class="fa fa-phone-square" aria-hidden="true"></i><a href="">{{$lead->mobile ? $lead->mobile:'--'}}</a></td>
<td>{{$lead->lead_source ? $lead->lead_source:'--'}}</td>
<td>{{ date('Y-m-d', strtotime($lead->created_at ?? '--')) }}</td>
<td>{{ $lead->modified_by ?? '--' }}</td>
</tr>
</tbody>
@@ -548,7 +548,7 @@
<td>{{$lead->email ? $lead->email:'--'}}</td>
<td>{{$lead->website ? $lead->website:'--'}}</td>
<td>{{$lead->lead_status ? $lead->lead_status.' Lead':'--'}}</td>
<td>{{$lead->lead_owner ? $lead->lead_owner:'--'}}</td>
<td>{{date('Y-m-d', strtotime($lead->created_at ?? '--'))}}</td>
</tr>
</tbody>
</table>

View File

@@ -192,10 +192,11 @@
</thead>
<tbody class="text-gray-600 fw-semibold">
@foreach($leads as $lead)
{{-- @dd($lead) --}}
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$lead->user->name}}</td>
<td>{{$lead->lead_company}}</td>
<td>{{$lead->lead_company ?? 'N/A'}}</td>
<td>{{$lead->email}}</td>
<td>{{$lead->mobile}}</td>
<td>{{$lead->leadSource == null ? 'No Lead Source Assigned' : $lead->leadSource->name}}</td>

View File

@@ -809,6 +809,7 @@ Route::middleware([BackendAccess::class])->group(function () {
Route::post("convert-closed", 'convertClosed')->name('convert-closed');
Route::get("sort-notes", 'sortNotes')->name('sort-notes');
Route::get('download-file-data', 'downloadFile')->name('lead-attachment-download');
Route::get('get-investor-detail', 'getInvestorDetail')->name('get-investor-detail');
});
//Manage Faqs