<?php
/* Smarty version 3.1.33, created on 2020-08-11 08:54:37
  from '/Users/codeworldweb.com/websites/uvocorp/content/modules/overview/views/overview.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_5f325ccd282fb0_44455225',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'd3fa7db8d30f6c99ff1b5e57ba8b3d89bddbb8b8' => 
    array (
      0 => '/Users/codeworldweb.com/websites/uvocorp/content/modules/overview/views/overview.tpl',
      1 => 1597136073,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5f325ccd282fb0_44455225 (Smarty_Internal_Template $_smarty_tpl) {
if ($_smarty_tpl->tpl_vars['user']->value['is_admin'] || $_smarty_tpl->tpl_vars['user']->value['is_sub_admin']) {?>

    <div class="row mb20">
        <div class="col-sm-4">
            <div class="stat-panel bg-gradient-primary">
                <div class="stat-cell">
                    <i class="fa fa-users bg-icon"></i>
                    <span class="text-xlg"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['insights']->value['customers'], ENT_QUOTES, 'UTF-8');?>
</span><br>
                    <span class="text-lg">Customers</span><br>
                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/customers">Manage Customers</a>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="stat-panel bg-gradient-warning">
                <div class="stat-cell">
                    <i class="fa fa-users bg-icon"></i>
                    <span class="text-xlg"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['insights']->value['employees'], ENT_QUOTES, 'UTF-8');?>
</span><br>
                    <span class="text-lg">Employees</span><br>
                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/employees/writers">Manage Employees</a>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="stat-panel bg-gradient-success">
                <div class="stat-cell">
                    <i class="fa fa-tasks bg-icon"></i>
                    <span class="text-xlg"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['insights']->value['orders'], ENT_QUOTES, 'UTF-8');?>
</span><br>
                    <span class="text-lg">Orders</span><br>
                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/orders">Manage Orders</a>
                </div>
            </div>
        </div>
    </div>

    <div class="row mb20">
        <div class="col-sm-4">
            <div class="stat-panel bg-gradient-info">
                <div class="stat-cell">
                    <i class="fab fa-paypal bg-icon"></i>
                    <span class="text-xlg"><?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['insights']->value['customer_payments']), ENT_QUOTES, 'UTF-8');?>
</span><br>
                    <span class="text-lg">Total Sales</span><br>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="stat-panel bg-gradient-indigo">
                <div class="stat-cell">
                    <i class="fas fa-money-bill-wave bg-icon"></i>
                    <span class="text-xlg"><?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['insights']->value['writer_payments']), ENT_QUOTES, 'UTF-8');?>
</span><br>
                    <span class="text-lg">Writer Payments</span><br>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="stat-panel bg-gradient-red">
                <div class="stat-cell">
                    <i class="fas fa-money-bill-wave bg-icon"></i>
                    <span class="text-xlg"><?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['insights']->value['editor_payments']), ENT_QUOTES, 'UTF-8');?>
</span><br>
                    <span class="text-lg">Editor Payments</span><br>
                </div>
            </div>
        </div>
        
    </div>

    <div class="row mb20">
        <div class="col-sm-6">
            <div id="admin-chart-orders" class="admin-chart"></div>
        </div>
        <div class="col-sm-6">
            <div id="admin-chart-customers" class="admin-chart"></div>
        </div>
    </div>

    <div class="row mb20">
        <div class="col-sm-6">
            <div id="admin-chart-sales" class="admin-chart"></div>
        </div>
        <div class="col-sm-6">
            <div id="admin-chart-payments" class="admin-chart"></div>
        </div>
    </div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['user']->value['is_writer'] || $_smarty_tpl->tpl_vars['user']->value['is_editor']) {?>
    <div class="row mb20">
        <div class="col-sm-4">
            <div class="stat-panel bg-gradient-primary">
                <div class="stat-cell">
                    <i class="fas fa-money-check-alt bg-icon"></i>
                    <span class="text-xlg"><?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['outstanding_payment']->value), ENT_QUOTES, 'UTF-8');?>
</span><br>
                    <span class="text-lg">Outstanding Payment</span><br>
                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/financial-overview/unrequested">Payment Overview</a>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="stat-panel bg-gradient-warning">
                <div class="stat-cell">
                    <i class="fab fa-paypal bg-icon"></i>
                    <span class="text-xlg"><?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['last_pay']->value), ENT_QUOTES, 'UTF-8');?>
</span><br>
                    <span class="text-lg">Last Pay</span><br>
                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/financial-overview/history">Payment History</a>
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="stat-panel bg-gradient-success">
                <div class="stat-cell">
                    <i class="fas fa-money-bill-wave bg-icon"></i>
                    <span class="text-xlg"><?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['total_paid']->value), ENT_QUOTES, 'UTF-8');?>
</span><br>
                    <span class="text-lg">Total Earned</span><br>
                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/financial-overview/history">Payment History</a>
                </div>
            </div>
        </div>
    </div>

    <div id="admin-chart-income" class="admin-chart"></div>
<?php }?>

<!-- Admin Charts -->
<?php echo '<script'; ?>
 src="https://code.highcharts.com/highcharts.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 src="https://code.highcharts.com/modules/exporting.js"><?php echo '</script'; ?>
>

<?php echo '<script'; ?>
 type="text/javascript">
    var xAxis = {
        categories: [
            "Jan",
            "Feb",
            "Mar",
            "Apr",
            "May",
            "Jun",
            "Jul",
            "Aug",
            "Sep",
            "Oct",
            "Nov",
            "Dec"
        ],
        crosshair: true
    };

    var yAxis = {
        min: 0,
        title: {
            text: "<?php echo htmlspecialchars(date('Y'), ENT_QUOTES, 'UTF-8');?>
"
        }
    };

    var tooltip = {
        headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
        pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
            '<td style="padding:0"><b>{point.y}</b></td></tr>',
        footerFormat: '</table>',
        shared: true,
        useHTML: true
    };

    var plotOptions = {
        column: {
            pointPadding: 0.2,
            borderWidth: 0
        }
    };
<?php echo '</script'; ?>
>

<?php if ($_smarty_tpl->tpl_vars['user']->value['is_admin'] || $_smarty_tpl->tpl_vars['user']->value['is_sub_admin']) {?>
    <?php echo '<script'; ?>
 type="text/javascript">
        $(function () {
            $('#admin-chart-orders').highcharts({
                chart: {
                    type: 'column'
                },
                title: {
                    text: "Monthly Orders Average"
                },
                xAxis,
                yAxis,
                tooltip,
                plotOptions,
                series: [{
                    name: "Orders",
                    data: [<?php echo htmlspecialchars(implode(',',$_smarty_tpl->tpl_vars['chart']->value['orders']), ENT_QUOTES, 'UTF-8');?>
]
                }]
            });

            $('#admin-chart-customers').highcharts({
                chart: {
                    type: 'column'
                },
                title: {
                    text: "Monthly Customers Average"
                },
                xAxis,
                yAxis,
                tooltip,
                plotOptions,
                series: [{
                    name: "Customers",
                    data: [<?php echo htmlspecialchars(implode(',',$_smarty_tpl->tpl_vars['chart']->value['customers']), ENT_QUOTES, 'UTF-8');?>
]
                }]
            });

            $('#admin-chart-sales').highcharts({
                chart: {
                    type: 'line'
                },
                title: {
                    text: "Monthly Sales"
                },
                xAxis,
                yAxis,
                tooltip : {
                    headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                    pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                        '<td style="padding:0"><b>${point.y}</b></td></tr>',
                    footerFormat: '</table>',
                    shared: true,
                    useHTML: true
                },
                plotOptions,
                series: [{
                    name: "Sales",
                    data: [<?php echo htmlspecialchars(implode(',',$_smarty_tpl->tpl_vars['chart']->value['sales']), ENT_QUOTES, 'UTF-8');?>
]
                }]
            });

            $('#admin-chart-payments').highcharts({
                chart: {
                    type: 'line'
                },
                title: {
                    text: "Monthly Payments"
                },
                xAxis,
                yAxis,
                tooltip : {
                    headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                    pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                        '<td style="padding:0"><b>${point.y}</b></td></tr>',
                    footerFormat: '</table>',
                    shared: true,
                    useHTML: true
                },
                plotOptions,
                series: [{
                    name: "Payments",
                    data: [<?php echo htmlspecialchars(implode(',',$_smarty_tpl->tpl_vars['chart']->value['payments']), ENT_QUOTES, 'UTF-8');?>
]
                }]
            });
        });
    <?php echo '</script'; ?>
>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['user']->value['is_writer'] || $_smarty_tpl->tpl_vars['user']->value['is_editor']) {?>
    <?php echo '<script'; ?>
 type="text/javascript">
        $(function () {
            $('#admin-chart-income').highcharts({
                chart: {
                    type: 'line'
                },
                title: {
                    text: "Monthly Income Average"
                },
                xAxis,
                yAxis,
                tooltip : {
                    headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                    pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                        '<td style="padding:0"><b>${point.y}</b></td></tr>',
                    footerFormat: '</table>',
                    shared: true,
                    useHTML: true
                },
                plotOptions,
                series: [{
                    name: "Income",
                    data: [<?php echo htmlspecialchars(implode(',',$_smarty_tpl->tpl_vars['chart']->value['income']), ENT_QUOTES, 'UTF-8');?>
]
                }]
            });
        });
    <?php echo '</script'; ?>
>
<?php }
}
}
