reconciliation table convert to component
This commit is contained in:
@ -84,71 +84,69 @@
|
|||||||
<x-form.input.hidden name="ended_at" :value="request('ended_at')" />
|
<x-form.input.hidden name="ended_at" :value="request('ended_at')" />
|
||||||
<x-form.input.hidden name="reconcile" value="0" id="hidden-reconcile" />
|
<x-form.input.hidden name="reconcile" value="0" id="hidden-reconcile" />
|
||||||
|
|
||||||
<div class="overflow-x-visible">
|
<x-table>
|
||||||
<div class="py-2 align-middle inline-block min-w-full">
|
<x-table.thead>
|
||||||
<table class="min-w-full divide-y divide-gray-200">
|
<x-table.tr>
|
||||||
<thead>
|
<x-table.th class="w-2/12" hidden-mobile>
|
||||||
<tr>
|
|
||||||
<th scope="col" class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
|
|
||||||
{{ trans('general.date') }}
|
{{ trans('general.date') }}
|
||||||
</th>
|
</x-table.th>
|
||||||
|
|
||||||
<th scope="col" class="w-3/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
|
<x-table.th class="w-3/12" hidden-mobile>
|
||||||
{{ trans('general.description') }}
|
{{ trans('general.description') }}
|
||||||
</th>
|
</x-table.th>
|
||||||
|
|
||||||
<th scope="col" class="w-3/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
|
<x-table.th class="w-6/12 lg:w-3/12">
|
||||||
{{ trans_choice('general.contacts', 1) }}
|
{{ trans_choice('general.contacts', 1) }}
|
||||||
</th>
|
</x-table.th>
|
||||||
|
|
||||||
<th scope="col" class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
|
<x-table.th class="w-2/12" hidden-mobile>
|
||||||
{{ trans('reconciliations.deposit') }}
|
{{ trans('reconciliations.deposit') }}
|
||||||
</th>
|
</x-table.th>
|
||||||
|
|
||||||
<th scope="col" class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
|
<x-table.th class="w-6/12 lg:w-2/12">
|
||||||
{{ trans('reconciliations.withdrawal') }}
|
{{ trans('reconciliations.withdrawal') }}
|
||||||
</th>
|
</x-table.th>
|
||||||
|
|
||||||
<th scope="col" class="ltr:pl-6 rtl:pr-6 ltr:text-right rtl:text-left py-4 text-center text-sm font-medium">
|
<x-table.th kind="amount" class="none-truncate">
|
||||||
{{ trans('general.clear') }}
|
{{ trans('general.clear') }}
|
||||||
</th>
|
</x-table.th>
|
||||||
</tr>
|
</x-table.tr>
|
||||||
</thead>
|
</x-table.thead>
|
||||||
|
|
||||||
<tbody>
|
<x-table.tbody>
|
||||||
@foreach($transactions as $item)
|
@foreach($transactions as $item)
|
||||||
<tr class="relative flex items-center border-b hover:bg-gray-100 px-1 group">
|
<x-table.tr>
|
||||||
<td class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
|
<x-table.td class="w-2/12" hidden-mobile kind="cursor-none">
|
||||||
<x-date date="{{ $item->paid_at }}" />
|
<x-date date="{{ $item->paid_at }}" />
|
||||||
</td>
|
</x-table.td>
|
||||||
|
|
||||||
<td class="w-3/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider truncate">
|
<x-table.td class="w-3/12" hidden-mobile kind="cursor-none">
|
||||||
{{ $item->description }}
|
{{ $item->description }}
|
||||||
</td>
|
</x-table.td>
|
||||||
|
|
||||||
<td class="w-3/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider truncate">
|
<x-table.td class="w-6/12 lg:w-3/12" kind="cursor-none">
|
||||||
{{ $item->contact->name }}
|
{{ $item->contact->name }}
|
||||||
</td>
|
</x-table.td>
|
||||||
|
|
||||||
@if ($item->isIncome())
|
@if ($item->isIncome())
|
||||||
<td class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
|
<x-table.td class="w-6/12 lg:w-2/12" kind="cursor-none">
|
||||||
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
|
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
|
||||||
</td>
|
</x-table.td>
|
||||||
|
|
||||||
<td class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
|
<x-table.td class="w-6/12 lg:w-2/12" kind="cursor-none">
|
||||||
<x-empty-data />
|
<x-empty-data />
|
||||||
</td>
|
</x-table.td>
|
||||||
@else
|
@else
|
||||||
<td class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
|
<x-table.td class="w-6/12 lg:w-2/12" kind="cursor-none">
|
||||||
<x-empty-data />
|
<x-empty-data />
|
||||||
</td>
|
</x-table.td>
|
||||||
|
|
||||||
<td class="w-2/12 ltr:pr-6 rtl:pl-6 py-3 ltr:text-left rtl:text-right text-xs font-medium text-black tracking-wider">
|
<x-table.td class="w-6/12 lg:w-2/12" kind="cursor-none">
|
||||||
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
|
<x-money :amount="$item->amount" :currency="$item->currency_code" convert />
|
||||||
</td>
|
</x-table.td>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<td class="ltr:pl-6 rtl:pr-6 py-4 text-center text-sm font-medium">
|
<x-table.td kind="amount" class="none-truncate">
|
||||||
@php $type = $item->isIncome() ? 'income' : 'expense'; @endphp
|
@php $type = $item->isIncome() ? 'income' : 'expense'; @endphp
|
||||||
|
|
||||||
<x-form.input.checkbox name="{{ $type . '_' . $item->id }}"
|
<x-form.input.checkbox name="{{ $type . '_' . $item->id }}"
|
||||||
@ -160,11 +158,11 @@
|
|||||||
v-model="form.transactions.{{ $type . '_' . $item->id }}"
|
v-model="form.transactions.{{ $type . '_' . $item->id }}"
|
||||||
@change="onCalculate"
|
@change="onCalculate"
|
||||||
/>
|
/>
|
||||||
</td>
|
</x-table.td>
|
||||||
</tr>
|
</x-table.tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</x-table.tbody>
|
||||||
</table>
|
</x-table>
|
||||||
|
|
||||||
@if ($transactions->count())
|
@if ($transactions->count())
|
||||||
<table class="min-w-full divide-y divide-gray-200">
|
<table class="min-w-full divide-y divide-gray-200">
|
||||||
@ -247,8 +245,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-6">
|
<div class="mt-6">
|
||||||
@if ($transactions->count())
|
@if ($transactions->count())
|
||||||
|
Reference in New Issue
Block a user