backend pagination and sorting from laravel database

This commit is contained in:
Peter Papp
2020-08-21 16:04:21 +02:00
parent 3e6e046dfc
commit 6dd0b4f026
37 changed files with 853 additions and 505 deletions
+10 -3
View File
@@ -358,6 +358,7 @@
this.errorMessage = error.response.data.message
}
// Show server error
if (error.response.status === 500) {
this.isError = true
this.errorMessage = error.response.data.message
@@ -452,16 +453,22 @@
// Get setup intent for stripe
axios.get('/api/stripe/setup-intent')
.then(response => this.clientSecret = response.data.client_secret)
.then(response => {
this.clientSecret = response.data.client_secret
})
.catch(() => this.$isSomethingWrong())
axios.get('/api/user/payments')
.then(response => {
this.defaultPaymentMethod = response.data.default
this.PaymentMethods = response.data.others
this.isLoading = false
})
.catch(() => this.$isSomethingWrong())
.finally(() => {
this.isLoading = false
}
)
}
}
</script>