mirror of
https://github.com/Karaka-Management/oms-Finance.git
synced 2026-01-11 12:58:42 +00:00
Continue with getter/setter cleanup
This commit is contained in:
parent
a3ecc258ef
commit
9a4517d67b
|
|
@ -44,14 +44,14 @@ final class BackendController extends Controller
|
|||
*/
|
||||
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::JSLATE, 'Resources/chartjs/Chartjs/chart.js');
|
||||
$head->addAsset(AssetType::JSLATE, 'Modules/ClientManagement/Controller.js', ['type' => 'module']);
|
||||
|
||||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
$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 = [];
|
||||
|
|
@ -64,7 +64,7 @@ final class BackendController extends Controller
|
|||
];
|
||||
}
|
||||
|
||||
$view->addData('monthlySalesCustomer', $monthlySalesCustomer);
|
||||
$view->data['monthlySalesCustomer'] = $monthlySalesCustomer;
|
||||
|
||||
$annualSalesCustomer = [];
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ use phpOMS\Localization\Money;
|
|||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
echo $this->getData('nav')->render();
|
||||
echo $this->data['nav']->render();
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
|
@ -119,7 +119,7 @@ echo $this->getData('nav')->render();
|
|||
Sales / Profit - Monthly
|
||||
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
|
||||
</div>
|
||||
<?php $salesCustomer = $this->getData('monthlySalesCustomer'); ?>
|
||||
<?php $salesCustomer = $this->data['monthlySalesCustomer']; ?>
|
||||
<div class="portlet-body">
|
||||
<canvas id="sales-region" data-chart='{
|
||||
"type": "bar",
|
||||
|
|
@ -243,7 +243,7 @@ echo $this->getData('nav')->render();
|
|||
Sales / Profit - Annual
|
||||
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
|
||||
</div>
|
||||
<?php $salesCustomer = $this->getData('annualSalesCustomer'); ?>
|
||||
<?php $salesCustomer = $this->data['annualSalesCustomer']; ?>
|
||||
<div class="portlet-body">
|
||||
<canvas id="sales-customer-annual" data-chart='{
|
||||
"type": "bar",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user