@php $id_form = 'storeDetailsInsert'; $id_table = 'storeDetailsRecords'; @endphp @extends('master') @section('content')
{{ __( 'New Store Details') }}
@include('components.form', [ 'id' => $id_form, // INPUT ID BIND 'resource' => 'orders', // FORM RESOURCE TARGET 'method' => config('const.crud.update'), // REQUIRED FORM METHOD 'hidden' => [ 'target' => 'products' // SPECIFY THE ACTION TARGET ], 'refs' => [ 'table' => $id_table // RECORDS TABLE ], 'groups' => [ [ 'product_code' => [ 'required' => true, 'type' => 'input-text', 'label' => __('form.label.product'), 'label-class' => 'col-md-1 small', 'div-class' => 'col-md-5', 'input-class' => 'select2x', 'input-attrs' => 'data-init="product_code:product_label"', 'placeholder' => __('form.placeholder.product.name'), 'help' => __('form.help.product.name'), ], 'quantity' => [ 'required' => true, 'type' => 'input-text', 'label' => __('form.label.quantity'), 'label-class' => 'col-md-1 small', 'div-class' => 'col-md-2', 'input-class' => 'centered padding0', 'placeholder' => __('form.placeholder.product.quantity'), 'help' => __('form.help.product.quantity') ], 'notes' => [ 'type' => 'textarea', 'label-class' => 'col-md-1 small', 'div-class' => 'col-md-2', 'rows' => '2', // 2 LINES 'label' => __('form.label.notes'), ] ] ] ])
{{ __( 'Store Details') }}
@include('components.table', [ 'id' => $id_table, // INPUT ID BIND 'class' => 'table cell-border hover', 'resource' => 'order_products', // FORM RESOURCE TARGET 'method' => config('const.crud.delete'), // RESOURCE METHOD AVAILABLE 'data' => $order->products, 'refs' => [ 'form' => $id_form // RECORDS TABLE ], 'headers' => [ [ 'label' => __('table.header.id'), 'target' => 'id', ], [ 'label' => __('table.header.code'), 'target' => 'code', ], [ 'label' => __('table.header.product'), 'target' => 'label', 'dclass' => 'lefted', ], [ 'label' => __('table.header.quantity'), 'target' => 'pivot.quantity', 'hclass' => 'quantity' ], [ 'label' => __('table.header.created'), 'target' => 'created_at', ], [ 'label' => __('table.header.delete'), 'target' => '_delete' ], ] ])
@stop @push('ready') @endpush