|
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'); ?>
<main class="main-content">
<div class="container">
<!-- begin::page header -->
<div class="page-header d-md-flex align-items-center justify-content-between">
<div>
<h3>Admin</h3>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:;">Dashboard</a></li>
</ol>
</nav>
</div>
</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; ?>
<div class="card">
<div class="card-body px-5">
<div class="" id="chart_div" style="width: 100%; height:auto;"></div>
<div class="row my-3">
<div class="col-md-12 d-flex align-items-center justify-content-center">
<?php
$btn_color = isset($_GET["timely"]) ? $_GET["timely"] : '';
?>
<form action="<?php echo e(asset('dashboard')); ?>" method="get">
<input type="hidden" value="weekly" name="timely" />
<button class="btn <?php echo e($btn_color == 'weekly' ? 'btn-success' : 'btn-outline-success'); ?> btn-sm timly mr-1" btn-value="weekly">W</button>
</form>
<form action="<?php echo e(asset('dashboard')); ?>" method="get">
<input type="hidden" value="monthly" name="timely" />
<button class="btn <?php echo e($btn_color == 'monthly' ? 'btn-success' : 'btn-outline-success'); ?> btn-sm timly mr-1" btn-value="monthly">M</button>
</form>
<form action="<?php echo e(asset('dashboard')); ?>" method="get">
<input type="hidden" value="6monthly" name="timely" />
<button class="btn <?php echo e($btn_color == '6monthly' ? 'btn-success' : 'btn-outline-success'); ?> btn-sm timly mr-1" btn-value="6monthly">6M</button>
</form>
<form action="<?php echo e(asset('dashboard')); ?>" method="get">
<input type="hidden" value="yearly" name="timely" />
<button class="btn <?php echo e($btn_color == 'yearly' ? 'btn-success' : 'btn-outline-success'); ?> btn-sm timly mr-1" btn-value="yearly">Y</button>
</form>
<form action="<?php echo e(asset('dashboard')); ?>" method="get">
<input type="hidden" value="all" name="timely" />
<button class="btn <?php echo e($btn_color == 'all' ? 'btn-success' : 'btn-outline-success'); ?> btn-sm timly" btn-value="all">ALL</button>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-3" >
<?php if(isset($distributor)): ?>
<a href="<?php echo e(asset('location-list')); ?>">
<div style="height:120px;" class="card d-flex cursor p-4 align-items-center justify-content-center">
<h6 class="card-title">DISTRIBUTOR</h6>
<h6 class="font-size-23"><?php echo e($distributor); ?></h6>
</div>
</a>
<?php endif; ?>
<?php if(isset($commission)): ?>
<a href="<?php echo e(asset('location-list')); ?>">
<div style="height:120px;" class="card d-flex cursor p-4 align-items-center justify-content-center">
<h6 class="card-title">TOTAL COMMISSION</h6>
<h6 class="font-size-23">₹ <?php echo e($commission); ?></h6>
</div>
</a>
<?php endif; ?>
</div>
<div class="col-3" >
<?php if(isset($licence)): ?>
<div style="height:120px;" class="card d-flex cursor p-4 align-items-center justify-content-center">
<h6 class="card-title">LICENCE</h6>
<h6 class="font-size-23"><?php echo e($licence); ?></h6>
</div>
<?php endif; ?>
</div>
<div class="col-3" >
<?php if(isset($licence_sell)): ?>
<div style="height:120px;" class="card d-flex cursor p-4 align-items-center justify-content-center">
<h6 class="card-title">SOLD LICENCE</h6>
<h5 class="font-size-23"><?php echo e($licence_sell); ?></h5>
</div>
<?php endif; ?>
</div>
<div class="col-3" >
<?php if(isset($restaurant)): ?>
<div style="height:120px;" class="card d-flex cursor p-4 align-items-center justify-content-center">
<h6 class="card-title">RESTAURANT</h6>
<h5 class="font-size-23"><?php echo e($restaurant); ?></h5>
</div>
<?php endif; ?>
</div>
</div>
<div class="row d-flex justify-content-end">
<div class="col-6">
<div class="card">
<h3 class="text-center" style="position: relative;top:15px;">How to create organization</h3>
<div class="p-3 pt-4">
<iframe src="https://www.youtube.com/embed/gl7HG0w3cLk?si=i3k6KGHgvtTqImCg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen style="width:100%;height: 300px;border-radius:2px;"></iframe>
</div>
</div>
</div>
</div>
</div>
<?php if(Auth::user()->hasRole('employee')): ?>
<p class="d-none has-role" roledata="employee"></p>
<?php endif; ?>
<?php if(Auth::user()->hasRole('distributor')): ?>
<p class="d-none has-role" roledata="distributor"></p>
<?php endif; ?>
</main>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script>
var role = $(".has-role").attr("roledata");
//console.log(role);
if(role=="distributor")
{
var commission = <?php echo $monthly_commission; ?>;
var sales = <?php echo $total_sells; ?>;
//console.log(sales);
commission = (Number(commission));
sales = (Number(sales));
//console.log(hosts);
var title_date = new Date();
var year = title_date.getFullYear();
var month = ('0' + (title_date.getMonth() + 1)).slice(-2); // Adding leading zero if needed
var day = ('0' + title_date.getDate()).slice(-2); // Adding leading zero if needed
// Concatenate the year, month, and day with hyphens
var c_date = year + '-' + month + '-' + day;
var date = new Date();
var options = {
year: 'numeric',
month: 'long'
};
var formattedDate = date.toLocaleDateString('en-US', options);
//console.log(formattedDate);
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart()
{
var data = google.visualization.arrayToDataTable([
['invoiced', 'Sales','Commission'],
[c_date, sales, commission]
]);
var options = {
title: formattedDate,
hAxis: {title: c_date, titleTextStyle: {color: '#333'}},
vAxis: {minValue: 0},
areaOpacity: 0,
chartArea: {
bottom: 30 // Adjust the bottom margin as needed
}
};
var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
}
if(role=="employee")
{
var commission = <?php echo $monthly_commission; ?>;
var sales = <?php echo $total_sells; ?>;
console.log(sales);
visits = (Number(commission));
sales = (Number(sales));
//console.log(hosts);
var title_date = new Date();
var year = title_date.getFullYear();
var month = ('0' + (title_date.getMonth() + 1)).slice(-2); // Adding leading zero if needed
var day = ('0' + title_date.getDate()).slice(-2); // Adding leading zero if needed
// Concatenate the year, month, and day with hyphens
var c_date = year + '-' + month + '-' + day;
var date = new Date();
var options = {
year: 'numeric',
month: 'long'
};
var formattedDate = date.toLocaleDateString('en-US', options);
//console.log(formattedDate);
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart()
{
var data = google.visualization.arrayToDataTable([
['invoiced', 'Sales'],
[c_date, sales]
]);
var options = {
title: formattedDate,
hAxis: {title: c_date, titleTextStyle: {color: '#333'}},
vAxis: {minValue: 0},
areaOpacity: 0,
chartArea: {
bottom: 30 // Adjust the bottom margin as needed
}
};
var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
}
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\licence_panel\resources\views/dashboard/dashboard.blade.php ENDPATH**/ ?>