Change supplier resources to use components
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@use(App\Models\Supplier)
|
||||
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
@@ -27,16 +29,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
||||
@include('adminlte::widget.form_select',[
|
||||
'label'=>'Supplier',
|
||||
'icon'=>'fas fa-handshake',
|
||||
'id'=>'supplier_id',
|
||||
'old'=>'supplier_id',
|
||||
'name'=>'supplier_id',
|
||||
'groupby'=>'active',
|
||||
'options'=>\App\Models\Supplier::orderBy('active','DESC')->orderBy('name')->get()->transform(function($item) { return ['id'=>$item->id,'value'=>$item->name,'active'=>$item->active]; }),
|
||||
'value'=>'',
|
||||
])
|
||||
<x-leenooks::form.select name="supplier_id" icon="fa-handshake" label="Supplier" choose="true" groupby="active" :options="$x=Supplier::orderBy('active','DESC')->orderBy(DB::Raw('UPPER(name)'))->get()->map(fn($item)=>['id'=>$item->id,'active'=>$item->active,'value'=>$item->name])"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -47,9 +40,6 @@
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
@css(select2)
|
||||
@js(select2,autofocus)
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#supplier_id')
|
||||
|
Reference in New Issue
Block a user