new widget structure
This commit is contained in:
@ -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',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user