@extends('components.form', [
'id' => $id, // INPUT ID BIND
'resource' => $resource, // FORM RESOURCE TARGET
'static' => @$static, // NOT DINAMIC JUST ALWAYS INS
'table' => @$table, // RELATED TABLE ID
'groups' => [
[
'name' => [
'required' => true,
'type' => 'input-text',
'label' => __('form.label.name'),
'div-class' => 'col-md-8',
'placeholder' => __('form.placeholder.product.name'),
'help' => __('form.help.product.name'),
]
],
[
'category_code' => [
'required' => true,
'type' => 'input-text',
'label' => __('form.label.category'),
'div-class' => 'col-md-8',
'input-class' => 'select2x',
'input-attrs' => 'data-init="category_code:category_label"',
'placeholder' => __('form.placeholder.code'),
'help' => __('form.help.product.category'),
],
],
[
'stock' => [
'required' => true,
'type' => 'input-text',
'label' => __('form.label.stock'),
'div-class' => 'col-md-2',
'input-class' => 'centered padding0',
'placeholder' => __('form.placeholder.product.stock'),
'help' => __('form.help.product.stock')
],
'price' => [
'required' => true,
'type' => 'input-text',
'label' => 'PRICE',
'label-class' => 'col-md-1',
'div-class' => 'col-md-2',
'input-class' => 'centered padding0', // BEST FIT',
'placeholder' => __('form.placeholder.product.price'),
'help' => __('form.help.product.price')
],
'code' => [
'required' => true,
'type' => 'input-text',
'label' => __('form.label.code'),
'label-class' => 'col-md-1',
'div-class' => 'col-md-2',
'value' => Utils::newCode($resource),
'placeholder' => __('form.placeholder.code'),
'help' => __('form.help.product.code'),
'help-icon' => 'fa fa-barcode',
]
],
[
'description' => [
'type' => 'textarea',
'label' => __('form.label.description'),
'div-class' => 'col-md-8',
]
],
[
'notes' => [
'type' => 'textarea',
'label' => __('form.label.notes'),
'div-class' => 'col-md-8',
]
]
]
])
@push('ready')
@endpush