fix filter on prices by tariff
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
<form id="price_generics-filters">
|
<form id="{{ $model }}-filters">
|
||||||
<input type="hidden" name="tariff_id" value="{{ $tariff['id'] ?? false }}">
|
<input type="text" name="tariff_id" value="{{ $tariff['id'] ?? false }}">
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -5,9 +5,5 @@
|
|||||||
])
|
])
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Shop.Tariffs.store', 'id' => 'tariff-form', 'autocomplete' => 'off']) }}
|
|
||||||
@include('Admin.Shop.Tariffs.form')
|
@include('Admin.Shop.Tariffs.form')
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -4,10 +4,5 @@
|
|||||||
'breadcrumb' => [__('shop.tariffs.title')]
|
'breadcrumb' => [__('shop.tariffs.title')]
|
||||||
])
|
])
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Shop.Tariffs.store', 'id' => 'tariffs-form', 'autocomplete' => 'off']) }}
|
|
||||||
<input type="hidden" name="id" id="tariff_id" value="{{ $tariff['id'] }}">
|
|
||||||
@include('Admin.Shop.Tariffs.form')
|
@include('Admin.Shop.Tariffs.form')
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
|
|
||||||
|
{{ Form::open(['route' => 'Admin.Shop.Tariffs.store', 'id' => 'tariffs-form', 'autocomplete' => 'off']) }}
|
||||||
|
<input type="hidden" name="id" id="id" value="{{ $tariff['id'] }}">
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
{{ Form::label('name', 'Nom') }}
|
{{ Form::label('name', 'Nom') }}
|
||||||
@@ -42,16 +45,18 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
|
|
||||||
@if ($tariff['id'] ?? false)
|
@if ($tariff['id'] ?? false)
|
||||||
@component('components.card', ['title' => 'Liste de prix'])
|
@component('components.card', ['title' => 'Liste de prix'])
|
||||||
|
|
||||||
@include('components.datatable', ['route' => route('Admin.Shop.PriceLists.index'), 'model' => 'price_lists', 'with_filters' => false, 'with_print' => false, 'dataTable' => $datatables['price_lists'], 'create_callback' => 'PriceListCreate();', 'edit_callback' => 'PriceListEdit(id);', 'delete_callback' => 'PriceListRefresh();'])
|
@include('components.datatable', ['route' => route('Admin.Shop.PriceLists.index'), 'model' => 'price_lists', 'with_filters' => true, 'with_print' => false, 'dataTable' => $datatables['price_lists'], 'create_callback' => 'PriceListCreate();', 'edit_callback' => 'PriceListEdit(id);', 'delete_callback' => 'PriceListRefresh();'])
|
||||||
|
|
||||||
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-price_lists-filters'])
|
@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-price_lists-filters'])
|
||||||
@include('Admin.Shop.PriceLists.partials.filters')
|
@include('Admin.Shop.PriceLists.partials.filters', ['model' => 'price_lists'])
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endif
|
@endif
|
||||||
@@ -62,6 +67,7 @@
|
|||||||
@include('components.save')
|
@include('components.save')
|
||||||
|
|
||||||
@include('load.form.editor')
|
@include('load.form.editor')
|
||||||
|
@include('load.form.select2')
|
||||||
@include('load.layout.modal')
|
@include('load.layout.modal')
|
||||||
|
|
||||||
@push('js')
|
@push('js')
|
||||||
@@ -71,7 +77,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function PriceListCreate() {
|
function PriceListCreate() {
|
||||||
var tariff_id = $('#tariff_id').val();
|
var tariff_id = $('#id').val();
|
||||||
var url_open = "{{ route('Admin.Shop.PriceLists.modalCreate') }}/" + tariff_id;
|
var url_open = "{{ route('Admin.Shop.PriceLists.modalCreate') }}/" + tariff_id;
|
||||||
var url_save = "{{ route('Admin.Shop.PriceLists.storeAjax') }}";
|
var url_save = "{{ route('Admin.Shop.PriceLists.storeAjax') }}";
|
||||||
openModal("{{ __('price_list') }}", '#price_list-form', url_open, url_save, "PriceListRefresh();");
|
openModal("{{ __('price_list') }}", '#price_list-form', url_open, url_save, "PriceListRefresh();");
|
||||||
|
|||||||
Reference in New Issue
Block a user