backend pagination and sorting from laravel database release

This commit is contained in:
Peter Papp
2020-08-24 06:35:42 +02:00
parent 6dd0b4f026
commit cca832a1c1
46 changed files with 60 additions and 275 deletions

View File

@@ -137,7 +137,7 @@ export default {
},
computed: {
hasData() {
return this.data && this.data.data.length > 0 ? true : false
return this.data && this.data.data && this.data.data.length > 0
},
floatPages() {
return [(this.pageIndex - 1), this.pageIndex, (this.pageIndex + 1)];

View File

@@ -135,9 +135,7 @@
// Send request to get verify account
axios
.post('/api/settings/email', this.mail, {
_method: 'put'
})
.post('/api/settings/email', this.mail)
.then(() => {
events.$emit('toaster', {

View File

@@ -710,9 +710,7 @@
// Send request to get verify account
axios
.post('/api/settings/stripe', this.stripeCredentials, {
_method: 'put'
})
.post('/api/settings/stripe', this.stripeCredentials)
.then(() => {
// End loading

View File

@@ -6,7 +6,7 @@
<MobileHeader :title="$router.currentRoute.meta.title"/>
<PageHeader :title="$router.currentRoute.meta.title"/>
<div class="content-page">
<div class="content-page" v-if="config.stripe_public_key">
<DatatableWrapper @data="invoices = $event" @init="isLoading = false" api="/api/invoices" :paginator="false" :columns="columns" class="table">
<template slot-scope="{ row }">
<tr>

View File

@@ -6,7 +6,7 @@
<MobileHeader :title="$router.currentRoute.meta.title"/>
<PageHeader :title="$router.currentRoute.meta.title"/>
<div class="content-page">
<div class="content-page" v-if="config.stripe_public_key">
<div class="table-tools">
<div class="buttons">
<router-link :to="{name: 'PlanCreate'}">

View File

@@ -1,12 +1,12 @@
<template>
<PageTab :is-loading="isLoading">
<PageTabGroup v-if="PaymentMethods && PaymentMethods.length > 0">
<PageTabGroup>
<!--Page title-->
<FormLabel>{{ $t('user_payments.title') }}</FormLabel>
<!--Add payment method button-->
<div class="page-actions">
<div class="page-actions" v-if="PaymentMethods && PaymentMethods.length > 0">
<router-link :to="{name: 'CreatePaymentMethod'}">
<MobileActionButton icon="credit-card">
{{ $t('user_payments.add_card') }}
@@ -129,19 +129,6 @@
break
}
},
getCardStatus(status) {
switch (status) {
case 'active':
return 'Active'
break
case 'card_declined':
return 'Rejected'
break
case 'expired':
return 'Expired'
break
}
},
setDefaultCard(card) {
events.$emit('confirm:open', {
title: this.$t('popup_set_card.title'),
@@ -168,7 +155,7 @@
.then(response => {
if (response.status == 204) {
this.PaymentMethods = []
this.PaymentMethods = {}
}
if (response.status == 200) {