This commit is contained in:
salam committed 2026-09-06 13:28:16 +02:00
1 parent 4139d390e8
commit 08b1850ea1
2 files changed
+5 -6

No files matched your search

+4 -4
View File
@@ -11,7 +11,6 @@ class BoardDispatcher extends Component
public array $results = [];
public array $destLabels = ['DR', 'MR', 'RW', 'DC', 'DM', 'MC', 'AM', 'SW', 'DC', 'DM', 'MC', 'AM', 'SM', 'ST', 'DC', 'DM', 'MC', 'AM', 'DL', 'ML', 'LM'];
public string $boardVersion = '';
public string $copystring = '';
public bool $copyDisabled = true;
public bool $calculationDisabled = true;
public string $calculationColor = 'gray';
@@ -77,12 +76,13 @@ class BoardDispatcher extends Component
$this->setCopyButton();
}
public function copy()
public function copyResult()
{
$this->copystring = '';
$copystring = '';
foreach ($this->results as $row) {
$this->copystring .= implode("\t", $row) . "\n";
$copystring .= implode("\t", $row) . "\n";
}
$this->js("navigator.clipboard.writeText('{$copystring}')");
}
@@ -23,8 +23,7 @@
<!-- Copy-Button -->
<x-filament::button icon="heroicon-o-clipboard-document-list" size="md" tooltip="Copy"
:disabled="$copyDisabled" class="cursor-pointer" color="{{ $copyColor }}"
x-on:click="navigator.clipboard.writeText({{ $this->copystring }})" />
:disabled="$copyDisabled" class="cursor-pointer" color="{{ $copyColor }}" x-on:click="$wire.copyResult()" />
<!-- Calculate-Button -->
<x-filament::button icon="heroicon-o-calculator" size="md" tooltip="Calculate" :disabled="$calculationDisabled"