add datatbles for invoices, add pdf icon, refactor icons components, add autocomplete on search, adapt searching to meilisearch
This commit is contained in:
2
resources/views/Shop/Invoices/partials/filters.blade.php
Normal file
2
resources/views/Shop/Invoices/partials/filters.blade.php
Normal file
@@ -0,0 +1,2 @@
|
||||
<form id="{{ $model }}-filters">
|
||||
</form>
|
||||
26
resources/views/Shop/Invoices/partials/list.blade.php
Normal file
26
resources/views/Shop/Invoices/partials/list.blade.php
Normal file
@@ -0,0 +1,26 @@
|
||||
@include('components.datatable', [
|
||||
'route' => route('Shop.Invoices.index'),
|
||||
'model' => 'invoices',
|
||||
'with_add' => false,
|
||||
'with_filters' => true,
|
||||
'with_exports' => false,
|
||||
'with_print' => false,
|
||||
'show_callback' => 'InvoiceView(id);',
|
||||
])
|
||||
|
||||
@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-invoices-filters'])
|
||||
@include('Shop.Invoices.partials.filters', ['model' => 'invoices'])
|
||||
@endcomponent
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
function InvoiceView(id) {
|
||||
var url_open = "{{ route('Shop.Invoices.view') }}/" + id;
|
||||
openModal("Voir une facture", '#invoice-form', url_open, false, false, 'xl', {{ !($with_add ?? false) }});
|
||||
}
|
||||
|
||||
function InvoiceRefresh() {
|
||||
reloadDatatable("invoices");
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
60
resources/views/Shop/Invoices/view.blade.php
Normal file
60
resources/views/Shop/Invoices/view.blade.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col-6">
|
||||
<h3>
|
||||
@if ($invoice['customer']['company'])
|
||||
{{ $invoice['customer']['company'] }}<br />
|
||||
@endif
|
||||
{{ $invoice['customer']['last_name'] }} {{ $invoice['customer']['first_name'] }}
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<x-card title="Adresse de facturation">
|
||||
@if ($invoice['address'])
|
||||
{{ $invoice['address']['address'] }}<br />
|
||||
@isset($invoice['address']['address2'])
|
||||
{{ $invoice['address']['address2'] }}<br />
|
||||
@endisset
|
||||
{{ $invoice['address']['zipcode'] }}
|
||||
{{ $invoice['address']['city'] }}<br />
|
||||
@endif
|
||||
</x-card>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<x-card title="Adresse de livraison">
|
||||
@if ($invoice['order']['delivery_address'])
|
||||
{{ $invoice['order']['delivery_address']['address'] }}<br />
|
||||
@isset($invoice['order']['delivery_address']['address2'])
|
||||
{{ $invoice['order']['delivery_address']['address2'] }}<br />
|
||||
@endisset
|
||||
{{ $invoice['order']['delivery_address']['zipcode'] }}
|
||||
{{ $invoice['order']['delivery_address']['city'] }}<br />
|
||||
@endif
|
||||
</x-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="row mb-3">
|
||||
<div class="col-6" style="font-size: 1.2em; font-weight: 500;">
|
||||
Facture N° {{ $invoice['ref'] }}<br />
|
||||
du {{ Carbon\Carbon::parse($invoice['created_at'])->isoFormat('LLLL') }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
Statut : {{ $invoice['status'] }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-6">
|
||||
Canal de vente : {{ $invoice['order']['sale_channel']['name'] }}
|
||||
</div>
|
||||
<div class="col-6">
|
||||
Règlement : {{ $invoice['payment_type'] }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('Admin.Shop.Orders.partials.detail', [
|
||||
'detail_type' => 'facture',
|
||||
'order' => $invoice['order'],
|
||||
])
|
||||
Reference in New Issue
Block a user