|
-
+
|
|
- {{ row.attributes.payments_processed }}
+ {{ row.data.attributes.payments_processed }}
|
- {{ row.attributes.active_subscribers }}
+ {{ row.data.attributes.active_subscribers }}
|
-
+
@@ -85,52 +85,27 @@
},
data() {
return {
- isLoading: false,
- plans: [
- {
- id: '2',
- type: 'payment_method',
- attributes: {
- type: 'paypal',
- gateway: 'PayPal',
- avatar: '/assets/images/paypal-logo-thumbnail.png',
- status: 0,
- payments_processed: 234,
- active_subscribers: 2920,
- }
- },
- {
- id: '1',
- type: 'payment_method',
- attributes: {
- type: 'stripe',
- gateway: 'Stripe',
- avatar: '/assets/images/stripe-logo-thumbnail.png',
- status: 1,
- payments_processed: 798,
- active_subscribers: 3587,
- }
- },
- ],
+ isLoading: true,
+ gateways: undefined,
columns: [
{
label: 'Payment Gateway',
- field: 'attributes.gateway',
+ field: 'data.attributes.gateway',
sortable: true
},
{
label: 'Status',
- field: 'attributes.status',
+ field: 'data.attributes.status',
sortable: true
},
{
label: 'Payments Processed',
- field: 'attributes.payments_processed',
+ field: 'data.attributes.payments_processed',
sortable: true
},
{
label: 'Active Subscribers',
- field: 'attributes.active_subscribers',
+ field: 'data.attributes.active_subscribers',
sortable: true
},
{
@@ -143,15 +118,15 @@
},
methods: {
changeStatus(val, type) {
- this.$updateText('/gateways/' + type, 'active', val)
+ this.$updateText('/gateways/' + type, 'status', val)
}
},
created() {
- /*axios.get('/api/plans')
+ axios.get('/api/gateways')
.then(response => {
- this.plans = response.data.data
+ this.gateways = response.data.data
this.isLoading = false
- })*/
+ })
}
}
diff --git a/resources/js/views/Admin/Gateways/Gateway.vue b/resources/js/views/Admin/Gateways/Gateway.vue
index 0e1c6d85..58530ecb 100644
--- a/resources/js/views/Admin/Gateways/Gateway.vue
+++ b/resources/js/views/Admin/Gateways/Gateway.vue
@@ -4,22 +4,22 @@
-
+
- ![]()
+
- {{ gateway.attributes.gateway }}
+ {{ gateway.attributes.name }}
Payment Gateway
-
-
+
Settings
@@ -137,21 +138,12 @@
return {
isLoading: false,
isSendingRequest: false,
- paypal: {
- status: 1,
- sandbox: 0,
- client_id: '',
- secret: '',
- webhook: '',
- },
- stripe: {
- status: 0,
- sandbox: 0,
- client_id: '',
- secret: '',
- }
+ paymentGateway: undefined,
}
},
+ created() {
+ this.paymentGateway = this.gateway
+ }
}
diff --git a/resources/js/views/Admin/Invoices.vue b/resources/js/views/Admin/Invoices.vue
index c6c937e0..5d8d98f3 100644
--- a/resources/js/views/Admin/Invoices.vue
+++ b/resources/js/views/Admin/Invoices.vue
@@ -8,19 +8,24 @@
+ |
+
+ {{ row.data.attributes.order }}
+
+ |
- ${{ row.attributes.total }}
+ ${{ row.data.attributes.total }}
|
- {{ row.attributes.plan }}
+ {{ row.data.attributes.bag[0].description }}
|
- {{ row.attributes.created_at_formatted }}
+ {{ row.data.attributes.created_at_formatted }}
|
@@ -34,9 +39,9 @@
|
|
@@ -58,16 +63,16 @@
import MobileHeader from '@/components/Mobile/MobileHeader'
import SectionTitle from '@/components/Others/SectionTitle'
import ButtonBase from '@/components/FilesView/ButtonBase'
- import {DownloadCloudIcon} from "vue-feather-icons";
+ import {ExternalLinkIcon} from "vue-feather-icons";
import PageHeader from '@/components/Others/PageHeader'
import ColorLabel from '@/components/Others/ColorLabel'
import Spinner from '@/components/FilesView/Spinner'
import axios from 'axios'
export default {
- name: 'Plans',
+ name: 'Invoices',
components: {
- DownloadCloudIcon,
+ ExternalLinkIcon,
DatatableCellImage,
MobileActionButton,
DatatableWrapper,
@@ -81,202 +86,14 @@
},
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/',
- },
- relationships: {
- user: {
- data: {
- id: '1',
- type: 'users',
- attributes: {
- avatar: '/avatars/6osmoXJo-avatar-01.png',
- name: 'Jane Doe',
- email: 'howdy@hi5ve.digital',
- }
- }
- }
- }
- },
- {
- 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/',
- },
- relationships: {
- user: {
- data: {
- id: '1',
- type: 'users',
- attributes: {
- avatar: '/avatars/dSMRCbwF-69299654_2418248648259454_4545563304688353280_o.jpg',
- name: 'Peter Papp',
- email: 'peterpapp@makingcg.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/',
- },
- relationships: {
- user: {
- data: {
- id: '1',
- type: 'users',
- attributes: {
- avatar: '/assets/images/default-avatar.png',
- name: 'Pavel Svintsitskiy',
- email: 'pashaUSA@gmail.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/',
- },
- relationships: {
- user: {
- data: {
- id: '1',
- type: 'users',
- attributes: {
- avatar: '/avatars/lTksMdJM-6D3529EF-5D8C-4959-BEC2-4BDE80A051C2.jpeg',
- name: 'Torsten',
- email: 'torsten.hoegel@go-on-net.de',
- }
- }
- }
- }
- },
- {
- 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/',
- },
- relationships: {
- user: {
- data: {
- id: '1',
- type: 'users',
- attributes: {
- avatar: '/avatars/6osmoXJo-avatar-01.png',
- name: 'Jane Doe',
- email: 'howdy@hi5ve.digital',
- }
- }
- }
- }
- },
- {
- 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/',
- },
- relationships: {
- user: {
- data: {
- id: '1',
- type: 'users',
- attributes: {
- avatar: '/avatars/dSMRCbwF-69299654_2418248648259454_4545563304688353280_o.jpg',
- name: 'Peter Papp',
- email: 'peterpapp@makingcg.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/',
- },
- relationships: {
- user: {
- data: {
- id: '1',
- type: 'users',
- attributes: {
- avatar: '/assets/images/default-avatar.png',
- name: 'Pavel Svintsitskiy',
- email: 'pashaUSA@gmail.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/',
- },
- relationships: {
- user: {
- data: {
- id: '1',
- type: 'users',
- attributes: {
- avatar: '/avatars/lTksMdJM-6D3529EF-5D8C-4959-BEC2-4BDE80A051C2.jpeg',
- name: 'Torsten',
- email: 'torsten.hoegel@go-on-net.de',
- }
- }
- }
- }
- },
- ],
+ isLoading: true,
+ invoices: undefined,
columns: [
+ {
+ label: 'Invoice Number',
+ field: 'attributes.total',
+ sortable: true
+ },
{
label: 'Total',
field: 'attributes.total',
@@ -306,11 +123,11 @@
}
},
created() {
- /*axios.get('/api/invoices')
+ axios.get('/api/invoices')
.then(response => {
this.invoices = response.data.data
this.isLoading = false
- })*/
+ })
}
}
diff --git a/resources/js/views/Admin/Plans.vue b/resources/js/views/Admin/Plans.vue
index 1c65bda7..02cdecc9 100644
--- a/resources/js/views/Admin/Plans.vue
+++ b/resources/js/views/Admin/Plans.vue
@@ -21,36 +21,36 @@
|
-
- {{ row.attributes.name }}
+
+ {{ row.data.attributes.name }}
|
-
+
|
- ${{ row.attributes.price }}
+ ${{ row.data.attributes.price }}
|
- {{ row.attributes.capacity }}
+ {{ row.data.attributes.capacity_formatted }}
|
- {{ row.attributes.subscribers }}
+ {{ row.data.attributes.subscribers }}
|
-
+
-
+
@@ -96,42 +96,8 @@
},
data() {
return {
- isLoading: false,
- plans: [
- {
- id: '1',
- type: 'plans',
- attributes: {
- name: 'Starter Plan',
- status: 1,
- price: 9.99,
- capacity: '200GB',
- subscribers: 172,
- }
- },
- {
- id: '2',
- type: 'plans',
- attributes: {
- name: 'Professional Plan',
- status: 0,
- price: 19.99,
- capacity: '500GB',
- subscribers: 1929,
- }
- },
- {
- id: '3',
- type: 'plans',
- attributes: {
- name: 'Business Plan',
- status: 1,
- price: 44.99,
- capacity: '1TB',
- subscribers: 389,
- }
- },
- ],
+ isLoading: true,
+ plans: undefined,
columns: [
{
label: 'Plan',
@@ -172,11 +138,11 @@
}
},
created() {
- /*axios.get('/api/plans')
+ axios.get('/api/plans')
.then(response => {
this.plans = response.data.data
this.isLoading = false
- })*/
+ })
}
}
diff --git a/resources/js/views/Admin/Plans/Plan.vue b/resources/js/views/Admin/Plans/Plan.vue
index 2ba6cedf..8aac415f 100644
--- a/resources/js/views/Admin/Plans/Plan.vue
+++ b/resources/js/views/Admin/Plans/Plan.vue
@@ -71,30 +71,16 @@
},
data() {
return {
- isLoading: false,
+ isLoading: true,
plan: undefined,
}
},
created() {
-
- this.plan = {
- id: '1',
- type: 'plans',
- attributes: {
- name: 'Starter Plan',
- description: 'This plan fits for every storage starter.',
- status: 1,
- price: 9.99,
- capacity: 200,
- subscribers: 172,
- }
- }
-
- /*axios.get('/api/gateway/' + this.$route.params.name)
+ axios.get('/api/plans/' + this.$route.params.id)
.then(response => {
- this.user = response.data.data
+ this.plan = response.data.data
this.isLoading = false
- })*/
+ })
}
}
diff --git a/resources/js/views/Admin/Plans/PlanCreate.vue b/resources/js/views/Admin/Plans/PlanCreate.vue
index b4ce600b..cc09e545 100644
--- a/resources/js/views/Admin/Plans/PlanCreate.vue
+++ b/resources/js/views/Admin/Plans/PlanCreate.vue
@@ -111,7 +111,9 @@
// Send request to get user token
axios
- .post('/api/plans/create', this.plan)
+ .post('/api/plans/store', {
+ attributes: this.plan
+ })
.then(response => {
// End loading
@@ -124,7 +126,7 @@
})
// Go to User page
- this.$router.push({name: 'UserDetail', params: {id: response.data.data.id}})
+ this.$router.push({name: 'PlanSettings', params: {id: response.data.data.id}})
})
.catch(error => {
diff --git a/resources/js/views/Admin/Plans/PlanTabs/PlanSettings.vue b/resources/js/views/Admin/Plans/PlanTabs/PlanSettings.vue
index 80b4044c..450d34cd 100644
--- a/resources/js/views/Admin/Plans/PlanTabs/PlanSettings.vue
+++ b/resources/js/views/Admin/Plans/PlanTabs/PlanSettings.vue
@@ -91,7 +91,7 @@
},
methods: {
changeStatus(val) {
- this.$updateText('/plans/' + this.$route.params.id + '/update', 'state', val)
+ this.$updateText('/plans/' + this.$route.params.id + '/update', 'status', val)
}
}
}
diff --git a/resources/js/views/Admin/Users.vue b/resources/js/views/Admin/Users.vue
index 797ef081..1e4954f8 100644
--- a/resources/js/views/Admin/Users.vue
+++ b/resources/js/views/Admin/Users.vue
@@ -36,12 +36,12 @@
|
- {{ row.data.attributes.storage.used }}%
+ {{ row.relationships.storage.data.attributes.used }}%
|
- {{ row.data.attributes.storage.capacity_formatted }}
+ {{ row.relationships.storage.data.attributes.capacity_formatted }}
|
diff --git a/resources/js/views/Admin/Users/User.vue b/resources/js/views/Admin/Users/User.vue
index 77939d6b..305b779d 100644
--- a/resources/js/views/Admin/Users/User.vue
+++ b/resources/js/views/Admin/Users/User.vue
@@ -9,16 +9,16 @@
- ![]()
+
- {{ user.attributes.name }}
+ {{ user.data.attributes.name }}
- {{ user.attributes.role }}
+ {{ user.data.attributes.role }}
- {{ user.attributes.email }}
+ {{ user.data.attributes.email }}
@@ -60,7 +60,7 @@
- | |