This commit is contained in:
salam committed 2026-09-08 10:22:46 +02:00
1 parent 75f9a622d3
commit eedd4b0238
1 file changed
+8 -8
+8 -8
View File
@@ -36,7 +36,7 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
public array $activeBoxes = [2 => 'DR', 4 => 'MR', 6 => 'RW', 9 => 'DC', 10 => 'DM', 11 => 'MC', 12 => 'AM', 15 => 'SW', 16 => 'DC', 17 => 'DM', 18 => 'MC', 19 => 'AM', 20 => 'SM', 21 => 'ST', 23 => 'DC', 24 => 'DM', 25 => 'MC', 26 => 'AM', 30 => 'DL', 32 => 'ML', 34 => 'LM'];
public bool $downloadDisabled = true;
public bool $copyDisabled = true;
public bool $calculationDisabled = true;
@@ -95,10 +95,10 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
->icon('phosphor-calculator')
->disabled($this->calculationDisabled)
->action(fn() => $this->calculateAspg()),
Action::make('download')
->icon('phosphor-download')
->disabled($this->downloadDisabled)
->action(fn() => $this->downloadResult()),
Action::make('copy')
->icon('phosphor-copy')
->disabled($this->copyDisabled)
->action(fn() => $this->copyResult()),
])
/**
* WICHTIG: Da Filament v5 zwingend eine Query braucht, nutzen wir ein
@@ -187,7 +187,7 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
public function calculateAspg(): void
{
$this->downloadDisabled = false;
$this->copyDisabled = false;
}
public function clearAll(): void
@@ -200,11 +200,11 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
$this->sourceRecords[$k]['active'] = 0;
}
$this->downloadDisabled = true;
$this->copyDisabled = true;
$this->calculationDisabled = true;
}
public function downloadResult()
public function copyResult()
{
return;