Fixed reload after editig/creating

This commit is contained in:
kolaente 2017-12-07 10:49:21 +01:00 committed by kolaente
parent 0c80f55963
commit f41a197cc5
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 18 additions and 9 deletions

View File

@ -105,6 +105,9 @@
title: this.translate('general').success, title: this.translate('general').success,
text: this.translate('authors').updatedSuccess text: this.translate('authors').updatedSuccess
}) })
// Redirect to authors list
router.push({ name: 'authors' })
}) })
.catch(e => { .catch(e => {
this.loading = false this.loading = false
@ -121,15 +124,15 @@
title: this.translate('general').success, title: this.translate('general').success,
text: this.translate('authors').insertedSuccess text: this.translate('authors').insertedSuccess
}) })
// Redirect to authors list
router.push({ name: 'authors' })
}) })
.catch(e => { .catch(e => {
this.loading = false this.loading = false
this.errorNotification(e) this.errorNotification(e)
}) })
} }
// Redirect to books list
router.push({ name: 'authors' })
} }
} }
} }

View File

@ -119,6 +119,9 @@
title: this.translate('general').success, title: this.translate('general').success,
text: this.translate('items').updatedSuccess text: this.translate('items').updatedSuccess
}) })
// Redirect to items list
router.push({ name: 'items' })
}) })
.catch(e => { .catch(e => {
this.loading = false this.loading = false
@ -135,15 +138,15 @@
title: this.translate('general').success, title: this.translate('general').success,
text: this.translate('items').insertedSuccess text: this.translate('items').insertedSuccess
}) })
// Redirect to items list
router.push({ name: 'items' })
}) })
.catch(e => { .catch(e => {
this.loading = false this.loading = false
this.errorNotification(e) this.errorNotification(e)
}) })
} }
// Redirect to books list
router.push({ name: 'items' })
} }
} }
} }

View File

@ -99,6 +99,9 @@
title: this.translate('general').success, title: this.translate('general').success,
text: this.translate('publishers').updatedSuccess text: this.translate('publishers').updatedSuccess
}) })
// Redirect to books list
router.push({ name: 'publishers' })
}) })
.catch(e => { .catch(e => {
this.loading = false this.loading = false
@ -115,15 +118,15 @@
title: this.translate('general').success, title: this.translate('general').success,
text: this.translate('publishers').insertedSuccess text: this.translate('publishers').insertedSuccess
}) })
// Redirect to books list
router.push({ name: 'publishers' })
}) })
.catch(e => { .catch(e => {
this.loading = false this.loading = false
this.errorNotification(e) this.errorNotification(e)
}) })
} }
// Redirect to books list
router.push({ name: 'publishers' })
} }
} }
} }