diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location.vue index 0dbf2652a..30a1c5bd9 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location.vue +++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location.vue @@ -20,7 +20,7 @@ v-model="location"> - + @@ -30,7 +30,7 @@ import { mapState } from "vuex"; import VueMultiselect from 'vue-multiselect'; import NewLocation from './Location/NewLocation.vue'; -import { getLocations, postLocation } from '../api.js'; +import { getLocations } from '../api.js'; export default { name: "Location", @@ -67,29 +67,6 @@ export default { }, customLabel(value) { return `${value.locationType.title.fr} ${value.name}`; - }, - saveNewLocation(selected) { - console.log('saveNewLocation', selected); - let body = { - type: 'location', - name: selected.name, - address: { - id: selected.addressId - }, - locationType: { - id: selected.type, - type: 'location-type' - }, - phonenumber1: selected.phonenumber1, - phonenumber2: selected.phonenumber2, - email: selected.email, - } - postLocation(body).then(location => new Promise(resolve => { - console.log('postLocation', location); - this.locations.push(location); - this.$store.dispatch('updateLocation', location); - resolve(); - })); } } } diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location/NewLocation.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location/NewLocation.vue index 3ffb2a33f..2515e37fc 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location/NewLocation.vue +++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location/NewLocation.vue @@ -1,75 +1,86 @@ + + + + + {{ $t('activity.create_new_location') }} + + + - - - - {{ $t('activity.create_new_location') }} - - - + + - - + + {{ $t('activity.create_new_location') }} + + + + + + {{ $t('activity.errors') }} + + {{ error }} + + + - - {{ $t('activity.create_new_location') }} - - + + + {{ $t('activity.choose_location_type') }} + + {{ t.title.fr }} + + + {{ $t('activity.location_fields.type') }} + - - + + + {{ $t('activity.location_fields.name') }} + - - - {{ $t('activity.location_fields.name') }} - + + - - - {{ $t('activity.choose_location_type') }} - - {{ t.title.fr }} - - - {{ $t('activity.location_fields.type') }} - + + + {{ $t('activity.location_fields.phonenumber1') }} + + + + {{ $t('activity.location_fields.phonenumber2') }} + + + + {{ $t('activity.location_fields.email') }} + + + + + + {{ $t('action.save') }} + + - - - {{ $t('activity.location_fields.phonenumber1') }} - - - - {{ $t('activity.location_fields.phonenumber2') }} - - - - {{ $t('activity.location_fields.email') }} - - - - - - {{ $t('action.save') }} - - - - - + + +
+ {{ $t('activity.errors') }} +