You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System and Version : MacOs Ventura 13.6.7 (locahost)
Browser type and version: Chrome
Description:
The trend below is displayed in a dashboard. As you can see, the trend is displayed outside of its card. The filter for this trend is blocked.
I tried clearing my application and browser caches but that doesn't change anything.
Detailed steps to reproduce the issue on a fresh Nova installation:
CostsPerDay Metric
<?php
namespace App\Nova\Metrics;
use App\Models\Cost;
use Laravel\Nova\Http\Requests\NovaRequest;
use Laravel\Nova\Metrics\Trend;
class CostsPerDay extends Trend
{
public function name()
{
return 'Coûts par jour';
}
/**
* Calculate the value of the metric.
*
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
* @return mixed
*/
public function calculate(NovaRequest $request)
{
return $this->countByDays($request, Cost::class)->showLatestValue()
->format(function ($value) {
return round($value, 2);
});
}
/**
* Get the ranges available for the metric.
*
* @return array
*/
public function ranges()
{
return [
30 => '30 Days',
60 => '60 Days',
90 => '90 Days',
];
}
/**
* Get the URI key for the metric.
*
* @return string
*/
public function uriKey()
{
return 'costs-per-day';
}
}
My model "Cost"
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Cost extends Model
{
use HasFactory;
protected $table = 'accounting.cost';
protected $fillable = [
'category_id',
'external_id',
'external_table_name',
'name',
'cost',
];
protected $dates = [
'created_at',
'updated_at',
'deleted_at'
];
public function costCategory()
{
return $this->belongsTo(CostCategory::class, 'category_id');
}
}
The text was updated successfully, but these errors were encountered:
Unable to reproduce the issue, please provide full reproducing repository based on fresh installation as suggested in the bug report template (or you can refer to https://github.com/nova-issues for example)
We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.
Description:
The trend below is displayed in a dashboard. As you can see, the trend is displayed outside of its card. The filter for this trend is blocked.
I tried clearing my application and browser caches but that doesn't change anything.
Detailed steps to reproduce the issue on a fresh Nova installation:
CostsPerDay Metric
My model "Cost"
The text was updated successfully, but these errors were encountered: