wip design

This commit is contained in:
salam committed 2025-10-17 12:39:19 +02:00
1 parent 56f46608a1
commit 44da4addcd
22 files changed
+330 -169

No files matched your search

+11 -5
View File
@@ -9,18 +9,24 @@ class Deckblatt
{
public static function create()
{
// $table->boolean('logo_anzeigen')->default(0);
// $table->boolean('text_anzeigen')->default(0);
// GUTACHTER
$html = '<div class="adler"></div>';
$html .= '<div id="deckblatt-gutachter">';
if (MakeGutachten::$gutachter->logo) {
if (MakeGutachten::$gutachter->logo && MakeGutachten::$gutachter->logo_anzeigen) {
$html = '<div id="deckblatt-image" style="background-position: center '.MakeGutachten::$gutachter->logo_align.'; background-image: url(\''.public_path().'/storage/'.MakeGutachten::$gutachter->logo.'\');"></div>';
}
$from = ['--', 'text-align: end;'];
$to = ['', 'text-align: right;'];
$str = RichContentRenderer::make(MakeGutachten::$gutachter->gutachten_layout)->toHtml();
$html .= str_replace($from, $to, $str);
if (MakeGutachten::$gutachter->referenz_formatting && MakeGutachten::$gutachter->text_anzeigen) {
$from = ['--', 'text-align: end;'];
$to = ['', 'text-align: right;'];
$str = RichContentRenderer::make(MakeGutachten::$gutachter->referenz_formatting)->toHtml();
$html .= str_replace($from, $to, $str);
}
$html .= '</div>';
// PROJEKT
$html .= '<div id="deckblatt-gutachten">';
$html .= '<h1>Gutachten</h1>';
$html .= '<div class="base bold ml-1">'.trim(MakeGutachten::$projekt->interner_name).'</div>';
@@ -2,10 +2,10 @@
namespace App\Filament\Resources\Auftraggebers\Schemas;
use Filament\Forms\Components\CheckboxList;
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\RichEditor;
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;
@@ -21,73 +21,89 @@ class AuftraggeberForm
->components([
Tabs::make('Tabs')
->tabs([
Tab::make('Firmenname')
->icon('lucide-stamp')
Tab::make('Kontaktperson')
->icon('lucide-contact')
->inlineLabel()
->schema([
TextInput::make('company')
->label('Firma')
->required(),
Textarea::make('address')
->label('Adresse')
->required(),
]),
Tab::make('Kontaktperson')
->icon('lucide-contact')
->inlineLabel()
->schema([
TextInput::make('title')
->label('Title')
->required(),
->label('Titel'),
Select::make('gender')
->label('Geschlecht')
->options([
'Herr' => 'Herr',
'Frau' => 'Frau',
'Non-binary' => 'Non-binary',
])
->required(),
]),
TextInput::make('name')
->label('Name')
->required(),
->label('Name'),
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()
Tab::make('Name am Deckblatt')
->icon('lucide-contact')
->schema([
Checkbox::make('text_anzeigen')
->label('Diesen Text im Kopf des Gutachtens verwenden'),
RichEditor::make('referenz_formatting')
->json()
->extraInputAttributes(['style' => 'min-height: 20rem; max-height: 50vh; overflow-y: auto;'])
->toolbarButtons([
['bold', 'italic', 'underline', 'horizontalRule', 'clearFormatting'],
['h1', 'h2', 'h3', 'alignStart', 'alignCenter', 'alignEnd', 'textColor'],
])->floatingToolbars([
'paragraph' => [
'bold', 'italic', 'underline', 'strike', 'subscript', 'superscript',
],
'heading' => [
'h1', 'h2', 'h3',
],
])
->textColors([
'#fb2c36' => 'Rot',
'#ff6900' => 'Orange',
'#fe9a00' => 'Bernstein',
'#f0b100' => 'Gelb',
'#7ccf00' => 'Limette',
'#00c950' => 'Grün',
'#00bc7d' => 'Smaragd',
'#00bba7' => 'Blaugrün',
'#00b8db' => 'Cyan',
'#00a6f4' => 'Himmelblau',
'#2b7fff' => 'Blau',
'#615fff' => 'Indigo',
'#8e51ff' => 'Violett',
'#ad46ff' => 'Lila',
'#e12afb' => 'Fuchisa',
'#f6339a' => 'Rosa',
'#ff2056' => 'Rose',
'#a6a09b' => 'Steingrau Hell',
'#44403b' => 'Steingrau Dunkel',
'#cad5e2' => 'Schiefer Hell',
'#314158' => 'Schiefer Dunkel',
])
->label('Adresse')
->required(),
]),
Tab::make('Logo')
->icon('phosphor-image')
->schema([
Checkbox::make('logo_anzeigen')
->label('Das Logo im Gutachten verwenden'),
FileUpload::make('logo')
->image()
->imageEditor()
->imageEditorAspectRatios([
null,
'16:9',
'4:3',
'1:1',
])
->disk('public')
->directory('auftraggeber-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()
->visibility('public')
->label('Logo')
->columnSpanFull(),
]),
])->columns(2),
])->columnSpanFull(),
]);
}
@@ -13,11 +13,8 @@ class AuftraggebersTable
{
return $table
->columns([
ImageColumn::make('logo'),
ImageColumn::make('logo')->disk('public'),
TextColumn::make('company')->label('Firma')->searchable(),
TextColumn::make('gender')->label('Geschlecht'),
TextColumn::make('title')->label('Title'),
TextColumn::make('name')->searchable(),
TextColumn::make('email')->copyable()->label('E-Mail')->searchable(),
])
->recordActions([
@@ -2,6 +2,7 @@
namespace App\Filament\Resources\Gutachters\Schemas;
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Radio;
use Filament\Forms\Components\RichEditor;
@@ -51,10 +52,13 @@ class GutachterForm
->label('Telefon')
->defaultCountry('AT'),
]),
Tab::make('Anzeige')
Tab::make('Anzeige am Deckblatt')
->icon('lucide-contact')
->schema([
RichEditor::make('gutachten_layout')
Checkbox::make('text_anzeigen')
->label('Diesen Text im Kopf des Gutachtens verwenden')
->columnSpanFull(),
RichEditor::make('referenz_formatting')
->json()
->extraInputAttributes(['style' => 'min-height: 20rem; max-height: 50vh; overflow-y: auto;'])
->toolbarButtons([
@@ -97,15 +101,11 @@ class GutachterForm
Tab::make('Logo')
->icon('phosphor-image')
->schema([
Checkbox::make('logo_anzeigen')
->label('Das Logo im Gutachten verwenden')
->columnSpanFull(),
FileUpload::make('logo')
->image()
->imageEditor()
->imageEditorAspectRatios([
null,
'16:9',
'4:3',
'1:1',
])
->disk('public')
->directory('gutachter-logo')
->visibility('public')
@@ -5,8 +5,8 @@ namespace App\Filament\Resources\Kontos\Schemas;
use App\Models\Konto;
use App\Models\Plan;
use Danielebarbaro\LaravelVatEuValidator\Rules\VatNumber;
use Filament\Forms\Components\RichEditor;
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;
@@ -38,7 +38,9 @@ class KontoForm
->label('UID Nummer')
->rules([new VatNumber])
->required(),
Textarea::make('address')
RichEditor::make('address')->toolbarButtons([
['bold', 'italic', 'underline', 'subscript', 'superscript'],
])
->label('Adresse')
->required(),
])->columnSpanFull(),
@@ -7,11 +7,10 @@ use Filament\Actions\EditAction;
use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\TextInput;
use Filament\Support\Enums\FontWeight;
use Filament\Support\Enums\IconSize;
use Filament\Support\Enums\TextSize;
use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
use Illuminate\Support\HtmlString;
class KontosTable
{
@@ -20,19 +19,9 @@ class KontosTable
return $table
->columns([
TextColumn::make('company')->label('Firma')
->wrap()
->description(fn ($record): string => $record->address),
// IconColumn::make('plan.icon')
// ->width('30px')
// ->label('')
// ->size(IconSize::TwoExtraLarge)
// ->color('primary')
// ->icon(fn (string $state): string => $state)
// ->extraAttributes(['class' => 'rounded-xl border border-gray-200 dark:border-gray-700 drop-shadow-xl']),
// TextColumn::make('plan.name')
// ->label('Zahlungs Plan')
// ->description(fn ($record): string => $record->plan->payment),
->size(TextSize::Large)
->weight(FontWeight::Bold)
->description(fn ($record): HtmlString => new HtmlString($record->address)),
TextColumn::make('guthaben')
->size(TextSize::Large)
->weight(FontWeight::Bold)
@@ -8,6 +8,7 @@ use Filament\Tables\Columns\SelectColumn;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Filters\SelectFilter;
use Filament\Tables\Table;
use Illuminate\Support\HtmlString;
class ProjektesTable
{
@@ -16,6 +17,7 @@ class ProjektesTable
return $table
->columns([
TextColumn::make('interner_name')
->tooltip(fn ($record): HtmlString => new HtmlString($record->beschreibung))
->label('Interner Name')
->color('info')
->wrap()
+3 -4
View File
@@ -18,12 +18,11 @@ class Auftraggeber extends Model
'gender',
'name',
'company',
'logo',
'address',
'email',
'phone',
'use_logo',
'kopf',
'logo',
'logo_anzeigen',
'text_anzeigen',
];
/**
+4 -2
View File
@@ -22,7 +22,9 @@ class Gutachter extends Model
'phone',
'logo',
'logo_align',
'gutachten_layout',
'referenz_formatting',
'logo_anzeigen',
'text_anzeigen',
];
/**
@@ -31,7 +33,7 @@ class Gutachter extends Model
protected function casts(): array
{
return [
'gutachten_layout' => 'array',
'referenz_formatting' => 'array',
];
}