mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-15 01:35:02 +00:00
v1.7 beta.4
This commit is contained in:
@@ -703,9 +703,12 @@
|
||||
},
|
||||
"user_payments": {
|
||||
"add_card": "Add Payment Card",
|
||||
"store_card": "Store Payment Card",
|
||||
"delete_card": "Delete card",
|
||||
"empty": "You don't have any payment cards yet.",
|
||||
"set_as_default": "Set as default card",
|
||||
"card_field_title": "Credit Card",
|
||||
"field_loading": "Loading card field...",
|
||||
"title": "Payment Methods"
|
||||
},
|
||||
"user_settings": {
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="cell-item">
|
||||
{{ row.data.attributes.bag.description }}
|
||||
<span class="cell-item" v-if="row.data.attributes.invoice_subscriptions[0].description">
|
||||
{{ row.data.attributes.invoice_subscriptions[0].description }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -11,10 +11,16 @@
|
||||
as the expiration date and <b>123</b> as CVC number and ZIP <b>12345</b>.</p>
|
||||
</InfoBox>
|
||||
|
||||
<div ref="stripeCard" class="stripe-card" :class="{'is-error': isError }"></div>
|
||||
|
||||
<div class="card-error-message" v-if="isError">
|
||||
<span>{{ errorMessage }}</span>
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_payments.card_field_title') }}:</label>
|
||||
<div ref="stripeCard" class="stripe-card" :class="{'is-error': isError }">
|
||||
<span class="loading">
|
||||
{{ $t('user_payments.field_loading') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="card-error-message" v-if="isError">
|
||||
<span>{{ errorMessage }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -30,8 +36,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ButtonBase @click.native="registerCard" :disabled="isSubmitted" :loading="isSubmitted" button-style="theme" type="submit">
|
||||
{{ $t('user_payments.add_card') }}
|
||||
<ButtonBase @click.native="registerCard" :loading="isSubmitted" :button-style="isDisabledSubmit ? 'secondary' : 'theme'" type="submit">
|
||||
{{ $t('user_payments.store_card') }}
|
||||
</ButtonBase>
|
||||
</div>
|
||||
</PageTabGroup>
|
||||
@@ -74,13 +80,18 @@
|
||||
},
|
||||
|
||||
isSubmitted: false,
|
||||
isDisabledSubmit: true,
|
||||
|
||||
defaultPaymentMethod: true,
|
||||
clientSecret: undefined
|
||||
clientSecret: undefined,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async registerCard() {
|
||||
|
||||
// Prevent empty submit
|
||||
if (! stripe && !card && ! this.$refs.stripeCard.classList.contains('StripeElement')) return
|
||||
|
||||
// Start loading
|
||||
this.isSubmitted = true
|
||||
|
||||
@@ -91,6 +102,7 @@
|
||||
})
|
||||
|
||||
if (setupIntent) {
|
||||
|
||||
axios
|
||||
.post('/api/user/payment-cards', {
|
||||
token: setupIntent.payment_method,
|
||||
@@ -128,7 +140,6 @@
|
||||
|
||||
// Show error message
|
||||
this.errorMessage = error.message
|
||||
|
||||
}
|
||||
},
|
||||
initStripe() {
|
||||
@@ -139,6 +150,8 @@
|
||||
card = elements.create('card');
|
||||
|
||||
card.mount(this.$refs.stripeCard);
|
||||
|
||||
this.isDisabledSubmit = false
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
@@ -179,6 +192,17 @@
|
||||
-webkit-transition: box-shadow 150ms ease;
|
||||
transition: box-shadow 150ms ease;
|
||||
|
||||
|
||||
&:not(.StripeElement) {
|
||||
background: $light_background;
|
||||
padding: 14px 20px;
|
||||
|
||||
.loading {
|
||||
@include font-size(14);
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-error {
|
||||
box-shadow: 0 0 7px rgba($danger, 0.3);
|
||||
border: 2px solid $danger;
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="cell-item">
|
||||
{{ row.data.attributes.bag.description }}
|
||||
<span class="cell-item" v-if="row.data.attributes.invoice_subscriptions[0].description">
|
||||
{{ row.data.attributes.invoice_subscriptions[0].description }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -2,11 +2,21 @@
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ config('vuefilemanager.app_name') }}</title>
|
||||
<title>@lang('vuefilemanager.invoice_title')</title>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;600;700;900&display=swap"
|
||||
rel="stylesheet">
|
||||
<link href="{{ env('APP_ENV') !== 'local' ? asset('css/invoice.css') : mix('css/invoice.css') }}?v={{ get_version() }}" rel="stylesheet">
|
||||
<link href="{{ env('APP_ENV') !== 'local' ? asset('css/invoice.css') : mix('css/invoice.css') }}?v={{ get_version() }}"
|
||||
rel="stylesheet">
|
||||
|
||||
<style>
|
||||
.table td {
|
||||
padding: 8px;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="toolbar-wrapper">
|
||||
@@ -165,7 +175,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="invoice-order">
|
||||
<table class="table">
|
||||
<table class="table" width="100%" class="table" border="0">
|
||||
<thead class="table-header">
|
||||
<tr>
|
||||
<td>@lang('vuefilemanager.col_description')</td>
|
||||
@@ -174,11 +184,21 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-body">
|
||||
<tr>
|
||||
<td>{{ $invoice->subscriptions()[0]->description }}</td>
|
||||
<td>{{ $invoice->subscriptions()[0]->type }}</td>
|
||||
<td>{{ \Laravel\Cashier\Cashier::formatAmount($invoice->subscriptions()[0]->amount) }}</td>
|
||||
</tr>
|
||||
@foreach($invoice->invoiceItems() as $item)
|
||||
<tr>
|
||||
<td colspan="2">{{ $item->description }}</td>
|
||||
<td>{{ $item->total() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
@foreach($invoice->subscriptions() as $subscription)
|
||||
<tr>
|
||||
<td>@lang('vuefilemanager.subscription') ({{ $subscription->quantity }})</td>
|
||||
<td>{{ $subscription->startDateAsCarbon()->formatLocalized('%d. %B. %Y') }} -
|
||||
{{ $subscription->endDateAsCarbon()->formatLocalized('%d. %B. %Y') }}</td>
|
||||
<td>{{ $subscription->total() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user