@include('Shop.Admin.Articles.partials.prices.block_attribute', ['attribute' => $price['article_attributes'][0]])
+
+
+ {{ Form::label('tax_id', 'TVA') }}
+ @include('components.select', ['name' => "prices[$key][tax_id]", 'value' => (isset($price['tax_id'])) ? $price['tax_id'] : null, 'list' => isset($taxes_options) ? $taxes_options : null, 'required' => true, 'class' => 'form-control form-control-sm'])
+
-
- {{ Form::label('price', 'Prix HT') }}
- @include('components.money', ['name' => "prices[$key][price]", 'value' => (isset($price['price'])) ? $price['price'] : 0, 'required' => true, 'class' => 'form-control-sm price-item'])
-
+
+ {{ Form::label('generic_price_id', 'Générique') }}
+ @include('components.select', ['name' => "prices[$key][generic_price_id]", 'value' => (isset($price['generic_price_id'])) ? $price['generic_price_id'] : null, 'list' => ['Tarif barquette','Tarif semences'], 'required' => false, 'class' => 'form-control-sm'])
+
-
- {{ Form::label('price_taxed', 'Prix TTC') }}
- @include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => (isset($price['price_taxed'])) ? $price['price_taxed'] : 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
+
+ {{ Form::label('price', 'Prix HT') }}
+ @include('components.money', ['name' => "prices[$key][price]", 'value' => (isset($price['price'])) ? $price['price'] : 0, 'required' => true, 'class' => 'form-control-sm price-item'])
+
+
+
+ {{ Form::label('price_taxed', 'Prix TTC') }}
+ @include('components.money', ['name' => "prices[$key][price_taxed]", 'value' => (isset($price['price_taxed'])) ? $price['price_taxed'] : 0, 'required' => true, 'class' => 'form-control-sm price-taxed-item'])
+
+
diff --git a/resources/views/components/button-cancel.blade.php b/resources/views/components/button-cancel.blade.php
new file mode 100644
index 00000000..ccd68316
--- /dev/null
+++ b/resources/views/components/button-cancel.blade.php
@@ -0,0 +1,11 @@
+
+
+@push('js')
+
+@endpush
\ No newline at end of file
diff --git a/resources/views/components/datatable.blade.php b/resources/views/components/datatable.blade.php
index d8cf1bd1..0b66b12d 100644
--- a/resources/views/components/datatable.blade.php
+++ b/resources/views/components/datatable.blade.php
@@ -1,4 +1,13 @@
@include('components.datatables.header')
- {{$dataTable->table(['class'=>'table table-bordered table-hover table-striped w-100'])}}
-
\ No newline at end of file
+ {{$dataTable->table(['class'=>'table table-bordered table-hover table-striped w-100 mb-0'])}}
+
+
+@push('css')
+
+@endpush
+
+@push('scripts')
+
+
+@endpush
\ No newline at end of file
diff --git a/resources/views/components/datatables/buttons/add.blade.php b/resources/views/components/datatables/buttons/add.blade.php
index e08194e0..9ff67c85 100644
--- a/resources/views/components/datatables/buttons/add.blade.php
+++ b/resources/views/components/datatables/buttons/add.blade.php
@@ -1,10 +1,11 @@
-
+
@push('js')
@endpush
diff --git a/resources/views/components/datatables/buttons/colvis.blade.php b/resources/views/components/datatables/buttons/colvis.blade.php
new file mode 100644
index 00000000..a4cb7704
--- /dev/null
+++ b/resources/views/components/datatables/buttons/colvis.blade.php
@@ -0,0 +1,22 @@
+
+
+@push('js')
+
+@endpush
diff --git a/resources/views/components/datatables/buttons/download.blade.php b/resources/views/components/datatables/buttons/download.blade.php
new file mode 100644
index 00000000..0f1cb855
--- /dev/null
+++ b/resources/views/components/datatables/buttons/download.blade.php
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+@push('js')
+
+@endpush
\ No newline at end of file
diff --git a/resources/views/components/datatables/buttons/excel.blade.php b/resources/views/components/datatables/buttons/excel.blade.php
new file mode 100644
index 00000000..33baf83f
--- /dev/null
+++ b/resources/views/components/datatables/buttons/excel.blade.php
@@ -0,0 +1,8 @@
+
+
+
diff --git a/resources/views/components/datatables/buttons/exports.blade.php b/resources/views/components/datatables/buttons/exports.blade.php
index 8be3f8fc..e4434a71 100644
--- a/resources/views/components/datatables/buttons/exports.blade.php
+++ b/resources/views/components/datatables/buttons/exports.blade.php
@@ -1,14 +1,6 @@
-
-
-
-
-
+ @include('components.datatables.buttons.print')
+ @include('components.datatables.buttons.download')
+
diff --git a/resources/views/components/datatables/buttons/filters.blade.php b/resources/views/components/datatables/buttons/filters.blade.php
index 3c104f94..569e285a 100644
--- a/resources/views/components/datatables/buttons/filters.blade.php
+++ b/resources/views/components/datatables/buttons/filters.blade.php
@@ -1,6 +1,5 @@
@push('js')
@@ -8,7 +7,7 @@
var $filter = $('#{{ $model }}-table-header .btn-filter');
$('#modal-filters').on('shown.bs.modal', function () {
- // initSelect2();
+ initSelect2();
});
$('#modal-filters .apply').click(function() {
@@ -16,5 +15,25 @@
var table = window.LaravelDataTables["{{ $model }}-table"];
table.draw();
})
+
+ $('#modal-filters .reset').click(function() {
+ $('#filters').trigger("reset");
+ $('#filters .select2').val(null).trigger("change");
+ })
+
+
+ /*
+ $filter.on( 'click', function () {
+ var table = window.LaravelDataTables["{{ $model }}-table"];
+ // table.search($search.val()).draw();
+ openModal('{{ __('Filters') }}', '{{ $route }}/getFiltersHtml', {
+ onApply: function() {
+ filters = $('#filters').serialize();
+ console.log(filters);
+ table.draw();
+ }
+ });
+ } );
+ */
@endpush
\ No newline at end of file
diff --git a/resources/views/components/datatables/buttons/pageLength.blade.php b/resources/views/components/datatables/buttons/pageLength.blade.php
index 265903cb..91e2cdd4 100644
--- a/resources/views/components/datatables/buttons/pageLength.blade.php
+++ b/resources/views/components/datatables/buttons/pageLength.blade.php
@@ -1,2 +1,14 @@
-@include('components.select', ['name' => 'pager', 'list' => ['5', '10','25', '50', '100']])
+@include('components.select', ['name' => 'pager', 'id_name'=> $model . '_pager', 'list' => [5 => '5', 10 => '10', 25 => '25', 50 => '50', 100 => '100']])
+
+@push('js')
+
+
+
+@endpush
\ No newline at end of file
diff --git a/resources/views/components/datatables/buttons/pdf.blade.php b/resources/views/components/datatables/buttons/pdf.blade.php
new file mode 100644
index 00000000..ef993702
--- /dev/null
+++ b/resources/views/components/datatables/buttons/pdf.blade.php
@@ -0,0 +1,3 @@
+
diff --git a/resources/views/components/datatables/buttons/print.blade.php b/resources/views/components/datatables/buttons/print.blade.php
new file mode 100644
index 00000000..893ee7f7
--- /dev/null
+++ b/resources/views/components/datatables/buttons/print.blade.php
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+@push('js')
+
+@endpush
+
diff --git a/resources/views/components/datatables/buttons/row_action.blade.php b/resources/views/components/datatables/buttons/row_action.blade.php
new file mode 100644
index 00000000..d550a1ab
--- /dev/null
+++ b/resources/views/components/datatables/buttons/row_action.blade.php
@@ -0,0 +1,9 @@
+
+
+
diff --git a/resources/views/components/datatables/search.blade.php b/resources/views/components/datatables/search.blade.php
index 01af6bdb..b3cfc872 100644
--- a/resources/views/components/datatables/search.blade.php
+++ b/resources/views/components/datatables/search.blade.php
@@ -1,10 +1,12 @@
diff --git a/resources/views/components/js/datatable.blade.php b/resources/views/components/js/datatable.blade.php
index fca832f4..113d9af0 100644
--- a/resources/views/components/js/datatable.blade.php
+++ b/resources/views/components/js/datatable.blade.php
@@ -2,7 +2,7 @@
$.extend( true, $.fn.dataTable.defaults, {
language: {
url: "/assets/vendor/boilerplate/js/datatables/i18n/French.json"
- }
+ },
});
@@ -11,30 +11,44 @@
diff --git a/resources/views/components/save.blade.php b/resources/views/components/save.blade.php
index 25a496b3..cb69156f 100644
--- a/resources/views/components/save.blade.php
+++ b/resources/views/components/save.blade.php
@@ -1,6 +1,7 @@
-
+
-
+
+ @include('components.button-cancel')
@include('components.button-save')
diff --git a/resources/views/components/select.blade.php b/resources/views/components/select.blade.php
index 9d87b9e9..70bc81a0 100644
--- a/resources/views/components/select.blade.php
+++ b/resources/views/components/select.blade.php
@@ -1,14 +1,13 @@