location: display the error message in case of wrong phone number or email

This commit is contained in:
nobohan 2021-11-03 14:45:15 +01:00 committed by Julien Fastré
parent 4011fc6e77
commit a768563cd0

View File

@ -244,13 +244,20 @@ export default {
} }
}); });
} }
postLocation(body).then(location => new Promise(resolve => { postLocation(body)
console.log('postLocation', location); .then(
this.locations.push(location); location => new Promise(resolve => {
this.$store.dispatch('updateLocation', location); console.log('postLocation', location);
resolve(); this.locations.push(location);
this.modal.showModal = false; this.$store.dispatch('updateLocation', location);
})); resolve();
this.modal.showModal = false;
})
).catch(
err => {
this.errors.push(err.message);
}
);
}; };
}, },
submitNewAddress(payload) { submitNewAddress(payload) {