Samson Mutunga 3 жил өмнө
parent
commit
c0f3f0f3eb

+ 4 - 0
app/Http/Controllers/StatTreeLineController.php

@@ -7,6 +7,7 @@ use Illuminate\Http\Request;
 use App\Models\StatTree;
 use App\Models\StatTreeLine;
 use App\Models\Client;
+use App\Models\Pro;
 
 class StatTreeLineController extends Controller
 {
@@ -76,6 +77,9 @@ class StatTreeLineController extends Controller
         if ($model === 'client') {
             $query = Client::query();
         }
+        if ($model === 'pro') {
+            $query = Pro::query();
+        }
 
         if (!$query) return null;
 

+ 2 - 0
resources/views/app/stat-tree/clauses/list.blade.php

@@ -22,6 +22,7 @@
                                         <thead class="bg-light">
                                             <tr>
                                                 <th class="border-0">Position Index</th>
+                                                <th class="border-0">Model</th>
                                                 <th class="border-0">Label</th>
                                                 <th class="border-0">Question</th>
                                                 <th class="border-0">Answer</th>
@@ -32,6 +33,7 @@
                                             @foreach($clauses as $clause)
                                             <tr>
                                                 <td>{{ $clause->position_index }}</td>
+                                                <td>{{$clause->model}}</td>
                                                 <td>{{$clause->label}}</td>
                                                 <td>{{$clause->question}}</td>
                                                 <td>{{ $clause->answer }}</td>

+ 2 - 0
resources/views/app/stat-tree/stat-trees/sub/dashboard.blade.php

@@ -19,6 +19,7 @@
                     <thead class="bg-light">
                         <tr>
                             <th class="border-bottom-0">#</th>
+                            <th class="border-bottom-0">Model</th>
                             <th class="border-bottom-0">Clauses</th>
                             <th class="border-bottom-0">Query</th>
                             <th class="border-bottom-0">Count</th>
@@ -33,6 +34,7 @@
                                     {{ $line->tree_order_position_index }}
                                 </a>
                             </td>
+                            <td>{{ ucwords($line->statTree->model) }}</td>
                             <td>
                                 @foreach($line->lineClauses as $c)
                                 | {{ $c->clause_label }}