GutachtenValidation
This commit is contained in:
1 parent
d1ce891d9c
commit
8ccc4a3c20
15 files changed
+390
-109
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\Projektes\Pages;
|
||||
|
||||
use App\Actions\Validation\GutachtenValidation;
|
||||
use App\Filament\Resources\Projektes\ProjekteResource;
|
||||
use App\Models\Konto;
|
||||
use App\Models\Projekte;
|
||||
@@ -72,10 +73,26 @@ class EditProjekte extends EditRecord
|
||||
->openUrlInNewTab(),
|
||||
Action::make('make_gutachten')
|
||||
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
|
||||
->color(fn ($record): string => match ($record->evaluation) {
|
||||
1 => 'info',
|
||||
default => 'gray',
|
||||
})
|
||||
->disabled(fn ($record): bool => $record->evaluation ? false : true)
|
||||
->label('Neu Berechnen')
|
||||
->icon('phosphor-calculator')
|
||||
->url(fn ($record) => route('standard.download', ['record' => $record, 'mode' => 'new']))
|
||||
->openUrlInNewTab(),
|
||||
Action::make('evaluate_gutachten')
|
||||
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
|
||||
->color(fn ($record): string => match ($record->evaluation) {
|
||||
1 => 'gray',
|
||||
default => 'info',
|
||||
})
|
||||
->label('Daten Evaluieren')
|
||||
->icon('phosphor-seal-check')
|
||||
->action(function ($record): void {
|
||||
GutachtenValidation::controll($record);
|
||||
}),
|
||||
])->label('Gutachten')
|
||||
->icon('heroicon-m-ellipsis-vertical')
|
||||
->button()
|
||||
|
||||
Reference in new issue
Block a user