|
@@ -4,62 +4,17 @@
|
|
<div id="statTreeViewPage">
|
|
<div id="statTreeViewPage">
|
|
<div id="statTreeView" class="row">
|
|
<div id="statTreeView" class="row">
|
|
@if(count($statTree->lines))
|
|
@if(count($statTree->lines))
|
|
- <div class="col-12">
|
|
|
|
- @include('app.stat-tree.tree', ['slug' => 'rm-tree'])
|
|
|
|
- </div>
|
|
|
|
<div class="col-12">
|
|
<div class="col-12">
|
|
<div class="d-flex align-items-center justify-content-between mb-2">
|
|
<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">
|
|
<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-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>
|
|
<span v-else><i class="fas fa-circle-notch fa-spin"></i> Refreshing...</span>
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</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>
|
|
</div>
|
|
@endif
|
|
@endif
|
|
|
|
|