From 239cc13c9e59348e345251bbe7ba0d55677f6cfc Mon Sep 17 00:00:00 2001 From: Kirill Stytsenko <kirill@styts.com> Date: Tue, 25 May 2021 16:47:00 +0200 Subject: [PATCH] Display potential error --- fda-ui/pages/db/_db_id/tables/table_from_csv.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fda-ui/pages/db/_db_id/tables/table_from_csv.vue b/fda-ui/pages/db/_db_id/tables/table_from_csv.vue index 9952f3b430..5140c075fd 100644 --- a/fda-ui/pages/db/_db_id/tables/table_from_csv.vue +++ b/fda-ui/pages/db/_db_id/tables/table_from_csv.vue @@ -38,7 +38,7 @@ </v-stepper-step> <v-stepper-content step="3"> <div v-for="(c, idx) in columns" :key="idx"> - <v-row dense class="column pa-2 ml-1 mr-1"> + <v-row dense class="column pa-2 ml-1 mr-1 mb-2"> <v-col cols="4"> <v-text-field v-model="c.name" disabled required label="Name" /> </v-col> @@ -148,13 +148,15 @@ export default { let res try { res = await this.$axios.post(url, data) - // TODO check success - this.newTableId = res.data.tableId // FIXME + this.newTableId = res.data.id } catch (err) { console.log(err) } - - this.step = 4 + if (res && res.data && res.data.id) { + this.step = 4 + } else { + this.$toast.error('Could not create table.') + } } } } -- GitLab