wip
This commit is contained in:
1 parent
28640e1d30
commit
c8a8064430
12 files changed
+2420
-2317
No files matched your search
@@ -16,8 +16,10 @@ use Filament\Actions\Action;
|
||||
use Filament\Actions\ActionGroup;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\ImportAction;
|
||||
use Filament\Forms\Components\RichEditor;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Validation\Rules\File;
|
||||
use Livewire\Attributes\On;
|
||||
|
||||
@@ -37,6 +39,16 @@ class EditProjekte extends EditRecord
|
||||
* IMPORT
|
||||
*/
|
||||
ActionGroup::make([
|
||||
Action::make('fix_line_endings')
|
||||
->icon('phosphor-pencil')
|
||||
->modalIcon('phosphor-file-csv')
|
||||
->label('Zeilenumbrüche korrigieren')
|
||||
->schema([
|
||||
RichEditor::make('file_endings')
|
||||
->label('Fügen Sie die Daten hier ein')
|
||||
->toolbarButtons(['paragraph']),
|
||||
])->modalSubmitAction(false),
|
||||
|
||||
ImportAction::make('import_allgemeinflaechen')
|
||||
->hidden(fn ($record): bool => $record->bezahlt_am ? false : true)
|
||||
->importer(ProjektAllgemeinflaechenImporter::class)
|
||||
@@ -138,7 +150,7 @@ class EditProjekte extends EditRecord
|
||||
Action::make('freischalten')
|
||||
->hidden(fn ($record): bool => $record->bezahlt_am ? true : false)
|
||||
->color('warning')
|
||||
->visible(fn (): bool => auth()->user()->konto->guthaben)
|
||||
->visible(fn (): bool => Auth::user()->konto->guthaben)
|
||||
->requiresConfirmation()
|
||||
->modalHeading('Gutachten freischalten?')
|
||||
->tooltip('Von Ihrem Guthaben wird ein Punkt abgezogen.')
|
||||
@@ -161,7 +173,7 @@ class EditProjekte extends EditRecord
|
||||
Action::make('bezahlen')
|
||||
->color('danger')
|
||||
->hidden(fn ($record): bool => $record->bezahlt_am ? true : false)
|
||||
->visible(fn (): bool => ! auth()->user()->konto->guthaben)
|
||||
->visible(fn (): bool => Auth::user()->konto->guthaben)
|
||||
->label('Konto laden')
|
||||
->tooltip('Konto laden um Gutachten freizuschalten.')
|
||||
->requiresConfirmation()
|
||||
|
||||
Reference in new issue
Block a user