2020-04-23 00:49:23 +02:00
|
|
|
<div class="-my-2 py-2 overflow-x-auto sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8">
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
<div class="flex items-center">
|
|
|
|
<span class="mr-2 text-sm hidden md:block">{{ ctrans('texts.per_page') }}</span>
|
|
|
|
<select wire:model="per_page" class="form-select py-1 text-sm">
|
|
|
|
<option>5</option>
|
|
|
|
<option selected>10</option>
|
|
|
|
<option>15</option>
|
|
|
|
<option>20</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="align-middle inline-block min-w-full overflow-hidden rounded mt-4">
|
2020-05-26 23:45:29 +02:00
|
|
|
<table class="min-w-full shadow rounded border border-gray-200 payments-table">
|
2020-04-23 00:49:23 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-09-30 13:31:15 +02:00
|
|
|
<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">
|
2020-04-23 00:49:23 +02:00
|
|
|
<span role="button" wire:click="sortBy('date')" class="cursor-pointer">
|
|
|
|
{{ ctrans('texts.payment_date') }}
|
|
|
|
</span>
|
|
|
|
</th>
|
2020-09-30 13:31:15 +02:00
|
|
|
<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">
|
2020-04-23 00:49:23 +02:00
|
|
|
<span role="button" wire:click="sortBy('type_id')" class="cursor-pointer">
|
|
|
|
{{ ctrans('texts.payment_type_id') }}
|
|
|
|
</span>
|
|
|
|
</th>
|
2020-09-30 13:31:15 +02:00
|
|
|
<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">
|
2020-04-23 00:49:23 +02:00
|
|
|
<span role="button" wire:click="sortBy('amount')" class="cursor-pointer">
|
|
|
|
{{ ctrans('texts.amount') }}
|
|
|
|
</span>
|
|
|
|
</th>
|
2020-09-30 13:31:15 +02:00
|
|
|
<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">
|
2020-04-23 00:49:23 +02:00
|
|
|
<span role="button" wire:click="sortBy('transaction_reference')" class="cursor-pointer">
|
|
|
|
{{ ctrans('texts.transaction_reference') }}
|
|
|
|
</span>
|
|
|
|
</th>
|
2020-09-30 13:31:15 +02:00
|
|
|
<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">
|
2020-04-23 00:49:23 +02:00
|
|
|
<span role="button" wire:click="sortBy('status_id')" class="cursor-pointer">
|
|
|
|
{{ ctrans('texts.status') }}
|
|
|
|
</span>
|
|
|
|
</th>
|
2020-09-30 13:31:15 +02:00
|
|
|
<th class="px-6 py-3 border-b border-gray-200 bg-primary"></th>
|
2020-04-23 00:49:23 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-04-25 01:17:37 +02:00
|
|
|
@forelse($payments as $payment)
|
|
|
|
<tr class="bg-white group hover:bg-gray-100">
|
2020-04-23 00:49:23 +02:00
|
|
|
<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>
|
|
|
|
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
|
|
|
|
{{ optional($payment->type)->name }}
|
|
|
|
</td>
|
|
|
|
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
|
|
|
|
{!! \App\Utils\Number::formatMoney($payment->amount, $payment->client) !!}
|
|
|
|
</td>
|
|
|
|
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
|
2020-12-03 13:38:57 +01:00
|
|
|
{{ \Illuminate\Support\Str::limit($payment->transaction_reference, 35) }}
|
2020-04-23 00:49:23 +02:00
|
|
|
</td>
|
|
|
|
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
|
|
|
|
{!! \App\Models\Payment::badgeForStatus($payment->status_id) !!}
|
|
|
|
</td>
|
|
|
|
<td class="px-6 py-4 whitespace-no-wrap flex items-center justify-end text-sm leading-5 font-medium">
|
|
|
|
<a href="{{ route('client.payments.show', $payment->hashed_id) }}" class="text-blue-600 hover:text-indigo-900 focus:outline-none focus:underline">
|
|
|
|
@lang('texts.view')
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2020-04-25 01:17:37 +02:00
|
|
|
@empty
|
|
|
|
<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" colspan="100%">
|
|
|
|
{{ ctrans('texts.no_results') }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforelse
|
2020-04-23 00:49:23 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="flex justify-center md:justify-between mt-6 mb-6">
|
2020-04-25 01:17:37 +02:00
|
|
|
@if($payments->total() > 0)
|
|
|
|
<span class="text-gray-700 text-sm hidden md:block">
|
|
|
|
{{ ctrans('texts.showing_x_of', ['first' => $payments->firstItem(), 'last' => $payments->lastItem(), 'total' => $payments->total()]) }}
|
|
|
|
</span>
|
|
|
|
@endif
|
2020-12-05 14:24:21 +01:00
|
|
|
{{ $payments->links('portal/ninja2020/vendor/pagination') }}
|
2020-04-23 00:49:23 +02:00
|
|
|
</div>
|
|
|
|
</div>
|