diff --git a/app/Filament/Pages/Auth/Register.php b/app/Filament/Pages/Auth/Register.php
index 4f04dc3..6cbeff3 100644
--- a/app/Filament/Pages/Auth/Register.php
+++ b/app/Filament/Pages/Auth/Register.php
@@ -2,6 +2,8 @@
namespace App\Filament\Pages\Auth;
+use App\Models\Auftraggeber;
+use App\Models\Gutachter;
use App\Models\Konto;
use Danielebarbaro\LaravelVatEuValidator\Rules\VatNumber;
use Filament\Auth\Pages\Register as BaseRegister;
@@ -160,11 +162,30 @@ class Register extends BaseRegister
public function handleRegistration(array $data): Model
{
+ // dd($data);
+
if (isset($data['kontos'])) {
$konto = new Konto($data['kontos']);
$konto->save();
$data['konto_id'] = $konto->id;
+
+ unset($data['kontos']['uid_number']);
}
+
+ if (isset($data['gutachter_anlegen'])) {
+ $gutachter = new Gutachter($data['kontos']);
+ $gutachter->konto_id = $konto->id;
+ $gutachter->save();
+ }
+
+ if (isset($data['auftraggeber_anlegen'])) {
+ $auftraggeber = new Auftraggeber($data['kontos']);
+ $auftraggeber->konto_id = $konto->id;
+ $auftraggeber->save();
+ }
+
+ unset($data['gutachter_anlegen']);
+ unset($data['auftraggeber_anlegen']);
unset($data['kontos']);
$user = parent::handleRegistration($data);
diff --git a/app/Models/Auftraggeber.php b/app/Models/Auftraggeber.php
index a07b684..41759af 100644
--- a/app/Models/Auftraggeber.php
+++ b/app/Models/Auftraggeber.php
@@ -13,13 +13,16 @@ class Auftraggeber extends Model
protected $fillable = [
'konto_id',
+ 'title',
+ 'gender',
'name',
+ 'company',
'logo',
'address',
'country',
- 'kontakt',
'email',
'phone',
+ 'use_logo',
];
protected static function newFactory(): Factory
diff --git a/app/Models/Gutachter.php b/app/Models/Gutachter.php
index d75d532..4bbe794 100644
--- a/app/Models/Gutachter.php
+++ b/app/Models/Gutachter.php
@@ -7,21 +7,23 @@ use Database\Factories\GutachterFactory;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
-use Illuminate\Database\Eloquent\SoftDeletes;
class Gutachter extends Model
{
use HasFactory;
- use SoftDeletes;
protected $fillable = [
'konto_id',
+ 'title',
+ 'gender',
'name',
+ 'company',
'logo',
'address',
'country',
'email',
'phone',
+ 'use_logo',
];
protected static function booted(): void
diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php
index a9173ff..978b3fd 100644
--- a/app/Providers/Filament/AdminPanelProvider.php
+++ b/app/Providers/Filament/AdminPanelProvider.php
@@ -60,7 +60,7 @@ class AdminPanelProvider extends PanelProvider
// ->sidebarCollapsibleOnDesktop()
// ->font('Open Sans')
->favicon(asset('images/favicon.svg'))
- ->brandLogo(fn () => view('filament.admin.logo'))
+ ->brandLogo(fn () => view('layouts.logo'))
->brandLogoHeight('2.6rem')
->unsavedChangesAlerts()
->databaseTransactions()
diff --git a/database/factories/AuftraggeberFactory.php b/database/factories/AuftraggeberFactory.php
index abb6df1..f264140 100644
--- a/database/factories/AuftraggeberFactory.php
+++ b/database/factories/AuftraggeberFactory.php
@@ -19,9 +19,11 @@ class AuftraggeberFactory extends Factory
{
return [
'konto_id' => Konto::all()->random()->id,
+ 'title' => fake()->randomElement(['Architekt:in', 'Ziviltechniker:in']),
+ 'gender' => fake()->randomElement(['Frau', 'Herr']),
'name' => fake()->name(),
+ 'company' => fake()->Company(),
'address' => fake()->Address(),
- 'kontakt' => fake()->name(),
'country' => 'Österreich',
'email' => fake()->email(),
'phone' => fake()->PhoneNumber(),
diff --git a/database/factories/GutachterFactory.php b/database/factories/GutachterFactory.php
index c088d50..c638af6 100644
--- a/database/factories/GutachterFactory.php
+++ b/database/factories/GutachterFactory.php
@@ -19,11 +19,14 @@ class GutachterFactory extends Factory
{
return [
'konto_id' => Konto::all()->random()->id,
+ 'title' => fake()->randomElement(['Architekt:in', 'Ziviltechniker:in']),
+ 'gender' => fake()->randomElement(['Frau', 'Herr']),
'name' => fake()->name(),
+ 'company' => fake()->Company(),
'address' => fake()->Address(),
'country' => 'Österreich',
- 'phone' => fake()->PhoneNumber(),
'email' => fake()->email(),
+ 'phone' => fake()->PhoneNumber(),
];
}
}
diff --git a/database/migrations/2025_09_05_131323_create_gutachter_tables.php b/database/migrations/2025_09_05_131323_create_gutachter_tables.php
index 1bf0c8a..a518eeb 100644
--- a/database/migrations/2025_09_05_131323_create_gutachter_tables.php
+++ b/database/migrations/2025_09_05_131323_create_gutachter_tables.php
@@ -14,13 +14,16 @@ return new class extends Migration
Schema::create('gutachters', function (Blueprint $table) {
$table->id();
$table->foreignId('konto_id')->constrained();
+ $table->string('title')->nullable();
+ $table->string('gender')->nullable();
$table->string('name')->nullable();
+ $table->string('company')->nullable();
$table->string('logo')->nullable();
$table->text('address')->nullable();
$table->string('country')->nullable();
- $table->string('phone')->nullable();
$table->string('email')->nullable();
- $table->timestamp('deleted_at')->nullable();
+ $table->string('phone')->nullable();
+ $table->boolean('use_logo')->default(false);
$table->timestamps();
});
}
diff --git a/database/migrations/2025_10_05_062328_create_auftraggeber_table.php b/database/migrations/2025_10_05_062328_create_auftraggeber_table.php
index ccd87f7..0c35d89 100644
--- a/database/migrations/2025_10_05_062328_create_auftraggeber_table.php
+++ b/database/migrations/2025_10_05_062328_create_auftraggeber_table.php
@@ -14,13 +14,16 @@ return new class extends Migration
Schema::create('auftraggebers', function (Blueprint $table) {
$table->id();
$table->foreignId('konto_id')->constrained();
+ $table->string('title')->nullable();
+ $table->string('gender')->nullable();
$table->string('name')->nullable();
+ $table->string('company')->nullable();
$table->string('logo')->nullable();
$table->text('address')->nullable();
$table->string('country')->nullable();
- $table->string('kontakt')->nullable();
$table->string('email')->email()->nullable();
$table->string('phone')->tel()->nullable();
+ $table->boolean('use_logo')->default(false);
$table->timestamps();
});
}
diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php
index c04c0a0..bb6f857 100644
--- a/database/seeders/DatabaseSeeder.php
+++ b/database/seeders/DatabaseSeeder.php
@@ -15,9 +15,11 @@ class DatabaseSeeder extends Seeder
*/
public function run(): void
{
- Konto::factory()->count(10)->create();
- Gutachter::factory()->count(30)->create();
- Auftraggeber::factory()->count(30)->create();
+ if (app()->isLocal()) {
+ Konto::factory()->count(10)->create();
+ Gutachter::factory()->count(30)->create();
+ Auftraggeber::factory()->count(30)->create();
+ }
$this->call([
OrientierungenSeeder::class,
@@ -25,7 +27,8 @@ class DatabaseSeeder extends Seeder
RolesAndPermissionsSeeder::class,
]);
- User::factory()->count(40)->create();
-
+ if (app()->isLocal()) {
+ User::factory()->count(40)->create();
+ }
}
}
diff --git a/resources/views/filament/admin/logo.blade.php b/resources/views/filament/admin/logo.blade.php
deleted file mode 100644
index b1a7a63..0000000
--- a/resources/views/filament/admin/logo.blade.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
-