mivita/resources/views/portal/order/my_orders.blade.php
2026-02-20 17:55:06 +01:00

77 lines
3 KiB
PHP
Executable file

@extends('portal.layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_orders') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="table table-striped table-bordered" id="datatables-orders">
<thead>
<tr>
<th>#</th>
<th>{{ __('tables.date') }}</th>
<th>{{ __('tables.amount') }}</th>
<th>{{ __('tables.status') }}</th>
<th>{{ __('tables.shipping') }}</th>
<th>{{ __('tables.firstname') }}</th>
<th>{{ __('tables.lastname') }}</th>
<th>{{ __('tables.email') }}</th>
<th>{{ __('tables.invoice') }}</th>
<th>{{ __('tables.art') }}</th>
</tr>
</thead>
<tbody>
{{-- Daten werden per AJAX über DataTables geladen --}}
</tbody>
</table>
</div>
</div>
@endsection
@section('scripts')
<script>
$(document).ready(function() {
$('#datatables-orders').DataTable({
processing: true,
serverSide: true,
ajax: '{!! route('portal.my_orders.datatable') !!}',
order: [[1, 'desc']],
columns: [
{ data: 'id', name: 'id', searchable: false, orderable: true },
{ data: 'created_at', name: 'shopping_orders.created_at' },
{ data: 'total_shipping', name: 'shopping_orders.total_shipping' },
{ data: 'txaction', name: 'shopping_orders.txaction' },
{ data: 'shipped', name: 'shopping_orders.shipped' },
{ data: 'firstname', name: 'shopping_user.billing_firstname', orderable: false },
{ data: 'lastname', name: 'shopping_user.billing_lastname', orderable: false },
{ data: 'email', name: 'shopping_user.billing_email', orderable: false },
{ data: 'invoice', name: 'invoice', searchable: false, orderable: false },
{ data: 'payment_for', name: 'shopping_orders.payment_for' },
],
bLengthChange: false,
iDisplayLength: 50,
language: {
url: '/js/datatables-{{ \App::getLocale() }}.json'
}
});
});
</script>
@endsection