Procházet zdrojové kódy

[Administration] Tableau de bord administrateur

feature/souke
Guillaume Bourgeois před 9 měsíci
rodič
revize
dc901d0757
2 změnil soubory, kde provedl 6 přidání a 5 odebrání
  1. +2
    -2
      backend/controllers/DashboardAdminController.php
  2. +4
    -3
      domain/Order/Order/OrderRepository.php

+ 2
- 2
backend/controllers/DashboardAdminController.php Zobrazit soubor

@@ -74,7 +74,7 @@ class DashboardAdminController extends BackendController
'countUsersOnline' => $this->getUserModule()->getRepository()->countUsersOnline(),
'countTicketsAdminOpen' => $this->getTicketModule()->getRepository()->countTicketsAdminStatusOpen(),
'countTicketsAdminUnread' => $this->getTicketModule()->getRepository()->countTicketsAdminUnreadByUser($this->getUserCurrent()),
'statisticsCacheHtml' => \Yii::$app->cache->get('dashboard_statistics5') ?: ''
'statisticsCacheHtml' => \Yii::$app->cache->get('dashboard_statistics10') ?: ''
]);
}

@@ -86,7 +86,7 @@ class DashboardAdminController extends BackendController

public function actionAjaxStatisticsHtml()
{
return \Yii::$app->cache->getOrSet('dashboard_statistics5', function () {
return \Yii::$app->cache->getOrSet('dashboard_statistics10', function () {
$producerModule = $this->getProducerModule();
$pointSaleModule = $this->getPointSaleModule();
$userModule = $this->getUserModule();

+ 4
- 3
domain/Order/Order/OrderRepository.php Zobrazit soubor

@@ -448,11 +448,12 @@ class OrderRepository extends AbstractRepository

public function getTurnoverLastThirtyDays()
{
$now = new \DateTime();
$today = new \DateTime();
$thirtyDaysBefore = (clone $today)->modify('-30 days');

return $this->getTurnoverByDateStartEnd(
$now->modify('-30 days'),
$now
$thirtyDaysBefore,
$today
);
}


Načítá se…
Zrušit
Uložit