add serializer to activityController

This commit is contained in:
2021-05-27 16:13:22 +02:00
parent 968e6914b2
commit b89cffce68
5 changed files with 37 additions and 1 deletions

View File

@@ -6,15 +6,27 @@
{% block content %}
{% include 'ChillActivityBundle:Activity:new.html.twig' %}
{{ dump() }}
{% endblock %}
{% block js %}
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script>
<script type="text/javascript">
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
window.activity =
{
"type": "activity",
"persons": [],
""
};
{#
{{ activity_json|e('json') }};
#}
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}
{% block css %}
<link rel="stylesheet" href="{{ asset('build/async_upload.css') }}"/>
{{ encore_entry_link_tags('vue_activity') }}
{% endblock %}

View File

@@ -12,9 +12,12 @@
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script>
<script type="text/javascript">
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
window.activity = {{ activity_json|e('json') }};
</script>
{{ encore_entry_script_tags('vue_activity') }}
{% endblock %}
{% block css %}
<link rel="stylesheet" href="{{ asset('build/async_upload.css') }}"/>
{{ encore_entry_link_tags('vue_activity') }}
{% endblock %}