wip
This commit is contained in:
1 parent
bceab60ca9
commit
4fc6e4d519
1 file changed
+12
-1
@@ -12,6 +12,7 @@ use Filament\Actions\Action;
|
||||
use Filament\Actions\Concerns\InteractsWithActions;
|
||||
use Filament\Actions\Contracts\HasActions;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Schemas\Concerns\InteractsWithSchemas;
|
||||
use Filament\Schemas\Concerns\RestrictsFileUploadsToSchemaComponents;
|
||||
use Filament\Schemas\Contracts\HasSchemas;
|
||||
@@ -413,8 +414,13 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
|
||||
|
||||
public function copyDevelopment()
|
||||
{
|
||||
if ($this->player_on_field_counter < 10) {
|
||||
return;
|
||||
}
|
||||
|
||||
$copystring = '';
|
||||
foreach ($this->calculationVariables as $row) {
|
||||
dd($row);
|
||||
$copystring .= implode("\t", $row) . "\n";
|
||||
}
|
||||
$this->js("navigator.clipboard.writeText(`$copystring`)");
|
||||
@@ -449,6 +455,11 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
|
||||
$copystring .= implode("\t", $tmp) . "\n";
|
||||
}
|
||||
$this->js("navigator.clipboard.writeText(`$copystring`)");
|
||||
|
||||
Notification::make()
|
||||
->title('Results copied')
|
||||
->success()
|
||||
->send();
|
||||
}
|
||||
|
||||
public function calculateAspg(): void
|
||||
@@ -582,7 +593,7 @@ class BoardDispatcher extends Component implements HasActions, HasSchemas, HasTa
|
||||
$results[] = $tmp;
|
||||
|
||||
// for dev copy
|
||||
$this->calculationVariables = $tmp;
|
||||
$this->calculationVariables[] = $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user