fix clone
This commit is contained in:
1 parent
82ee9d2dcf
commit
9a5ad32315
33 files changed
+654
-496
No files matched your search
@@ -49,7 +49,7 @@ class GutachtenValidation
|
||||
->duration(10000)
|
||||
->body('Die Tabelle der <b>Allgemeinflächen</b> ist leer.')
|
||||
->send();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
foreach ($res as $value) {
|
||||
@@ -61,7 +61,7 @@ class GutachtenValidation
|
||||
->duration(10000)
|
||||
->body('Für die Allgemeinfläche <b>'.$value->raumart.'</b> fehlt die Angabe des <u>Geschoßes</u>.')
|
||||
->send();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (! $value->raumart) {
|
||||
@@ -83,7 +83,7 @@ class GutachtenValidation
|
||||
->duration(10000)
|
||||
->body('Für die Allgemeinfläche <b>'.$value->raumart.'</b> fehlt die Angabe der <u>Fläche</u>.')
|
||||
->send();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -95,11 +95,11 @@ class GutachtenValidation
|
||||
$collect = [];
|
||||
foreach ($res as $value) {
|
||||
$res2 = ProjektObjekteImDetail::where('projekte_id', $record->id)->where('projekt_objekte_id', $value->id)->first();
|
||||
if(!$res2){
|
||||
if (! $res2) {
|
||||
$collect[] = $value->top_nummer;
|
||||
}
|
||||
}
|
||||
if($collect){
|
||||
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.')
|
||||
@@ -115,14 +115,14 @@ class GutachtenValidation
|
||||
* jedes objekt im detail hat eine Verbindung zu einem objekt
|
||||
*/
|
||||
$res = ProjektObjekteImDetail::where('projekte_id', $record->id)->get();
|
||||
$collect=[];
|
||||
$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 (! $res2) {
|
||||
$collect[] = $value->geschoss.' '.$value->raumart;
|
||||
}
|
||||
}
|
||||
if($collect){
|
||||
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.')
|
||||
@@ -133,23 +133,17 @@ class GutachtenValidation
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ProjektObjekteImDetail + raumart
|
||||
* -> cosistent
|
||||
* ProjektMethode + raumart
|
||||
*/
|
||||
|
||||
$raumarts_ObjekteImDetail = ProjektObjekteImDetail::where('projekte_id', $record->id)->groupBy('raumart')->pluck('raumart')->toArray();
|
||||
$raumarts_Methode = ProjektMethode::where('projekte_id', $record->id)->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();
|
||||
|
||||
|
||||
$extra_oid = array_diff($raumarts_oid, $raumarts_meth);
|
||||
$extra_meth = array_diff($raumarts_meth, $raumarts_oid);
|
||||
|
||||
// dd($extra_oid, $raumarts_meth);
|
||||
$extra_oid = array_diff($raumarts_ObjekteImDetail, $raumarts_Methode);
|
||||
$extra_meth = array_diff($raumarts_Methode, $raumarts_ObjekteImDetail);
|
||||
|
||||
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';
|
||||
@@ -171,7 +165,7 @@ class GutachtenValidation
|
||||
->icon('heroicon-o-exclamation-triangle')
|
||||
->duration(10000)
|
||||
->danger()
|
||||
->body(implode('<br>', $extra_oid))
|
||||
->body(implode('<br>', $extra_meth))
|
||||
->send();
|
||||
|
||||
return false;
|
||||
@@ -254,7 +248,7 @@ class GutachtenValidation
|
||||
->duration(10000)
|
||||
->body('Für den Raum mit der ID <b>'.$value->id.'</b> fehlt die Angabe der <u>Top Nummer</u>.')
|
||||
->send();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
if (! $value->projektobjekteimdetail->first()->raumart) {
|
||||
@@ -333,7 +327,7 @@ class GutachtenValidation
|
||||
->body('Inhaltsverzeichnis fehlt!')
|
||||
->duration(10000)
|
||||
->send();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user