household: redirect to the household page when a household is created from a person

This commit is contained in:
nobohan
2021-12-10 17:40:40 +01:00
parent af87b3f6da
commit da12aedb53
2 changed files with 8 additions and 4 deletions

View File

@@ -533,10 +533,14 @@ const store = createStore({
// nothing to do anymore here, bye-bye !
let params = new URLSearchParams(window.location.search);
if (params.has('returnPath')) {
window.location.replace(params.get('returnPath'));
} else {
if (params.has('followAfter')) {
window.location.replace(`/fr/person/household/${household_id}/summary`);
} else {
if (params.has('returnPath')) {
window.location.replace(params.get('returnPath'));
} else {
window.location.replace(`/fr/person/household/${household_id}/summary`);
}
}
} else {
// we assume the answer was 422...