From 8636337e904ae92a1b4eff460a22a95128523a9b Mon Sep 17 00:00:00 2001 From: Pavel Mironchik Date: Thu, 24 Jun 2021 23:41:20 +0600 Subject: [PATCH] Extract a row of the documents table in a dedicated Blade view. --- .../documents/index/card-body.blade.php | 166 +----------------- .../partials/documents/table/row.blade.php | 165 +++++++++++++++++ 2 files changed, 166 insertions(+), 165 deletions(-) create mode 100644 resources/views/partials/documents/table/row.blade.php diff --git a/resources/views/components/documents/index/card-body.blade.php b/resources/views/components/documents/index/card-body.blade.php index e5eed5aa9..1ba633eed 100644 --- a/resources/views/components/documents/index/card-body.blade.php +++ b/resources/views/components/documents/index/card-body.blade.php @@ -90,171 +90,7 @@ @foreach($documents as $item) - @php $paid = $item->paid; @endphp - - - @if (!$hideBulkAction) - - {{ Form::bulkActionGroup($item->id, $item->document_number) }} - - @endif - - @stack('document_number_td_start') - @if (!$hideDocumentNumber) - - @stack('document_number_td_inside_start') - - {{ $item->document_number }} - - @stack('document_number_td_inside_end') - - @endif - @stack('document_number_td_end') - - @stack('contact_name_td_start') - @if (!$hideContactName) - - @stack('contact_name_td_inside_start') - - {{ $item->contact_name }} - - @stack('contact_name_td_inside_end') - - @endif - @stack('contact_name_td_end') - - @stack('amount_td_start') - @if (!$hideAmount) - - @stack('amount_td_inside_start') - - @money($item->amount, $item->currency_code, true) - - @stack('amount_td_inside_end') - - @endif - @stack('amount_td_end') - - @stack('issued_at_td_start') - @if (!$hideIssuedAt) - - @stack('issued_at_td_inside_start') - - @date($item->issued_at) - - @stack('issued_at_td_inside_end') - - @endif - @stack('issued_at_td_end') - - @stack('due_at_td_start') - @if (!$hideDueAt) - - @stack('due_at_td_inside_start') - - @date($item->due_at) - - @stack('due_at_td_inside_end') - - @endif - @stack('due_at_td_end') - - @stack('status_td_start') - @if (!$hideStatus) - - @stack('status_td_inside_start') - - {{ trans($textDocumentStatus . $item->status) }} - - @stack('status_td_inside_end') - - @endif - @stack('status_td_end') - - @if (!$hideActions) - - - - @endif - + @include('partials.documents.table.row') @endforeach diff --git a/resources/views/partials/documents/table/row.blade.php b/resources/views/partials/documents/table/row.blade.php new file mode 100644 index 000000000..2ff5ceae3 --- /dev/null +++ b/resources/views/partials/documents/table/row.blade.php @@ -0,0 +1,165 @@ +@php $paid = $item->paid; @endphp + + + @if (!$hideBulkAction) + + {{ Form::bulkActionGroup($item->id, $item->document_number) }} + + @endif + + @stack('document_number_td_start') + @if (!$hideDocumentNumber) + + @stack('document_number_td_inside_start') + + {{ $item->document_number }} + + @stack('document_number_td_inside_end') + + @endif + @stack('document_number_td_end') + + @stack('contact_name_td_start') + @if (!$hideContactName) + + @stack('contact_name_td_inside_start') + + {{ $item->contact_name }} + + @stack('contact_name_td_inside_end') + + @endif + @stack('contact_name_td_end') + + @stack('amount_td_start') + @if (!$hideAmount) + + @stack('amount_td_inside_start') + + @money($item->amount, $item->currency_code, true) + + @stack('amount_td_inside_end') + + @endif + @stack('amount_td_end') + + @stack('issued_at_td_start') + @if (!$hideIssuedAt) + + @stack('issued_at_td_inside_start') + + @date($item->issued_at) + + @stack('issued_at_td_inside_end') + + @endif + @stack('issued_at_td_end') + + @stack('due_at_td_start') + @if (!$hideDueAt) + + @stack('due_at_td_inside_start') + + @date($item->due_at) + + @stack('due_at_td_inside_end') + + @endif + @stack('due_at_td_end') + + @stack('status_td_start') + @if (!$hideStatus) + + @stack('status_td_inside_start') + + {{ trans($textDocumentStatus . $item->status) }} + + @stack('status_td_inside_end') + + @endif + @stack('status_td_end') + + @if (!$hideActions) + + + + @endif +