diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 295eb3e0e..68b1bcf08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,9 @@ before_script: - curl -sS https://getcomposer.org/installer | php - php -d memory_limit=2G composer.phar install - php tests/app/bin/console doctrine:migrations:migrate -n - - php -d memory_limit=2G tests/app/bin/console doctrine:fixtures:load -n + - php -d memory_limit=2G tests/app/bin/console cache:clear --env=dev + - php -d memory_limit=3G tests/app/bin/console doctrine:fixtures:load -n + - php -d memory_limit=2G tests/app/bin/console cache:clear --env=test - echo "before_script finished" # Bring in any services we need http://docs.gitlab.com/ee/ci/docker/using_docker_images.html#what-is-a-service diff --git a/.gitlab/merge_request_templates/Default merge request.md b/.gitlab/merge_request_templates/Default merge request.md new file mode 100644 index 000000000..5d62f91eb --- /dev/null +++ b/.gitlab/merge_request_templates/Default merge request.md @@ -0,0 +1,24 @@ + +# Description of changes + + + + +# Issues related + + + +* ... +* ... + +# Tests + + + diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityType.php b/src/Bundle/ChillActivityBundle/Form/ActivityType.php index 19d53c262..5ef08832d 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityType.php @@ -313,7 +313,7 @@ class ActivityType extends AbstractType } return $location->getId(); }, - function (?string $id): Location { + function (?string $id): ?Location { return $this->om->getRepository(Location::class)->findOneBy(['id' => (int) $id]); } )) 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..c8d1472bd 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", @@ -66,30 +66,7 @@ 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(); - })); + return `${value.locationType.title.fr} ${value.name ? value.name : ''}`; } } } 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..2920e15b2 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,87 @@