@php $productTitle = false; if($product_type_title): $productTitle = Str::singular($product_type_title); endif @endphp @if($product_type_title) Manage : {{ $product_type_title }} @else All Items @endif

@if($product_type_title) Create {{ $productTitle }} Page Create {{ $productTitle }} @endif
{{ $myproducts->onEachSide(0)->links() }}
@if($isOpen) @include('livewire.item.create') @endif
Name Item Type Sku Sort Code @if (in_array($product_type_id, [1,5])) Retail Price Trade Price Promo Price @endif Cost @if (in_array($product_type_id, [4])) Used in (just temp) @endif @if (in_array($product_type_id, [9])) Material @endif @if (in_array($product_type_id, [2,4,5,6,8])) Supplier(s) @endif Category Product Description Action @foreach($myproducts as $product) @livewire('component.edit-field',['id'=>$product->id,'object'=>'Product','field'=>'name'], key(rand() * $product->id)) @livewire('component.edit-type',['id'=>$product->id,'object'=>'Product','field'=>'product_type_id'], key(rand() * $product->id)) @livewire('component.edit-field',['id'=>$product->id,'object'=>'Product','field'=>'sku'], key(rand() * $product->id)) @livewire('component.edit-field',['id'=>$product->id,'object'=>'Product','field'=>'sortcode'], key(rand() * $product->id)) @if (in_array($product_type_id, [1,5])) @livewire('component.edit-field',['id'=>$product->id,'object'=>'Product','field'=>'price'], key(rand() * $product->id)) @livewire('component.edit-field',['id'=>$product->id,'object'=>'Product','field'=>'trade_price'], key(rand() * $product->id)) @livewire('component.edit-field',['id'=>$product->id,'object'=>'Product','field'=>'promo_price'], key(rand() * $product->id)) @endif {{ $product->cost_currency }} @if (in_array($product_type_id, [4])) @if($product->makes) @foreach($product->makes as $makes) {{ $makes->name }} @endforeach @endif @endif @if (in_array($product_type_id, [9])) {{ $product->sub_product_id }} @if($product->material) {{ $product->material->name ?? '' }} @endif @endif @if (in_array($product_type_id, [2,4,5,6,8])) @foreach($product->suppliers as $productsupplier) {{ $productsupplier->name }}
@endforeach
@endif @foreach($product->product_categories as $product_categories) {{ $product_categories->name }}
@endforeach
{{ $product->product_description }} @if (in_array($product->product_type_id,[1,3,7])) @endif
@endforeach