Skip to content

Commit

Permalink
fix(events): give warning when creating select question without values (
Browse files Browse the repository at this point in the history
#2261)

Also fixes many other small things for the events with mandatory fields and typos
  • Loading branch information
LeonVreling authored Dec 7, 2024
1 parent a2320c3 commit 7ac211b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/views/events/Apply.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
I agree with my personal data to be processed
by AEGEE-Europe for the purposes of the participant selection
and event organisation. AEGEE-Europe will disclose this data
to organising local for the time period of the event organisation.
to organising local for the time period of the event organisation.<span class="has-text-danger">*</span>
<input type="checkbox" required v-model="application.agreed_to_privacy_policy" />
</label>
<p class="help is-danger" v-if="errors.agreed_to_privacy_policy">{{ errors.agreed_to_privacy_policy.join(', ') }}</p>
Expand Down
8 changes: 7 additions & 1 deletion src/views/events/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
<tr>
<th>Description <span class="has-text-danger">*</span></th>
<th>Type <span class="has-text-danger">*</span></th>
<th>Required (works for text and string)?</th>
<th>Required?</th>
<th>Values (for select)</th>
<th />
</tr>
Expand Down Expand Up @@ -793,6 +793,12 @@ export default {
return this.$root.showError('Please add at least one organizer.')
}
for (const question of this.event.questions) {
if (question.type === 'select' && question.values.length === 0) {
return this.$root.showError('Please set values for select questions.')
}
}
this.isSaving = true
this.errors = {}
Expand Down
2 changes: 1 addition & 1 deletion src/views/events/Single.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@

<div class="notification is-info" v-if="event.status === 'draft'">
<p>
This event is in the "draft" status. Once you'll fill all the fields in,
This event is in the "draft" status. Once you have filled in all the fields,
you can send it to EQAC approval.
</p>
</div>
Expand Down

0 comments on commit 7ac211b

Please sign in to comment.