<?php $login = new Login();  ?>

<section class="content-header">

    <h1>Dashboard<small>Control panel</small></h1>

    <ol class="breadcrumb">

      <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>

      <li class="active">Dashboard</li>

    </ol>

</section>

<section class="content">

    <div class="box-body">

      <div class="box box-primary">

        <div class="box-header">

            <i class="fa fa-sun-o"></i>

            <h3 class="box-title"><?php echo $_translator->_getTranslation('Clima local'); ?></h3>

        </div>

        <div class="box-body">

            <div class="col-lg-12 col-xs-12">       

                <?php                    

                $storeRepo = new StoreRepository();

                $storeData = $storeRepo->getById($login->getStoreId());

                echo $storeData['weather_location'];

                ?>

                <script>

                    !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src='https://weatherwidget.io/js/widget.min.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','weatherwidget-io-js');

                </script>

            </div>

        </div>

      </div>

    </div>    

    <div class="box">

        <?php 

        switch($login->getRole()){

            case '1':

                include ROOT."/View/Dashboard/role_admin.php";

                break;

            case '2':

                include ROOT."/View/Dashboard/role_sucursal.php";

                break;

        }

        ?>

    </div>

</section>



<script src="<?php echo ROOT_HOST?>/public/chart.js/Chart.js"></script>

<script src="<?php echo ROOT_HOST?>/public/app/js/app-dashboard.js?v=<?php echo time()?>"></script>

