Basic implementation of payment methods
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
|
||||
contributingLocalGroups.value = props.event.contributingLocalGroups?.map(t => t.id) ?? []
|
||||
eatingHabits.value = props.event.eatingHabits?.map(t => t.id) ?? []
|
||||
paymentMethods.value = props.event.paymentMethods?.map(t => t.id) ?? []
|
||||
paymentMethods.value = props.event.paymentMethods?.map(t => t.slug) ?? []
|
||||
});
|
||||
|
||||
async function save() {
|
||||
@@ -218,7 +218,7 @@
|
||||
|
||||
<tr v-for="paymentMethod in dynmicProps.paymentMethods">
|
||||
<td>
|
||||
<input type="checkbox" :id="'paymentmethod' + paymentMethod.id" :value="paymentMethod.id" v-model="paymentMethods" />
|
||||
<input type="checkbox" :id="'paymentmethod' + paymentMethod.id" :value="paymentMethod.slug" v-model="paymentMethods" />
|
||||
<label style="padding-left: 5px;" :for="'paymentmethod' + paymentMethod.id">{{paymentMethod.name}}</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -16,6 +16,7 @@ const props = defineProps({
|
||||
event: Object,
|
||||
participantData: Object,
|
||||
localGroups: Array,
|
||||
paymentMethod: String,
|
||||
})
|
||||
|
||||
const emit = defineEmits(['registrationDone'])
|
||||
@@ -23,7 +24,7 @@ const emit = defineEmits(['registrationDone'])
|
||||
const {
|
||||
currentStep, goToStep, formData, selectedAddons,
|
||||
submit, submitting, submitResult, summaryLoading, summaryAmount
|
||||
} = useSignupForm(props.event, props.participantData)
|
||||
} = useSignupForm(props.event, props.participantData, props.paymentMethod)
|
||||
|
||||
const steps = [
|
||||
{ step: 1, label: 'Alter' },
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ref, reactive, computed } from 'vue'
|
||||
import axios from 'axios'
|
||||
|
||||
export function useSignupForm(event, participantData) {
|
||||
export function useSignupForm(event, participantData, paymentMethod) {
|
||||
const currentStep = ref(1)
|
||||
const submitting = ref(false)
|
||||
const summaryLoading = ref(false)
|
||||
@@ -11,6 +11,7 @@ export function useSignupForm(event, participantData) {
|
||||
|
||||
const formData = reactive({
|
||||
eatingHabit: 'EATING_HABIT_VEGAN',
|
||||
paymentMethod: paymentMethod ?? null,
|
||||
userId: participantData.id,
|
||||
eventId: event.id,
|
||||
vorname: participantData.firstname ?? '',
|
||||
|
||||
Reference in New Issue
Block a user