summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/BackendModuleEdit.vue
diff options
context:
space:
mode:
authorJannik Schönartz2019-02-28 04:56:38 +0100
committerJannik Schönartz2019-02-28 04:56:38 +0100
commit0f8fa2a1f704701bde374b5c3c5bd2accd5bfbb4 (patch)
tree64ca60c98197cf9083fb9290558f1fc411ac2048 /webapp/src/components/BackendModuleEdit.vue
parent[webapp] fix toolbar height when resizing (diff)
downloadbas-0f8fa2a1f704701bde374b5c3c5bd2accd5bfbb4.tar.gz
bas-0f8fa2a1f704701bde374b5c3c5bd2accd5bfbb4.tar.xz
bas-0f8fa2a1f704701bde374b5c3c5bd2accd5bfbb4.zip
[webapp/backends] Rework to the new DataTable
Diffstat (limited to 'webapp/src/components/BackendModuleEdit.vue')
-rw-r--r--webapp/src/components/BackendModuleEdit.vue16
1 files changed, 8 insertions, 8 deletions
diff --git a/webapp/src/components/BackendModuleEdit.vue b/webapp/src/components/BackendModuleEdit.vue
index 9c392d5..9d27fbc 100644
--- a/webapp/src/components/BackendModuleEdit.vue
+++ b/webapp/src/components/BackendModuleEdit.vue
@@ -2,10 +2,12 @@
{
"en": {
"inputCredentials": "Login credentials",
+ "backendCreated": "Backend was successfully created.",
"backendName": "Backend name",
"backendEmptyError": "This field can not be empty.",
"backendType": "Backend type",
"backendtypeEmptyError": "Please choose a backend type.",
+ "backendSaved": "Backend was successfully saved.",
"stepperOptional": "optional",
"pending": "pending",
"progress": "in progress ...",
@@ -15,10 +17,12 @@
},
"de": {
"inputCredentials": "Anmeldedaten",
+ "backendCreated": "Backend wurde erfolgreich erstellt.",
"backendName": "Backend Name",
"backendEmptyError": "Dieses Feld darf nicht leer sein.",
"backendType": "Backend Typ",
"backendtypeEmptyError": "Bitte wähle einen Backendtyp aus.",
+ "backendSaved": "Backend wurde erfolgreich gespeichert.",
"stepperOptional": "Optional",
"pending": "nicht getestet",
"progress": "test läuft ...",
@@ -115,7 +119,7 @@
<v-btn flat @click.native="$store.commit('backends/setEdit', false)">{{ $t('cancel') }}</v-btn>
<v-btn color="primary" v-show="step == 1" @click.native="completeStepOne()">{{ $t('continue') }}</v-btn>
<v-btn color="primary" v-show="step == 2" @click.native="completeStepTwo()">{{ $t('continue') }}</v-btn>
- <v-btn type="submit" @click="submit" v-show="step == 3" class="primary" raised>{{ $t('submit') }}</v-btn>
+ <v-btn type="submit" @click="submit" v-show="step == 3" class="primary" raised>{{ backendId ? $t('save') : $t('create') }}</v-btn>
</v-flex>
</v-card-actions>
</v-card>
@@ -154,15 +158,11 @@ export default {
type: this.backendType,
credentials: this.credentials
}).then(response => {
- // TODO: Add backend saved successfull msg.
- console.log('TODO: Implement snackbar and print backend added successfully msg.')
+ this.$snackbar({ color: 'success', text: this.backendId ? this.$t('backendSaved') : this.$t('backendUpdated') })
this.$store.dispatch('backends/loadData')
this.$store.commit('backends/setEdit', false)
}).catch(error => {
- console.log(error)
- // if (error.response.data.status === '') {
- // }
- // this.$refs.form.validate()
+ this.$snackbar({ color: 'success', text: error.response })
})
}
},
@@ -234,7 +234,7 @@ export default {
} else {
this.statusColor = 'error--text'
this.statusLabel = this.$t('error')
- this.$store.commit('newSnackbar', response.data.error)
+ this.$snackbar({ color: 'error', text: response.data.error })
}
// Set item.loading = false to end the loading animation.
this.loading = false