mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
household: redirect to the household page when a household is created from a person
This commit is contained in:
parent
af87b3f6da
commit
da12aedb53
@ -533,10 +533,14 @@ const store = createStore({
|
|||||||
|
|
||||||
// nothing to do anymore here, bye-bye !
|
// nothing to do anymore here, bye-bye !
|
||||||
let params = new URLSearchParams(window.location.search);
|
let params = new URLSearchParams(window.location.search);
|
||||||
if (params.has('returnPath')) {
|
if (params.has('followAfter')) {
|
||||||
window.location.replace(params.get('returnPath'));
|
|
||||||
} else {
|
|
||||||
window.location.replace(`/fr/person/household/${household_id}/summary`);
|
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 {
|
} else {
|
||||||
// we assume the answer was 422...
|
// we assume the answer was 422...
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-misc" href="{{chill_path_add_return_path('chill_person_household_members_editor', { 'persons': [ person.id ]}) }}">
|
<a class="btn btn-misc" href="{{chill_path_add_return_path('chill_person_household_members_editor', { 'persons': [ person.id ], 'followAfter': 'true'}) }}">
|
||||||
<i class="fa fa-sign-out"></i>
|
<i class="fa fa-sign-out"></i>
|
||||||
{{ 'household.Join'|trans }}
|
{{ 'household.Join'|trans }}
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user