mirror of
https://github.com/Karaka-Management/oms-Sales.git
synced 2026-02-15 11:08:41 +00:00
Merge branch 'develop' of https://github.com/Karaka-Management/oms-Sales into develop
This commit is contained in:
commit
bd309abee2
|
|
@ -44,14 +44,14 @@ final class BackendController extends Controller
|
||||||
*/
|
*/
|
||||||
public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||||
{
|
{
|
||||||
$head = $response->get('Content')->getData('head');
|
$head = $response->get('Content')->head;
|
||||||
$head->addAsset(AssetType::CSS, 'Resources/chartjs/Chartjs/chart.css');
|
$head->addAsset(AssetType::CSS, 'Resources/chartjs/Chartjs/chart.css');
|
||||||
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/Chartjs/chart.js');
|
$head->addAsset(AssetType::JSLATE, 'Resources/chartjs/Chartjs/chart.js');
|
||||||
$head->addAsset(AssetType::JSLATE, 'Modules/ClientManagement/Controller.js', ['type' => 'module']);
|
$head->addAsset(AssetType::JSLATE, 'Modules/ClientManagement/Controller.js', ['type' => 'module']);
|
||||||
|
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/Sales/Theme/Backend/sales-analysis-dashboard');
|
$view->setTemplate('/Modules/Sales/Theme/Backend/sales-analysis-dashboard');
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001602001, $request, $response));
|
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001602001, $request, $response);
|
||||||
|
|
||||||
/////
|
/////
|
||||||
$monthlySalesCustomer = [];
|
$monthlySalesCustomer = [];
|
||||||
|
|
@ -64,7 +64,7 @@ final class BackendController extends Controller
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->addData('monthlySalesCustomer', $monthlySalesCustomer);
|
$view->data['monthlySalesCustomer'] = $monthlySalesCustomer;
|
||||||
|
|
||||||
$annualSalesCustomer = [];
|
$annualSalesCustomer = [];
|
||||||
for ($i = 1; $i < 11; ++$i) {
|
for ($i = 1; $i < 11; ++$i) {
|
||||||
|
|
@ -75,7 +75,7 @@ final class BackendController extends Controller
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$view->addData('annualSalesCustomer', $annualSalesCustomer);
|
$view->data['annualSalesCustomer'] = $annualSalesCustomer;
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ use phpOMS\Localization\Money;
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
*/
|
*/
|
||||||
|
|
||||||
echo $this->getData('nav')->render();
|
echo $this->data['nav']->render();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -119,7 +119,7 @@ echo $this->getData('nav')->render();
|
||||||
Sales / Profit - Monthly
|
Sales / Profit - Monthly
|
||||||
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
|
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php $salesCustomer = $this->getData('monthlySalesCustomer'); ?>
|
<?php $salesCustomer = $this->data['monthlySalesCustomer']; ?>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<canvas id="sales-region" data-chart='{
|
<canvas id="sales-region" data-chart='{
|
||||||
"type": "bar",
|
"type": "bar",
|
||||||
|
|
@ -243,7 +243,7 @@ echo $this->getData('nav')->render();
|
||||||
Sales / Profit - Annual
|
Sales / Profit - Annual
|
||||||
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
|
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php $salesCustomer = $this->getData('annualSalesCustomer'); ?>
|
<?php $salesCustomer = $this->data['annualSalesCustomer']; ?>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<canvas id="sales-customer-annual" data-chart='{
|
<canvas id="sales-customer-annual" data-chart='{
|
||||||
"type": "bar",
|
"type": "bar",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user