wip
This commit is contained in:
1 parent
16c0aa24fe
commit
4a509c6a16
16 files changed
+163
-77
No files matched your search
@@ -32,7 +32,7 @@ class CloneProjekt
|
|||||||
$news_project->cloned_from_id = $record->id;
|
$news_project->cloned_from_id = $record->id;
|
||||||
$news_project->save();
|
$news_project->save();
|
||||||
|
|
||||||
ProjektUser::create(['user_id' => Auth::user()->id, 'projekte_id' => $news_project->id]);
|
ProjektUser::create(['user_id' => Auth::user()->id, 'projekte_id' => $news_project->id, 'evaluation_gutachten' => 0]);
|
||||||
|
|
||||||
$res = ProjektObjekte::where('projekte_id', $record->id)->get();
|
$res = ProjektObjekte::where('projekte_id', $record->id)->get();
|
||||||
foreach ($res as $row) {
|
foreach ($res as $row) {
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ use App\Models\ProjektObjekte;
|
|||||||
use App\Models\ProjektObjekteImDetail;
|
use App\Models\ProjektObjekteImDetail;
|
||||||
use App\Models\ProjektPlatzhalter;
|
use App\Models\ProjektPlatzhalter;
|
||||||
|
|
||||||
class CloneValidation
|
class Reparieren
|
||||||
{
|
{
|
||||||
public static function validate(Projekte $record)
|
public static function run(Projekte $record)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* projektes
|
* projektes
|
||||||
@@ -29,29 +29,33 @@ class CloneValidation
|
|||||||
$ORIGINAL = $record->cloned_from_id;
|
$ORIGINAL = $record->cloned_from_id;
|
||||||
$GEKLONT = $record->id;
|
$GEKLONT = $record->id;
|
||||||
|
|
||||||
// $originals = ProjektObjekte::where('projekte_id', $ORIGINAL)->get();
|
if($ORIGINAL){
|
||||||
// foreach ($originals as $original) {
|
// überprüfe geklontes Projekt!
|
||||||
// $check = ProjektObjekte::where('projekte_id', $GEKLONT)->where('top_nummer', $original->top_nummer)->first();
|
$originals = ProjektObjekte::where('projekte_id', $ORIGINAL)->get();
|
||||||
// if (! $check) {
|
foreach ($originals as $original) {
|
||||||
// /**
|
$check = ProjektObjekte::where('projekte_id', $GEKLONT)->where('top_nummer', $original->top_nummer)->get();
|
||||||
// * Im original dazugekommen
|
dd($check);
|
||||||
// */
|
if (! $check) {
|
||||||
// $new = $original->replicate();
|
/**
|
||||||
// $new->projekte_id = $GEKLONT;
|
* Im original dazugekommen
|
||||||
// $new->save();
|
*/
|
||||||
|
$new = $original->replicate();
|
||||||
|
$new->projekte_id = $GEKLONT;
|
||||||
|
$new->save();
|
||||||
|
|
||||||
// $res2 = ProjektObjekteImDetail::where('projekte_id', $ORIGINAL)->where('projekt_objekte_id', $original->id)->get();
|
$res2 = ProjektObjekteImDetail::where('projekte_id', $ORIGINAL)->where('projekt_objekte_id', $original->id)->get();
|
||||||
// foreach ($res2 as $row2) {
|
foreach ($res2 as $row2) {
|
||||||
// $check = ProjektObjekteImDetail::where('projekte_id', $GEKLONT)->where('raumart', $row2->raumart)->first();
|
$check = ProjektObjekteImDetail::where('projekte_id', $GEKLONT)->where('raumart', $row2->raumart)->first();
|
||||||
// if (! $check) {
|
if (! $check) {
|
||||||
// $new2 = $row2->replicate();
|
$new2 = $row2->replicate();
|
||||||
// $new2->projekte_id = $GEKLONT;
|
$new2->projekte_id = $GEKLONT;
|
||||||
// $new2->projekt_objekte_id = $new->id;
|
$new2->projekt_objekte_id = $new->id;
|
||||||
// $new2->save();
|
$new2->save();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// $res = ProjektAllgemeinflaechen::where('projekte_id', $original_id)->get();
|
// $res = ProjektAllgemeinflaechen::where('projekte_id', $original_id)->get();
|
||||||
// foreach ($res as $row) {
|
// foreach ($res as $row) {
|
||||||
@@ -19,7 +19,7 @@ use PhpOffice\PhpSpreadsheet\Style\Fill;
|
|||||||
|
|
||||||
class ExcelAufstellung
|
class ExcelAufstellung
|
||||||
{
|
{
|
||||||
public static function make($projekte_id)
|
public static function make(int $projekte_id)
|
||||||
{
|
{
|
||||||
$black = 'ff62748e';
|
$black = 'ff62748e';
|
||||||
$blue = 'ff2b7fff';
|
$blue = 'ff2b7fff';
|
||||||
|
|||||||
@@ -26,15 +26,15 @@ use Mpdf\Mpdf;
|
|||||||
|
|
||||||
class PdfGenerator
|
class PdfGenerator
|
||||||
{
|
{
|
||||||
public static $projekt;
|
public static Projekte $projekt;
|
||||||
|
|
||||||
public static $gutachter;
|
public static Gutachter $gutachter;
|
||||||
|
|
||||||
public static $auftraggeber;
|
public static Auftraggeber $auftraggeber;
|
||||||
|
|
||||||
public static $zusammenstellung = [];
|
public static array $zusammenstellung = [];
|
||||||
|
|
||||||
public static function make($projekte_id, $part)
|
public static function make(int $projekte_id,string $part)
|
||||||
{
|
{
|
||||||
self::$projekt = Projekte::where('id', $projekte_id)->first();
|
self::$projekt = Projekte::where('id', $projekte_id)->first();
|
||||||
|
|
||||||
@@ -114,6 +114,7 @@ class PdfGenerator
|
|||||||
$html = '';
|
$html = '';
|
||||||
$html = Ueberschrift::load($inhalt);
|
$html = Ueberschrift::load($inhalt);
|
||||||
$textblock = '';
|
$textblock = '';
|
||||||
|
$textblock2 = '';
|
||||||
|
|
||||||
if ($inhalt->textblock) {
|
if ($inhalt->textblock) {
|
||||||
$textblock = Platzhalter::replace($platzhalter, $inhalt->textblock);
|
$textblock = Platzhalter::replace($platzhalter, $inhalt->textblock);
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ use App\Models\ProjektInhaltsverzeichnis;
|
|||||||
use App\Models\ProjektMethode;
|
use App\Models\ProjektMethode;
|
||||||
use App\Models\ProjektObjekte;
|
use App\Models\ProjektObjekte;
|
||||||
use App\Models\ProjektObjekteImDetail;
|
use App\Models\ProjektObjekteImDetail;
|
||||||
use App\Models\ProjektPlatzhalter;
|
// use App\Models\ProjektPlatzhalter;
|
||||||
use Filament\Notifications\Notification;
|
use Filament\Notifications\Notification;
|
||||||
|
|
||||||
class GutachtenValidation
|
class GutachtenValidation
|
||||||
{
|
{
|
||||||
public static function controll($record)
|
public static function run(Projekte $record)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Projekt
|
* Projekt
|
||||||
@@ -88,17 +88,69 @@ class GutachtenValidation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* jedes objekt hat mindestens ein objekt im detail
|
||||||
|
*/
|
||||||
|
$res = ProjektObjekte::where('projekte_id', $record->id)->get();
|
||||||
|
$collect = [];
|
||||||
|
foreach ($res as $value) {
|
||||||
|
$res2 = ProjektObjekteImDetail::where('projekte_id', $record->id)->where('projekt_objekte_id', $value->id)->first();
|
||||||
|
if(!$res2){
|
||||||
|
$collect[] = $value->top_nummer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($collect){
|
||||||
|
Notification::make()
|
||||||
|
->title('Fehler bei Verbindungen von Objekt zu Objekt im Detail')
|
||||||
|
->body('Für die <u>Objekte</u>:<div class="py-2 text-gray-500">'.implode(', ', $collect).'</div>fehlen die <u>Objekte im Detail</u>. Daten können nochmals hochladen werden.')
|
||||||
|
->icon('heroicon-o-exclamation-triangle')
|
||||||
|
->duration(10000)
|
||||||
|
->danger()
|
||||||
|
->send();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* jedes objekt im detail hat eine Verbindung zu einem objekt
|
||||||
|
*/
|
||||||
|
$res = ProjektObjekteImDetail::where('projekte_id', $record->id)->get();
|
||||||
|
$collect=[];
|
||||||
|
foreach ($res as $value) {
|
||||||
|
$res2 = ProjektObjekte::where('projekte_id', $record->id)->where('id', $value->projekt_objekte_id)->first();
|
||||||
|
if(!$res2){
|
||||||
|
$collect[] = $value->geschoss .' '.$value->raumart;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($collect){
|
||||||
|
Notification::make()
|
||||||
|
->title('Fehler bei Verbindungen von Objekt im Detail zu Objekt')
|
||||||
|
->body('Für die <u>Objekte im Detail</u>: <div class="py-2 text-gray-500">'.implode(', ', $collect).'</div>fehlt das<u>Objekte</u>. Daten können nochmals hochladen werden.')
|
||||||
|
->icon('heroicon-o-exclamation-triangle')
|
||||||
|
->duration(10000)
|
||||||
|
->danger()
|
||||||
|
->send();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ProjektObjekteImDetail + raumart
|
* ProjektObjekteImDetail + raumart
|
||||||
* -> cosistent
|
* -> cosistent
|
||||||
* ProjektMethode + raumart
|
* ProjektMethode + raumart
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$raumarts_oid = ProjektObjekteImDetail::where('projekte_id', $record->id)->groupBy('raumart')->pluck('raumart')->toArray();
|
$raumarts_oid = ProjektObjekteImDetail::where('projekte_id', $record->id)->groupBy('raumart')->pluck('raumart')->toArray();
|
||||||
$raumarts_meth = ProjektMethode::where('projekte_id', $record->id)->pluck('raumart')->toArray();
|
$raumarts_meth = ProjektMethode::where('projekte_id', $record->id)->pluck('raumart')->toArray();
|
||||||
|
|
||||||
|
|
||||||
$extra_oid = array_diff($raumarts_oid, $raumarts_meth);
|
$extra_oid = array_diff($raumarts_oid, $raumarts_meth);
|
||||||
$extra_meth = array_diff($raumarts_meth, $raumarts_oid);
|
$extra_meth = array_diff($raumarts_meth, $raumarts_oid);
|
||||||
|
|
||||||
|
// dd($extra_oid, $raumarts_meth);
|
||||||
|
|
||||||
if ($extra_oid) {
|
if ($extra_oid) {
|
||||||
$titel = \count($extra_oid) == 1 ? 'Für diese "Raumart" aus "Objekte im Detail" ist keine "Raum Methode" definiert' : 'Für diese "Raumarten" aus "Objekte im Detail" sind keine "Raum Methoden" definiert';
|
$titel = \count($extra_oid) == 1 ? 'Für diese "Raumart" aus "Objekte im Detail" ist keine "Raum Methode" definiert' : 'Für diese "Raumarten" aus "Objekte im Detail" sind keine "Raum Methoden" definiert';
|
||||||
Notification::make()
|
Notification::make()
|
||||||
@@ -309,5 +361,7 @@ class GutachtenValidation
|
|||||||
->send();
|
->send();
|
||||||
|
|
||||||
Projekte::where('id', $record->id)->update(['evaluation_gutachten' => 1]);
|
Projekte::where('id', $record->id)->update(['evaluation_gutachten' => 1]);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,10 +4,11 @@ namespace App\Filament\Imports;
|
|||||||
|
|
||||||
use App\Models\ProjektAllgemeinflaechen;
|
use App\Models\ProjektAllgemeinflaechen;
|
||||||
use Filament\Notifications\Notification;
|
use Filament\Notifications\Notification;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class ImportAllgemeinDirect
|
class ImportAllgemeinDirect
|
||||||
{
|
{
|
||||||
public static function run($data, $projekte_id)
|
public static function run(array $data, int $projekte_id)
|
||||||
{
|
{
|
||||||
$data = explode(PHP_EOL, $data['upload_data']);
|
$data = explode(PHP_EOL, $data['upload_data']);
|
||||||
|
|
||||||
@@ -38,21 +39,20 @@ class ImportAllgemeinDirect
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$recipient = auth()->user();
|
|
||||||
if ($error) {
|
if ($error) {
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Fehlerbeim Import')
|
->title('Fehlerbeim Import')
|
||||||
->body('Daten konnten nicht in vier Spalten aufgeteilt werden. Falscher Separator?')
|
->body('Daten konnten nicht in vier Spalten aufgeteilt werden. Falscher Separator?')
|
||||||
->danger()
|
->danger()
|
||||||
->send()
|
->send()
|
||||||
->sendToDatabase($recipient);
|
->sendToDatabase(Auth::user());
|
||||||
} else {
|
} else {
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Allgemeinflächen wurden erfolgreich importiert')
|
->title('Allgemeinflächen wurden erfolgreich importiert')
|
||||||
->body('Es wurden '.$new.' Flächen hinzugefügt')
|
->body('Es wurden '.$new.' Flächen hinzugefügt')
|
||||||
->success()
|
->success()
|
||||||
->send()
|
->send()
|
||||||
->sendToDatabase($recipient);
|
->sendToDatabase(Auth::user());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Resources\Projektes\Pages;
|
namespace App\Filament\Resources\Projektes\Pages;
|
||||||
|
|
||||||
use App\Actions\Cloning\CloneValidation;
|
use App\Actions\Cloning\Reparieren;
|
||||||
use App\Actions\Validation\GutachtenValidation;
|
use App\Actions\Validation\GutachtenValidation;
|
||||||
use App\Filament\Resources\Projektes\ProjekteResource;
|
use App\Filament\Resources\Projektes\ProjekteResource;
|
||||||
use App\Models\Konto;
|
use App\Models\Konto;
|
||||||
@@ -15,6 +15,7 @@ use Filament\Actions\DeleteAction;
|
|||||||
use Filament\Notifications\Notification;
|
use Filament\Notifications\Notification;
|
||||||
use Filament\Resources\Pages\EditRecord;
|
use Filament\Resources\Pages\EditRecord;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\HtmlString;
|
||||||
use Livewire\Attributes\On;
|
use Livewire\Attributes\On;
|
||||||
|
|
||||||
class EditProjekte extends EditRecord
|
class EditProjekte extends EditRecord
|
||||||
@@ -71,18 +72,6 @@ class EditProjekte extends EditRecord
|
|||||||
// ->modalIcon('heroicon-o-exclamation-triangle')
|
// ->modalIcon('heroicon-o-exclamation-triangle')
|
||||||
// ->modalDescription('Bitte laden sie Ihr Konto auf. (nicht aktive)')
|
// ->modalDescription('Bitte laden sie Ihr Konto auf. (nicht aktive)')
|
||||||
// ->modalSubmitActionLabel('Konto aufladen'),
|
// ->modalSubmitActionLabel('Konto aufladen'),
|
||||||
/**
|
|
||||||
* EVALUATE
|
|
||||||
*/
|
|
||||||
Action::make('evaluate_gutachten')
|
|
||||||
->hidden(fn ($record): bool => $record->bezahlt_am && ! $record->evaluation_gutachten ? false : true)
|
|
||||||
->label('Evaluieren')
|
|
||||||
->icon('phosphor-eye')
|
|
||||||
->action(function ($record): void {
|
|
||||||
GutachtenValidation::controll($record);
|
|
||||||
$this->record->refresh();
|
|
||||||
}),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PDF
|
* PDF
|
||||||
*/
|
*/
|
||||||
@@ -94,7 +83,9 @@ class EditProjekte extends EditRecord
|
|||||||
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->evaluation_gutachten) ? true : false)
|
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->evaluation_gutachten) ? true : false)
|
||||||
->label('Standard Texte')
|
->label('Standard Texte')
|
||||||
->icon('icon-pdf')
|
->icon('icon-pdf')
|
||||||
->url(fn ($record) => route('pdf', ['record' => $record, 'part' => 'standard']))
|
->url(function ($record) {
|
||||||
|
return route('pdf', ['record' => $record, 'part' => 'standard']);
|
||||||
|
})
|
||||||
->openUrlInNewTab(),
|
->openUrlInNewTab(),
|
||||||
/**
|
/**
|
||||||
* NUTZWERTE
|
* NUTZWERTE
|
||||||
@@ -103,7 +94,9 @@ class EditProjekte extends EditRecord
|
|||||||
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->evaluation_gutachten) ? true : false)
|
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->evaluation_gutachten) ? true : false)
|
||||||
->label('Nutzwertberechnung')
|
->label('Nutzwertberechnung')
|
||||||
->icon('icon-pdf')
|
->icon('icon-pdf')
|
||||||
->url(fn ($record) => route('pdf', ['record' => $record, 'part' => 'nutzwerte']))
|
->url(function ($record) {
|
||||||
|
return route('pdf', ['record' => $record, 'part' => 'nutzwerte']);
|
||||||
|
})
|
||||||
->openUrlInNewTab(),
|
->openUrlInNewTab(),
|
||||||
/**
|
/**
|
||||||
* PARAGRAPH 6
|
* PARAGRAPH 6
|
||||||
@@ -112,7 +105,9 @@ class EditProjekte extends EditRecord
|
|||||||
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->evaluation_gutachten) ? true : false)
|
->hidden(fn ($record): bool => (! $record->bezahlt_am || ! $record->evaluation_gutachten) ? true : false)
|
||||||
->label('Auszug gem. §6 ')
|
->label('Auszug gem. §6 ')
|
||||||
->icon('icon-pdf')
|
->icon('icon-pdf')
|
||||||
->url(fn ($record) => route('pdf', ['record' => $record, 'part' => 'paragraph']))
|
->url(function ($record) {
|
||||||
|
return route('pdf', ['record' => $record, 'part' => 'paragraph']);
|
||||||
|
})
|
||||||
->openUrlInNewTab(),
|
->openUrlInNewTab(),
|
||||||
])->label('Pdf')
|
])->label('Pdf')
|
||||||
->icon('phosphor-download')
|
->icon('phosphor-download')
|
||||||
@@ -144,14 +139,28 @@ class EditProjekte extends EditRecord
|
|||||||
* ADMIN
|
* ADMIN
|
||||||
*/
|
*/
|
||||||
ActionGroup::make([
|
ActionGroup::make([
|
||||||
Action::make('relationen')
|
/**
|
||||||
->label('Relationen überprüfen')
|
* EVALUATE
|
||||||
->modalIcon('phosphor-gear')
|
*/
|
||||||
->modalDescription('Dieses Projekt wurde gekloned. Mit dieser Funktion können Fehler behoben und Änderungen vom originalen Projekt übernommen werden. Objekte ohne Verbindung werden gelöscht.')
|
Action::make('evaluate_gutachten')
|
||||||
->hidden(fn ($record): bool => ! $record->cloned_from_id)
|
->color('primary')
|
||||||
->action(fn ($record) => CloneValidation::validate($record))
|
// ->hidden(fn ($record): bool => $record->bezahlt_am && ! $record->evaluation_gutachten ? false : true)
|
||||||
->icon('phosphor-gear'),
|
->label('Daten überprüfen')
|
||||||
|
->icon('phosphor-eye')
|
||||||
|
->action(function ($record): void {
|
||||||
|
GutachtenValidation::run($record);
|
||||||
|
$this->record->refresh();
|
||||||
|
}),
|
||||||
|
Action::make('reparieren')
|
||||||
|
->color('success')
|
||||||
|
->label('Daten reparieren')
|
||||||
|
->modalIcon('phosphor-arrow-fat-line-right-fill')
|
||||||
|
->modalDescription( new HtmlString('<ol class="list-decimal"><li>Bei geklonten Projekten werden Änderungen vom originalen <u>Objekt</u> und <u>Objekt im Detail</u> übernommen.</li><li>Bei geklonten Projekten werden gelöschte <u>Objekt</u> und <u>Objekt im Detail</u> ergänzt.</li><li><u>Objekt im Detail</u> ohne Verbindung zum <u>Objekt</u> werden gelöscht.</li><li>Doppelte <u>Objekt</u> oder <u>Objekt im Detail</u> werden gelöscht.</li></ol>'))
|
||||||
|
// ->hidden(fn ($record): bool => ! $record->cloned_from_id)
|
||||||
|
->action(fn ($record) => Reparieren::run($record))
|
||||||
|
->icon('phosphor-arrow-fat-line-right-fill'),
|
||||||
DeleteAction::make()->icon('heroicon-o-trash')
|
DeleteAction::make()->icon('heroicon-o-trash')
|
||||||
|
->label('Projekt löschen')
|
||||||
->modalDescription('Möchten Sie dieses Projekt wirklich löschen? Die Daten werden unwiderbringlich gelöscht, dieser Vorgang kann nicht rückgängig gemacht werden.'),
|
->modalDescription('Möchten Sie dieses Projekt wirklich löschen? Die Daten werden unwiderbringlich gelöscht, dieser Vorgang kann nicht rückgängig gemacht werden.'),
|
||||||
])->label('Admin')
|
])->label('Admin')
|
||||||
->icon('phosphor-user-circle')
|
->icon('phosphor-user-circle')
|
||||||
|
|||||||
+7
-1
@@ -33,6 +33,7 @@ use Filament\Tables\Filters\Filter;
|
|||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use ToneGabes\BetterOptions\Forms\Components\RadioCards;
|
use ToneGabes\BetterOptions\Forms\Components\RadioCards;
|
||||||
|
use ToneGabes\Filament\Icons\Enums\Phosphor;
|
||||||
|
|
||||||
class ProjektInhaltsverzeichnisRelationManager extends RelationManager
|
class ProjektInhaltsverzeichnisRelationManager extends RelationManager
|
||||||
{
|
{
|
||||||
@@ -360,7 +361,7 @@ class ProjektInhaltsverzeichnisRelationManager extends RelationManager
|
|||||||
->columns(3)
|
->columns(3)
|
||||||
->iconAfter()
|
->iconAfter()
|
||||||
->indicatorBefore()
|
->indicatorBefore()
|
||||||
->hiddenIcon()
|
// ->hiddenIcon()
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->default('standard')
|
->default('standard')
|
||||||
->options([
|
->options([
|
||||||
@@ -368,6 +369,11 @@ class ProjektInhaltsverzeichnisRelationManager extends RelationManager
|
|||||||
'nutzwerte' => 'Nutzwertberechnung',
|
'nutzwerte' => 'Nutzwertberechnung',
|
||||||
'paragraph' => 'Auszug Gutachten',
|
'paragraph' => 'Auszug Gutachten',
|
||||||
])
|
])
|
||||||
|
->icons([
|
||||||
|
'standard' => Phosphor::ListNumbers->thin(),
|
||||||
|
'nutzwerte' => Phosphor::Table->thin(),
|
||||||
|
'paragraph' => Phosphor::Paragraph->thin(),
|
||||||
|
])
|
||||||
->idleIndicator('phosphor-circle')
|
->idleIndicator('phosphor-circle')
|
||||||
->selectedIndicator('phosphor-circle-fill')
|
->selectedIndicator('phosphor-circle-fill')
|
||||||
->descriptions([
|
->descriptions([
|
||||||
|
|||||||
+3
@@ -11,6 +11,7 @@ use Filament\Actions\CreateAction;
|
|||||||
use Filament\Actions\DeleteAction;
|
use Filament\Actions\DeleteAction;
|
||||||
use Filament\Actions\DeleteBulkAction;
|
use Filament\Actions\DeleteBulkAction;
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
|
use Filament\Forms\Components\Hidden;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
use Filament\Forms\Components\Textarea;
|
use Filament\Forms\Components\Textarea;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
@@ -43,6 +44,7 @@ class ProjektObjekteImDetailRelationManager extends RelationManager
|
|||||||
|
|
||||||
return $schema
|
return $schema
|
||||||
->components([
|
->components([
|
||||||
|
Hidden::make('added_manuel')->default(1),
|
||||||
Select::make('projekt_objekte_id')
|
Select::make('projekt_objekte_id')
|
||||||
->relationship('top_nummer', 'top_nummer', fn (Builder $query) => $query->where('projekte_id', $this->getOwnerRecord()->id))
|
->relationship('top_nummer', 'top_nummer', fn (Builder $query) => $query->where('projekte_id', $this->getOwnerRecord()->id))
|
||||||
->required()
|
->required()
|
||||||
@@ -78,6 +80,7 @@ class ProjektObjekteImDetailRelationManager extends RelationManager
|
|||||||
->recordTitleAttribute('top_nummer')
|
->recordTitleAttribute('top_nummer')
|
||||||
->defaultPaginationPageOption(50)
|
->defaultPaginationPageOption(50)
|
||||||
->columns([
|
->columns([
|
||||||
|
TextColumn::make('projekt_objekte_id')->label('Parent '),
|
||||||
TextColumn::make('top_nummer.top_nummer')
|
TextColumn::make('top_nummer.top_nummer')
|
||||||
->sortable()
|
->sortable()
|
||||||
->extraAttributes(['pointer-events' => 'none'])
|
->extraAttributes(['pointer-events' => 'none'])
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ use Filament\Actions\CreateAction;
|
|||||||
use Filament\Actions\DeleteAction;
|
use Filament\Actions\DeleteAction;
|
||||||
use Filament\Actions\DeleteBulkAction;
|
use Filament\Actions\DeleteBulkAction;
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
|
use Filament\Forms\Components\Hidden;
|
||||||
use Filament\Forms\Components\Radio;
|
use Filament\Forms\Components\Radio;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
@@ -47,6 +48,7 @@ class ProjektObjekteRelationManager extends RelationManager
|
|||||||
{
|
{
|
||||||
return $schema
|
return $schema
|
||||||
->components([
|
->components([
|
||||||
|
Hidden::make('added_manuel')->default(1),
|
||||||
TextInput::make('top_nummer')
|
TextInput::make('top_nummer')
|
||||||
->label('Top Nummer')
|
->label('Top Nummer')
|
||||||
->required()
|
->required()
|
||||||
@@ -60,12 +62,13 @@ class ProjektObjekteRelationManager extends RelationManager
|
|||||||
$spalten = ProjektMerkmale::where('projekte_id', $this->ownerRecord->id)->pluck('name', 'code');
|
$spalten = ProjektMerkmale::where('projekte_id', $this->ownerRecord->id)->pluck('name', 'code');
|
||||||
|
|
||||||
return $table
|
return $table
|
||||||
// ->striped()
|
->striped()
|
||||||
->emptyStateDescription(new HtmlString('Bitte Projekt freischalten und unter <b class="text-primary-600">Objekte im Detail</b> Daten hochladen.'))
|
->emptyStateDescription(new HtmlString('Bitte Projekt freischalten und unter <b class="text-primary-600">Objekte im Detail</b> Daten hochladen.'))
|
||||||
->recordTitleAttribute('top_nummer')
|
->recordTitleAttribute('top_nummer')
|
||||||
->description(new HtmlString('<span class="flex gap-1.5">Orientierungen, Zu- und Abschläge, '.Blade::render('<x-lucide-locate-off class="w-3 h-3 mt-1" />').' Nicht in Orientierung</span>'))
|
->description(new HtmlString('<span class="flex gap-1.5">Orientierungen, Zu- und Abschläge, '.Blade::render('<x-lucide-locate-off class="w-3 h-3 mt-1" />').' Nicht in Orientierung</span>'))
|
||||||
->defaultPaginationPageOption(50)
|
->defaultPaginationPageOption(50)
|
||||||
->columns([
|
->columns([
|
||||||
|
TextColumn::make('id')->width('1rem'),
|
||||||
TextColumn::make('top_nummer')
|
TextColumn::make('top_nummer')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->sortable()
|
->sortable()
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class ProjektesTable
|
|||||||
{
|
{
|
||||||
return $table
|
return $table
|
||||||
->columns([
|
->columns([
|
||||||
TextColumn::make('id'),
|
TextColumn::make('id')->sortable(),
|
||||||
ToggleColumn::make('meine')
|
ToggleColumn::make('meine')
|
||||||
->state(fn ($record) => ProjektUser::where('user_id', auth()->user()->id)->where('projekte_id', $record->id)->count())
|
->state(fn ($record) => ProjektUser::where('user_id', auth()->user()->id)->where('projekte_id', $record->id)->count())
|
||||||
->beforeStateUpdated(function ($record, $state) {
|
->beforeStateUpdated(function ($record, $state) {
|
||||||
@@ -38,6 +38,7 @@ class ProjektesTable
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
TextColumn::make('interner_name')
|
TextColumn::make('interner_name')
|
||||||
|
->sortable()
|
||||||
->badge()
|
->badge()
|
||||||
->tooltip(fn ($record): HtmlString => new HtmlString($record->beschreibung))
|
->tooltip(fn ($record): HtmlString => new HtmlString($record->beschreibung))
|
||||||
->label('Interner Name')
|
->label('Interner Name')
|
||||||
@@ -49,6 +50,7 @@ class ProjektesTable
|
|||||||
->wrap()
|
->wrap()
|
||||||
->searchable(),
|
->searchable(),
|
||||||
TextColumn::make('offizieller_name')
|
TextColumn::make('offizieller_name')
|
||||||
|
->sortable()
|
||||||
->wrap()
|
->wrap()
|
||||||
->searchable()
|
->searchable()
|
||||||
->label('Offizieller Name'),
|
->label('Offizieller Name'),
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class ProjektObjekte extends Model
|
|||||||
'type',
|
'type',
|
||||||
'raumart',
|
'raumart',
|
||||||
'nutzwert',
|
'nutzwert',
|
||||||
|
'added_manuel',
|
||||||
'a',
|
'a',
|
||||||
'b',
|
'b',
|
||||||
'c',
|
'c',
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class ProjektObjekteImDetail extends Model
|
|||||||
'faktor',
|
'faktor',
|
||||||
'flaeche',
|
'flaeche',
|
||||||
'nutzwert',
|
'nutzwert',
|
||||||
|
'added_manuel',
|
||||||
];
|
];
|
||||||
|
|
||||||
public static function boot()
|
public static function boot()
|
||||||
|
|||||||
Generated
+14
-14
@@ -4997,20 +4997,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v5.7.0",
|
"version": "v5.8.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
"reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82"
|
"reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82",
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f",
|
||||||
"reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82",
|
"reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-ctype": "*",
|
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-tokenizer": "*",
|
"ext-tokenizer": "*",
|
||||||
"php": ">=7.4"
|
"php": ">=7.4"
|
||||||
@@ -5049,9 +5048,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||||
"source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0"
|
"source": "https://github.com/nikic/PHP-Parser/tree/v5.8.0"
|
||||||
},
|
},
|
||||||
"time": "2025-12-06T11:56:16+00:00"
|
"time": "2026-07-04T14:30:18+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nunomaduro/termwind",
|
"name": "nunomaduro/termwind",
|
||||||
@@ -10120,16 +10119,16 @@
|
|||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "barryvdh/laravel-debugbar",
|
"name": "barryvdh/laravel-debugbar",
|
||||||
"version": "v4.3.0",
|
"version": "v4.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/fruitcake/laravel-debugbar.git",
|
"url": "https://github.com/fruitcake/laravel-debugbar.git",
|
||||||
"reference": "3d76ea8d78b82225b92789de65fc630c1cd8e80c"
|
"reference": "80ef956bda9e1a5824037d6f2cd06e73092e5634"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/fruitcake/laravel-debugbar/zipball/3d76ea8d78b82225b92789de65fc630c1cd8e80c",
|
"url": "https://api.github.com/repos/fruitcake/laravel-debugbar/zipball/80ef956bda9e1a5824037d6f2cd06e73092e5634",
|
||||||
"reference": "3d76ea8d78b82225b92789de65fc630c1cd8e80c",
|
"reference": "80ef956bda9e1a5824037d6f2cd06e73092e5634",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -10137,11 +10136,12 @@
|
|||||||
"illuminate/session": "^11|^12|^13.0",
|
"illuminate/session": "^11|^12|^13.0",
|
||||||
"illuminate/support": "^11|^12|^13.0",
|
"illuminate/support": "^11|^12|^13.0",
|
||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
"php-debugbar/php-debugbar": "^3.7.2",
|
"php-debugbar/php-debugbar": "^3.8.0",
|
||||||
"php-debugbar/symfony-bridge": "^1.1"
|
"php-debugbar/symfony-bridge": "^1.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"larastan/larastan": "^3",
|
"larastan/larastan": "^3",
|
||||||
|
"laravel/ai": "^0.8",
|
||||||
"laravel/octane": "^2",
|
"laravel/octane": "^2",
|
||||||
"laravel/pennant": "^1",
|
"laravel/pennant": "^1",
|
||||||
"laravel/pint": "^1",
|
"laravel/pint": "^1",
|
||||||
@@ -10203,7 +10203,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/fruitcake/laravel-debugbar/issues",
|
"issues": "https://github.com/fruitcake/laravel-debugbar/issues",
|
||||||
"source": "https://github.com/fruitcake/laravel-debugbar/tree/v4.3.0"
|
"source": "https://github.com/fruitcake/laravel-debugbar/tree/v4.4.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -10215,7 +10215,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-06-04T07:54:01+00:00"
|
"time": "2026-07-04T08:30:57+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "barryvdh/laravel-ide-helper",
|
"name": "barryvdh/laravel-ide-helper",
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ return new class extends Migration
|
|||||||
$table->string('top_nummer')->nullable();
|
$table->string('top_nummer')->nullable();
|
||||||
$table->string('type')->nullable();
|
$table->string('type')->nullable();
|
||||||
$table->decimal('nutzwert', 5, 2)->default(0)->nullable();
|
$table->decimal('nutzwert', 5, 2)->default(0)->nullable();
|
||||||
|
$table->boolean('added_manuel')->default(0)->nullable();
|
||||||
// 10 Zusatzfelder
|
// 10 Zusatzfelder
|
||||||
$table->decimal('a', 5, 2)->default(0);
|
$table->decimal('a', 5, 2)->default(0);
|
||||||
$table->decimal('b', 5, 2)->default(0);
|
$table->decimal('b', 5, 2)->default(0);
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ return new class extends Migration
|
|||||||
$table->string('raumart')->nullable();
|
$table->string('raumart')->nullable();
|
||||||
$table->decimal('flaeche', 7, 2)->default(0);
|
$table->decimal('flaeche', 7, 2)->default(0);
|
||||||
$table->integer('nutzwert')->default(0)->nullable();
|
$table->integer('nutzwert')->default(0)->nullable();
|
||||||
|
$table->boolean('added_manuel')->default(0)->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user