mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
#16 pass default variables to add-address component when it is called from another vue component
This commit is contained in:
parent
e90782500b
commit
3ca46efd2c
@ -117,7 +117,8 @@ export default {
|
||||
target: { //name, id
|
||||
},
|
||||
edit: false,
|
||||
addressId: null
|
||||
addressId: null,
|
||||
defaults: window.addaddress
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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') }}
|
||||
|
@ -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 %}
|
||||
|
@ -109,6 +109,7 @@
|
||||
});
|
||||
chill.categoryLinkParentChildSelect();
|
||||
});
|
||||
window.addaddress = {{ add_address|json_encode|raw }};
|
||||
</script>
|
||||
|
||||
{% block js %}<!-- nothing added to js -->{% endblock %}
|
||||
|
@ -164,7 +164,8 @@ export default {
|
||||
id: this.accompanyingCourse.id
|
||||
},
|
||||
edit: false,
|
||||
addressId: null
|
||||
addressId: null,
|
||||
defaults: window.addaddress
|
||||
}
|
||||
if (this.accompanyingCourse.location) {
|
||||
context['edit'] = true;
|
||||
|
@ -5,6 +5,7 @@ import { fetchHouseholdByAddressReference } from 'ChillPersonAssets/lib/househol
|
||||
import { datetimeToISO, dateToISO, ISOToDate } from 'ChillMainAssets/chill/js/date.js';
|
||||
|
||||
const debug = process.env.NODE_ENV !== 'production';
|
||||
//console.log('AJAJAJA', window.addaddress);
|
||||
|
||||
const concerned = window.household_members_editor_data.persons.map(p => {
|
||||
return {
|
||||
@ -115,6 +116,7 @@ const store = createStore({
|
||||
name: state.household.type,
|
||||
id: state.household.id
|
||||
},
|
||||
defaults: window.addaddress,
|
||||
suggestions: state.addressesSuggestion
|
||||
};
|
||||
} else {
|
||||
@ -125,6 +127,7 @@ const store = createStore({
|
||||
name: state.household.type,
|
||||
id: state.household.id
|
||||
},
|
||||
defaults: window.addaddress,
|
||||
};
|
||||
}
|
||||
},
|
||||
|
@ -201,7 +201,8 @@ export default {
|
||||
context: {
|
||||
target: {}, // boilerplate for getting the address id
|
||||
edit: false,
|
||||
addressId: null
|
||||
addressId: null,
|
||||
defaults: window.addaddress
|
||||
}
|
||||
},
|
||||
errors: []
|
||||
|
@ -10,6 +10,7 @@
|
||||
<script type="text/javascript">
|
||||
window.accompanyingCourseId = {{ accompanyingCourse.id|e('js') }};
|
||||
window.vueRootComponent = 'app';
|
||||
window.addaddress = {{ add_address|json_encode|raw }};
|
||||
</script>
|
||||
{{ encore_entry_script_tags('vue_accourse') }}
|
||||
{% endblock %}
|
||||
|
@ -19,6 +19,7 @@
|
||||
<script type="text/javascript">
|
||||
window.household_members_editor_data = {{ data|json_encode|raw }};
|
||||
window.household_members_editor_expand_suggestions = {{ expandSuggestions }};
|
||||
window.addaddress = {{ add_address|json_encode|raw }};
|
||||
</script>
|
||||
{{ encore_entry_script_tags('vue_household_members_editor') }}
|
||||
{% endblock %}
|
||||
|
@ -232,7 +232,8 @@ export default {
|
||||
id: this.id
|
||||
},
|
||||
edit: false,
|
||||
addressId: null
|
||||
addressId: null,
|
||||
defaults: window.addaddress
|
||||
};
|
||||
if ( !(this.thirdparty.address === undefined || this.thirdparty.address === null)
|
||||
&& this.thirdparty.address.address_id !== null
|
||||
|
Loading…
x
Reference in New Issue
Block a user