Skip to content
Snippets Groups Projects
Unverified Commit 85b33aab authored by Martin Weise's avatar Martin Weise
Browse files

Updated table schema error message

parent 8289c8e3
No related branches found
No related tags found
1 merge request!81New stable release
This commit is part of merge request !81. Comments created here will be created in the context of that merge request.
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
v-model="c.name" v-model="c.name"
required required
:rules="[v => !!v || $t('Required')]" :rules="[v => !!v || $t('Required')]"
:error-messages="needsSequence && c.name === 'id' ? ['Column with this name already present'] : []" :error-messages="needsSequence && c.name === 'id' ? ['Column needs to be declared as primary key'] : []"
label="Name *" /> label="Name *" />
</v-col> </v-col>
<v-col cols="2"> <v-col cols="2">
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
name="name" name="name"
label="Table Name *" label="Table Name *"
autocomplete="off" autocomplete="off"
:rules="[v => !!v || $t('Required')]" :rules="[v => notEmpty(v) || $t('Required')]"
:error-messages="!validTableName ? ['Table with this name exists!'] : []" :error-messages="!validTableName ? ['Table with this name exists'] : []"
required /> required />
</v-col> </v-col>
</v-row> </v-row>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
name="description" name="description"
label="Description *" label="Description *"
autocomplete="off" autocomplete="off"
:rules="[v => !!v || $t('Required')]" :rules="[v => notEmpty(v) || $t('Required')]"
required /> required />
</v-col> </v-col>
</v-row> </v-row>
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
<script> <script>
import TableSchema from '@/components/TableSchema' import TableSchema from '@/components/TableSchema'
const { notEmpty } = require('@/utils')
export default { export default {
components: { components: {
TableSchema TableSchema
...@@ -113,6 +114,7 @@ export default { ...@@ -113,6 +114,7 @@ export default {
this.listTables() this.listTables()
}, },
methods: { methods: {
notEmpty,
submit () { submit () {
this.$refs.form.validate() this.$refs.form.validate()
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment