Explorar o código

Stat tree minor UI tweaks

Vijayakrishnan %!s(int64=3) %!d(string=hai) anos
pai
achega
6ed0a6d7be

+ 1 - 1
resources/views/app/stat-tree/stat-trees/single.blade.php

@@ -20,7 +20,7 @@
                         </div>
                     </div>
                     <div>
-                        <a href="" class="btn btn-sm btn-primary text-white"><i class="fas fa-network-wired"></i> View All Stat Trees</a>
+                        <a href="{{route('practice-management.statTrees.list')}}" class="btn btn-sm btn-primary text-white"><i class="fas fa-network-wired"></i> View All Stat Trees</a>
                     </div>
                 </div>
             </div>

+ 3 - 48
resources/views/app/stat-tree/stat-trees/sub/dashboard2.blade.php

@@ -4,62 +4,17 @@
 <div id="statTreeViewPage">
     <div id="statTreeView" class="row">
         @if(count($statTree->lines))
-            <div class="col-12">
-                @include('app.stat-tree.tree', ['slug' => 'rm-tree'])
-            </div>
             <div class="col-12">
                 <div class="d-flex align-items-center justify-content-between mb-2">
-                    <h6 class="font-weight-bold">Lines</h6>
-                    <div>
+                    <h6 class="font-weight-bold m-0">{{$statTree->name}}</h6>
+                    <div class="ml-auto">
                         <button @click="refreshTreeCountQueries" class="btn btn-sm btn-danger text-white">
                             <span v-if="!refreshing"><i class="fas fa-sync-alt"></i> Refresh Counts</span>
                             <span v-else><i class="fas fa-circle-notch fa-spin"></i> Refreshing...</span>
                         </button>
                     </div>
                 </div>
-                <div class="table-responsive">
-                    <table class="table table-condensed border p-0 m-0">
-                        <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>
-                                <th class="border-bottom-0">Actions</th>
-                            </tr>
-                        </thead>
-                        <tbody>
-                            @foreach($statTree->lines as $line)
-                            <tr>
-                                <td>
-                                    <a href="{{ route('practice-management.statTreeLines.view.dashboard', $line) }}" target="_blank">
-                                        {{ $line->tree_order_position_index }}
-                                    </a>
-                                </td>
-                                <td>{{ ucwords($line->statTree->model) }}</td>
-                                <td>
-                                    @foreach($line->lineClauses as $c)
-                                    | {{ $c->clause_label }}
-                                    @endforeach
-                                </td>
-                                <td>
-                                    SELECT COUNT(*) FROM {{ $statTree->model }} WHERE
-                                    @foreach($line->lineClauses as $c)
-                                    {{ $c->clause->clause_text ?? '' }} @if(!$loop->last) AND @endif
-                                    @endforeach
-                                </td>
-                                <td>
-                                    <span id="line-{{ $line->id }}">{{ $line->last_refresh_count }}</span>
-                                </td>
-                                <td>
-                                    <a href="#" data-id="{{$line->id}}" refresh-line-query native>Refresh</a>
-                                </td>
-                            </tr>
-                            @endforeach
-                        </tbody>
-                    </table>
-                </div>
+                @include('app.stat-tree.tree', ['slug' => 'rm-tree'])
             </div>
         @endif
 

+ 0 - 3
resources/views/app/stat-tree/tree.blade.php

@@ -18,9 +18,6 @@ if (!function_exists('renderStatTreeLineNode')) {
 $statTree = \App\Models\StatTree::where('slug', $slug)->first();
 ?>
 @if(@$statTree)
-    <div class="d-flex align-items-center justify-content-between mb-2">
-        <h6 class="font-weight-bold m-0">{{$statTree->name}}</h6>
-    </div>
     <div class="stat-tree-view border mb-3">
         @foreach($statTree->lines as $line)
             @if(!$line->parent_stat_tree_line_id)