<?php
/* Smarty version 5.4.2, created on 2024-12-19 19:16:34
  from 'file:/Users/razib/Herd/suite/ui/theme/default/../../../apps/wcsuite/views/summary.tpl' */

/* @var \Smarty\Template $_smarty_tpl */
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
  'version' => '5.4.2',
  'unifunc' => 'content_6764b76286f698_20854154',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '1436f62dedf6431acb9e26b0522f5c408558b5b8' => 
    array (
      0 => '/Users/razib/Herd/suite/ui/theme/default/../../../apps/wcsuite/views/summary.tpl',
      1 => 1730635716,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
))) {
function content_6764b76286f698_20854154 (\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/apps/wcsuite/views';
$_smarty_tpl->getInheritance()->init($_smarty_tpl, false);
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_15707988476764b762859887_59638908', "content");
?>


<?php 
$_smarty_tpl->getInheritance()->instanceBlock($_smarty_tpl, 'Block_15054857846764b76286d7b6_52285703', "script");
?>

<?php }
/* {block "content"} */
class Block_15707988476764b762859887_59638908 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/apps/wcsuite/views';
?>



    <?php $_smarty_tpl->renderSubTemplate(((string)$_smarty_tpl->getValue('app_view_path'))."/includes/top.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
?>

    <div class="row">

        <div class="col-md-12">



            <div class="card">
                <div class="card-body">
                    <div class="text-center" id="clxLoader">
                        <div class="md-preloader"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="32" width="32" viewbox="0 0 75 75"><circle cx="37.5" cy="37.5" r="33.5" stroke-width="6"/></svg></div>
                    </div>

                    <div id="clxContent">

                    </div>

                    <h5 class="my-3">Sales</h5>

                    <div id="chart_sales">

                    </div>

                    <h5 class="my-3">Orders</h5>

                    <div id="chart_orders">

                    </div>
                </div>
            </div>







        </div>

    </div>
<?php
}
}
/* {/block "content"} */
/* {block "script"} */
class Block_15054857846764b76286d7b6_52285703 extends \Smarty\Runtime\Block
{
public function callBlock(\Smarty\Template $_smarty_tpl) {
$_smarty_current_dir = '/Users/razib/Herd/suite/apps/wcsuite/views';
?>


    <?php $_smarty_tpl->renderSubTemplate(((string)$_smarty_tpl->getValue('app_view_path'))."/includes/base_js.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
?>

    <?php echo '<script'; ?>
>
        $(function () {

            var $clxLoader = $('#clxLoader');
            var $clxContent = $('#clxContent');

            axios.get('<?php echo $_smarty_tpl->getValue('_url');?>
wcsuite/app/x_dashboard').then(function (response) {
                $clxLoader.hide();
                $clxContent.html(response.data.html);

                var chart_sales = new ApexCharts(document.querySelector("#chart_sales"), {
                    chart: {
                        type: 'area',
                        fontFamily: 'Roboto, sans-serif',
                        height: 340,
                    },
                    series: [{
                        name: 'sales',
                        data: response.data.chart_data_sales,
                    }],
                    xaxis: {
                        type: 'category'
                    },
                });

                chart_sales.render();

                var chart_orders = new ApexCharts(document.querySelector("#chart_orders"), {
                    chart: {
                        type: 'bar',
                        fontFamily: 'Roboto, sans-serif',
                        height: 340,
                    },
                    series: [{
                        name: 'sales',
                        data: response.data.chart_data_orders,
                    }],
                    xaxis: {
                        type: 'category'
                    },
                });

                chart_orders.render();

            }).catch(function (reason) {
                console.log(reason);
            });



        })
    <?php echo '</script'; ?>
>

<?php
}
}
/* {/block "script"} */
}
