fixed filament.blade.php
This commit is contained in:
@@ -28,18 +28,28 @@
|
||||
<x-table.header>Weight</x-table.header>
|
||||
<x-table.header>Price</x-table.header>
|
||||
<x-table.header>Rolls</x-table.header>
|
||||
<x-table.header class="w-1/6"></x-table.header>
|
||||
<x-table.header class="w-48"></x-table.header>
|
||||
</x-slot>
|
||||
|
||||
@foreach ($filaments as $filament)
|
||||
<tr wire:key="{{ $filament->id }}" class="border-b border-blackout-950">
|
||||
<x-table.item><p class="p-4 px-3 pl-6 font-bold">{{ $filament->name }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ $filament->description }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3"></p></x-table.item>
|
||||
<x-table.item>
|
||||
<div class="flex flex-row gap-4 justify-end pr-8">
|
||||
<flux:button wire:click="edit({{ $filament->id }})" icon="pencil">Edit</flux:button>
|
||||
<flux:button wire:click="deleteModal({{ $filament->id }})" icon="x-mark">Delete</flux:button>
|
||||
<div class="flex flex-row gap-2 justify-start items-center">
|
||||
<div class="p-4 px-3 mx-3 h-8 rounded w-full" style="background-color: {{ App\Models\Color::find($filament->color_id)->hex}}"></div>
|
||||
<p>{{ App\Models\Color::find($filament->color_id)->name }}</p></x-table.item>
|
||||
</div>
|
||||
<x-table.item><p class="p-4 px-3">{{ App\Models\Manufacturer::find($filament->manufacturer_id)->name }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ App\Models\FilamentType::find($filament->filament_type_id)->name }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ $filament->diameter }} mm</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ $filament->weight }} g/m</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">${{ $filament->price }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">${{ $filament->stock }}</p></x-table.item>
|
||||
<x-table.item>
|
||||
<div class="flex flex-row gap-2 justify-start pr-2">
|
||||
<flux:button wire:click="edit({{ $filament->id }})" variant="ghost" icon="pencil">Edit</flux:button>
|
||||
<flux:button wire:click="deleteModal({{ $filament->id }})" variant="ghost" icon="x-mark">Delete</flux:button>
|
||||
</div>
|
||||
</x-table.item>
|
||||
</tr>
|
||||
@@ -62,19 +72,22 @@
|
||||
</div>
|
||||
<flux:input label="Name" wire:model="name" placeholder="Filament Name" required />
|
||||
<flux:textarea label="Description" wire:model="description" placeholder="Description" />
|
||||
<flux:select wire:model="manufacturer" label="Manufacturer">
|
||||
<flux:select wire:model="manufacturer_id" label="Manufacturer">
|
||||
<flux:select.option disabled value="">Choose Manufacturer</flux:select.option>
|
||||
@foreach ($manufacturers as $manufacturer)
|
||||
<option value="{{ $manufacturer->id }}">{{ $manufacturer->name }}</option>
|
||||
<flux:select.option wire:key="{{ $manufacturer->id }}" value="{{ $manufacturer->id }}">{{ $manufacturer->name }}</flux:select.option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
<flux:select wire:model="type" label="Type">
|
||||
<flux:select wire:model="type_id" label="Type">
|
||||
<flux:select.option disabled value="">Choose Type</flux:select.option>
|
||||
@foreach ($types as $type)
|
||||
<option value="{{ $type->id }}">{{ $type->name }}</option>
|
||||
<flux:select.option wire:key="{{ $type->id }}" value="{{ $type->id }}">{{ $type->name }}</flux:select.option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
<flux:select wire:model="color" label="Color" >
|
||||
<flux:select wire:model="color_id" label="Color" >
|
||||
<flux:select.option disabled value="">Choose Color</flux:select.option>
|
||||
@foreach ($colors as $color)
|
||||
<option value="{{ $color->id }}">{{ $color->name }}</option>
|
||||
<flux:select.option wire:key="{{ $color->id }}" value="{{ $color->id }}">{{ $color->name }}</flux:select.option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
<flux:input label="Diameter" wire:model="diameter" placeholder="Diameter" required />
|
||||
|
||||
Reference in New Issue
Block a user