wip
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Nova\Dashboards;
|
||||
use App\Nova\Resources\Order\Loan\Metrics\LoanOrderPerDay;
|
||||
use App\Nova\Resources\Order\Loan\Metrics\LoanOrderPerStatus;
|
||||
use App\Nova\Resources\Order\Loan\Metrics\NewLoanOrders;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Laravel\Nova\Dashboards\Main as Dashboard;
|
||||
|
||||
class Main extends Dashboard
|
||||
@@ -23,9 +24,15 @@ class Main extends Dashboard
|
||||
public function cards(): array
|
||||
{
|
||||
return [
|
||||
NewLoanOrders::make(),
|
||||
LoanOrderPerDay::make(),
|
||||
LoanOrderPerStatus::make(),
|
||||
NewLoanOrders::make()
|
||||
->canSee(fn () => Gate::allows('isAdmin', auth()->user()->isAdmin())),
|
||||
|
||||
LoanOrderPerDay::make()
|
||||
->canSee(fn () => Gate::allows('isAdmin', auth()->user()->isAdmin())),
|
||||
|
||||
LoanOrderPerStatus::make()
|
||||
->canSee(fn () => Gate::allows('isAdmin', auth()->user()->isAdmin())),
|
||||
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,6 @@ class LoanOrderPerDay extends Trend
|
||||
|
||||
/**
|
||||
* Calculate the value of the metric.
|
||||
*
|
||||
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function calculate(NovaRequest $request): mixed
|
||||
{
|
||||
@@ -30,8 +27,6 @@ class LoanOrderPerDay extends Trend
|
||||
|
||||
/**
|
||||
* Get the ranges available for the metric.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function ranges(): array
|
||||
{
|
||||
@@ -54,8 +49,6 @@ class LoanOrderPerDay extends Trend
|
||||
|
||||
/**
|
||||
* Get the URI key for the metric.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function uriKey(): string
|
||||
{
|
||||
|
||||
@@ -19,9 +19,6 @@ class LoanOrderPerStatus extends Partition
|
||||
|
||||
/**
|
||||
* Calculate the value of the metric.
|
||||
*
|
||||
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function calculate(NovaRequest $request): mixed
|
||||
{
|
||||
@@ -45,8 +42,6 @@ class LoanOrderPerStatus extends Partition
|
||||
|
||||
/**
|
||||
* Get the URI key for the metric.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function uriKey(): string
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user