unify logo register also auftraggeber und gutacher at register
This commit is contained in:
1 parent
481f5ec6eb
commit
f928513668
16 files changed
+71
-63
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,9 +15,11 @@ class DatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
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,
|
||||
]);
|
||||
|
||||
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>
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
{{-- <body class="bg-cover" style="background-image: url('images/backgrounds/bg2.jpg')"> --}}
|
||||
|
||||
<body>
|
||||
<body class="bg-gray-50 dark:bg-gray-900">
|
||||
<div>
|
||||
@livewire('notifications')
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<header class="fi-simple-header pb-5">
|
||||
<a class="flex gap-1 justify-center" href="/">
|
||||
<div class="w-11 pt-2">
|
||||
<div>
|
||||
<a class="flex gap-0 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" />
|
||||
@@ -15,4 +15,4 @@
|
||||
<div class="text-xs font-light tracking-tight">Software für Architekten</div>
|
||||
</div>
|
||||
</a>
|
||||
</header>
|
||||
</div>
|
||||
@@ -1,22 +1,8 @@
|
||||
<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 -->
|
||||
<div class="fi-logo flex gap-1 ">
|
||||
<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>
|
||||
@include('layouts.logo')
|
||||
|
||||
<!-- Desktop Menu -->
|
||||
<dev class="hidden items-center gap-4 md:flex">
|
||||
<x-filament::link href="/" color="white" icon="heroicon-o-home">
|
||||
|
||||
@@ -35,9 +35,10 @@
|
||||
<div class="flex flex-col gap-4 p-6">
|
||||
<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"
|
||||
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">
|
||||
..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">
|
||||
mehr...
|
||||
</x-filament::link>
|
||||
@@ -51,11 +52,12 @@
|
||||
class="object-cover transition duration-700 ease-out group-hover:scale-105" alt="Klammer" />
|
||||
</div>
|
||||
<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"
|
||||
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">
|
||||
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">
|
||||
mehr...
|
||||
</x-filament::link>
|
||||
|
||||
@@ -5,15 +5,14 @@ case "$1" in
|
||||
git pull
|
||||
composer update
|
||||
php artisan optimize
|
||||
php artisan storage:link
|
||||
;;
|
||||
"2")
|
||||
php artisan migrate:fresh --force
|
||||
php artisan shield:generate --all
|
||||
php artisan db:seed --force
|
||||
php artisan optimize:clear
|
||||
php artisan filament:assets
|
||||
php artisan optimize
|
||||
php artisan db:seed --force
|
||||
;;
|
||||
"3")
|
||||
php artisan filament:optimize-clear
|
||||
@@ -33,7 +32,7 @@ case "$1" in
|
||||
php artisan filament:assets
|
||||
;;
|
||||
"7")
|
||||
php artisan shield:setup
|
||||
php artisan db:seed --force
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
@@ -41,12 +40,12 @@ case "$1" in
|
||||
echo "setup nuh lives"
|
||||
echo "--------------------------"
|
||||
echo "1 => git pull & composer update & optimize"
|
||||
echo "2 => a db fresh & seed"
|
||||
echo "3 => a cache & storage"
|
||||
echo "2 => a db fresh"
|
||||
echo "3 => empty cache & optimize"
|
||||
echo "4 => chown -R apache:apache ."
|
||||
echo "5 => a storage:link"
|
||||
echo "6 => a filament:assets . copy to prod"
|
||||
echo "7 => a shield:setup"
|
||||
echo "6 => a filament:assets (copy to prod)"
|
||||
echo "7 => a db:seed --force"
|
||||
echo "--------------------------"
|
||||
echo ""
|
||||
;;
|
||||
|
||||
Reference in new issue
Block a user