diff --git a/src/Bundle/ChillMainBundle/Resources/public/modules/vue/components/App.vue b/src/Bundle/ChillMainBundle/Resources/public/modules/vue/components/App.vue
deleted file mode 100644
index 7cab5069c..000000000
--- a/src/Bundle/ChillMainBundle/Resources/public/modules/vue/components/App.vue
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/Bundle/ChillMainBundle/Resources/public/modules/vue/index.js b/src/Bundle/ChillMainBundle/Resources/public/modules/vue/index.js
index bc25630d9..f631d1d0b 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/modules/vue/index.js
+++ b/src/Bundle/ChillMainBundle/Resources/public/modules/vue/index.js
@@ -1,5 +1,5 @@
import Vue from 'vue'
-import App from './components/App.vue'
+import App from 'ChillPersonAssets/js/AccompanyingCourse.vue'
new Vue({
el: '#app',
diff --git a/src/Bundle/ChillMainBundle/chill.webpack.config.js b/src/Bundle/ChillMainBundle/chill.webpack.config.js
index aa9286014..540900853 100644
--- a/src/Bundle/ChillMainBundle/chill.webpack.config.js
+++ b/src/Bundle/ChillMainBundle/chill.webpack.config.js
@@ -44,6 +44,7 @@ module.exports = function(encore, entries)
// Aliases are used when webpack is trying to resolve modules path
encore.addAliases({
+ ChillMainAssets: __dirname + '/Resources/public',
ChillMainSass: __dirname + '/Resources/public/modules/scratch',
ShowHide: __dirname + '/Resources/public/modules/show_hide'
});
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/js/AccompanyingCourse.vue b/src/Bundle/ChillPersonBundle/Resources/public/js/AccompanyingCourse.vue
new file mode 100644
index 000000000..fbc7747db
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/public/js/AccompanyingCourse.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
diff --git a/src/Bundle/ChillMainBundle/Resources/public/modules/vue/components/AccompanyingCourse.vue b/src/Bundle/ChillPersonBundle/Resources/public/js/components/PersonsAssociated.vue
similarity index 74%
rename from src/Bundle/ChillMainBundle/Resources/public/modules/vue/components/AccompanyingCourse.vue
rename to src/Bundle/ChillPersonBundle/Resources/public/js/components/PersonsAssociated.vue
index f2d42e866..d2c29b82e 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/modules/vue/components/AccompanyingCourse.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/js/components/PersonsAssociated.vue
@@ -1,16 +1,17 @@
+
Usagers concernés
- id
- - {{ accompanying_course.id }}
+ - {{ persons_associated.id }}
- opening_date
- - {{ accompanying_course.opening_date }}
+ - {{ persons_associated.opening_date }}
- closing_date
- - {{ accompanying_course.closing_date }}
+ - {{ persons_associated.closing_date }}
- remark
- - {{ accompanying_course.remark }}
+ - {{ persons_associated.remark }}
- closing_motive
- - {{ accompanying_course.closing_motive }}
+ - {{ persons_associated.closing_motive }}
@@ -24,7 +25,7 @@
-
+
{{ person.firstname }} |
{{ person.lastname }} |
{{ person.startdate }} |
@@ -56,7 +57,7 @@
export default{
data () {
return {
- accompanying_course: []
+ persons_associated: []
}
},
http: {
@@ -64,17 +65,17 @@
},
methods: {
addPerson(){
- this.accompanying_course.persons.push({"firstname": "Lisa", "lastname": "Simpson", "startdate": "1975-09-15", "enddate": "2021-04-20" })
+ this.persons_associated.persons.push({"firstname": "Lisa", "lastname": "Simpson", "startdate": "1975-09-15", "enddate": "2021-04-20" })
}
},
computed: {
counter() {
- return this.accompanying_course.persons.length
+ return this.persons_associated.persons.length
}
},
- mounted() {
+ created() {
this.$resource('parcours/861/show').get().then((response) => {
- this.accompanying_course = response.data
+ this.persons_associated = response.data
}, (response) => {
console.log('erreur', response);
})
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig
index c3d8a4b8c..08c3b2b40 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig
@@ -22,11 +22,10 @@ usagers:
{% endfor %}
{{ dump() }}
+ {% verbatim %}{% endverbatim %}
#}
- {% verbatim %}
-
- {% endverbatim %}
+
{{ encore_entry_script_tags('vuejs') }}
{% endblock %}
diff --git a/src/Bundle/ChillPersonBundle/chill.webpack.config.js b/src/Bundle/ChillPersonBundle/chill.webpack.config.js
index 724184f63..b1957108f 100644
--- a/src/Bundle/ChillPersonBundle/chill.webpack.config.js
+++ b/src/Bundle/ChillPersonBundle/chill.webpack.config.js
@@ -1,4 +1,10 @@
// this file loads all assets from the Chill person bundle
-module.exports = function(encore, entries) {
+module.exports = function(encore, entries)
+{
entries.push(__dirname + '/Resources/public/index.js');
+
+ // Aliases are used when webpack is trying to resolve modules path
+ encore.addAliases({
+ ChillPersonAssets: __dirname + '/Resources/public'
+ });
};