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

WiP on ColumnUnit assignment

Former-commit-id: 12e69795
parent bdee72d4
No related branches found
No related tags found
1 merge request!42Fixed the query service tests
<template>
<div>
EMPTY
</div>
</template>
<script>
export default {
data () {
return {
}
},
computed: {
},
mounted () {
},
methods: {
}
}
</script>
<style scoped>
</style>
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<thead> <thead>
<th>Column Name</th> <th>Column Name</th>
<th>Type</th> <th>Type</th>
<th>Unit</th>
<th>Primary Key</th> <th>Primary Key</th>
<th>Unique</th> <th>Unique</th>
<th>NULL Allowed</th> <th>NULL Allowed</th>
...@@ -91,6 +92,9 @@ ...@@ -91,6 +92,9 @@
<td> <td>
{{ col.columnType }} {{ col.columnType }}
</td> </td>
<td>
<DialogsColumnUnit :column="col" />
</td>
<td> <td>
<v-simple-checkbox v-model="col.isPrimaryKey" disabled aria-readonly="true" /> <v-simple-checkbox v-model="col.isPrimaryKey" disabled aria-readonly="true" />
</td> </td>
......
<template>
<v-dialog
v-model="dialog"
max-width="600px">
<template v-slot:activator="{ on, attrs }">
<v-btn
small
v-bind="attrs"
v-on="on">
Unit
</v-btn>
</template>
<v-card>
<v-card-title>
<span class="text-h5">Column Unit</span>
</v-card-title>
<v-card-text>
<div>
<i>
Autocomplete not working yet
</i>
</div>
<v-autocomplete
hide-details
dense
clearable />
</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn
color="blue darken-1"
text
@click="dialog = false">
Close
</v-btn>
<v-btn
color="blue darken-1"
text
@click="dialog = false">
Save
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
export default {
props: {
column: { type: Object, default: () => ({}) }
},
data () {
return {
dialog: false,
isLoading: false,
model: null,
search: null,
entries: []
}
},
computed: {
items () {
return this.entries.map((entry) => {
const Description = entry.Description.length > this.descriptionLimit
? entry.Description.slice(0, this.descriptionLimit) + '...'
: entry.Description
return Object.assign({}, entry, { Description })
})
}
},
watch: {
search (val) {
// Items have already been loaded
if (this.items.length > 0) { return }
// Items have already been requested
if (this.isLoading) { return }
this.isLoading = true
// Lazily load input items
this.$axios.get('/api/units/suggest')
.then((res) => {
debugger
this.entries = res
})
.catch((err) => {
console.log(err)
})
.finally(() => (this.isLoading = false))
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped>
</style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<v-card> <v-card>
<v-row dense> <v-row dense>
<v-col cols="6"> <v-col cols="">
<v-card-title v-if="table.name"> <v-card-title v-if="table.name">
{{ table.name }} {{ table.name }}
</v-card-title> </v-card-title>
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
{{ table.description }} {{ table.description }}
</v-card-subtitle> </v-card-subtitle>
</v-col> </v-col>
<v-col class="text-right" cols="6"> <v-col class="text-right pr-4" cols="4">
<v-row dense> <v-row dense>
<v-col> <v-col cols="7">
<v-menu <v-menu
ref="dateMenu" ref="dateMenu"
v-model="dateMenu" v-model="dateMenu"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment