Move category/category_name product::class methods into __get(), no functional changes
This commit is contained in:
@@ -53,7 +53,7 @@ if(isset($spo)) {
|
||||
|
||||
<div class="col-4">
|
||||
<!-- Offering Type -->
|
||||
<x-leenooks::form.select name="offering_type" icon="fa-cogs" label="Type" helper="Offering Type" :choose="true" :value="$oo?->category ?? ''" :options="Supplier::offeringTypes()->sortBy(fn($item)=>$item->category_name)->map(fn($item)=>['id'=>$item->category,'value'=>$item->category_name])"/>
|
||||
<x-leenooks::form.select name="offering_type" icon="fa-cogs" label="Type" helper="Offering Type" :choose="true" :value="$oo?->category_lc ?? ''" :options="Supplier::offeringTypes()->sortBy(fn($item)=>$item->category_name)->map(fn($item)=>['id'=>$item->category_lc,'value'=>$item->category_name])"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -180,7 +180,7 @@ if(isset($spo)) {
|
||||
$(document).ready(function() {
|
||||
@if(isset($oo) && $oo->exists)
|
||||
$('#offering_type').attr('style','pointer-events: none;');
|
||||
load_type('{{$oo->category}}',{{$oo->id}})
|
||||
load_type('{{$oo->category_lc}}',{{$oo->id}})
|
||||
@endif
|
||||
|
||||
$('#offering_type').on('change',function() {
|
||||
|
@@ -37,7 +37,7 @@
|
||||
<tbody>
|
||||
@foreach($xx=$offering->items->with(['products.products.services'])->get() as $oo)
|
||||
<tr>
|
||||
<td><a href="{{ route('supplier.product.type',['id'=>$oo->id,'spo'=>$oo->supplier_detail_id,'type'=>$oo->category]) }}">{{ $oo->id }}</a></td>
|
||||
<td><a href="{{ route('supplier.product.type',['id'=>$oo->id,'spo'=>$oo->supplier_detail_id,'type'=>$oo->category_lc]) }}">{{ $oo->id }}</a></td>
|
||||
<td>{{ $oo->name }}</td>
|
||||
<td>{{ $oo->name_long }}</td>
|
||||
<td class="text-right">{{ $oo->active ? 'YES' : 'NO' }}</td>
|
||||
|
@@ -40,7 +40,7 @@
|
||||
@foreach($oo->products->pluck('products')->flatten()->filter() as $po)
|
||||
<tr>
|
||||
<td><a href="{{ route('product',['pdo'=>$po->id]) }}">{{ $po->lid }}</a></td>
|
||||
<td>{{ $po->pid }} <small>[<a href="{{ route('supplier.product.type',['id'=>$po->supplied->id,'spo'=>$po->supplier->id,'type'=>$po->supplied->category]) }}">{{ $po->supplied->name }}</a>]</small></td>
|
||||
<td>{{ $po->pid }} <small>[<a href="{{ route('supplier.product.type',['id'=>$po->supplied->id,'spo'=>$po->supplier->id,'type'=>$po->supplied->category_lc]) }}">{{ $po->supplied->name }}</a>]</small></td>
|
||||
<td>{{ $po->name }}</td>
|
||||
<td class="text-right">{{ $po->active ? 'YES' : 'NO' }}</td>
|
||||
<td class="text-right">{{ $po->billing_interval_string }}</td>
|
||||
|
Reference in New Issue
Block a user