This commit is contained in:
ogerly 2023-04-24 14:20:36 +02:00
parent 1ba79343fe
commit e172fe917a
2 changed files with 50 additions and 53 deletions

View File

@ -45,11 +45,6 @@
formmat="DD-MM-YYYY HH:mm" formmat="DD-MM-YYYY HH:mm"
style="z-index: 20" style="z-index: 20"
></date-picker> ></date-picker>
<!-- <ds-input
model="formData.eventStart"
v-model="formData.eventStart"
style="position: absolute; min-width: 300px; margin-top: -38px; z-index: 0"
/> -->
</div> </div>
<div class="chipbox" style="margin-top: 10px"> <div class="chipbox" style="margin-top: 10px">
<ds-chip size="base" :color="errors && errors.eventStart && 'danger'"> <ds-chip size="base" :color="errors && errors.eventStart && 'danger'">
@ -71,7 +66,12 @@
</ds-grid> </ds-grid>
<ds-grid> <ds-grid>
<ds-grid-item style="grid-row-end: span 3"> <ds-grid-item style="grid-row-end: span 3">
<ds-input model="eventLocationName" name="location" placeholder="Location" size="large" /> <ds-input
model="eventLocationName"
name="location"
placeholder="Location"
size="large"
/>
<div class="chipbox"> <div class="chipbox">
<ds-chip size="base" :color="errors && errors.eventLocationName && 'danger'"> <ds-chip size="base" :color="errors && errors.eventLocationName && 'danger'">
{{ formData.eventLocationName.length }}/{{ formSchema.eventLocationName.max }} {{ formData.eventLocationName.length }}/{{ formSchema.eventLocationName.max }}
@ -252,9 +252,9 @@ export default {
return [] return []
}, },
}, },
eventStart: { required: this.creatEvent ? true : false }, eventStart: { required: !!this.creatEvent },
eventVenue: { required: this.creatEvent ? true : false, min: 3, max: 100 }, eventVenue: { required: !!this.creatEvent, min: 3, max: 100 },
eventLocationName: { required: this.creatEvent ? true : false, min: 3, max: 100 }, eventLocationName: { required: !!this.creatEvent, min: 3, max: 100 },
}, },
loading: false, loading: false,
users: [], users: [],
@ -277,7 +277,7 @@ export default {
// TODO: eventLocationName: this.formData.eventLocationName, // TODO: eventLocationName: this.formData.eventLocationName,
eventVenue: this.formData.eventVenue, eventVenue: this.formData.eventVenue,
// TODO: eventIsOnline: this.formData.eventIsOnline, // TODO: eventIsOnline: this.formData.eventIsOnline,
eventLocation: JSON.stringify(this.formData.eventLocation) eventLocation: JSON.stringify(this.formData.eventLocation),
} }
} }
return undefined return undefined
@ -314,7 +314,6 @@ export default {
} }
} }
this.loading = true this.loading = true
alert(JSON.stringify(this.eventInput))
this.$apollo this.$apollo
.mutate({ .mutate({
@ -331,7 +330,6 @@ export default {
}, },
}) })
.then(({ data }) => { .then(({ data }) => {
console.log(data)
this.loading = false this.loading = false
this.$toast.success(this.$t('contribution.success')) this.$toast.success(this.$t('contribution.success'))
const result = data[this.contribution.id ? 'UpdatePost' : 'CreatePost'] const result = data[this.contribution.id ? 'UpdatePost' : 'CreatePost']
@ -342,7 +340,6 @@ export default {
}) })
}) })
.catch((err) => { .catch((err) => {
console.error(data)
this.$toast.error(err.message) this.$toast.error(err.message)
this.loading = false this.loading = false
}) })