nutzwert in tabelle rauemall und orientierung

This commit is contained in:
salam committed 2025-10-22 19:16:10 +02:00
1 parent fe03a71735
commit 5583bed563
24 files changed
+726 -526

No files matched your search

@@ -64,7 +64,7 @@ class EditProjekte extends EditRecord
->modalDescription('Bitte laden sie Ihr Konto auf')
->modalSubmitActionLabel('Konto aufladen'),
/**
* GUTACHTEN
* EVALUATE
*/
Action::make('evaluate_gutachten')
->hidden(fn ($record): bool => $record->bezahlt_am && ! $record->evaluation_gutachten ? false : true)
@@ -75,86 +75,62 @@ class EditProjekte extends EditRecord
GutachtenValidation::controll($record);
$this->record->refresh();
}),
ActionGroup::make([
Action::make('gutachten')
->disabled(fn ($record): bool => ! $record->pdf_gutachten_status)
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
->color(fn ($record): string => match ($record->pdf_gutachten_status) {
1 => 'primary',
default => 'gray',
})
->label('Öffnen')
->icon('icon-pdf')
->url(fn ($record) => route('standard.download', ['record' => $record, 'mode' => 'file']))
->openUrlInNewTab(),
Action::make('make_gutachten')
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
->color(fn ($record): string => match ($record->evaluation_gutachten) {
1 => 'primary',
default => 'gray',
})
->disabled(fn ($record): bool => $record->evaluation_gutachten ? false : true)
->label('Berechnen')
->icon('phosphor-calculator')
->url(fn ($record) => route('standard.download', ['record' => $record, 'mode' => 'new']))
->openUrlInNewTab(),
])->label('Gutachten')
->icon('heroicon-m-ellipsis-vertical')
->button()
->color('primary'),
/**
* GUTACHTEN
*/
Action::make('gutachten')
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->pdf_gutachten_status) ? true : false)
->color('primary')
->label('Gutachten')
->icon('icon-pdf')
->url(fn ($record) => route('standard.download', ['record' => $record, 'mode' => 'file']))
->openUrlInNewTab(),
Action::make('make_gutachten')
->hidden(fn ($record): bool => (! $record->bezahlt_am || $record->pdf_gutachten_status || ! $record->evaluation_gutachten) ? true : false)
->label('Gutachten')
->icon('phosphor-calculator')
->url(fn ($record) => route('standard.download', ['record' => $record, 'mode' => 'new']))
->openUrlInNewTab(),
/**
* NUTZWERTE
*/
ActionGroup::make([
Action::make('nutzwerte')
->disabled(fn ($record): bool => ! $record->pdf_nutzwerte_status)
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
->color(fn ($record): string => match ($record->pdf_gutachten_status) {
1 => 'primary',
default => 'gray',
})
->label('Öffnen')
->icon('icon-pdf')
->url(fn ($record) => route('nutzwerte.download', ['record' => $record, 'mode' => 'file']))
->openUrlInNewTab(),
Action::make('make_nutzwerte')
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
->disabled(fn ($record): bool => $record->evaluation_gutachten ? false : true)
->label('Berechnen')
->icon('phosphor-calculator')
->color(fn ($record): string => match ($record->evaluation_gutachten) {
1 => 'primary',
default => 'gray',
})
->url(fn ($record) => route('nutzwerte.download', ['record' => $record, 'mode' => 'new']))
->openUrlInNewTab(),
])->label('Nutzwerte')
->icon('heroicon-m-ellipsis-vertical')
->button()
->color('warning'),
Action::make('nutzwerte')
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->pdf_nutzwerte_status) ? true : false)
->color('primary')
->label('Nutzwerte')
->icon('icon-pdf')
->url(fn ($record) => route('nutzwerte.download', ['record' => $record, 'mode' => 'file']))
->openUrlInNewTab(),
Action::make('make_nutzwerte')
->hidden(fn ($record): bool => (! $record->bezahlt_am || $record->pdf_nutzwerte_status || ! $record->evaluation_gutachten) ? true : false)
->label('Nutzwerte')
->icon('phosphor-calculator')
->url(fn ($record) => route('nutzwerte.download', ['record' => $record, 'mode' => 'new']))
->openUrlInNewTab(),
/**
* EXCEL
*/
ActionGroup::make([
Action::make('excel-nutzflaeche-nutzwerte')
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
->disabled(fn ($record): bool => $record->evaluation_gutachten ? false : true)
->label('Nutzfläche & Nutzwerte')
->icon('icon-excel')
->url(fn ($record) => route('excel.download', ['record' => $record, 'mode' => 'file']))
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->evaluation_gutachten) ? true : false)
->openUrlInNewTab(),
Action::make('excel-nutzflaechen-aufstellung')
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
->disabled(fn ($record): bool => $record->evaluation_gutachten ? false : true)
->label('Nutzflächen Aufstellung')
->icon('icon-excel')
->url(fn ($record) => route('excel.download', ['record' => $record, 'mode' => 'file']))
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->evaluation_gutachten) ? true : false)
->openUrlInNewTab(),
])->label('Spreadsheet')
->icon('heroicon-m-ellipsis-vertical')
->icon('icon-excel')
->button()
->color('info'),
DeleteAction::make(),
DeleteAction::make()->icon('heroicon-o-trash'),
];
}