Fix on merchandises
This commit is contained in:
@@ -3,11 +3,26 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col-3">
|
||||
{{ Form::label('model', 'Familles de produit') }}<br>
|
||||
@include('components.form.select', ['name' => 'product_type', 'id_name' => 'product_type', 'list' => $models_options, 'value' => $article['product_type'] ?? null, 'class' => 'select2', 'with_empty' => '', 'required' => true])
|
||||
@include('components.form.select', [
|
||||
'name' => 'product_type',
|
||||
'id_name' => 'product_type',
|
||||
'list' => $models_options,
|
||||
'value' => $article['product_type'] ?? null,
|
||||
'class' => 'select2',
|
||||
'with_empty' => '',
|
||||
'required' => true
|
||||
])
|
||||
</div>
|
||||
<div class="col-6">
|
||||
{{ Form::label('model_id', 'Produit') }}<br>
|
||||
@include('components.form.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>
|
||||
@@ -22,14 +37,27 @@
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ Form::label('article_nature_id', __('shop.article_natures.name')) }}<br>
|
||||
@include('components.form.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-8">
|
||||
{{ Form::label('categories', __('shop.shelves.title')) }}<br>
|
||||
@include('components.form.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 class="col-2">
|
||||
{{ Form::label('visible', 'Visible') }}<br>
|
||||
@@ -58,7 +86,13 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
{{ Form::label('tags', 'Tags') }}<br>
|
||||
@include('components.form.selects.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>
|
||||
|
||||
@@ -71,7 +105,12 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col-12">
|
||||
{{ Form::label('description', 'Description') }}
|
||||
@include('components.form.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>
|
||||
|
||||
@@ -80,8 +119,17 @@
|
||||
<div id="product_images_inherited">
|
||||
@include('Admin.Shop.Articles.partials.product.images')
|
||||
</div>
|
||||
@include('components.uploader.widget', ['load_url' => route('Admin.Shop.Articles.getImages', ['id' => $article['id'] ?? false]), 'delete_url' => route('Admin.Shop.Articles.deleteImage'), 'title' => 'Photos', 'name' => 'images' ])
|
||||
@include('Admin.Core.Comments.partials.comments', ['model' => 'Shop.Article', 'model_id' => $article['id'] ?? false, 'comments' => $article['comments'] ?? false])
|
||||
@include('components.uploader.widget', [
|
||||
'load_url' => route('Admin.Shop.Articles.getImages', ['id' => $article['id'] ?? false]),
|
||||
'delete_url' => route('Admin.Shop.Articles.deleteImage'),
|
||||
'title' => 'Photos',
|
||||
'name' => 'images'
|
||||
])
|
||||
@include('Admin.Core.Comments.partials.comments', [
|
||||
'model' => 'Shop.Article',
|
||||
'model_id' => $article['id'] ?? false,
|
||||
'comments' => $article['comments'] ?? false
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -109,9 +157,11 @@
|
||||
var url = '{{ route('Admin.Botanic.Species.getSelect') }}';
|
||||
break;
|
||||
case 'App\\Models\\Botanic\\Variety':
|
||||
default:
|
||||
var url = '{{ route('Admin.Botanic.Varieties.getSelect') }}';
|
||||
break;
|
||||
case 'App\\Models\\Shop\\Merchandise':
|
||||
var url = '{{ route('Admin.Shop.Merchandises.getSelect') }}';
|
||||
break;
|
||||
}
|
||||
loadProducts(url);
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@include('components.form.input', ['name' => 'name', 'value' => $category['name'] ?? null, 'required' => true])
|
||||
</div>
|
||||
<div class="col-5">
|
||||
{{ Form::label('parent', 'Rubrique parente') }}
|
||||
{{ Form::label('parent', 'Rayon parent') }}
|
||||
@include('components.form.select', [
|
||||
'name' => 'parent_id',
|
||||
'list' => $categories ?? [],
|
||||
|
||||
Reference in New Issue
Block a user