This commit is contained in:
salam committed 2026-08-02 08:52:59 +02:00
1 parent 301443d8c4
commit 8c34730c41
9 files changed
+534 -38

No files matched your search

@@ -83,11 +83,27 @@ class ProjektAllgemeinflaechensRelationManager extends RelationManager
->searchable(),
])
->headerActions([
CreateAction::make()
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
->color('gray')
->icon('phosphor-file-plus')
->createAnother(false),
Action::make('leeren')
->action(function () {
ProjektAllgemeinflaechen::where('projekte_id', $this->ownerRecord->id)->delete();
})
->icon('phosphor-trash')
->color('danger')
->requiresConfirmation()
->successNotification(
Notification::make()
->success()
->title('Allgemeinflächen gelöscht'),
),
Action::make('import-text')
->icon('phosphor-upload')
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
->modalIcon('phosphor-file-csv')
->color('info')
->label('Hochladen')
->modalHeading('Allgemeinflächen hochladen')
->modalDescription(new HtmlString('<b>Objekte werden immer hinzugefügt!</b><br/>Spalten Separator:<br/>Strichpunkt ";" oder Pfeife "|"<br/>Immer vier Spalten verwenden, erste Spalte wird ignoriert.<br/><br/>Beispiel:<br/>Allgemein | EG | Eingang | 15,35<br/>Allgemein | EG | Eingang/ Stiegenhaus | 27,16'))
@@ -102,22 +118,6 @@ class ProjektAllgemeinflaechensRelationManager extends RelationManager
->action(function (array $data): void {
ImportAllgemeinDirect::run($data, $this->ownerRecord->id);
}),
Action::make('leeren')
->action(function () {
ProjektAllgemeinflaechen::where('projekte_id', $this->ownerRecord->id)->delete();
})
->icon('phosphor-trash')
->color('danger')
->requiresConfirmation()
->successNotification(
Notification::make()
->success()
->title('Allgemeinflächen gelöscht'),
),
CreateAction::make()
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
->icon('phosphor-file-plus')
->createAnother(false),
])
->recordActions([
EditAction::make()->iconButton()