1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #5669 from beganovich/v5-1104-client-portal-changes

(v5) Client portal changes
This commit is contained in:
Benjamin Beganović 2021-05-11 15:28:56 +02:00 committed by GitHub
commit 61c5a7161f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 9 deletions

View File

@ -79,7 +79,7 @@ class StripePaymentDriver extends BaseDriver
if($this->stripe_connect)
{
Stripe::setApiKey(config('ninja.ninja_stripe_key'));
$this->stripe_connect_auth = ["stripe_account" => $this->company_gateway->getConfigField('account_id')];
}
else
@ -186,7 +186,7 @@ class StripePaymentDriver extends BaseDriver
if ($this->company_gateway->require_billing_address) {
$fields[] = ['name' => 'client_address_line_1', 'label' => ctrans('texts.address1'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_address_line_2', 'label' => ctrans('texts.address2'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_address_line_2', 'label' => ctrans('texts.address2'), 'type' => 'text', 'validation' => 'sometimes'];
$fields[] = ['name' => 'client_city', 'label' => ctrans('texts.city'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_state', 'label' => ctrans('texts.state'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_country_id', 'label' => ctrans('texts.country'), 'type' => 'text', 'validation' => 'required'];
@ -194,7 +194,7 @@ class StripePaymentDriver extends BaseDriver
if ($this->company_gateway->require_shipping_address) {
$fields[] = ['name' => 'client_shipping_address_line_1', 'label' => ctrans('texts.shipping_address1'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_shipping_address_line_2', 'label' => ctrans('texts.shipping_address2'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_shipping_address_line_2', 'label' => ctrans('texts.shipping_address2'), 'type' => 'text', 'validation' => 'sometimes'];
$fields[] = ['name' => 'client_shipping_city', 'label' => ctrans('texts.shipping_city'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_shipping_state', 'label' => ctrans('texts.shipping_state'), 'type' => 'text', 'validation' => 'required'];
$fields[] = ['name' => 'client_shipping_postal_code', 'label' => ctrans('texts.shipping_postal_code'), 'type' => 'text', 'validation' => 'required'];

View File

@ -5,7 +5,7 @@
<div>
<div class="rounded-md shadow-sm">
<button data-cy="pay-now-dropdown" @click="open = !open" type="button"
class="inline-flex justify-center w-full px-4 py-2 text-sm font-medium leading-5 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-md hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-50 active:text-gray-800">
class="button button-primary bg-primary hover:bg-primary-darken inline-flex items-center">
{{ ctrans('texts.pay_now') }}
<svg class="w-5 h-5 ml-2 -mr-1" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd"

View File

@ -14,6 +14,11 @@
<table class="min-w-full shadow rounded border border-gray-200 payments-table">
<thead>
<tr>
<th class="px-6 py-3 border-b border-gray-200 bg-primary text-left text-xs leading-4 font-medium text-white uppercase tracking-wider">
<span role="button" wire:click="sortBy('number')" class="cursor-pointer">
{{ ctrans('texts.number') }}
</span>
</th>
<th class="px-6 py-3 border-b border-gray-200 bg-primary text-left text-xs leading-4 font-medium text-white uppercase tracking-wider">
<span role="button" wire:click="sortBy('date')" class="cursor-pointer">
{{ ctrans('texts.payment_date') }}
@ -45,6 +50,9 @@
<tbody>
@forelse($payments as $payment)
<tr class="bg-white group hover:bg-gray-100">
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ $payment->number }}
</td>
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
{{ $payment->formatDate($payment->date, $payment->client->date_format()) }}
</td>
@ -84,4 +92,4 @@
@endif
{{ $payments->links('portal/ninja2020/vendor/pagination') }}
</div>
</div>
</div>

View File

@ -15,7 +15,7 @@
<div>
<dl>
@if(!empty($payment->clientPaymentDate()) && !is_null($payment->clientPaymentDate()))
<div class="px-4 py-5 bg-gray-50 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.payment_date') }}
</dt>
@ -25,6 +25,17 @@
</div>
@endif
@if(!empty($payment->number) && !is_null($payment->number))
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.number') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
{{ $payment->number }}
</dd>
</div>
@endif
@if(!empty($payment->transaction_reference) && !is_null($payment->transaction_reference))
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium leading-5 text-gray-500">
@ -39,7 +50,7 @@
@endif
@if(!empty(optional($payment->type)->name) && !is_null(optional($payment->type)->name))
<div class="px-4 py-5 bg-gray-50 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.method') }}
</dt>
@ -61,7 +72,7 @@
@endif
@if(!empty($payment->status_id) && !is_null($payment->status_id))
<div class="px-4 py-5 bg-gray-50 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.status') }}
</dt>
@ -96,7 +107,7 @@
<div>
<dl>
@foreach($payment->invoices as $invoice)
<div class="px-4 py-5 bg-gray-50 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<div class="px-4 py-5 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.invoice_number') }}
</dt>