Automatically go back after saving from a popup
This commit is contained in:
parent
2bf5ffa1a1
commit
cf47e196d7
4 changed files with 4 additions and 5 deletions
|
@ -120,6 +120,7 @@ export default {
|
||||||
this.success({message: 'The filter was saved successfully.'}, this)
|
this.success({message: 'The filter was saved successfully.'}, this)
|
||||||
this.filter = r
|
this.filter = r
|
||||||
this.filters = objectToSnakeCase(this.filter.filters)
|
this.filters = objectToSnakeCase(this.filter.filters)
|
||||||
|
this.$router.back()
|
||||||
})
|
})
|
||||||
.catch(e => this.error(e, this))
|
.catch(e => this.error(e, this))
|
||||||
},
|
},
|
||||||
|
|
|
@ -117,6 +117,7 @@ export default {
|
||||||
.then(r => {
|
.then(r => {
|
||||||
this.$store.commit('namespaces/setListInNamespaceById', r)
|
this.$store.commit('namespaces/setListInNamespaceById', r)
|
||||||
this.success({message: 'The list was successfully updated.'}, this)
|
this.success({message: 'The list was successfully updated.'}, this)
|
||||||
|
this.$router.back()
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.error(e, this)
|
this.error(e, this)
|
||||||
|
|
|
@ -127,6 +127,7 @@ export default {
|
||||||
// Update the namespace in the parent
|
// Update the namespace in the parent
|
||||||
this.$store.commit('namespaces/setNamespaceById', r)
|
this.$store.commit('namespaces/setNamespaceById', r)
|
||||||
this.success({message: 'The namespace was successfully updated.'}, this)
|
this.success({message: 'The namespace was successfully updated.'}, this)
|
||||||
|
this.$router.back()
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.error(e, this)
|
this.error(e, this)
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import router from '../../router'
|
|
||||||
import TeamModel from '../../models/team'
|
import TeamModel from '../../models/team'
|
||||||
import TeamService from '../../services/team'
|
import TeamService from '../../services/team'
|
||||||
import CreateEdit from '@/components/misc/create-edit'
|
import CreateEdit from '@/components/misc/create-edit'
|
||||||
|
@ -64,7 +63,7 @@ export default {
|
||||||
this.teamService
|
this.teamService
|
||||||
.create(this.team)
|
.create(this.team)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
router.push({
|
this.$router.push({
|
||||||
name: 'teams.edit',
|
name: 'teams.edit',
|
||||||
params: { id: response.id },
|
params: { id: response.id },
|
||||||
})
|
})
|
||||||
|
@ -77,9 +76,6 @@ export default {
|
||||||
this.error(e, this)
|
this.error(e, this)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
back() {
|
|
||||||
router.go(-1)
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue