Add new stats on dashboard and improve stats presentations and calculations

This commit is contained in:
Abhishek Kumar
2022-11-03 16:48:03 +05:30
parent e3d62e1fc1
commit b8d1504868
46 changed files with 2721 additions and 1411 deletions

View File

@@ -104,6 +104,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
$module = Tools::getValue('module');
$action .= ($module ? '&module='.Tools::safeOutput($module) : '');
$action .= (($id_product = Tools::getValue('id_product')) ? '&id_product='.Tools::safeOutput($id_product) : '');
$action .= (($id_hotel = Tools::getValue('id_hotel')) ? '&id_hotel='.Tools::safeOutput($id_hotel) : '');
$tpl->assign(array(
'current' => self::$currentIndex,
'token' => $token,
@@ -150,13 +151,8 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
$tpl = $this->createTemplate('menu.tpl');
$modules = $this->getModules();
$key_statsforecast = null;
$module_instance = array();
foreach ($modules as $m => $module) {
if ($module['name'] == 'statsforecast') {
$key_statsforecast = $m;
}
if ($module_instance[$module['name']] = Module::getInstanceByName($module['name'])) {
$modules[$m]['displayName'] = $module_instance[$module['name']]->displayName;
} else {
@@ -166,9 +162,6 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
}
uasort($modules, array($this, 'checkModulesNames'));
if (!is_null($key_statsforecast)) {
$modules = array($key_statsforecast => $modules[$key_statsforecast]) + $modules;
}
$tpl->assign(array(
'current' => self::$currentIndex,