|
@@ -1,51 +1,56 @@
|
|
|
@extends('app.stat-tree.stat-trees.single')
|
|
|
@section('page')
|
|
|
|
|
|
-<h1>Lines</h1>
|
|
|
-
|
|
|
-<table class="table">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>#</th>
|
|
|
- <th>Clauses</th>
|
|
|
- <th>Query</th>
|
|
|
- <th>Count</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- @foreach($statTree->lines as $line)
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <a href="{{ route('practice-management.statTreeLines.view.dashboard', $line) }}">
|
|
|
- {{ $line->tree_order_position_index }}
|
|
|
- </a>
|
|
|
- </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>
|
|
|
- {{ $line->last_refresh_count }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- @endforeach
|
|
|
-</table>
|
|
|
-
|
|
|
-<hr>
|
|
|
-<h2>Replace Stat Tree Lines</h2>
|
|
|
+<div class="row">
|
|
|
+ @if(count($statTree->lines))
|
|
|
+ <div class="col-12">
|
|
|
+ <h6 class="font-weight-bold">Lines</h6>
|
|
|
+ <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">Clauses</th>
|
|
|
+ <th class="border-bottom-0">Query</th>
|
|
|
+ <th class="border-bottom-0">Count</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($statTree->lines as $line)
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <a href="{{ route('practice-management.statTreeLines.view.dashboard', $line) }}">
|
|
|
+ {{ $line->tree_order_position_index }}
|
|
|
+ </a>
|
|
|
+ </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>
|
|
|
+ {{ $line->last_refresh_count }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
|
|
|
-<div id="app">
|
|
|
- <div class="container">
|
|
|
+ <div id="app" class="col-12">
|
|
|
+ <h6 class="font-weight-bold bg-light p-3 mt-3">Replace Stat Tree Lines</h6>
|
|
|
<div class="row">
|
|
|
<div class="col-md-6">
|
|
|
<div class="bg-white p-3">
|
|
|
- <h6>TSV</h6>
|
|
|
+ <h6 class="font-weight-bold">TSV</h6>
|
|
|
<div class="input-group">
|
|
|
<textarea v-model="content" class="form-control" rows="10" @keyup="splitContents"></textarea>
|
|
|
</div>
|
|
@@ -53,7 +58,7 @@
|
|
|
</div>
|
|
|
<div class="col-md-6">
|
|
|
<div class="bg-white p-3">
|
|
|
- <h6>JSON Structure</h6>
|
|
|
+ <h6 class="font-weight-bold">JSON Structure</h6>
|
|
|
<textarea class="form-control" rows="10">@{{jsonStructure}}</textarea>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -62,7 +67,7 @@
|
|
|
<div class="row my-3">
|
|
|
<div class="col">
|
|
|
<div class="bg-white p-3">
|
|
|
- <h6>Table output:</h6>
|
|
|
+ <h6 class="font-weight-bold">Table output:</h6>
|
|
|
<div class="table-responsive">
|
|
|
<table class="table table-bordered table-hover">
|
|
|
<tbody>
|
|
@@ -80,11 +85,14 @@
|
|
|
</template>
|
|
|
<div class="row">
|
|
|
<div class="col-md-12">
|
|
|
- <button type="button" class="btn btn-sm btn-primary" @click="submit">Submit</button>
|
|
|
- <button type="button" class="btn btn-sm btn-secondary" @click="generateAutoFilledJson">Fill</button>
|
|
|
+ <div class="px-3">
|
|
|
+ <button type="button" class="btn btn-sm btn-primary" @click="submit">Submit</button>
|
|
|
+ <button type="button" class="btn btn-sm btn-secondary" @click="generateAutoFilledJson">Fill</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
<script src="{{ asset('js/tsvToArray.js') }}"></script>
|
|
@@ -102,6 +110,7 @@
|
|
|
jsonStructure: '',
|
|
|
isAutoFilled: false
|
|
|
},
|
|
|
+ delimiters: ['@{{', '}}'],
|
|
|
methods: {
|
|
|
updateColumns(rowIndex, columnIndex) {
|
|
|
try {
|
|
@@ -184,11 +193,7 @@
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- })
|
|
|
-
|
|
|
- // Sam, write a function that takes the tsv array to text please. T
|
|
|
- // Sorry, i haven't understood you well
|
|
|
- //What if I add extra function to auto-fill his empty cells?
|
|
|
+ });
|
|
|
</script>
|
|
|
|
|
|
-@endsection
|
|
|
+@endsection
|