fix import types

This commit is contained in:
salam committed 2026-04-29 09:56:43 +02:00
1 parent 4bce04cd64
commit d30eb76442
6 files changed
+103 -103

No files matched your search

+2 -2
View File
@@ -7,9 +7,9 @@ use Illuminate\Support\Carbon;
use Illuminate\Support\LazyCollection;
use Spatie\SimpleExcel\SimpleExcelReader;
class ImportPlayer
class ImportEvents
{
public static function importEvents(string $filePath, int $sport_id): void
public static function run(string $filePath, int $sport_id): void
{
$now = now()->format('Y-m-d H:i:s');
@@ -7,7 +7,7 @@ use Illuminate\Support\Carbon;
use Illuminate\Support\LazyCollection;
use Spatie\SimpleExcel\SimpleExcelReader;
class ImportPlayer
class ImportPersonal
{
public static function run(string $filePath): void
{
+5 -5
View File
@@ -5,7 +5,7 @@ namespace App\Filament\Imports;
use App\Filament\Imports\Helper\ImportBenchmark;
use App\Filament\Imports\Helper\ImportEvents;
use App\Filament\Imports\Helper\ImportFixtures;
use App\Filament\Imports\Helper\ImportPlayer;
use App\Filament\Imports\Helper\ImportPersonal;
use App\Models\StatistikoImport;
class StatistikoImporter
@@ -32,8 +32,8 @@ class StatistikoImporter
ImportBenchmark::start($table);
switch ($record['data_type']) {
case 'player':
ImportPlayer::run($filePath);
case 'personal':
ImportPersonal::run($filePath);
break;
case 'events':
ImportEvents::run($filePath, $sport_id);
@@ -41,11 +41,11 @@ class StatistikoImporter
case 'fixtures':
ImportFixtures::run($filePath, $sport_id);
break;
case 'events_player':
case 'player':
break;
}
StatistikoImport::where('id', $record->id)->update(['has_run' => 1]);
StatistikoImport::query()->where('id', $record->id)->update(['has_run' => 1]);
ImportBenchmark::end($table);
}