Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Wallet.vue
Show First 20 Lines • Show All 369 Lines • ▼ Show 20 Lines | export default { | ||||
this.$nextTick().then(() => { | this.$nextTick().then(() => { | ||||
const type = nextForm == 'manual' ? 'oneoff' : 'recurring' | const type = nextForm == 'manual' ? 'oneoff' : 'recurring' | ||||
const loader = ['#payment-method', { 'min-height': '10em', small: false }] | const loader = ['#payment-method', { 'min-height': '10em', small: false }] | ||||
axios.get('/api/v4/payments/methods', { params: { type }, loader }) | axios.get('/api/v4/payments/methods', { params: { type }, loader }) | ||||
.then(response => { | .then(response => { | ||||
this.paymentMethods = response.data | this.paymentMethods = response.data | ||||
if (this.paymentMethods.length == 1) { | |||||
this.nextForm = 'auto'; | |||||
this.selectPaymentMethod(this.paymentMethods[0]); | |||||
} | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
autoPaymentForm(event, title) { | autoPaymentForm(event, title) { | ||||
this.paymentForm = 'auto' | this.paymentForm = 'auto' | ||||
this.paymentDialogTitle = title | this.paymentDialogTitle = title | ||||
this.formLock = false | this.formLock = false | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |