frontend & backend update

This commit is contained in:
carodej
2020-06-19 08:03:29 +02:00
parent 95bc310def
commit a2cab6198e
83 changed files with 4464 additions and 1907 deletions

View File

@@ -27,12 +27,7 @@
</td>
<td>
<span class="cell-item">
{{ row.data.attributes.payments_processed }}
</span>
</td>
<td>
<span class="cell-item">
{{ row.data.attributes.active_subscribers }}
{{ row.data.attributes.payment_processed }}
</span>
</td>
<td>
@@ -100,12 +95,7 @@
},
{
label: 'Payments Processed',
field: 'data.attributes.payments_processed',
sortable: true
},
{
label: 'Active Subscribers',
field: 'data.attributes.active_subscribers',
field: 'data.attributes.payment_processed',
sortable: true
},
{

View File

@@ -1,47 +1,68 @@
<template>
<PageTab>
<PageTabGroup>
<DatatableWrapper :paginator="true" :columns="columns" :data="invoices" class="table">
<PageTabGroup v-if="transactions.length > 0">
<DatatableWrapper :paginator="true" :columns="columns" :data="transactions" class="table">
<template scope="{ row }">
<tr>
<td>
<span class="cell-item">
${{ row.attributes.total }}
</span>
<a :href="'/invoice/' + row.data.attributes.token" target="_blank" class="cell-item">
{{ row.data.attributes.order }}
</a>
</td>
<td>
<span class="cell-item">
{{ row.attributes.plan }}
</span>
<span class="cell-item">
${{ row.data.attributes.total }}
</span>
</td>
<td>
<span class="cell-item">
{{ row.attributes.created_at_formatted }}
</span>
<span class="cell-item">
{{ row.data.attributes.bag[0].description }}
</span>
</td>
<td>
<span class="cell-item">
{{ row.data.attributes.created_at_formatted }}
</span>
</td>
<td>
<router-link :to="{name: 'UserInvoices', params: {id: row.relationships.user.data.id}}">
<DatatableCellImage
image-size="small"
:image="row.relationships.user.data.attributes.avatar"
:title="row.relationships.user.data.attributes.name"
/>
</router-link>
</td>
<td>
<div class="action-icons">
<download-cloud-icon size="15" class="icon"></download-cloud-icon>
<a :href="'/invoice/' + row.data.attributes.token" target="_blank">
<external-link-icon size="15" class="icon"></external-link-icon>
</a>
</div>
</td>
</tr>
</template>
</DatatableWrapper>
</PageTabGroup>
<PageTabGroup v-else>
You don't have any transactions yet.
</PageTabGroup>
</PageTab>
</template>
<script>
import DatatableCellImage from '@/components/Others/Tables/DatatableCellImage'
import DatatableWrapper from '@/components/Others/Tables/DatatableWrapper'
import PageTabGroup from '@/components/Others/Layout/PageTabGroup'
import PageTab from '@/components/Others/Layout/PageTab'
import {DownloadCloudIcon} from "vue-feather-icons";
import {ExternalLinkIcon} from "vue-feather-icons";
import axios from 'axios'
export default {
name: 'GatewayTransactions',
components: {
DownloadCloudIcon,
DatatableCellImage,
ExternalLinkIcon,
DatatableWrapper,
PageTabGroup,
PageTab,
@@ -49,97 +70,13 @@
data() {
return {
isLoading: false,
invoices: [
{
id: '1',
type: 'invoices',
attributes: {
total: 9.99,
plan: 'Starter Plan',
created_at: '30. April. 2020',
created_at_formatted: '30. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '2',
type: 'invoices',
attributes: {
total: 9.99,
plan: 'Starter Plan',
created_at: '30. April. 2020',
created_at_formatted: '30. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '3',
type: 'invoices',
attributes: {
total: 49.99,
plan: 'Business Plan',
created_at: '31. April. 2020',
created_at_formatted: '31. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '4',
type: 'invoices',
attributes: {
total: 29.99,
plan: 'Professional Plan',
created_at: '31. April. 2020',
created_at_formatted: '31. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '5',
type: 'invoices',
attributes: {
total: 9.99,
plan: 'Starter Plan',
created_at: '30. April. 2020',
created_at_formatted: '30. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '6',
type: 'invoices',
attributes: {
total: 9.99,
plan: 'Starter Plan',
created_at: '30. April. 2020',
created_at_formatted: '30. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '7',
type: 'invoices',
attributes: {
total: 49.99,
plan: 'Business Plan',
created_at: '31. April. 2020',
created_at_formatted: '31. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
{
id: '8',
type: 'invoices',
attributes: {
total: 29.99,
plan: 'Professional Plan',
created_at: '31. April. 2020',
created_at_formatted: '31. April. 2020',
download: 'https://vuefilemanager.com/',
},
},
],
transactions: [],
columns: [
{
label: 'Invoice Number',
field: 'attributes.total',
sortable: true
},
{
label: 'Total',
field: 'attributes.total',
@@ -155,6 +92,11 @@
field: 'attributes.created_at',
sortable: true
},
{
label: 'User',
field: 'relationships.user.data.id',
sortable: true
},
{
label: this.$t('admin_page_user.table.action'),
field: 'data.action',
@@ -164,11 +106,11 @@
}
},
created() {
/*axios.get('/api/users/' + this.$route.params.id + '/storage')
axios.get('/api/gateways/' + this.$route.params.slug + '/transactions')
.then(response => {
this.storage = response.data.data
this.transactions = response.data.data
this.isLoading = false
})*/
})
}
}
</script>

View File

@@ -34,15 +34,6 @@
</ValidationProvider>
</div>
<!--Price-->
<div class="block-wrapper">
<label>Price:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Plan price" rules="required" v-slot="{ errors }">
<input @input="$updateText('/plans/' + $route.params.id + '/update', 'price', plan.attributes.price)" v-model="plan.attributes.price" placeholder="Plan price" type="number" step="0.01" min="1" max="99999" :class="{'is-error': errors[0]}"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<!--Storage Capacity-->
<div class="block-wrapper">
<label>Storage Capacity:</label>

View File

@@ -35,8 +35,8 @@
</ColorLabel>
</td>
<td v-if="config.isSaaS">
<span class="cell-item" v-if="row.relationships.subscription">
{{ row.relationships.subscription.data.attributes.name }}
<span class="cell-item" v-if="row.data.attributes.subscription">
Premium
</span>
<span class="cell-item" v-else>
Free
@@ -114,44 +114,7 @@
return {
isLoading: true,
users: [],
columns: [
{
label: this.$t('admin_page_user.table.name'),
field: 'data.attributes.name',
sortable: true
},
{
label: this.$t('admin_page_user.table.role'),
field: 'data.attributes.role',
sortable: true
},
{
label: 'Subscription Plan',
field: 'data.attributes.role',
sortable: true,
hidden: true,
},
{
label: this.$t('admin_page_user.table.storage_used'),
field: 'data.attributes.storage.used',
sortable: true
},
{
label: this.$t('admin_page_user.table.storage_capacity'),
field: 'data.attributes.storage.capacity',
sortable: true
},
{
label: this.$t('admin_page_user.table.created_at'),
field: 'data.attributes.created_at_formatted',
sortable: true
},
{
label: this.$t('admin_page_user.table.action'),
field: 'data.action',
sortable: false
},
],
columns: undefined,
}
},
methods: {
@@ -167,6 +130,45 @@
}
},
created() {
this.columns = [
{
label: this.$t('admin_page_user.table.name'),
field: 'data.attributes.name',
sortable: true
},
{
label: this.$t('admin_page_user.table.role'),
field: 'data.attributes.role',
sortable: true
},
{
label: 'Subscription Plan',
field: 'data.attributes.role',
sortable: true,
hidden: ! this.config.isSaaS,
},
{
label: this.$t('admin_page_user.table.storage_used'),
field: 'data.attributes.storage.used',
sortable: true
},
{
label: this.$t('admin_page_user.table.storage_capacity'),
field: 'data.attributes.storage.capacity',
sortable: true
},
{
label: this.$t('admin_page_user.table.created_at'),
field: 'data.attributes.created_at_formatted',
sortable: true
},
{
label: this.$t('admin_page_user.table.action'),
field: 'data.action',
sortable: false
},
]
axios.get('/api/users')
.then(response => {
this.users = response.data.data