+
![]()
+
+ |
+
+ {{ row.data.attributes.note }}
+
+ |
+
+
+
+
+
+ {{ row.data.relationships.user.data.attributes.name }}
+
+
+ {{ row.data.relationships.user.data.attributes.email }}
+
+
+
+
+ {{ $t('User was deleted') }}
+
+ |
+
+
+ {{ row.data.attributes.status }}
+
+ |
+
+
+ {{ $getTransactionMark(row.data.attributes.type) + row.data.attributes.price }}
+
+ |
+
+
+ {{ row.data.attributes.created_at }}
+
+ |
+
+
+ ![]()
+
+ |
+
+
+ |
+
+
+
\ No newline at end of file
diff --git a/resources/js/components/Subscription/MeteredTransactionDetailRow.vue b/resources/js/components/Subscription/MeteredTransactionDetailRow.vue
new file mode 100644
index 00000000..411fb3fc
--- /dev/null
+++ b/resources/js/components/Subscription/MeteredTransactionDetailRow.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ {{ $t(usage.feature) }}
+
+
+ {{ $t(`feature_usage_desc_${usage.feature}`) }}
+
+
+
+
+ {{ usage.usage }}
+
+
+
+
+ {{ usage.cost }}
+
+
+
+ |
+
+
+
\ No newline at end of file
diff --git a/resources/js/components/Subscription/MeteredTransactionRow.vue b/resources/js/components/Subscription/MeteredTransactionRow.vue
new file mode 100644
index 00000000..909f8a6d
--- /dev/null
+++ b/resources/js/components/Subscription/MeteredTransactionRow.vue
@@ -0,0 +1,104 @@
+
+
+ |
+
+ {{ row.data.attributes.note }}
+
+ |
+
+
+
+
+
+ {{ row.data.relationships.user.data.attributes.name }}
+
+
+ {{ row.data.relationships.user.data.attributes.email }}
+
+
+
+
+ {{ $t('User was deleted') }}
+
+ |
+
+
+ {{ row.data.attributes.status }}
+
+ |
+
+
+ {{ $t(row.data.attributes.type) }}
+
+ |
+
+
+ {{ $getTransactionMark(row.data.attributes.type) + row.data.attributes.price }}
+
+ |
+
+
+ {{ row.data.attributes.created_at }}
+
+ |
+
+
+ ![]()
+
+ |
+
+
+
+ -
+
+ |
+
+
+
\ No newline at end of file
diff --git a/resources/js/components/Subscription/UserTransactionsForFixedBilling.vue b/resources/js/components/Subscription/UserTransactionsForFixedBilling.vue
index f1ff25fc..fec83c90 100644
--- a/resources/js/components/Subscription/UserTransactionsForFixedBilling.vue
+++ b/resources/js/components/Subscription/UserTransactionsForFixedBilling.vue
@@ -5,36 +5,13 @@
-
- |
-
- {{ row.data.attributes.note }}
-
- |
-
-
- {{ row.data.attributes.status }}
-
- |
-
-
- {{ $getTransactionMark(row.data.attributes.type) + row.data.attributes.price }}
-
- |
-
-
- {{ row.data.attributes.created_at }}
-
- |
-
-
- |
-
+
@@ -47,44 +24,25 @@
\ No newline at end of file
diff --git a/resources/js/components/Subscription/UserTransactionsForMeteredBilling.vue b/resources/js/components/Subscription/UserTransactionsForMeteredBilling.vue
index bb254576..09ec3020 100644
--- a/resources/js/components/Subscription/UserTransactionsForMeteredBilling.vue
+++ b/resources/js/components/Subscription/UserTransactionsForMeteredBilling.vue
@@ -10,79 +10,12 @@
:paginator="true"
:columns="columns"
>
-
-
- |
-
- {{ row.data.attributes.note }}
-
- |
-
-
- {{ row.data.attributes.status }}
-
- |
-
-
- {{ $t(row.data.attributes.type) }}
-
- |
-
-
- {{ $getTransactionMark(row.data.attributes.type) + row.data.attributes.price }}
-
- |
-
-
- {{ row.data.attributes.created_at }}
-
- |
-
-
- ![]()
-
- |
-
-
-
- -
-
- |
-
+
+
-
-
-
-
-
- {{ $t(usage.feature) }}
-
-
- {{ $t(`feature_usage_desc_${usage.feature}`) }}
-
-
-
-
- {{ usage.usage }}
-
-
-
-
- {{ usage.cost }}
-
-
-
- |
-
+
@@ -101,10 +34,14 @@
import FormLabel from "../Others/Forms/FormLabel"
import InfoBox from '/resources/js/components/Others/Forms/InfoBox'
import {mapGetters} from "vuex";
+ import MeteredTransactionDetailRow from "./MeteredTransactionDetailRow"
+ import MeteredTransactionRow from "./MeteredTransactionRow"
export default {
name: 'UserTransactionsForMeteredBilling',
components: {
+ MeteredTransactionDetailRow,
+ MeteredTransactionRow,
DatatableWrapper,
ColorLabel,
FormLabel,
@@ -115,47 +52,14 @@
computed: {
...mapGetters([
'user',
- ])
+ ]),
+ columns() {
+ return this.$store.getters.transactionColumns.filter(column => column.field !== 'user_id')
+ }
},
data() {
return {
showedTransactionDetailById: undefined,
- columns: [
- {
- label: this.$t('Note'),
- field: 'note',
- sortable: true
- },
- {
- label: this.$t('Status'),
- field: 'status',
- sortable: true
- },
- {
- label: this.$t('Type'),
- field: 'status',
- sortable: true
- },
- {
- label: this.$t('admin_page_invoices.table.total'),
- field: 'amount',
- sortable: true
- },
- {
- label: this.$t('Payed At'),
- field: 'created_at',
- sortable: true
- },
- {
- label: this.$t('Service'),
- field: 'driver',
- sortable: true
- },
- {
- label: this.$t('Actions'),
- sortable: false
- },
- ],
}
},
methods: {
diff --git a/resources/js/store/modules/lists.js b/resources/js/store/modules/lists.js
index ce156377..889ff8c2 100644
--- a/resources/js/store/modules/lists.js
+++ b/resources/js/store/modules/lists.js
@@ -1,4 +1,48 @@
+import i18n from '../../i18n'
+
const defaultState = {
+ transactionColumns: [
+ {
+ label: i18n.t('Note'),
+ field: 'note',
+ sortable: true
+ },
+ {
+ label: i18n.t('user'),
+ field: 'user_id',
+ sortable: true
+ },
+ {
+ label: i18n.t('Status'),
+ field: 'status',
+ sortable: true
+ },
+ {
+ label: i18n.t('Type'),
+ field: 'type',
+ sortable: true
+ },
+ {
+ label: i18n.t('Total'),
+ field: 'amount',
+ sortable: true
+ },
+ {
+ label: i18n.t('Payed At'),
+ field: 'created_at',
+ sortable: true
+ },
+ {
+ label: i18n.t('Service'),
+ field: 'driver',
+ sortable: true
+ },
+ {
+ label: i18n.t('Actions'),
+ field: 'actions',
+ sortable: false
+ },
+ ],
roles: [
{
label: 'roles.admin',
@@ -979,6 +1023,7 @@ const defaultState = {
}
const getters = {
+ transactionColumns: state => state.transactionColumns,
subscriptionTypes: state => state.subscriptionTypes,
teamPermissions: state => state.teamPermissions,
expirationList: state => state.expirationList,
diff --git a/resources/js/views/Admin.vue b/resources/js/views/Admin.vue
index 06f9f215..3c0f0db6 100644
--- a/resources/js/views/Admin.vue
+++ b/resources/js/views/Admin.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/resources/js/views/Admin/Dashboard.vue b/resources/js/views/Admin/Dashboard.vue
index b3433238..59f3a4e3 100644
--- a/resources/js/views/Admin/Dashboard.vue
+++ b/resources/js/views/Admin/Dashboard.vue
@@ -3,7 +3,7 @@