unify logo register also auftraggeber und gutacher at register

This commit is contained in:
salam committed 2025-09-27 18:17:34 +02:00
1 parent 481f5ec6eb
commit f928513668
16 files changed
+76 -68

No files matched your search

+21
View File
@@ -2,6 +2,8 @@
namespace App\Filament\Pages\Auth; namespace App\Filament\Pages\Auth;
use App\Models\Auftraggeber;
use App\Models\Gutachter;
use App\Models\Konto; use App\Models\Konto;
use Danielebarbaro\LaravelVatEuValidator\Rules\VatNumber; use Danielebarbaro\LaravelVatEuValidator\Rules\VatNumber;
use Filament\Auth\Pages\Register as BaseRegister; use Filament\Auth\Pages\Register as BaseRegister;
@@ -160,11 +162,30 @@ class Register extends BaseRegister
public function handleRegistration(array $data): Model public function handleRegistration(array $data): Model
{ {
// dd($data);
if (isset($data['kontos'])) { if (isset($data['kontos'])) {
$konto = new Konto($data['kontos']); $konto = new Konto($data['kontos']);
$konto->save(); $konto->save();
$data['konto_id'] = $konto->id; $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']); unset($data['kontos']);
$user = parent::handleRegistration($data); $user = parent::handleRegistration($data);
+4 -1
View File
@@ -13,13 +13,16 @@ class Auftraggeber extends Model
protected $fillable = [ protected $fillable = [
'konto_id', 'konto_id',
'title',
'gender',
'name', 'name',
'company',
'logo', 'logo',
'address', 'address',
'country', 'country',
'kontakt',
'email', 'email',
'phone', 'phone',
'use_logo',
]; ];
protected static function newFactory(): Factory protected static function newFactory(): Factory
+4 -2
View File
@@ -7,21 +7,23 @@ use Database\Factories\GutachterFactory;
use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Gutachter extends Model class Gutachter extends Model
{ {
use HasFactory; use HasFactory;
use SoftDeletes;
protected $fillable = [ protected $fillable = [
'konto_id', 'konto_id',
'title',
'gender',
'name', 'name',
'company',
'logo', 'logo',
'address', 'address',
'country', 'country',
'email', 'email',
'phone', 'phone',
'use_logo',
]; ];
protected static function booted(): void protected static function booted(): void
@@ -60,7 +60,7 @@ class AdminPanelProvider extends PanelProvider
// ->sidebarCollapsibleOnDesktop() // ->sidebarCollapsibleOnDesktop()
// ->font('Open Sans') // ->font('Open Sans')
->favicon(asset('images/favicon.svg')) ->favicon(asset('images/favicon.svg'))
->brandLogo(fn () => view('filament.admin.logo')) ->brandLogo(fn () => view('layouts.logo'))
->brandLogoHeight('2.6rem') ->brandLogoHeight('2.6rem')
->unsavedChangesAlerts() ->unsavedChangesAlerts()
->databaseTransactions() ->databaseTransactions()
+3 -1
View File
@@ -19,9 +19,11 @@ class AuftraggeberFactory extends Factory
{ {
return [ return [
'konto_id' => Konto::all()->random()->id, 'konto_id' => Konto::all()->random()->id,
'title' => fake()->randomElement(['Architekt:in', 'Ziviltechniker:in']),
'gender' => fake()->randomElement(['Frau', 'Herr']),
'name' => fake()->name(), 'name' => fake()->name(),
'company' => fake()->Company(),
'address' => fake()->Address(), 'address' => fake()->Address(),
'kontakt' => fake()->name(),
'country' => 'Österreich', 'country' => 'Österreich',
'email' => fake()->email(), 'email' => fake()->email(),
'phone' => fake()->PhoneNumber(), 'phone' => fake()->PhoneNumber(),
+4 -1
View File
@@ -19,11 +19,14 @@ class GutachterFactory extends Factory
{ {
return [ return [
'konto_id' => Konto::all()->random()->id, 'konto_id' => Konto::all()->random()->id,
'title' => fake()->randomElement(['Architekt:in', 'Ziviltechniker:in']),
'gender' => fake()->randomElement(['Frau', 'Herr']),
'name' => fake()->name(), 'name' => fake()->name(),
'company' => fake()->Company(),
'address' => fake()->Address(), 'address' => fake()->Address(),
'country' => 'Österreich', 'country' => 'Österreich',
'phone' => fake()->PhoneNumber(),
'email' => fake()->email(), 'email' => fake()->email(),
'phone' => fake()->PhoneNumber(),
]; ];
} }
} }
@@ -14,13 +14,16 @@ return new class extends Migration
Schema::create('gutachters', function (Blueprint $table) { Schema::create('gutachters', function (Blueprint $table) {
$table->id(); $table->id();
$table->foreignId('konto_id')->constrained(); $table->foreignId('konto_id')->constrained();
$table->string('title')->nullable();
$table->string('gender')->nullable();
$table->string('name')->nullable(); $table->string('name')->nullable();
$table->string('company')->nullable();
$table->string('logo')->nullable(); $table->string('logo')->nullable();
$table->text('address')->nullable(); $table->text('address')->nullable();
$table->string('country')->nullable(); $table->string('country')->nullable();
$table->string('phone')->nullable();
$table->string('email')->nullable(); $table->string('email')->nullable();
$table->timestamp('deleted_at')->nullable(); $table->string('phone')->nullable();
$table->boolean('use_logo')->default(false);
$table->timestamps(); $table->timestamps();
}); });
} }
@@ -14,13 +14,16 @@ return new class extends Migration
Schema::create('auftraggebers', function (Blueprint $table) { Schema::create('auftraggebers', function (Blueprint $table) {
$table->id(); $table->id();
$table->foreignId('konto_id')->constrained(); $table->foreignId('konto_id')->constrained();
$table->string('title')->nullable();
$table->string('gender')->nullable();
$table->string('name')->nullable(); $table->string('name')->nullable();
$table->string('company')->nullable();
$table->string('logo')->nullable(); $table->string('logo')->nullable();
$table->text('address')->nullable(); $table->text('address')->nullable();
$table->string('country')->nullable(); $table->string('country')->nullable();
$table->string('kontakt')->nullable();
$table->string('email')->email()->nullable(); $table->string('email')->email()->nullable();
$table->string('phone')->tel()->nullable(); $table->string('phone')->tel()->nullable();
$table->boolean('use_logo')->default(false);
$table->timestamps(); $table->timestamps();
}); });
} }
+8 -5
View File
@@ -15,9 +15,11 @@ class DatabaseSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
Konto::factory()->count(10)->create(); if (app()->isLocal()) {
Gutachter::factory()->count(30)->create(); Konto::factory()->count(10)->create();
Auftraggeber::factory()->count(30)->create(); Gutachter::factory()->count(30)->create();
Auftraggeber::factory()->count(30)->create();
}
$this->call([ $this->call([
OrientierungenSeeder::class, OrientierungenSeeder::class,
@@ -25,7 +27,8 @@ class DatabaseSeeder extends Seeder
RolesAndPermissionsSeeder::class, RolesAndPermissionsSeeder::class,
]); ]);
User::factory()->count(40)->create(); if (app()->isLocal()) {
User::factory()->count(40)->create();
}
} }
} }
@@ -1,16 +0,0 @@
<a class="flex gap-1 justify-center" href="/">
<div class="w-9 pt-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="m12.99 6.74 1.93 3.44" />
<path d="M19.136 12a10 10 0 0 1-14.271 0" />
<path d="m21 21-2.16-3.84" />
<path d="m3 21 8.02-14.26" />
<circle cx="12" cy="5" r="2" />
</svg>
</div>
<div class="text-2xl leading-none font-black tracking-tighter text-shadow-md dark:text-shadow-none">
nutzwerte.at
<div class="text-xs font-light">Software für Architekten</div>
</div>
</a>
@@ -1,3 +0,0 @@
<x-filament-panels::page>
{{-- Page content --}}
</x-filament-panels::page>
+1 -1
View File
@@ -37,7 +37,7 @@
{{-- <body class="bg-cover" style="background-image: url('images/backgrounds/bg2.jpg')"> --}} {{-- <body class="bg-cover" style="background-image: url('images/backgrounds/bg2.jpg')"> --}}
<body> <body class="bg-gray-50 dark:bg-gray-900">
<div> <div>
@livewire('notifications') @livewire('notifications')
</div> </div>
+4 -4
View File
@@ -1,6 +1,6 @@
<header class="fi-simple-header pb-5"> <div>
<a class="flex gap-1 justify-center" href="/"> <a class="flex gap-0 justify-center" href="/">
<div class="w-11 pt-2"> <div class="w-9 pt-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round"> stroke-linecap="round" stroke-linejoin="round">
<path d="m12.99 6.74 1.93 3.44" /> <path d="m12.99 6.74 1.93 3.44" />
@@ -15,4 +15,4 @@
<div class="text-xs font-light tracking-tight">Software für Architekten</div> <div class="text-xs font-light tracking-tight">Software für Architekten</div>
</div> </div>
</a> </a>
</header> </div>
+3 -17
View File
@@ -1,22 +1,8 @@
<nav x-data="{ mobileMenuIsOpen: false }" x-on:click.away="mobileMenuIsOpen = false" <nav x-data="{ mobileMenuIsOpen: false }" x-on:click.away="mobileMenuIsOpen = false"
class="flex items-center justify-between bg-surface-alt border-b border-outline px-6 py-4 dark:border-outline-dark dark:bg-surface-dark-alt"> class="flex items-center justify-between bg-white border-b border-outline px-7 py-3 dark:border-outline-dark dark:bg-surface-dark-alt">
<!-- Brand Logo --> <!-- Brand Logo -->
<div class="fi-logo flex gap-1 "> @include('layouts.logo')
<div class="w-9 pt-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="m12.99 6.74 1.93 3.44"></path>
<path d="M19.136 12a10 10 0 0 1-14.271 0"></path>
<path d="m21 21-2.16-3.84"></path>
<path d="m3 21 8.02-14.26"></path>
<circle cx="12" cy="5" r="2"></circle>
</svg>
</div>
<div class="text-2xl leading-none font-black tracking-tighter text-shadow-md dark:text-shadow-none">
nutzwerte.at
<div class="text-xs font-light">Software für Architekten</div>
</div>
</div>
<!-- Desktop Menu --> <!-- Desktop Menu -->
<dev class="hidden items-center gap-4 md:flex"> <dev class="hidden items-center gap-4 md:flex">
<x-filament::link href="/" color="white" icon="heroicon-o-home"> <x-filament::link href="/" color="white" icon="heroicon-o-home">
+8 -6
View File
@@ -18,7 +18,7 @@
aria-describedby="featureDescription">..ist ein Gutachten im österreichischen aria-describedby="featureDescription">..ist ein Gutachten im österreichischen
Wohnungseigentumsrecht.</h3> Wohnungseigentumsrecht.</h3>
<p id="featureDescription" class="text-pretty text-sm"> <p id="featureDescription" class="text-pretty text-sm">
..es werden das Verhältnis der einzelnen Eigentumsanteile innerhalb eines Gebäudes bestimmt. .. es werden das Verhältnis der einzelnen Eigentumsanteile innerhalb eines Gebäudes bestimmt.
<x-filament::link href="/nutzwerte" icon-position="after" icon="lucide-external-link"> <x-filament::link href="/nutzwerte" icon-position="after" icon="lucide-external-link">
mehr... mehr...
</x-filament::link> </x-filament::link>
@@ -35,9 +35,10 @@
<div class="flex flex-col gap-4 p-6"> <div class="flex flex-col gap-4 p-6">
<span class="text-sm font-medium">Einmal Andes</span> <span class="text-sm font-medium">Einmal Andes</span>
<h3 class="text-balance text-xl lg:text-2xl font-bold text-on-surface-strong dark:text-on-surface-dark-strong indent-5" <h3 class="text-balance text-xl lg:text-2xl font-bold text-on-surface-strong dark:text-on-surface-dark-strong indent-5"
aria-describedby="featureDescription">Dieses Programm kann Sie bei der Bewertung</h3> aria-describedby="featureDescription">Dieses Programm kann bei der Bewertung von Objekten </h3>
<p id="featureDescription" class="text-pretty text-sm"> <p id="featureDescription" class="text-pretty text-sm">
..von Objekten und bei der Erstellung eines Gutachten nach amtlich vorgegebenen Normen unterstützen. .. und bei der Erstellung eines Gutachten nach amtlich vorgegebenen Normen
unterstützen.
<x-filament::link href="/nutzwerte" icon-position="after" icon="lucide-external-link"> <x-filament::link href="/nutzwerte" icon-position="after" icon="lucide-external-link">
mehr... mehr...
</x-filament::link> </x-filament::link>
@@ -51,11 +52,12 @@
class="object-cover transition duration-700 ease-out group-hover:scale-105" alt="Klammer" /> class="object-cover transition duration-700 ease-out group-hover:scale-105" alt="Klammer" />
</div> </div>
<div class="flex flex-col gap-4 p-6"> <div class="flex flex-col gap-4 p-6">
<span class="text-sm font-medium">Die Daten</span> <span class="text-sm font-medium">Die Daten können </span>
<h3 class="text-balance text-xl lg:text-2xl font-bold text-on-surface-strong dark:text-on-surface-dark-strong indent-5" <h3 class="text-balance text-xl lg:text-2xl font-bold text-on-surface-strong dark:text-on-surface-dark-strong indent-5"
aria-describedby="featureDescription">..können aus allen gängigen</h3> aria-describedby="featureDescription">..aus allen gängigen Zeicheprogrammen im CSV Format</h3>
<p id="featureDescription" class="text-pretty text-sm"> <p id="featureDescription" class="text-pretty text-sm">
Zeicheprogrammen als CSV Datei importiert werden. .. importiert werden, die
Parameter werden gesetzt und das Gutachten im PFD Format heruntergeladen.
<x-filament::link href="/nutzwerte" icon-position="after" icon="lucide-external-link"> <x-filament::link href="/nutzwerte" icon-position="after" icon="lucide-external-link">
mehr... mehr...
</x-filament::link> </x-filament::link>
+6 -7
View File
@@ -5,15 +5,14 @@ case "$1" in
git pull git pull
composer update composer update
php artisan optimize php artisan optimize
php artisan storage:link
;; ;;
"2") "2")
php artisan migrate:fresh --force php artisan migrate:fresh --force
php artisan shield:generate --all php artisan shield:generate --all
php artisan db:seed --force
php artisan optimize:clear php artisan optimize:clear
php artisan filament:assets php artisan filament:assets
php artisan optimize php artisan optimize
php artisan db:seed --force
;; ;;
"3") "3")
php artisan filament:optimize-clear php artisan filament:optimize-clear
@@ -33,7 +32,7 @@ case "$1" in
php artisan filament:assets php artisan filament:assets
;; ;;
"7") "7")
php artisan shield:setup php artisan db:seed --force
;; ;;
*) *)
echo "" echo ""
@@ -41,12 +40,12 @@ case "$1" in
echo "setup nuh lives" echo "setup nuh lives"
echo "--------------------------" echo "--------------------------"
echo "1 => git pull & composer update & optimize" echo "1 => git pull & composer update & optimize"
echo "2 => a db fresh & seed" echo "2 => a db fresh"
echo "3 => a cache & storage" echo "3 => empty cache & optimize"
echo "4 => chown -R apache:apache ." echo "4 => chown -R apache:apache ."
echo "5 => a storage:link" echo "5 => a storage:link"
echo "6 => a filament:assets . copy to prod" echo "6 => a filament:assets (copy to prod)"
echo "7 => a shield:setup" echo "7 => a db:seed --force"
echo "--------------------------" echo "--------------------------"
echo "" echo ""
;; ;;