address: back to the page when the address is filled

This commit is contained in:
nobohan 2021-07-05 15:07:21 +02:00
parent f0232228a3
commit 67c31e781d
2 changed files with 4 additions and 2 deletions

View File

@ -131,7 +131,8 @@ export default {
this.$store.dispatch('addDateToAddressAndAddressToPerson', {
personId: this.personId,
addressId: this.$store.state.address.address_id,
body: { validFrom: {datetime: `${this.validFrom}T00:00:00+0100`}}
body: { validFrom: {datetime: `${this.validFrom}T00:00:00+0100`}},
backUrl: this.backUrl
})
},
getEditAddress() {

View File

@ -95,9 +95,10 @@ const store = createStore({
postAddressToPerson(payload.personId, payload.addressId)
.then(person => new Promise((resolve, reject) => {
commit('addAddressToPerson', person);
resolve();
commit('setLoading', false);
commit('setSuccess', true);
window.location.assign(payload.backUrl);
resolve();
}))
.catch((error) => {
commit('catchError', error);