change icons, css, add routing to merchandise, add mail templater, fixes

This commit is contained in:
Ludovic CANDELLIER
2023-02-12 23:34:48 +01:00
parent 8313e25f2e
commit f2f4788ce1
71 changed files with 1486 additions and 154 deletions

View File

@@ -1,3 +1,14 @@
<div class="row">
<div class="col-4">
{{ Form::label('product_type', 'Famille de produit') }}
@include('components.form.select', [
'name' => 'product_type',
'value' => $article_nature['product_type'] ?? null,
'list' => $product_types ?? null,
'required' => true,
])
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="row mb-3">

View File

@@ -10,6 +10,6 @@
<input type="hidden" name="id" id="id" value="{{ $article['id'] ?? null }}">
@include('Admin.Shop.Articles.form')
</form>
{{ Form::close() }}
@endsection

View File

@@ -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});

View File

@@ -11,7 +11,7 @@
@if ($inherited['tags'])
<h6> Tags</h6>
@foreach ($inherited['tags'] as $tag)
<button type="button" class="btn btn-secondary btn-xs">{{ $tag['tag_group']['name'] }}-{{ $tag['name'] ?? $tag['name'] }}</button>
<button type="button" class="btn btn-secondary btn-xs">{{ $tag['tag_group']['name'] ?? '' }}-{{ $tag['name'] ?? '' }}</button>
@endforeach
@endif
@endcomponent