Show the payment number in the client portal

This commit is contained in:
Benjamin Beganović 2021-05-11 15:02:52 +02:00
parent 10cffc3db0
commit 4803cef69b
2 changed files with 24 additions and 5 deletions

View File

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

View File

@ -15,7 +15,7 @@
<div> <div>
<dl> <dl>
@if(!empty($payment->clientPaymentDate()) && !is_null($payment->clientPaymentDate())) @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"> <dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.payment_date') }} {{ ctrans('texts.payment_date') }}
</dt> </dt>
@ -25,6 +25,17 @@
</div> </div>
@endif @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)) @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"> <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"> <dt class="text-sm font-medium leading-5 text-gray-500">
@ -39,7 +50,7 @@
@endif @endif
@if(!empty(optional($payment->type)->name) && !is_null(optional($payment->type)->name)) @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"> <dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.method') }} {{ ctrans('texts.method') }}
</dt> </dt>
@ -61,7 +72,7 @@
@endif @endif
@if(!empty($payment->status_id) && !is_null($payment->status_id)) @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"> <dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.status') }} {{ ctrans('texts.status') }}
</dt> </dt>
@ -96,7 +107,7 @@
<div> <div>
<dl> <dl>
@foreach($payment->invoices as $invoice) @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"> <dt class="text-sm font-medium leading-5 text-gray-500">
{{ ctrans('texts.invoice_number') }} {{ ctrans('texts.invoice_number') }}
</dt> </dt>