Use map() instead of transform(), use fn() instead of function(), consistent coding for form.select
Some checks failed
Create Docker Image / Build Docker Image (x86_64) (push) Failing after 28s
Create Docker Image / Final Docker Image Manifest (push) Has been skipped

This commit is contained in:
2024-08-18 14:02:03 +10:00
parent 5139b26a05
commit 2c3665650c
15 changed files with 23 additions and 22 deletions

View File

@@ -27,7 +27,7 @@
@endforeach
</tbody>
@if(($x=Supplier::active()->whereNotIn('id',$o->suppliers->pluck('id'))->orderBy('name')->get())->count())
@if(($x=Supplier::active()->whereNotIn('id',$o->suppliers->pluck('id'))->orderBy(DB::raw('UPPER(name)'))->get())->count())
<tfoot>
<tr>
<td colspan="3">
@@ -36,7 +36,7 @@
<div class="row">
<div class="col-6">
<x-leenooks::form.select id="supplier_id" name="supplier_id" icon="fa-handshake" label="Add Supplier" :options="$x->map(function($item) { $item->value = $item->name; return $item; })->toArray()"/>
<x-leenooks::form.select id="supplier_id" name="supplier_id" icon="fa-handshake" label="Add Supplier" :options="$x->map(fn($item)=>['id'=>$item->id,'value'=>$item->name])"/>
</div>
<div class="col-4">