#16 pass default variables to add-address component when it is called from another vue component

This commit is contained in:
2022-11-17 16:12:30 +01:00
parent e90782500b
commit 3ca46efd2c
12 changed files with 18 additions and 4 deletions

View File

@@ -117,7 +117,8 @@ export default {
target: { //name, id
},
edit: false,
addressId: null
addressId: null,
defaults: window.addaddress
}
}
}

View File

@@ -22,6 +22,7 @@
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
});
window.activity = {{ activity_json|json_encode|raw }};
window.addaddress = {{ add_address|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}

View File

@@ -37,6 +37,7 @@
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
});
window.activity = {{ activity_json|json_encode|raw }};
window.addaddress = {{ add_address|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}

View File

@@ -18,6 +18,7 @@
{{ encore_entry_script_tags('mod_async_upload') }}
<script type="text/javascript">
window.activity = {{ activity_json|json_encode|raw }};
window.addaddress = {{ add_address|json_encode|raw }};
{% if default_location is not null %}window.default_location_id = {{ default_location.id }}{% endif %};
</script>
{{ encore_entry_script_tags('vue_activity') }}

View File

@@ -21,6 +21,7 @@
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
});
window.activity = {{ activity_json|json_encode|raw }};
window.addaddress = {{ add_address|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}