mwthoden
This commit is contained in:
1 parent
301443d8c4
commit
8c34730c41
9 files changed
+534
-38
No files matched your search
@@ -111,7 +111,7 @@ class EditProjekte extends EditRecord
|
||||
->openUrlInNewTab(),
|
||||
])->label('Pdf')
|
||||
->icon('phosphor-download')
|
||||
->color('info')
|
||||
->color('gray')
|
||||
->button(),
|
||||
|
||||
/**
|
||||
@@ -132,7 +132,7 @@ class EditProjekte extends EditRecord
|
||||
->openUrlInNewTab(),
|
||||
])->label('Excel')
|
||||
->icon('phosphor-download')
|
||||
->color('info')
|
||||
->color('gray')
|
||||
->button(),
|
||||
|
||||
/**
|
||||
@@ -153,9 +153,9 @@ class EditProjekte extends EditRecord
|
||||
}),
|
||||
Action::make('reparieren')
|
||||
->color('success')
|
||||
->label('Daten reparieren')
|
||||
->label('Daten reparieren ..')
|
||||
->modalIcon('phosphor-arrow-fat-line-right-fill')
|
||||
->modalDescription( self::reparierenText())
|
||||
->modalDescription(self::reparierenText())
|
||||
// ->hidden(fn ($record): bool => ! $record->cloned_from_id)
|
||||
->action(fn ($record) => Reparieren::run($record))
|
||||
->icon('phosphor-arrow-fat-line-right-fill'),
|
||||
|
||||
+17
-17
@@ -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()
|
||||
|
||||
+39
-3
@@ -46,7 +46,43 @@ class ProjektMethodesRelationManager extends RelationManager
|
||||
->components([
|
||||
Select::make('methode_id')
|
||||
->label('Methoden')
|
||||
->options(Methode::where('id', '<=', 6)->orderBy('order')->pluck('name', 'id'))
|
||||
->options(function () {
|
||||
$res = Methode::query()->orderBy('order')->get();
|
||||
$opt = [];
|
||||
// <span class="bg-success-600"></span>
|
||||
// <span class="bg-primary-600"></span>
|
||||
// <span class="bg-gray-600"></span>
|
||||
// <span class="bg-info-600"></span>
|
||||
// <span class="bg-warning-600"></span>
|
||||
foreach ($res as $val) {
|
||||
$opt[$val->id] = '<span class="text-white bg-'.$val->color.'-600 px-2 py-1 rounded cursor-pointer font-black">'.$val->name.' <em class="ml-3 font-normal xs">'.$val->description.'<em></span>';
|
||||
// switch ($val->id) {
|
||||
// case 1:
|
||||
// $opt[$val->id] = '<span class="text-white bg-'.$val->color.'-600 px-2 py-1 rounded cursor-pointer font-black">'.$val->name.' <em class="ml-3 font-normal xs">'.$val->description.'<em></span>';
|
||||
// break;
|
||||
// case 2:
|
||||
// case 8:
|
||||
// $opt[$val->id] = '<span class="text-white bg-'.$val->color.'-600 px-2 py-1 rounded cursor-pointer font-black">'.$val->name.' <em class="ml-3 font-normal xs">'.$val->description.'<em></span>';
|
||||
// break;
|
||||
// case 3:
|
||||
// case 7:
|
||||
// $opt[$val->id] = '<span class="text-white bg-'.$val->color.'-600 px-2 py-1 rounded cursor-pointer font-black">'.$val->name.' <em class="ml-3 font-normal xs">'.$val->description.'<em></span>';
|
||||
// break;
|
||||
// case 4:
|
||||
// $opt[$val->id] = '<span class="text-white bg-'.$val->color.'-600 px-2 py-1 rounded cursor-pointer font-black">'.$val->name.' <em class="ml-3 font-normal xs">'.$val->description.'<em></span>';
|
||||
// break;
|
||||
|
||||
// default:
|
||||
// // code...
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
return $opt;
|
||||
})
|
||||
->allowHtml()
|
||||
->native(false)
|
||||
// ->options(Methode::where('id', '<=', 6)->orderBy('order')->pluck('name', 'id'))
|
||||
->rules(['required'])
|
||||
->afterStateUpdated(function (Component $livewire) {
|
||||
$livewire->dispatch('refreshMethods');
|
||||
@@ -129,7 +165,7 @@ class ProjektMethodesRelationManager extends RelationManager
|
||||
->filtersFormColumns(4)
|
||||
->headerActions([
|
||||
Action::make('Wohnnutzfläche')
|
||||
->color('info')
|
||||
->color('gray')
|
||||
->tooltip('Setzt alle leeren Felder auf "Normale Wohnnutzfläche"')
|
||||
->icon('phosphor-arrow-bend-right-down')
|
||||
->action(function (): void {
|
||||
@@ -143,7 +179,7 @@ class ProjektMethodesRelationManager extends RelationManager
|
||||
->send();
|
||||
}),
|
||||
Action::make('methoden')
|
||||
->color('info')
|
||||
->color('gray')
|
||||
->tooltip('Informationen zu den Methoden')
|
||||
->icon('phosphor-question')
|
||||
->modalCancelAction(fn (Action $action) => $action->label('Schließen'))
|
||||
|
||||
+7
-5
@@ -132,7 +132,7 @@ class ProjektObjekteImDetailRelationManager extends RelationManager
|
||||
->icon('phosphor-upload')
|
||||
->modalIcon('phosphor-file-csv')
|
||||
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||
->color('info')
|
||||
->color('gray')
|
||||
->label('Hochladen')
|
||||
->modalHeading('Objekte im Detail hochladen')
|
||||
->modalDescription(new HtmlString('Daten fixiert auf: <b class="text-primary-500">Top, Geschoss und Raumart</b>. <br/>Bestehen diese wird die Reihe <b>aktualisiert</b>.<br/>Ansonnsten wird ein neue Reihe <b>hinzugefügt</b>!<br/><br/>Separator:<br/>Strichpunkt ";" oder Pfeife "|"<br/>Text ist <b>Vierspaltig</b>.<br/><br/>Beispiel:<br/>"APG 01";"UG ";"Stellplatz+ ";"14,25"<br/>"APG 02";"UG ";"Stellplatz";"12,94"'))
|
||||
@@ -147,12 +147,10 @@ class ProjektObjekteImDetailRelationManager extends RelationManager
|
||||
->action(function (array $data): void {
|
||||
ImportObjekteDirect::run($data, $this->ownerRecord->id);
|
||||
}),
|
||||
CreateAction::make()
|
||||
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||
->icon('phosphor-file-plus')
|
||||
->createAnother(false),
|
||||
Action::make('nutzwerte')
|
||||
->color('gray')
|
||||
->label('Nutzwerte')
|
||||
->tooltip('Eine Vorschau wird berechnet und angezeigt')
|
||||
->icon('phosphor-calculator')
|
||||
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||
->action(function () {
|
||||
@@ -170,6 +168,10 @@ class ProjektObjekteImDetailRelationManager extends RelationManager
|
||||
})->after(function (Component $livewire) {
|
||||
$livewire->dispatch('refreshProjektObjekteImDetail');
|
||||
}),
|
||||
CreateAction::make()
|
||||
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||
->icon('phosphor-file-plus')
|
||||
->createAnother(false),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()->iconButton()
|
||||
|
||||
@@ -291,13 +291,9 @@ class ProjektObjekteRelationManager extends RelationManager
|
||||
}),
|
||||
])
|
||||
->headerActions([
|
||||
CreateAction::make()
|
||||
->modalHeading('Objekt erstellen')
|
||||
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||
->modalDescription('Die dazugehörigen Räume werde in "Objekte im Detail" erstellt.')
|
||||
->icon('phosphor-file-plus')
|
||||
->createAnother(false),
|
||||
Action::make('projekt_merkmale')
|
||||
->label('Projekt Merkmale')
|
||||
->color('gray')
|
||||
->icon('phosphor-pen')
|
||||
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||
->modalCancelAction(fn (Action $action) => $action->label('Schließen'))
|
||||
@@ -309,6 +305,12 @@ class ProjektObjekteRelationManager extends RelationManager
|
||||
->after(function (Component $livewire) {
|
||||
$livewire->dispatch('refreshOrientierung');
|
||||
}),
|
||||
CreateAction::make()
|
||||
->modalHeading('Objekt erstellen')
|
||||
->hidden(fn (): bool => $this->ownerRecord->bezahlt_am ? false : true)
|
||||
->modalDescription('Die dazugehörigen Räume werde in "Objekte im Detail" erstellt.')
|
||||
->icon('phosphor-file-plus')
|
||||
->createAnother(false),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
|
||||
Reference in new issue
Block a user