diff --git a/src/Bundle/ChillPersonBundle/Resources/public/js/AccompanyingCourse.js b/src/Bundle/ChillPersonBundle/Resources/public/js/AccompanyingCourse.js new file mode 100644 index 000000000..70ae23168 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/public/js/AccompanyingCourse.js @@ -0,0 +1,20 @@ + +import Vue from 'vue'; + +const AccompanyingCourseComponent = { + data() { + return { + id: 7, + persons_associated: [] + }; + }, +}; + +let app = Vue.CreateApp({ + delimiters: ['${', '}'] +}) + .component(AccompanyingCourseComponent) +; + + +app.mount('#app'); diff --git a/src/Bundle/ChillPersonBundle/Resources/public/js/AccompanyingCourse.vue b/src/Bundle/ChillPersonBundle/Resources/public/js/AccompanyingCourse.vue index 1f8a7ba03..4a1bc5a5c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/js/AccompanyingCourse.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/js/AccompanyingCourse.vue @@ -1,16 +1,105 @@ + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/js/index.js b/src/Bundle/ChillPersonBundle/Resources/public/js/index.js index 8602629a2..bdcdfe6a8 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/js/index.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/js/index.js @@ -1,7 +1,10 @@ -import Vue from 'vue' -import App from './AccompanyingCourse.vue' +import AccompanyingCourseComponent from './AccompanyingCourse.vue'; +import { createApp } from 'vue'; -new Vue({ - el: '#app', - render: h => h(App) -}); + +const app = createApp({ + name: 'AccCourseGlobal', + template: '
', +}) +.component('accompanying-course', AccompanyingCourseComponent) +.mount('#app'); diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig index 0d6c926a9..4b6321998 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig @@ -8,81 +8,14 @@

{{ block('title') }}

-{# -
-{{ accompanyingCourse.id }}
-{{ accompanyingCourse.openingDate|format_date('short') }}
-{{ accompanyingCourse.closingDate|format_date('short') }}
-{{ accompanyingCourse.closingMotive|chill_entity_render_box }}
-{{ accompanyingCourse.remark|raw }}
-{{ accompanyingCourse.user }}
-usagers:
-{% for p in accompanyingCourse.participations %}
-    {{ p.person.id }} | {{ p.person.fullnamecanonical }} | {{ p.startdate|format_date('short') }} | {{ p.enddate|format_date('short') }}
-{% endfor %}
-    
- {{ dump() }} - {% verbatim %}{% endverbatim %} -#} - -
+ + - - - +
+ {{ encore_entry_script_tags('accompanying_course') }} {% endblock %}