Fix SpiceChart: encode URL array as JSON.parse() to avoid double quotes breaking x-data HTML attribute
Deploy / deploy (push) Successful in 16s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Malek TellissiandClaude Sonnet 4.6 committed 2026-09-13 00:52:07 +02:00
1 parent 118552d093
commit 8f7af41513
1 file changed
+8 -5
@@ -4,6 +4,7 @@ namespace App\Filament\User\Resources\SpiceResource\Widgets;
use Leandrocfe\FilamentApexCharts\Widgets\ApexChartWidget;
use Filament\Support\RawJs;
use Illuminate\Support\Js;
use App\Models\Spice;
class SpiceChart extends ApexChartWidget
@@ -61,11 +62,13 @@ class SpiceChart extends ApexChartWidget
protected function extraJsOptions(): ?RawJs
{
$urls = Spice::orderBy('id')
->get()
->map(fn ($spice) => url('/dashboard/rohstoffe/' . $spice->id . '/edit'))
->values()
->toJson();
$urls = Js::from(
Spice::orderBy('id')
->get()
->map(fn ($spice) => url('/dashboard/rohstoffe/' . $spice->id . '/edit'))
->values()
->toArray()
);
return RawJs::make(<<<JS
{