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"
style="z-index: 20"
></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 class="chipbox" style="margin-top: 10px">
<ds-chip size="base" :color="errors && errors.eventStart && 'danger'">
@ -71,7 +66,12 @@
</ds-grid>
<ds-grid>
<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">
<ds-chip size="base" :color="errors && errors.eventLocationName && 'danger'">
{{ formData.eventLocationName.length }}/{{ formSchema.eventLocationName.max }}
@ -252,9 +252,9 @@ export default {
return []
},
},
eventStart: { required: this.creatEvent ? true : false },
eventVenue: { required: this.creatEvent ? true : false, min: 3, max: 100 },
eventLocationName: { required: this.creatEvent ? true : false, min: 3, max: 100 },
eventStart: { required: !!this.creatEvent },
eventVenue: { required: !!this.creatEvent, min: 3, max: 100 },
eventLocationName: { required: !!this.creatEvent, min: 3, max: 100 },
},
loading: false,
users: [],
@ -277,7 +277,7 @@ export default {
// TODO: eventLocationName: this.formData.eventLocationName,
eventVenue: this.formData.eventVenue,
// TODO: eventIsOnline: this.formData.eventIsOnline,
eventLocation: JSON.stringify(this.formData.eventLocation)
eventLocation: JSON.stringify(this.formData.eventLocation),
}
}
return undefined
@ -314,7 +314,6 @@ export default {
}
}
this.loading = true
alert(JSON.stringify(this.eventInput))
this.$apollo
.mutate({
@ -331,7 +330,6 @@ export default {
},
})
.then(({ data }) => {
console.log(data)
this.loading = false
this.$toast.success(this.$t('contribution.success'))
const result = data[this.contribution.id ? 'UpdatePost' : 'CreatePost']
@ -342,7 +340,6 @@ export default {
})
})
.catch((err) => {
console.error(data)
this.$toast.error(err.message)
this.loading = false
})