@push('style')
@endpush
@php
$headers = [
[
'label' => __('table.header.id'),
'target' => 'id',
'dclass' => 'lefted',
],
[
'label' => __('table.header.code'),
'target' => 'code',
],
[
'label' => __('table.header.name'),
'target' => 'name',
'dclass' => 'lefted',
],
[
'label' => __('table.header.gender'),
'target' => 'gender_label',
'dclass' => 'centered',
],
[
'label' => __('table.header.deliveries'),
'target' => 'deliveries_count',
],
[
'label' => __('table.header.phone'),
'hclass' => 'city',
'target' => 'phone',
],
[
'label' => __('table.header.email'),
'hclass' => 'email',
'target' => 'email',
],
[
'label' => __('table.header.city'),
'target' => 'city',
'hclass' => 'city',
'dclass' => 'lefted',
],
[
'label' => __('table.header.load'),
'target' => 'loaded_products',
],
[
'label' => __('table.header.registered'),
'target' => 'created_at',
],
[
'label' => __('table.header.notes'),
'target' => 'notes',
'wclass' => 'notes',
'hclass' => 'notes',
'dclass' => 'notes',
],
[
'label' => __('table.header.unload'),
'hclass' => 'handle',
'target' => '_button',
'class' => 'btn btn btn-default disabled',
'icon' => 'fa fa-truck'
],
[
'label' => __('table.header.load'),
'hclass' => 'handle',
'target' => '_button1',
'class' => 'btn btn-success load list',
'icon' => 'fa fa-truck'
],
[
'label' => __('table.header.edit'),
'target' => '_edit',
],
[
'label' => __('table.header.delete'),
'target' => '_delete'
],
];
// GET HEADERS TARGETS
$col = array_flip( array_column($headers, 'target') );
@endphp
@include('components.table', [
'id' => $id,
'edit' => @$edit, // EDIT TARGET ID
'class' => 'table cell-border hover',
'data' => $data,
'headers' => $headers,
'fields' => $col
])
@push('ready')
@endpush