Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RES-1994 Can't add volunteer to past event #742

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions resources/js/components/EventAddVolunteerModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ export default {
user: null,
fullName: null,
volunteerEmailAddress: null,
groupVolunteers: []
groupId: null,
}
},
computed: {
groupVolunteers() {
return this.groupId ? this.$store.getters['volunteers/byGroup'](this.groupId) : []
},
options() {
const ret = [
{
Expand All @@ -63,7 +66,7 @@ export default {

this.groupVolunteers.forEach((v) => {
ret.push({
value: v.id,
value: v.user,
text: v.name
})
})
Expand Down Expand Up @@ -110,11 +113,12 @@ export default {
methods: {
async show() {
// Get the list of volunteers.
this.$store.dispatch('volunteers/fetchGroup', this.idgroups)
const event = await this.$store.dispatch('events/fetch', {
id: this.idevents
})

if (ret && ret.data) {
this.groupVolunteers = ret.data
}
this.groupId = event.group.id
await this.$store.dispatch('volunteers/fetchGroup', this.groupId)

this.showModal = true
},
Expand Down
Loading