fix credits
This commit is contained in:
1 parent
9a355aa812
commit
3196e17116
9 files changed
+43
-18
No files matched your search
@@ -67,6 +67,17 @@ class KontoForm
|
|||||||
->label('Telefon')
|
->label('Telefon')
|
||||||
->defaultCountry('AT'),
|
->defaultCountry('AT'),
|
||||||
])->columnSpanFull(),
|
])->columnSpanFull(),
|
||||||
|
// Tab::make('Guthaben')
|
||||||
|
// ->icon('lucide-euro')
|
||||||
|
// ->inlineLabel()
|
||||||
|
// ->schema([
|
||||||
|
// TextInput::make('guthaben')
|
||||||
|
// ->numeric()
|
||||||
|
// ->minValue(1)
|
||||||
|
// ->maxValue(100)
|
||||||
|
// ->label('Guthaben laden')
|
||||||
|
// ->prefixIcon('lucide-coins'),
|
||||||
|
// ])->columnSpanFull(),
|
||||||
])->columnSpanFull(),
|
])->columnSpanFull(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,15 +38,15 @@ class KontosTable
|
|||||||
])
|
])
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make()->iconButton(),
|
EditAction::make()->iconButton(),
|
||||||
Action::make('Guthaben laden')
|
// Action::make('Guthaben laden')
|
||||||
->iconButton()
|
// ->iconButton()
|
||||||
->color('gray')
|
// ->color('gray')
|
||||||
->icon('heroicon-o-credit-card')
|
// ->icon('heroicon-o-credit-card')
|
||||||
->schema([
|
// ->schema([
|
||||||
TextInput::make('subject')->required(),
|
// TextInput::make('subject')->required(),
|
||||||
RichEditor::make('body')->required(),
|
// RichEditor::make('body')->required(),
|
||||||
])
|
// ])
|
||||||
->action(function (array $data) {}),
|
// ->action(function (array $data) {}),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,7 @@ class EditProjekte extends EditRecord
|
|||||||
*/
|
*/
|
||||||
Action::make('freischalten')
|
Action::make('freischalten')
|
||||||
->hidden(fn ($record): bool => $record->bezahlt_am ? true : false)
|
->hidden(fn ($record): bool => $record->bezahlt_am ? true : false)
|
||||||
->color('warning')
|
->color('success')
|
||||||
->visible(fn (): bool => Auth::user()->konto->guthaben)
|
->visible(fn (): bool => Auth::user()->konto->guthaben)
|
||||||
->requiresConfirmation()
|
->requiresConfirmation()
|
||||||
->modalHeading('Gutachten freischalten?')
|
->modalHeading('Gutachten freischalten?')
|
||||||
@@ -56,16 +56,20 @@ class EditProjekte extends EditRecord
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
Action::make('bezahlen')
|
Action::make('bezahlen')
|
||||||
->color('danger')
|
->color('primary')
|
||||||
|
->icon('phosphor-euro')
|
||||||
->hidden(fn ($record): bool => $record->bezahlt_am ? true : false)
|
->hidden(fn ($record): bool => $record->bezahlt_am ? true : false)
|
||||||
->visible(fn (): bool => Auth::user()->konto->guthaben)
|
->visible(fn (): bool => Auth::user()->konto->guthaben == 0)
|
||||||
->label('Konto laden')
|
->label('Konto laden')
|
||||||
->tooltip('Konto laden um Gutachten freizuschalten.')
|
->tooltip('Konto laden (Dirket nur bei Büro AVF möglich).')
|
||||||
->requiresConfirmation()
|
->action(function () {
|
||||||
->modalHeading('Kein Guthaben')
|
Konto::where('id', Auth::user()->konto_id)->update(['guthaben' => 10]);
|
||||||
->modalIcon('heroicon-o-exclamation-triangle')
|
}),
|
||||||
->modalDescription('Bitte laden sie Ihr Konto auf')
|
// ->requiresConfirmation()
|
||||||
->modalSubmitActionLabel('Konto aufladen'),
|
// ->modalHeading('Kein Guthaben')
|
||||||
|
// ->modalIcon('heroicon-o-exclamation-triangle')
|
||||||
|
// ->modalDescription('Bitte laden sie Ihr Konto auf. (nicht aktive)')
|
||||||
|
// ->modalSubmitActionLabel('Konto aufladen'),
|
||||||
/**
|
/**
|
||||||
* EVALUATE
|
* EVALUATE
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
@@ -112,6 +112,7 @@ class ProjektAllgemeinflaechensRelationManager extends RelationManager
|
|||||||
->title('Allgemeinflächen gelöscht'),
|
->title('Allgemeinflächen gelöscht'),
|
||||||
),
|
),
|
||||||
CreateAction::make()
|
CreateAction::make()
|
||||||
|
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||||
->icon('phosphor-file-plus')
|
->icon('phosphor-file-plus')
|
||||||
->createAnother(false),
|
->createAnother(false),
|
||||||
])
|
])
|
||||||
|
|||||||
+2
@@ -361,6 +361,7 @@ class ProjektInhaltsverzeichnisRelationManager extends RelationManager
|
|||||||
->headerActions([
|
->headerActions([
|
||||||
Action::make('generate')
|
Action::make('generate')
|
||||||
->action(fn (CreateProjektInhaltsverzeichnis $createInhaltsverzeichnis) => $createInhaltsverzeichnis->create($this->ownerRecord))
|
->action(fn (CreateProjektInhaltsverzeichnis $createInhaltsverzeichnis) => $createInhaltsverzeichnis->create($this->ownerRecord))
|
||||||
|
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||||
->requiresConfirmation()
|
->requiresConfirmation()
|
||||||
->modalHeading('Inhaltsverzeichnis neu generieren')
|
->modalHeading('Inhaltsverzeichnis neu generieren')
|
||||||
->modalDescription('Bestehende Daten werden gelöscht.')
|
->modalDescription('Bestehende Daten werden gelöscht.')
|
||||||
@@ -369,6 +370,7 @@ class ProjektInhaltsverzeichnisRelationManager extends RelationManager
|
|||||||
->tooltip('Inhaltsverzeichnis wird neu erstellt.')
|
->tooltip('Inhaltsverzeichnis wird neu erstellt.')
|
||||||
->icon('phosphor-gear'),
|
->icon('phosphor-gear'),
|
||||||
CreateAction::make()
|
CreateAction::make()
|
||||||
|
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||||
->icon('phosphor-file-plus')
|
->icon('phosphor-file-plus')
|
||||||
->createAnother(false),
|
->createAnother(false),
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ class ProjektMethodesRelationManager extends RelationManager
|
|||||||
Action::make('erstellen')
|
Action::make('erstellen')
|
||||||
->action(fn (CreateProjektMethoden $createProjektMethoden) => $createProjektMethoden->create($this->ownerRecord))
|
->action(fn (CreateProjektMethoden $createProjektMethoden) => $createProjektMethoden->create($this->ownerRecord))
|
||||||
->requiresConfirmation()
|
->requiresConfirmation()
|
||||||
|
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||||
->modalHeading('Raum Methoden erstellen')
|
->modalHeading('Raum Methoden erstellen')
|
||||||
->modalDescription(new HtmlString('Daten werden aus der Tabelle "Objekte im Detail" generiert. Änderungen werden übernommen nicht mehr verwendete Objekte gelöscht. <br>Um die Tabelle neu zu generieren bitte die Tabelle vorher leeren.'))
|
->modalDescription(new HtmlString('Daten werden aus der Tabelle "Objekte im Detail" generiert. Änderungen werden übernommen nicht mehr verwendete Objekte gelöscht. <br>Um die Tabelle neu zu generieren bitte die Tabelle vorher leeren.'))
|
||||||
->modalSubmitActionLabel('Generieren')
|
->modalSubmitActionLabel('Generieren')
|
||||||
|
|||||||
+3
@@ -144,6 +144,7 @@ class ProjektObjekteImDetailRelationManager extends RelationManager
|
|||||||
Action::make('import-text')
|
Action::make('import-text')
|
||||||
->icon('phosphor-upload')
|
->icon('phosphor-upload')
|
||||||
->modalIcon('phosphor-file-csv')
|
->modalIcon('phosphor-file-csv')
|
||||||
|
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||||
->color('info')
|
->color('info')
|
||||||
->label('Hochladen')
|
->label('Hochladen')
|
||||||
->modalHeading('Objekte im Detail hochladen')
|
->modalHeading('Objekte im Detail hochladen')
|
||||||
@@ -160,11 +161,13 @@ class ProjektObjekteImDetailRelationManager extends RelationManager
|
|||||||
ImportObjekteDirect::run($data, $this->ownerRecord->id);
|
ImportObjekteDirect::run($data, $this->ownerRecord->id);
|
||||||
}),
|
}),
|
||||||
CreateAction::make()
|
CreateAction::make()
|
||||||
|
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||||
->icon('phosphor-file-plus')
|
->icon('phosphor-file-plus')
|
||||||
->createAnother(false),
|
->createAnother(false),
|
||||||
Action::make('nutzwerte')
|
Action::make('nutzwerte')
|
||||||
->label('Nutzwerte')
|
->label('Nutzwerte')
|
||||||
->icon('phosphor-calculator')
|
->icon('phosphor-calculator')
|
||||||
|
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||||
->action(function () {
|
->action(function () {
|
||||||
$res = ProjektObjekteImDetail::with('methode')
|
$res = ProjektObjekteImDetail::with('methode')
|
||||||
->where('projekte_id', $this->getOwnerRecord()->id)
|
->where('projekte_id', $this->getOwnerRecord()->id)
|
||||||
|
|||||||
@@ -271,11 +271,13 @@ class ProjektObjekteRelationManager extends RelationManager
|
|||||||
->headerActions([
|
->headerActions([
|
||||||
CreateAction::make()
|
CreateAction::make()
|
||||||
->modalHeading('Objekt erstellen')
|
->modalHeading('Objekt erstellen')
|
||||||
|
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||||
->modalDescription('Die dazugehörigen Räume werde in "Objekte im Detail" erstellt.')
|
->modalDescription('Die dazugehörigen Räume werde in "Objekte im Detail" erstellt.')
|
||||||
->icon('phosphor-file-plus')
|
->icon('phosphor-file-plus')
|
||||||
->createAnother(false),
|
->createAnother(false),
|
||||||
Action::make('projekt_merkmale')
|
Action::make('projekt_merkmale')
|
||||||
->icon('phosphor-pen')
|
->icon('phosphor-pen')
|
||||||
|
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||||
->modalCancelAction(fn (Action $action) => $action->label('Schließen'))
|
->modalCancelAction(fn (Action $action) => $action->label('Schließen'))
|
||||||
->modalSubmitAction(false)
|
->modalSubmitAction(false)
|
||||||
->modalHeading('ProjektMerkmale')
|
->modalHeading('ProjektMerkmale')
|
||||||
|
|||||||
+1
@@ -53,6 +53,7 @@ class ProjektPlatzhalterRelationManager extends RelationManager
|
|||||||
->headerActions([
|
->headerActions([
|
||||||
Action::make('generate')
|
Action::make('generate')
|
||||||
->action(fn (CreatePlatzhalter $createPlatzhalter) => $createPlatzhalter->create($this->ownerRecord))
|
->action(fn (CreatePlatzhalter $createPlatzhalter) => $createPlatzhalter->create($this->ownerRecord))
|
||||||
|
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||||
->requiresConfirmation()
|
->requiresConfirmation()
|
||||||
->modalHeading('Platzhalter neu generieren')
|
->modalHeading('Platzhalter neu generieren')
|
||||||
->modalDescription('Bestehende Platzhalter bleiben erhalten, neue werden hinzugefügt und nicht mehr verwendete werden gelöscht.')
|
->modalDescription('Bestehende Platzhalter bleiben erhalten, neue werden hinzugefügt und nicht mehr verwendete werden gelöscht.')
|
||||||
|
|||||||
Reference in new issue
Block a user