change icons, css, add routing to merchandise, add mail templater, fixes
This commit is contained in:
@@ -25,17 +25,6 @@
|
||||
])
|
||||
</div>
|
||||
<div class="col-3">
|
||||
{{ Form::label('ref', 'Référence') }}<br>
|
||||
@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.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.form.select', [
|
||||
'name' => 'article_nature_id',
|
||||
@@ -49,6 +38,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-8">
|
||||
{{ Form::label('name', 'Nom') }}<br>
|
||||
@include('components.form.input', ['name' => 'name', 'value' => $article['name'] ?? null, 'required' => true])
|
||||
</div>
|
||||
<div class="col-4">
|
||||
{{ Form::label('ref', 'Référence') }}<br>
|
||||
@include('components.form.input', ['name' => 'ref', 'value' => $article['ref'] ?? null])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-8">
|
||||
{{ Form::label('categories', __('shop.shelves.title')) }}<br>
|
||||
@@ -156,25 +156,37 @@
|
||||
switch (product_type) {
|
||||
case 'App\\Models\\Botanic\\Specie':
|
||||
var url = '{{ route('Admin.Botanic.Species.getSelect') }}';
|
||||
var product_type = 1;
|
||||
break;
|
||||
case 'App\\Models\\Botanic\\Variety':
|
||||
var url = '{{ route('Admin.Botanic.Varieties.getSelect') }}';
|
||||
var product_type = 1;
|
||||
break;
|
||||
case 'App\\Models\\Shop\\Merchandise':
|
||||
var url = '{{ route('Admin.Shop.Merchandises.getSelect') }}';
|
||||
var product_type = 2;
|
||||
break;
|
||||
}
|
||||
loadProducts(url);
|
||||
var url = '{{ route('Admin.Shop.ArticleNatures.getOptions') }}';
|
||||
loadArticleNatures(url);
|
||||
});
|
||||
|
||||
function loadArticleNatures(url) {
|
||||
$.ajax({
|
||||
url : url,
|
||||
method : 'POST',
|
||||
data: {product_type: $('#product_type').val()},
|
||||
success : function(data) {
|
||||
setOptions('#article_nature_id', data);
|
||||
// $("#product_id").select2({data: data});
|
||||
// $("#product_id").trigger('change');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadProducts(url) {
|
||||
$.ajax({
|
||||
url : url,
|
||||
method : 'POST',
|
||||
data: {model: $('#product_type').val()},
|
||||
data: {article_nature_id: $('#article_nature_id').val()},
|
||||
success : function(data) {
|
||||
setOptions('#product_id', data);
|
||||
// $("#product_id").select2({data: data});
|
||||
|
||||
Reference in New Issue
Block a user