Updates to Product Model, product updates, enable pricing update, improved formating of product services
This commit is contained in:
@@ -16,46 +16,7 @@
|
||||
@section('main-content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card-header">
|
||||
<h1 class="card-title">Product Configuration</h1>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form class="g-0 needs-validation" method="POST" enctype="multipart/form-data" role="form">
|
||||
@csrf
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
||||
@include('adminlte::widget.form_select',[
|
||||
'label'=>'Product',
|
||||
'icon'=>'fas fa-list',
|
||||
'id'=>'product_id',
|
||||
'old'=>'product_id',
|
||||
'name'=>'product_id',
|
||||
'groupby'=>'active',
|
||||
'options'=>\App\Models\Product::get()->sortBy(function($item) { return ($item->active ? '0' : '1').$item->name; })->transform(function($item) { return ['id'=>$item->id,'value'=>$item->name,'active'=>$item->active]; }),
|
||||
'value'=>'',
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@include('product.widget.selector')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
@css(select2)
|
||||
@js(select2,autofocus)
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#product_id').on('change',function(item) {
|
||||
window.location.href = '{{ url('a/product/details') }}/'+item.target.value;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
||||
@endsection
|
Reference in New Issue
Block a user