diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index 0106e65f1..29a3000be 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -30,15 +30,33 @@ -
-

Start, End Datum

-

Location

-

Strasse

-

Nr.

-

PLZ

-

Ort

-
+
+
+ + + + +
+ + + + + + + + + + + + + + + + Online +
+ category.id) : [], + eventStart: null, + eventEnd: new Date(), + eventLocation: '', + eventVenue: '', + eventOnline: true, + time1: null, + time2: null, + time3: null, }, formSchema: { title: { required: true, min: 3, max: 100 }, @@ -159,7 +206,7 @@ export default { imageBlurred: { required: false }, categoryIds: { type: 'array', - required: this.categoriesActive, + required: this.categoriesActive, validator: (_, value = []) => { if (this.categoriesActive && (value.length === 0 || value.length > 3)) { return [new Error(this.$t('common.validations.categories'))] @@ -193,11 +240,12 @@ export default { }, methods: { submit() { - if (creatEvent) { + if (creatEvent) { alert('EVENT speichern') return } let image = null + const { title, content, categoryIds } = this.formData if (this.formData.image) { image = { @@ -220,6 +268,8 @@ export default { id: this.contribution.id || null, image, groupId: this.groupId, + postType: 'Article', + eventInput: '$eventInput', }, }) .then(({ data }) => { diff --git a/webapp/package.json b/webapp/package.json index 0e999cdc2..fd16dd48f 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -60,6 +60,7 @@ "vue-observe-visibility": "^1.0.0", "vue-scrollto": "^2.20.0", "vue-sweetalert-icons": "~4.3.1", + "vue2-datepicker": "^3.11.1", "vuex-i18n": "~1.13.1", "xregexp": "^4.3.0", "zxcvbn": "^4.4.2" diff --git a/webapp/pages/post/create.vue b/webapp/pages/post/create.vue index a8b40d98b..ae3be907a 100644 --- a/webapp/pages/post/create.vue +++ b/webapp/pages/post/create.vue @@ -1,19 +1,21 @@