first step for events

This commit is contained in:
ogerly 2023-04-05 10:24:58 +02:00
parent 992b2fc849
commit d2fec8ea2f
4 changed files with 46 additions and 3 deletions

View File

@ -30,6 +30,15 @@
<base-icon name="question-circle" />
</page-params-link>
</div>
<div>
<h1 class="text-h1" v-if="creatEvent">Start, End Datum</h1>
<h1 class="text-h1" v-if="creatEvent">Location</h1>
<h1 class="text-h1" v-if="creatEvent">Strasse</h1>
<h1 class="text-h1" v-if="creatEvent">Nr.</h1>
<h1 class="text-h1" v-if="creatEvent">PLZ</h1>
<h1 class="text-h1" v-if="creatEvent">Ort</h1>
</div>
<ds-input
model="title"
:placeholder="$t('contribution.title')"
@ -119,6 +128,10 @@ export default {
type: Object,
default: () => null,
},
creatEvent: {
type: Boolean,
default: false,
}
},
data() {
const { title, content, image, categories } = this.contribution
@ -180,6 +193,10 @@ export default {
},
methods: {
submit() {
if (creatEvent) {
alert('EVENT speichern')
return
}
let image = null
const { title, content, categoryIds } = this.formData
if (this.formData.image) {

View File

@ -278,6 +278,7 @@
"inappropriatePicture": "Dieses Bild kann für einige Menschen unangemessen sein.",
"languageSelectLabel": "Sprache Deines Beitrags",
"languageSelectText": "Sprache wählen",
"newEvent": "Erstelle einen neue Veranstaltung",
"newPost": "Erstelle einen neuen Beitrag",
"success": "Gespeichert!",
"teaserImage": {
@ -684,6 +685,12 @@
"submitted": "Kommentar gesendet",
"updated": "Änderungen gespeichert"
},
"createNewEvent": {
"forGroup": {
"title": "Für die Gruppe „{name}“"
},
"title": "Erstelle ein neues Event"
},
"createNewPost": {
"forGroup": {
"title": "Für die Gruppe „{name}“"
@ -706,6 +713,7 @@
"unpinnedSuccessfully": "Angehefteten Beitrag erfolgreich losgelöst!"
},
"name": "Beitrag",
"event":"Veranstaltung",
"pinned": "Meldung",
"takeAction": {
"name": "Aktiv werden"

View File

@ -278,6 +278,7 @@
"inappropriatePicture": "This image may be inappropriate for some people.",
"languageSelectLabel": "Language of your contribution",
"languageSelectText": "Select Language",
"newEvent": "Create a new Event",
"newPost": "Create a new Post",
"success": "Saved!",
"teaserImage": {
@ -684,6 +685,12 @@
"submitted": "Comment submitted!",
"updated": "Changes saved!"
},
"createNewEvent": {
"forGroup": {
"title": "For The Group “{name}”"
},
"title": "Create A New Event"
},
"createNewPost": {
"forGroup": {
"title": "For The Group “{name}”"
@ -706,6 +713,7 @@
"unpinnedSuccessfully": "Post unpinned successfully!"
},
"name": "Post",
"event":"Event",
"pinned": "Announcement",
"takeAction": {
"name": "Take action"

View File

@ -1,15 +1,24 @@
<template>
<div>
<ds-space margin="small">
<ds-heading tag="h1">{{ $t('post.createNewPost.title') }}</ds-heading>
<ds-heading v-if="group" tag="h2">
<ds-grid :min-column-width="200">
<ds-grid-item>
<ds-heading tag="h1">{{ creatEvent ? $t('post.createNewEvent.title') : $t('post.createNewPost.title') }}</ds-heading>
<ds-heading v-if="group" tag="h2">
{{ $t('post.createNewPost.forGroup.title', { name: group.name }) }}
</ds-heading>
</ds-grid-item>
<ds-grid-item>
<ds-button size="x-large" @click="creatEvent = !creatEvent">{{ creatEvent ? $t('post.name') : $t('post.event') }}</ds-button>
</ds-grid-item>
</ds-grid>
</ds-space>
<ds-space margin="large" />
<ds-flex :width="{ base: '100%' }" gutter="base">
<ds-flex-item :width="{ base: '100%', md: 5 }">
<contribution-form :group="group" />
<contribution-form :group="group" :creatEvent="creatEvent" />
</ds-flex-item>
<ds-flex-item :width="{ base: '100%', md: 1 }">&nbsp;</ds-flex-item>
</ds-flex>
@ -28,6 +37,7 @@ export default {
const { groupId = null } = this.$route.query
return {
groupId,
creatEvent: false,
}
},
computed: {