@push('style')
@endpush
@php
// TABLE HEADERS
# SEPARATED TO HANDLE CONFIG CONSTRUCTION IN THIS FILE
$headers = [
// EXTRA DATA HIDDEN
[
'label' => '',
'target' => 'order_label',
'hclass' => 'hidden',
'dclass' => 'hidden'
],
[
'label' => '',
'target' => 'courier_label',
'hclass' => 'hidden',
'dclass' => 'hidden'
],
// VISIBLE DATA
[
'label' => __('table.header.id'),
'target' => 'id',
],
[
'label' => __('table.header.code'),
'target' => 'code',
],
[
'label' => __('table.header.name'),
'target' => 'name',
'dclass' => 'lefted',
'hclass' => 'labelx',
],
[
'label' => __('table.header.status'),
'target' => 'order_status',
],
[
'label' => __('table.header.order'),
'target' => 'order_code',
],
[
'label' => 'courier',
'target' => 'courier_code',
],
[
'label' => __('table.header.registered'),
'target' => 'created_at',
],
[
'label' => __('table.header.notes'),
'target' => 'notes',
'hclass' => 'notes',
'wclass' => 'notes'
],
[
'label' => __('table.header.account'),
'hclass' => 'handle',
'target' => '_button',
'class' => 'btn btn-success account',
'icon' => 'fa fa-credit-card'
],
[
'label' => __('table.header.stats'),
'hclass' => 'handle',
'target' => '_button',
'class' => 'btn btn-info stats',
'icon' => 'fa fa-bar-chart-o'
],
[
'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,
'targets' => [
'store' => 'store_id'
]
])
@push('ready')
@endpush