new widget structure

This commit is contained in:
denisdulici
2019-12-31 02:20:10 +03:00
parent 8c6ca5e5fb
commit 71c5caf264
44 changed files with 333 additions and 502 deletions

View File

@ -13,10 +13,6 @@ class CashFlow extends Widget
{
use Currencies, DateTime;
protected $config = [
'width' => 'col-md-12',
];
public function show()
{
$financial_start = $this->getFinancialStart()->format('Y-m-d');
@ -96,8 +92,7 @@ class CashFlow extends Widget
])
->fill(false);
return view('widgets.cash_flow', [
'config' => (object) $this->config,
return $this->view('widgets.cash_flow', [
'chart' => $chart,
]);
}
@ -175,4 +170,16 @@ class CashFlow extends Widget
return $profit;
}
public function getDefaultName()
{
return trans('widgets.cash_flow');
}
public function getDefaultSettings()
{
return [
'width' => 'col-md-12',
];
}
}