mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-25 22:24:42 +00:00
updated transaction tables
This commit is contained in:
@@ -197,17 +197,31 @@
|
||||
const userId = this.user.data.id
|
||||
const app = this
|
||||
|
||||
// Initialize paypal buttons
|
||||
await paypal.Buttons({
|
||||
// Initialize paypal buttons for subscription
|
||||
/*await paypal.Buttons({
|
||||
createSubscription: function(data, actions) {
|
||||
return actions.subscription.create({
|
||||
'plan_id': planId,
|
||||
'custom_id': userId
|
||||
plan_id: planId,
|
||||
custom_id: userId
|
||||
});
|
||||
},
|
||||
onApprove: function(data, actions) {
|
||||
app.paymentSuccessful()
|
||||
}
|
||||
}).render('#paypal-button-container');*/
|
||||
|
||||
// Initialize paypal buttons for subscription
|
||||
await paypal.Buttons({
|
||||
createOrder: function(data, actions) {
|
||||
return actions.order.create({
|
||||
purchase_units: [{
|
||||
amount: {
|
||||
value: '10.49',
|
||||
},
|
||||
custom_id: userId
|
||||
}]
|
||||
});
|
||||
}
|
||||
}).render('#paypal-button-container');
|
||||
},
|
||||
selectPlan(plan) {
|
||||
|
||||
+19
@@ -327,6 +327,7 @@ const FunctionHelpers = {
|
||||
'paypal': '/assets/payments/paypal.svg',
|
||||
'paystack': store.getters.isDarkMode ? '/assets/payments/paystack-dark.svg' : '/assets/payments/paystack.svg',
|
||||
'stripe': '/assets/payments/stripe.svg',
|
||||
'system': this.$getImage(store.getters.config.app_logo_horizontal),
|
||||
}[driver]
|
||||
}
|
||||
|
||||
@@ -348,6 +349,24 @@ const FunctionHelpers = {
|
||||
}[status]
|
||||
}
|
||||
|
||||
Vue.prototype.$getTransactionTypeTextColor = function (type) {
|
||||
|
||||
return {
|
||||
'withdrawal': 'text-red-500',
|
||||
'credit': 'text-green-500',
|
||||
'charge': '',
|
||||
}[type]
|
||||
}
|
||||
|
||||
Vue.prototype.$getTransactionMark = function (type) {
|
||||
|
||||
return {
|
||||
'withdrawal': '-',
|
||||
'credit': '+',
|
||||
'charge': '',
|
||||
}[type]
|
||||
}
|
||||
|
||||
Vue.prototype.$goToFileView = function (id) {
|
||||
|
||||
let locations = {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<tr class="border-b dark:border-opacity-5 border-light border-dashed">
|
||||
<td class="py-5">
|
||||
<span class="text-sm font-bold">
|
||||
{{ row.data.attributes.plan_name }}
|
||||
{{ row.data.attributes.note }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@@ -41,8 +41,8 @@
|
||||
</ColorLabel>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-sm font-bold">
|
||||
{{ row.data.attributes.price }}
|
||||
<span class="text-sm font-bold" :class="$getTransactionTypeTextColor(row.data.attributes.type)">
|
||||
{{ $getTransactionMark(row.data.attributes.type) + row.data.attributes.price }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@@ -51,7 +51,7 @@
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<img class="block max-h-5 m-auto" :src="$getPaymentLogo(row.data.attributes.driver)" :alt="row.data.attributes.driver">
|
||||
<img class="inline-block max-h-5" :src="$getPaymentLogo(row.data.attributes.driver)" :alt="row.data.attributes.driver">
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -133,8 +133,8 @@
|
||||
invoices: [],
|
||||
columns: [
|
||||
{
|
||||
label: this.$t('Plan'),
|
||||
field: 'plan_name',
|
||||
label: this.$t('Note'),
|
||||
field: 'note',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<img class="block max-h-5 m-auto" :src="$getPaymentLogo(row.data.attributes.driver)" :alt="row.data.attributes.driver">
|
||||
<img class="inline-block max-h-5" :src="$getPaymentLogo(row.data.attributes.driver)" :alt="row.data.attributes.driver">
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -100,7 +100,7 @@
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
label: this.$t('Plan'),
|
||||
label: this.$t('Note'),
|
||||
field: 'plan.name',
|
||||
sortable: true
|
||||
},
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<img class="block max-h-5 m-auto" :src="$getPaymentLogo(row.data.attributes.driver)" :alt="row.data.attributes.driver">
|
||||
<img class="inline-block max-h-5" :src="$getPaymentLogo(row.data.attributes.driver)" :alt="row.data.attributes.driver">
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -142,7 +142,7 @@
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
label: this.$t('Plan'),
|
||||
label: this.$t('Note'),
|
||||
field: 'plan.name',
|
||||
sortable: true
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<tr class="border-b dark:border-opacity-5 border-light border-dashed">
|
||||
<td class="py-4">
|
||||
<span class="text-sm font-bold">
|
||||
{{ row.data.attributes.plan_name }}
|
||||
{{ row.data.attributes.note }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@@ -20,8 +20,8 @@
|
||||
</ColorLabel>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-sm font-bold">
|
||||
{{ row.data.attributes.price }}
|
||||
<span class="text-sm font-bold" :class="$getTransactionTypeTextColor(row.data.attributes.type)">
|
||||
{{ $getTransactionMark(row.data.attributes.type) + row.data.attributes.price }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@@ -30,7 +30,7 @@
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<img class="block max-h-5 m-auto" :src="$getPaymentLogo(row.data.attributes.driver)" :alt="row.data.attributes.driver">
|
||||
<img class="inline-block max-h-5" :src="$getPaymentLogo(row.data.attributes.driver)" :alt="row.data.attributes.driver">
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -65,8 +65,8 @@
|
||||
isLoading: true,
|
||||
columns: [
|
||||
{
|
||||
label: this.$t('Plan'),
|
||||
field: 'plan_name',
|
||||
label: this.$t('Note'),
|
||||
field: 'note',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<tr class="border-b dark:border-opacity-5 border-light border-dashed">
|
||||
<td class="py-4">
|
||||
<span class="text-sm font-bold">
|
||||
{{ row.data.attributes.plan_name }}
|
||||
{{ row.data.attributes.note }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@@ -20,8 +20,8 @@
|
||||
</ColorLabel>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-sm font-bold">
|
||||
{{ row.data.attributes.price }}
|
||||
<span class="text-sm font-bold" :class="$getTransactionTypeTextColor(row.data.attributes.type)">
|
||||
{{ $getTransactionMark(row.data.attributes.type) + row.data.attributes.price }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@@ -30,7 +30,7 @@
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<img class="block max-h-5 m-auto" :src="$getPaymentLogo(row.data.attributes.driver)" :alt="row.data.attributes.driver">
|
||||
<img class="inline-block max-h-5" :src="$getPaymentLogo(row.data.attributes.driver)" :alt="row.data.attributes.driver">
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -66,8 +66,8 @@
|
||||
invoices: undefined,
|
||||
columns: [
|
||||
{
|
||||
label: this.$t('Plan'),
|
||||
field: 'plan_name',
|
||||
label: this.$t('Note'),
|
||||
field: 'note',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user