Skip to content
Snippets Groups Projects
Commit bdf4ca97 authored by Kirill Stytsenko's avatar Kirill Stytsenko
Browse files

Make use of Nuxt's "components" feature

Former-commit-id: 2a7b5964
parent cc121007
No related branches found
No related tags found
1 merge request!23Sprint results
...@@ -22,24 +22,26 @@ ...@@ -22,24 +22,26 @@
@change="buildQuery" /> @change="buildQuery" />
</v-col> </v-col>
</v-row> </v-row>
<QBFilter <QueryFilters
v-if="table" v-if="table"
v-model="clauses" v-model="clauses"
:columns="columnNames" /> :columns="columnNames" />
<highlightjs <v-row v-if="query.formatted">
v-if="query.formatted" <v-col>
autodetect <highlightjs autodetect :code="query.formatted" />
:code="query.formatted" /> </v-col>
<v-col cols="3" class="actions">
<v-btn class="execute" color="primary">
<v-icon>mdi-refresh</v-icon>
Execute
</v-btn>
</v-col>
</v-row>
</div> </div>
</template> </template>
<script> <script>
import QBFilter from './QBFilters'
export default { export default {
components: {
QBFilter
},
data () { data () {
return { return {
table: null, table: null,
...@@ -118,4 +120,10 @@ main.scss file from vuetify, because it paints it red */ ...@@ -118,4 +120,10 @@ main.scss file from vuetify, because it paints it red */
background: #fdf6e3; background: #fdf6e3;
color: #657b83; color: #657b83;
} }
.actions {
align-items: center;
display: flex;
justify-content: center;
}
</style> </style>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</v-col> </v-col>
</v-row> </v-row>
</v-col> </v-col>
<v-col class="acitons mt-1" cols="3"> <v-col class="acitons" cols="3">
<v-btn :disabled="!canAdd(idx)" class="mr-1" depressed tile @click="addAnd">AND</v-btn> <v-btn :disabled="!canAdd(idx)" class="mr-1" depressed tile @click="addAnd">AND</v-btn>
<v-btn :disabled="!canAdd(idx)" class="mr-1" depressed tile @click="addOr">OR</v-btn> <v-btn :disabled="!canAdd(idx)" class="mr-1" depressed tile @click="addOr">OR</v-btn>
<v-btn depressed tile @click="remove(idx)"><v-icon>mdi-delete</v-icon></v-btn> <v-btn depressed tile @click="remove(idx)"><v-icon>mdi-delete</v-icon></v-btn>
......
...@@ -6,14 +6,7 @@ ...@@ -6,14 +6,7 @@
</template> </template>
<script> <script>
import DBToolbar from '@/components/DBToolbar'
import QueryBuilder from '@/components/query/QueryBuilder'
export default { export default {
components: {
DBToolbar,
QueryBuilder
},
data () { data () {
return { return {
} }
......
import test from 'ava' import test from 'ava'
import { mount, shallowMount } from '@vue/test-utils' import { mount, shallowMount } from '@vue/test-utils'
import QBFilters from '@/components/query/QBFilters' import QBFilters from '@/components/query/Filters'
test('is a Vue instance', (t) => { test('is a Vue instance', (t) => {
const wrapper = mount(QBFilters) const wrapper = mount(QBFilters)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment