mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
fix error in afterLastPaneAction
This commit is contained in:
parent
f3b755e46e
commit
3f3dd83132
@ -415,18 +415,25 @@ export default {
|
|||||||
this.flag.datePane = false;
|
this.flag.datePane = false;
|
||||||
this.openShowPane();
|
this.openShowPane();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/*
|
||||||
|
* What happens when submitting last Pane:
|
||||||
|
* - redirect or reset pane,
|
||||||
|
* - change context to editing
|
||||||
|
*/
|
||||||
afterLastPaneAction(params) {
|
afterLastPaneAction(params) {
|
||||||
this.initForm();
|
this.initForm();
|
||||||
// redirect or reset pane
|
|
||||||
if (this.options.forceRedirect === true) {
|
if (this.options.forceRedirect === true) {
|
||||||
console.log("redirect to backUrl");
|
console.log("redirect to backUrl");
|
||||||
window.location.assign(this.context.backUrl);
|
window.location.assign(this.context.backUrl);
|
||||||
} else {
|
} else {
|
||||||
console.log("don't redirect, adapt context");
|
console.log("don't redirect");
|
||||||
this.resetPane();
|
this.resetPane();
|
||||||
// change to edit context
|
if (!this.context.edit) {
|
||||||
this.context.edit = true;
|
this.context.edit = true;
|
||||||
this.context.addressId = params.addressId;
|
this.context.addressId = params.addressId;
|
||||||
|
console.log("context is now edit, with address", params.addressId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -30,11 +30,11 @@
|
|||||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||||
targetEntity: { name: 'person', id: person.id },
|
targetEntity: { name: 'person', id: person.id },
|
||||||
backUrl: path('chill_person_address_list', { 'person_id': person.id }),
|
backUrl: path('chill_person_address_list', { 'person_id': person.id }),
|
||||||
useValidFrom: true,
|
|
||||||
openPanesInModal: false,
|
openPanesInModal: false,
|
||||||
stickyActions: true,
|
stickyActions: true,
|
||||||
} %}
|
} %}
|
||||||
{#
|
{#
|
||||||
|
useValidFrom: true,
|
||||||
#}
|
#}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user