This commit is contained in:
salam committed 2026-07-05 18:14:23 +02:00
1 parent 16c0aa24fe
commit 4a509c6a16
16 files changed
+168 -82

No files matched your search

@@ -4,10 +4,11 @@ namespace App\Filament\Imports;
use App\Models\ProjektAllgemeinflaechen;
use Filament\Notifications\Notification;
use Illuminate\Support\Facades\Auth;
class ImportAllgemeinDirect
{
public static function run($data, $projekte_id)
public static function run(array $data, int $projekte_id)
{
$data = explode(PHP_EOL, $data['upload_data']);
@@ -38,21 +39,20 @@ class ImportAllgemeinDirect
}
}
$recipient = auth()->user();
if ($error) {
Notification::make()
->title('Fehlerbeim Import')
->body('Daten konnten nicht in vier Spalten aufgeteilt werden. Falscher Separator?')
->danger()
->send()
->sendToDatabase($recipient);
->sendToDatabase(Auth::user());
} else {
Notification::make()
->title('Allgemeinflächen wurden erfolgreich importiert')
->body('Es wurden '.$new.' Flächen hinzugefügt')
->success()
->send()
->sendToDatabase($recipient);
->sendToDatabase(Auth::user());
}
}
}