gutachter

This commit is contained in:
salam committed 2025-10-02 15:03:16 +02:00
1 parent 749555a6b4
commit a473081e3a
6 files changed
+123 -29

No files matched your search

@@ -2,7 +2,16 @@
namespace App\Filament\Resources\Gutachters\Schemas;
use Filament\Forms\Components\CheckboxList;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Tabs;
use Filament\Schemas\Components\Tabs\Tab;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Ysfkaya\FilamentPhoneInput\Forms\PhoneInput;
class GutachterForm
{
@@ -10,7 +19,70 @@ class GutachterForm
{
return $schema
->components([
//
Tabs::make('Tabs')
->tabs([
Tab::make('Firmenname')
->icon('lucide-stamp')
->inlineLabel()
->schema([
TextInput::make('company')
->label('Firma')
->required(),
Textarea::make('address')
->label('Adresse')
->required(),
TextInput::make('country')
->label('Land')
->default('Österreich')
->required(),
]),
Tab::make('Kontaktperson')
->icon('lucide-contact')
->inlineLabel()
->schema([
TextInput::make('title')
->label('Title')
->required(),
Select::make('gender')
->label('Geschlecht')
->options([
'Herr' => 'Herr',
'Frau' => 'Frau',
'Non-binary' => 'Non-binary',
])
->required(),
TextInput::make('name')
->label('Name')
->required(),
TextInput::make('email')
->label('E-Mail')
->required()
->prefixIcon(Heroicon::Envelope),
PhoneInput::make('phone')
->label('Telefon')
->defaultCountry('AT'),
]),
Tab::make('Logo')
->icon('phosphor-squares-four')
->inlineLabel()
->schema([
FileUpload::make('logo')->label('Gutachter Logo'),
]),
Tab::make('Anzeige Im Gutachten')
->icon('phosphor-eye')
->inlineLabel()
->schema([
CheckboxList::make('kopf')
->Label('Bitte auswählen')
->options([
'logo' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" fill="currentColor" viewBox="0 0 256 256"><path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z"></path></svg>Logo des Gutachters</div>',
'firma' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-stamp-icon lucide-stamp"><path d="M14 13V8.5C14 7 15 7 15 5a3 3 0 0 0-6 0c0 2 1 2 1 3.5V13"/><path d="M20 15.5a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 4 15.5V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1z"/><path d="M5 22h14"/></svg> Firma mit Adresse</div>',
'name' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-contact-icon lucide-contact"><path d="M16 2v2"/><path d="M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2"/><path d="M8 2v2"/><circle cx="12" cy="11" r="3"/><rect x="3" y="4" width="18" height="18" rx="2"/></svg> Name des Gutachters</div>',
])
->allowHtml()
->columnSpanFull(),
]),
])->columnSpanFull(),
]);
}
}
@@ -3,6 +3,7 @@
namespace App\Filament\Resources\Gutachters\Tables;
use Filament\Actions\EditAction;
use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
@@ -12,6 +13,10 @@ class GutachtersTable
{
return $table
->columns([
ImageColumn::make('logo'),
TextColumn::make('company')->label('Firma'),
TextColumn::make('gender')->label('Geschlecht'),
TextColumn::make('title')->label('Title'),
TextColumn::make('name'),
TextColumn::make('email')->copyable()->label('E-Mail'),
])
@@ -27,34 +27,12 @@ class KontoForm
Tabs::make('Tabs')
->tabs([
Tab::make('Zahlungsplan')
->schema([
RadioDeck::make('plan_id')
// ->label('Wählen sie eine Option')
->label('Zur Zeit bieten wie nur eine Zahlung per Gutachten an.')
->options(fn () => Plan::pluck('name', 'id')->toArray())
->descriptions(Plan::options())
->icons(fn () => Plan::pluck('icon', 'id')->toArray())
->required()
->iconPosition(IconPosition::Before) // Before | After
->iconSize(IconSize::TwoExtraLarge)
->alignment(Alignment::Center) // Start | Center | End
->padding('px-4 py-6') // Padding around the deck
->extraCardsAttributes([
'class' => 'rounded-xl drop-shadow-xl mt-1',
])
->extraOptionsAttributes([
'class' => 'text-2xl font-black tracking-tight lg:text-3xl',
])
->colors('primary')
->columns(3)
->columnSpanFull(),
])->columnSpanFull(),
Tab::make('Firma')
Tab::make('Rechnungsdaten')
->icon('lucide-file-pen-line')
->inlineLabel()
->schema([
TextInput::make('company')
->label('Firma')
->label('Firma/Inhaber')
->required(),
TextInput::make('uid_number')
->label('UID Nummer')
@@ -69,6 +47,7 @@ class KontoForm
->required(),
])->columnSpanFull(),
Tab::make('Kontaktperson')
->icon('lucide-contact')
->inlineLabel()
->schema([
TextInput::make('title')
@@ -94,6 +73,32 @@ class KontoForm
->label('Telefon')
->defaultCountry('AT'),
])->columnSpanFull(),
Tab::make('Zahlungsplan')
->icon('phosphor-coins')
->schema([
RadioDeck::make('plan_id')
// ->label('Wählen sie eine Option')
->label('Zur Zeit bieten wie nur den Basic Plan als Zahlungvariante an.')
->options(fn () => Plan::pluck('name', 'id')->toArray())
->descriptions(Plan::options())
->icons(fn () => Plan::pluck('icon', 'id')->toArray())
->required()
->iconPosition(IconPosition::Before) // Before | After
->iconSize(IconSize::TwoExtraLarge)
->alignment(Alignment::Center) // Start | Center | End
->padding('px-4 py-6') // Padding around the deck
->extraCardsAttributes([
'class' => 'rounded-xl drop-shadow-xl mt-1',
])
->extraOptionsAttributes([
'class' => 'text-2xl font-black tracking-tight lg:text-3xl',
])
->colors('primary')
->disabled()
->columns(3)
->columnSpanFull(),
])->columnSpanFull(),
])->columnSpanFull(),
]);
+1
View File
@@ -24,6 +24,7 @@ class Gutachter extends Model
'email',
'phone',
'use_logo',
'kopf',
];
protected static function booted(): void
@@ -24,10 +24,21 @@ return new class extends Migration
$table->string('email')->nullable();
$table->string('phone')->nullable();
$table->boolean('use_logo')->default(false);
$table->string('kopf')->nullable();
$table->timestamps();
});
}
/**
* @return array<string, string>
*/
protected function casts(): array
{
return [
'kopf' => 'array',
];
}
/**
* Reverse the migrations.
*/
+3 -3
View File
@@ -19,7 +19,7 @@
Wohnungseigentumsrecht.</h3>
<p id="featureDescription" class="text-pretty text-sm">
.. 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">
mehr...
</x-filament::link>
</p>
@@ -39,7 +39,7 @@
</h3>
<p id="featureDescription" class="text-pretty text-sm">
.. und erstellt Nutzwertgutachten nach vorgegebenen Normen.
<x-filament::link href="/nutzwerte" icon-position="after" icon="lucide-external-link">
<x-filament::link href="/nutzwerte">
mehr...
</x-filament::link>
</p>
@@ -57,7 +57,7 @@
aria-describedby="featureDescription">..aus allen gängigen Zeicheprogrammen importiert.</h3>
<p id="featureDescription" class="text-pretty text-sm">
.. die Parameter werden gesetzt und das Gutachten kann als PFD heruntergeladen werden.
<x-filament::link href="/nutzwerte" icon-position="after" icon="lucide-external-link">
<x-filament::link href="/nutzwerte">
mehr...
</x-filament::link>
</p>