|
|
@@ -85,12 +85,12 @@ class RecordINOUT extends Component
|
|
|
$this->year_2 = date("Y");
|
|
|
$this->show_block_2 = false;
|
|
|
|
|
|
- $this->getCausale(\App\Models\Causal::select('id', 'name')->where('parent_id', null)->where('type', 'IN')->whereNotIn('id', $this->excludeCausals)->where('hidden', false)->get(), 'IN', 0);
|
|
|
- $this->getCausale(\App\Models\Causal::select('id', 'name')->where('parent_id', null)->where('type', 'OUT')->whereNotIn('id', $this->excludeCausals)->where('hidden', false)->get(), 'OUT', 0);
|
|
|
+ $this->getCausale(\App\Models\Causal::select('id', 'name')->where('parent_id', null)->where('type', 'IN')->whereNotIn('id', $this->excludeCausals)->get(), 'IN', 0);
|
|
|
+ $this->getCausale(\App\Models\Causal::select('id', 'name')->where('parent_id', null)->where('type', 'OUT')->whereNotIn('id', $this->excludeCausals)->get(), 'OUT', 0);
|
|
|
|
|
|
- $this->getCausalsIn(\App\Models\Causal::select('id', 'name')->where('parent_id', null)->where('type', 'IN')->where('hidden', false)->get(), 0);
|
|
|
+ $this->getCausalsIn(\App\Models\Causal::select('id', 'name')->where('parent_id', null)->where('type', 'IN')->get(), 0);
|
|
|
|
|
|
- $this->getCausalsOut(\App\Models\Causal::select('id', 'name')->where('parent_id', null)->where('type', 'OUT')->where('hidden', false)->get(), 0);
|
|
|
+ $this->getCausalsOut(\App\Models\Causal::select('id', 'name')->where('parent_id', null)->where('type', 'OUT')->get(), 0);
|
|
|
|
|
|
//$this->causalsIn = \App\Models\Causal::where('parent_id', null)->where('type', 'IN')->whereNotIn('id', $this->excludeCausals)->get();
|
|
|
//$this->causalsOut = \App\Models\Causal::where('parent_id', null)->where('type', 'OUT')->whereNotIn('id', $this->excludeCausals)->get();
|
|
|
@@ -100,9 +100,8 @@ class RecordINOUT extends Component
|
|
|
{
|
|
|
foreach ($records as $record) {
|
|
|
$this->causalsIn[] = array('id' => $record->id, 'name' => $record->getTree(), 'text' => $record->getTree(), 'level' => $indentation);
|
|
|
- $childs = $record->childs->where('hidden', false);
|
|
|
- if (count($childs))
|
|
|
- $this->getCausalsIn($childs, $indentation + 1);
|
|
|
+ if (count($record->childs))
|
|
|
+ $this->getCausalsIn($record->childs, $indentation + 1);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -110,10 +109,8 @@ class RecordINOUT extends Component
|
|
|
{
|
|
|
foreach ($records as $record) {
|
|
|
$this->causalsOut[] = array('id' => $record->id, 'name' => $record->getTree(), 'text' => $record->getTree(), 'level' => $indentation);
|
|
|
- $childs = $record->childs->where('hidden', false);
|
|
|
- if (count($childs)) {
|
|
|
- $this->getCausalsOut($childs, $indentation + 1);
|
|
|
- }
|
|
|
+ if (count($record->childs))
|
|
|
+ $this->getCausalsOut($record->childs, $indentation + 1);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -128,10 +125,8 @@ class RecordINOUT extends Component
|
|
|
$this->rows_in[] = array('id' => $record->id, 'name' => $record->name, 'level' => $indentation, 'parent_id' => $record->parent_id, 'parent_name' => $this->getCausalName($record->parent_id), 'first_parent_id' => $first_parent_id, 'first_parent_name' => $this->getCausalName($first_parent_id), 'all_childs' => $this->getAllChild($record->id));
|
|
|
if ($type == 'OUT')
|
|
|
$this->rows_out[] = array('id' => $record->id, 'name' => $record->name, 'level' => $indentation, 'parent_id' => $record->parent_id, 'parent_name' => $this->getCausalName($record->parent_id), 'first_parent_id' => $first_parent_id, 'first_parent_name' => $this->getCausalName($first_parent_id), 'all_childs' => $this->getAllChild($record->id));
|
|
|
-
|
|
|
- $childs = $record->childs->where('hidden', false);
|
|
|
- if (count($childs))
|
|
|
- $this->getCausale($childs, $type, $indentation + 1);
|
|
|
+ if (count($record->childs))
|
|
|
+ $this->getCausale($record->childs, $type, $indentation + 1);
|
|
|
}
|
|
|
}
|
|
|
|