Refactoring, change menu, add many features
This commit is contained in:
@@ -7,11 +7,11 @@
|
||||
@include('load.form.select2')
|
||||
|
||||
@section('content')
|
||||
@include('components.datatable', ['route' => route('Admin.Shop.Articles.index'), 'model' => 'articles', 'with_filters' => true])
|
||||
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-articles-filters'])
|
||||
@include('Admin.Shop.Articles.partials.filters')
|
||||
@component('components.card')
|
||||
@include('components.datatable', ['route' => route('Admin.Shop.Articles.index'), 'model' => 'articles', 'with_filters' => true])
|
||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-articles-filters'])
|
||||
@include('Admin.Shop.Articles.partials.filters')
|
||||
@endcomponent
|
||||
@endcomponent
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -4,40 +4,40 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col-3">
|
||||
{{ Form::label('model', 'Familles de produit') }}<br>
|
||||
@include('components.select', ['name' => 'product_type', 'id_name' => 'product_type', 'list' => $models_options, 'value' => $article['product_type'] ?? null, 'class' => 'select2', 'with_empty' => ''])
|
||||
@include('components.form.select', ['name' => 'product_type', 'id_name' => 'product_type', 'list' => $models_options, 'value' => $article['product_type'] ?? null, 'class' => 'select2', 'with_empty' => ''])
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ Form::label('model_id', 'Produit') }}<br>
|
||||
@include('components.select', ['name' => 'product_id', 'id_name' => 'product_id', 'list' => $products ?? [], 'value' => $article['product_id'] ?? null, 'class' => 'select2', 'with_empty' => ''])
|
||||
@include('components.form.select', ['name' => 'product_id', 'id_name' => 'product_id', 'list' => $products ?? [], 'value' => $article['product_id'] ?? null, 'class' => 'select2', 'with_empty' => ''])
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ Form::label('ref', 'Référence') }}<br>
|
||||
@include('components.input', ['name' => 'ref', 'value' => $article['ref'] ?? null])
|
||||
@include('components.form.input', ['name' => 'ref', 'value' => $article['ref'] ?? null])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-8">
|
||||
{{ Form::label('name', 'Nom') }}<br>
|
||||
@include('components.input', ['name' => 'name', 'value' => $article['name'] ?? null, 'required' => true])
|
||||
@include('components.form.input', ['name' => 'name', 'value' => $article['name'] ?? null, 'required' => true])
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ Form::label('article_nature_id', __('shop.article_natures.name')) }}<br>
|
||||
@include('components.select', ['name' => 'article_nature_id', 'list' => $natures_options, 'value' => $article['article_nature_id'] ?? null, 'class' => 'select2', 'with_empty' => '', 'required' => true])
|
||||
@include('components.form.select', ['name' => 'article_nature_id', 'list' => $natures_options, 'value' => $article['article_nature_id'] ?? null, 'class' => 'select2', 'with_empty' => '', 'required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
{{ Form::label('categories', __('shop.shelves.title')) }}<br>
|
||||
@include('components.select', ['name' => 'categories[]', 'list' => $categories_options, 'values' => $article['categories'] ?? null, 'class' => 'select2', 'multiple' => true])
|
||||
@include('components.form.select', ['name' => 'categories[]', 'list' => $categories_options, 'values' => $article['categories'] ?? null, 'class' => 'select2', 'multiple' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
{{ Form::label('tags', 'Tags') }}<br>
|
||||
@include('components.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $article['tags'] ?? null, 'class' => 'select2', 'multiple' => true])
|
||||
@include('components.form.selects.select-tree', ['name' => 'tags[]', 'list' => $tags_list, 'values' => $article['tags'] ?? null, 'class' => 'select2', 'multiple' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
{{ Form::label('description', 'Description') }}
|
||||
@include('components.textarea', ['name' => 'description', 'value' => $article['description'] ?? null, 'class' => 'editor', 'required' => true])
|
||||
@include('components.form.textarea', ['name' => 'description', 'value' => $article['description'] ?? null, 'class' => 'editor', 'required' => true])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="row">
|
||||
<label class="col-4">{{ __('article_natures.title') }}</label>
|
||||
<div class="col-8">
|
||||
@include('components.select', ['name' => 'article_nature_id', 'list' => $article_natures ?? [], 'value' => $filters['article_nature_id'] ?? null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
|
||||
@include('components.form.select', ['name' => 'article_nature_id', 'list' => $article_natures ?? [], 'value' => $filters['article_nature_id'] ?? null, 'class' => 'form-control-sm select2', 'with_empty' => ' '])
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<div class="col-12 col-lg-7">
|
||||
{{ Form::label('attribute_family_id', 'Attributs') }}<br/>
|
||||
@include('components.select', [
|
||||
@include('components.form.select', [
|
||||
'name' => "prices[$key][attribute][attribute_family_id]",
|
||||
'value' => $attribute['attribute_value']['article_attribute_family_id'] ?? null,
|
||||
'list' => $attribute_families_options,
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<div class="col-12 col-lg-5">
|
||||
{{ Form::label('attribute_value_id', 'Valeur') }}<br/>
|
||||
@include('components.select', [
|
||||
@include('components.form.select', [
|
||||
'name' => "prices[$key][attribute][attribute_value_id]",
|
||||
'value' => $attribute['article_attribute_value_id'] ?? null,
|
||||
'list' => $attribute_values ?? null,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<input type="hidden" name="prices[][attribute][quantity]" value="1">
|
||||
<div class="col-12 col-lg-6 1">
|
||||
{{ Form::label('attribute_family_id', 'Attributs') }}<br/>
|
||||
@include('components.select', [
|
||||
@include('components.form.select', [
|
||||
'name' => 'prices[][attribute][attribute_family_id]',
|
||||
'value' => $attribute_value['article_attribute_family_id'] ?? null,
|
||||
'list' => $attribute_families_options,
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<div class="col-12 col-lg-6 2">
|
||||
{{ Form::label('attribute_value_id', 'Valeur') }}<br/>
|
||||
@include('components.select', [
|
||||
@include('components.form.select', [
|
||||
'name' => 'prices[][attribute][attribute_value_id]',
|
||||
'value' => $attribute_value['id'] ?? null,
|
||||
'list' => $attribute_values ?? null,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<div class="row mt-3">
|
||||
<div class="col-6">
|
||||
@include('components.select-tree', ['name' => "article_price_generic_id", 'id_name' => "article_price_generic_id", 'value' => $price['article_price_generic_id'] ?? null, 'list' => $price_generics ?? null, 'required' => false, 'class' => 'form-control-sm w-100'])
|
||||
@include('components.form.selects.select-tree', ['name' => "article_price_generic_id", 'id_name' => "article_price_generic_id", 'value' => $price['article_price_generic_id'] ?? null, 'list' => $price_generics ?? null, 'required' => false, 'class' => 'form-control-sm w-100'])
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn btn-sm btn-primary" id="add-new-generic_price">Associer un tarif générique <i class="fa fa-plus"></i></button>
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-1">
|
||||
{{ Form::label('quantity', 'Qté.') }}<br/>
|
||||
@include('components.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
|
||||
@include('components.form.inputs.number', ['name' => "prices[$key][quantity]", 'value' => $price['quantity'] ?? 1, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
{{ Form::label('package_id', 'Type Package') }}<br/>
|
||||
@include('components.select', [
|
||||
@include('components.form.select', [
|
||||
'name' => "prices[$key][package_id]",
|
||||
'value' => $price['package_id'] ?? null,
|
||||
'list' => $packages ?? null,
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<div class="col-lg-1">
|
||||
{{ Form::label('package_qty', 'Pack Qté') }}<br/>
|
||||
@include('components.number', [
|
||||
@include('components.form.inputs.number', [
|
||||
'name' => "prices[$key][package_quantity]",
|
||||
'value' => $price['package_quantity'] ?? null,
|
||||
'required' => true,
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
<div class="col-lg-3">
|
||||
{{ Form::label('unity_id', 'Unité') }}<br/>
|
||||
@include('components.select', [
|
||||
@include('components.form.select', [
|
||||
'name' => "prices[$key][unity_id]",
|
||||
'value' => $price['unity_id'] ?? null,
|
||||
'list' => $unities ?? null,
|
||||
@@ -48,17 +48,17 @@
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ Form::label('tax_id', 'TVA') }}<br/>
|
||||
@include('components.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
|
||||
@include('components.form.select', ['name' => "prices[$key][tax_id]", 'value' => $price['tax_id'] ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
{{ Form::label('price', 'Prix HT') }}
|
||||
@include('components.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
@include('components.form.inputs.money', ['name' => "prices[$key][price]", 'value' => $price['price'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
{{ Form::label('price_taxed', 'Prix TTC') }}
|
||||
@include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
@include('components.form.inputs.money', ['name' => "prices[$key][price_taxed]", 'value' => $price['price_taxed'] ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
<div class="col-lg-1">
|
||||
{{ Form::label('quantity', 'Quantité') }}<br/>
|
||||
@include('components.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
|
||||
@include('components.form.inputs.number', ['name' => 'prices[0][quantity]', 'value' => $quantity ?? 1, 'required' => true, 'class' => 'form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
{{ Form::label('package_id', 'Type Package') }}<br/>
|
||||
@include('components.select', [
|
||||
@include('components.form.select', [
|
||||
'name' => "prices[0][package_id]",
|
||||
'value' => $price['package_id'] ?? null,
|
||||
'list' => $packages ?? null,
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<div class="col-lg-1">
|
||||
{{ Form::label('package_qty', 'Pack Qté') }}<br/>
|
||||
@include('components.number', [
|
||||
@include('components.form.inputs.number', [
|
||||
'name' => "prices[0][package_quantity]",
|
||||
'value' => $price['package_quantity'] ?? null,
|
||||
'required' => true,
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<div class="col-lg-3">
|
||||
{{ Form::label('unity_id', 'Unité') }}<br/>
|
||||
@include('components.select', [
|
||||
@include('components.form.select', [
|
||||
'name' => "prices[0][unity_id]",
|
||||
'value' => $price['unity_id'] ?? null,
|
||||
'list' => $unities ?? null,
|
||||
@@ -50,17 +50,17 @@
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
{{ Form::label('tax_id', 'TVA') }}<br/>
|
||||
@include('components.select', ['name' => 'prices[0][tax_id]', 'value' => $tax_id ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
|
||||
@include('components.form.select', ['name' => 'prices[0][tax_id]', 'value' => $tax_id ?? null, 'list' => $taxes_options ?? null, 'required' => true, 'class' => 'form-control form-control-sm'])
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
{{ Form::label('price', 'Prix HT') }}
|
||||
@include('components.money', ['name' => 'prices[0][price]', 'value' => $price ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
@include('components.form.inputs.money', ['name' => 'prices[0][price]', 'value' => $price ?? 0, 'required' => true, 'class' => 'form-control-sm price-item'])
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
{{ Form::label('price_taxed', 'Prix TTC') }}
|
||||
@include('components.money', ['name' => 'prices[0][price_taxed]', 'value' => $price_taxed ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
@include('components.form.inputs.money', ['name' => 'prices[0][price_taxed]', 'value' => $price_taxed ?? 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user