[WIP] begin of new display for article, shelves

This commit is contained in:
Ludovic CANDELLIER
2022-06-13 23:29:05 +02:00
parent e31978b1e3
commit b37321daf8
13 changed files with 163 additions and 98 deletions

View File

@@ -6,8 +6,8 @@
@include('components.form.button', ['id' => 'by_rows', 'icon' => 'fa-list', 'class' => 'btn-secondary'])
@endif
@include('components.form.button', ['id' => 'semences', 'icon' => 'fa-leaf', 'class' => 'bg-yellow yellow-dark'])
@include('components.form.button', ['id' => 'plants', 'icon' => 'fa-seedling', 'class' => 'bg-green text-white'])
@include('components.form.button', ['data_id' => 'botanic', 'icon' => 'fa-leaf', 'class' => 'products bg-yellow yellow-dark'])
@include('components.form.button', ['data_id' => 'merchandise', 'icon' => 'fa-seedling', 'class' => 'products bg-green text-white'])
</div>
</div>
@@ -15,12 +15,16 @@
@push('js')
<script>
$('#by_rows').click(function() {
var url = "{{ route('Shop.Categories.show', ['id' => $category['id'], 'by_rows' => true]) }}";
window.location = url;
})
$('#display_by_rows').val(1);
$('#category-form').submit();
});
$('#by_cards').click(function() {
var url = "{{ route('Shop.Categories.show', ['id' => $category['id']]) }}";
window.location = url;
})
$('#display_by_rows').val(0);
$('#category-form').submit();
});
$('.products').click(function() {
$('#product_type').val($(this).data('id'));
$('#category-form').submit();
});
</script>
@endpush