@push('style')
@endpush
@php
// TABLE HEADERS
# SEPARATED TO HANDLE CONFIG CONSTRUCTION IN THIS FILE
$headers = [
[
'label' => __('table.header.id'),
'target' => 'id',
],
[
'label' => __('table.header.code'),
'target' => 'code',
],
[
'label' => __('table.header.category'),
'target' => 'category_label',
'dclass' => 'lefted',
],
[
'label' => __('table.header.name'),
'target' => 'name',
'dclass' => 'lefted',
],
[
'label' => __('table.header.price'),
'target' => 'price'
],
[
'label' => __('table.header.stock'),
'target' => 'stock',
],
[
'label' => __('table.header.registered'),
'target' => 'created_at',
],
[
'label' => __('table.header.description'),
'target' => 'description',
'wclass' => 'description',
'hclass' => 'description',
'dclass' => 'description',
],
[
'label' => __('table.header.notes'),
'target' => 'notes',
'hclass' => 'notes',
'wclass' => 'notes'
],
[
'label' => __('table.header.images'),
'hclass' => 'handle',
'target' => '_button',
'class' => 'btn btn-info images',
'icon' => 'fa fa-file-image-o'
],
[
'label' => __('table.header.documents'),
'hclass' => 'handle',
'target' => '_button',
'class' => 'btn btn-primary documents',
'icon' => 'fa fa-file-text-o'
],
];
// 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
])
@push('ready')
@endpush