diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml index a0dda4dc0..973dc6ac5 100644 --- a/deployment/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -65,10 +65,10 @@ services: backend: image: ocelotsocialnetwork/backend-branded:local-${CONFIGURATION} - container_name: backend + container_name: backend-branded build: dockerfile: src/docker/backend.Dockerfile - target: branded-branded + target: branded context: . args: - CONFIGURATION=$CONFIGURATION @@ -143,7 +143,7 @@ services: neo4j: image: ocelotsocialnetwork/neo4j-community:latest - container_name: neo4j + container_name: neo4j-branded networks: - test-network volumes: diff --git a/webapp/components/CategoriesSelect/CategoriesSelect.vue b/webapp/components/CategoriesSelect/CategoriesSelect.vue index 4f7a555a3..91fb7704c 100644 --- a/webapp/components/CategoriesSelect/CategoriesSelect.vue +++ b/webapp/components/CategoriesSelect/CategoriesSelect.vue @@ -43,6 +43,14 @@ export default { selectedCategoryIds: this.existingCategoryIds, } }, + watch: { + existingCategoryIds() { + if (!this.selectedCategoryIds.length && this.existingCategoryIds.length) { + this.selectedCategoryIds = this.existingCategoryIds + this.$forceUpdate() + } + }, + }, computed: { selectedCount() { return this.selectedCategoryIds.length diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index 1a9c8b168..c6d4b6203 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -304,8 +304,14 @@ export default { groupName() { return this.group && this.group.name }, - eventStartFake() { - return this.formData.eventStart + groupCategories() { + return this.group && this.group.categories + }, + }, + watch: { + groupCategories() { + if (!this.formData.categoryIds.length && this.groupCategories) + this.formData.categoryIds = this.groupCategories.map((cat) => cat.id) }, }, methods: { diff --git a/webapp/components/Group/GroupForm.vue b/webapp/components/Group/GroupForm.vue index cb407a3d9..52437d644 100644 --- a/webapp/components/Group/GroupForm.vue +++ b/webapp/components/Group/GroupForm.vue @@ -37,8 +37,6 @@ {{ $t('group.type') }} - - - - + { + let wrapper + let mocks + + beforeEach(() => { + mocks = { + $t: jest.fn(), + } + }) + + describe('mount', () => { + const Wrapper = () => { + return shallowMount(ActionRadiusSelect, { propsData, mocks, localVue }) + } + + beforeEach(() => { + wrapper = Wrapper() + }) + it('renders the select', () => { + expect(wrapper.findComponent(ActionRadiusSelect).exists()).toBe(true) + }) + + describe('when an option is selected', () => { + it('emits a change event with the new value', () => { + const select = wrapper.find('select') + select.trigger('change') + expect(wrapper.emitted().change[0]).toEqual(['regional']) + }) + }) + }) +}) diff --git a/webapp/components/Select/ActionRadiusSelect.vue b/webapp/components/Select/ActionRadiusSelect.vue new file mode 100644 index 000000000..0a090e0a5 --- /dev/null +++ b/webapp/components/Select/ActionRadiusSelect.vue @@ -0,0 +1,33 @@ + + + diff --git a/webapp/graphql/groups.js b/webapp/graphql/groups.js index bb5292675..6aedc205d 100644 --- a/webapp/graphql/groups.js +++ b/webapp/graphql/groups.js @@ -207,6 +207,9 @@ export const groupMembersQuery = () => { name slug myRoleInGroup + avatar { + url + } } } `