Added Extruder Livewire components with Create, Edit, Show, and Index. Introduced corresponding routes, views, and navigation updates. Enhanced Buildplate and Manufacturer views for improved linking and consistency.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Extruder;
|
||||
|
||||
use App\Models\Extruder as Model;
|
||||
use Livewire\Attributes\Title;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Component;
|
||||
|
||||
#[title('Extruders')]
|
||||
class CreateExtruder extends Component
|
||||
{
|
||||
public Model $extruder ;
|
||||
public string $name = '';
|
||||
public string $description = '';
|
||||
public int $manufacturer_id = 0;
|
||||
public string $diameter = '';
|
||||
public string $temp_max = '';
|
||||
|
||||
#[Validate('required')]
|
||||
public function save(){
|
||||
$this->validate([
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'description' => ['nullable', 'string', 'max:255'],
|
||||
'manufacturer_id' => ['required', 'integer'],
|
||||
'diameter' => ['required', 'string', 'max:4'],
|
||||
'temp_max' => ['required', 'integer']
|
||||
]);
|
||||
|
||||
$extruder = new Model();
|
||||
$extruder->name = $this->name;
|
||||
$extruder->description = $this->description;
|
||||
$extruder->manufacturer_id = $this->manufacturer_id;
|
||||
$extruder->diameter = $this->diameter;
|
||||
$extruder->temp_max = $this->temp_max;
|
||||
$extruder->save();
|
||||
|
||||
return $this->redirectRoute('extruder.show', $extruder->id , navigate: true);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.extruder.create', [
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Extruder;
|
||||
|
||||
use App\Models\Extruder as Model;
|
||||
use Livewire\Attributes\Title;
|
||||
use Livewire\Component;
|
||||
|
||||
#[title('Extruders')]
|
||||
class EditExtruder extends Component
|
||||
{
|
||||
public Model $extruder ;
|
||||
public string $name = '';
|
||||
public string $description = '';
|
||||
public int $manufacturer_id = 0;
|
||||
public string $diameter = '';
|
||||
public string $temp_max = '';
|
||||
|
||||
public function mount(Model $extruder){
|
||||
$this->extruder = $extruder;
|
||||
$this->name = $extruder->name;
|
||||
$this->description = $extruder->description;
|
||||
$this->manufacturer_id = $extruder->manufacturer_id;
|
||||
$this->diameter = $extruder->diameter;
|
||||
$this->temp_max = $extruder->temp_max;
|
||||
}
|
||||
|
||||
public function save(){
|
||||
$this->validate([
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'description' => ['nullable', 'string', 'max:255'],
|
||||
'manufacturer_id' => ['required', 'integer'],
|
||||
'diameter' => ['required', 'string', 'max:4'],
|
||||
'temp_max' => ['required', 'integer']
|
||||
]);
|
||||
|
||||
$this->extruder->update([
|
||||
'name' => $this->name,
|
||||
'description' => $this->description,
|
||||
'manufacturer_id' => $this->manufacturer_id,
|
||||
'diameter' => $this->diameter,
|
||||
'temp_max' => $this->temp_max
|
||||
]);
|
||||
return $this->redirectRoute('extruder.show', $this->extruder->id, navigate: true);
|
||||
}
|
||||
public function cancel(){
|
||||
return $this->redirectRoute('extruder.index', navigate: true);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.extruder.edit', [
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Extruder;
|
||||
|
||||
use App\Models\Extruder as Model;
|
||||
use Livewire\Attributes\Title;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
#[title('Extruders')]
|
||||
class Extruder extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
public $search ='';
|
||||
|
||||
public function create(){
|
||||
return $this->redirectRoute('extruder.create', navigate: true);
|
||||
}
|
||||
public function edit($id){
|
||||
return $this->redirectRoute('extruder.edit', $id, navigate: true);
|
||||
}
|
||||
public function show($id){
|
||||
return $this->redirectRoute('extruder.show', $id, navigate: true);
|
||||
}
|
||||
public function delete($id){
|
||||
Model::destroy($id);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.extruder.index', [
|
||||
'extruders' => Model::search('name', $this->search)->paginate(10),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Extruder;
|
||||
|
||||
use App\Models\Extruder as Model;
|
||||
use Livewire\Attributes\Title;
|
||||
use Livewire\Component;
|
||||
|
||||
#[title('Extruders')]
|
||||
class ShowExtruder extends Component
|
||||
{
|
||||
public Model $extruder ;
|
||||
|
||||
public function back(){
|
||||
return $this->redirectRoute('extruder.index', navigate: true);
|
||||
}
|
||||
|
||||
public function edit($id){
|
||||
return $this->redirectRoute('extruder.edit', $id, navigate: true);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.extruder.show', [
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -9,29 +9,6 @@
|
||||
<flux:navbar.item wire:navigate icon="home" href="{{ route('dashboard') }}">Dashboard</flux:navbar.item>
|
||||
<flux:navbar.item wire:navigate icon="shopping-bag" href="{{ route('orders.index') }}">Orders
|
||||
</flux:navbar.item>
|
||||
|
||||
|
||||
<flux:dropdown>
|
||||
|
||||
<flux:navbar.item icon="circle-stack" icon-trailing="chevron-down">Database</flux:navbar.item>
|
||||
|
||||
<flux:navmenu class="bg-white">
|
||||
<flux:navmenu.item wire:navigate icon="circle-stack" href="{{ route('filaments.index') }}">All
|
||||
Filaments
|
||||
</flux:navmenu.item>
|
||||
<flux:navmenu.separator/>
|
||||
<flux:navmenu.item wire:navigate icon="archive-box" href="{{ route('manufacturer.index') }}">
|
||||
Manufacturers
|
||||
</flux:navmenu.item>
|
||||
<flux:navmenu.item wire:navigate icon="paint-brush" href="{{ route('color.index') }}">Colors
|
||||
</flux:navmenu.item>
|
||||
<flux:navmenu.item wire:navigate icon="clipboard" href="{{ route('type.index') }}">Types
|
||||
</flux:navmenu.item>
|
||||
<flux:navmenu.item wire:navigate icon="clipboard" href="{{ route('buildplate.index') }}">
|
||||
BuildPlates
|
||||
</flux:navmenu.item>
|
||||
</flux:navmenu>
|
||||
</flux:dropdown>
|
||||
</flux:navbar>
|
||||
|
||||
|
||||
@@ -42,6 +19,31 @@
|
||||
<flux:navbar.item class="max-lg:hidden" icon="cog-6-tooth" href="{{ route('settings.index') }}"
|
||||
label="Settings"/>
|
||||
<flux:separator vertical variant="subtle" class="my-2"/>
|
||||
<flux:dropdown>
|
||||
|
||||
<flux:navbar.item icon="circle-stack" />
|
||||
|
||||
<flux:navmenu class="bg-white">
|
||||
<flux:navmenu.item wire:navigate icon="circle-stack" href="{{ route('filaments.index') }}">All
|
||||
Filaments
|
||||
</flux:navmenu.item>
|
||||
<flux:navmenu.separator/>
|
||||
<flux:navmenu.item wire:navigate icon="archive-box" href="{{ route('manufacturer.index') }}">
|
||||
Manufacturers
|
||||
</flux:navmenu.item>
|
||||
<flux:navmenu.item wire:navigate icon="swatch" href="{{ route('color.index') }}">Colors
|
||||
</flux:navmenu.item>
|
||||
<flux:navmenu.item wire:navigate icon="beaker" href="{{ route('type.index') }}">Types
|
||||
</flux:navmenu.item>
|
||||
<flux:navmenu.item wire:navigate icon="clipboard" href="{{ route('buildplate.index') }}">
|
||||
BuildPlates
|
||||
</flux:navmenu.item>
|
||||
<flux:navmenu.item wire:navigate icon="paint-brush" href="{{ route('extruder.index') }}">
|
||||
Extruder
|
||||
</flux:navmenu.item>
|
||||
</flux:navmenu>
|
||||
</flux:dropdown>
|
||||
<flux:separator vertical variant="subtle" class="my-2"/>
|
||||
</flux:navbar>
|
||||
|
||||
<flux:dropdown position="top" align="start">
|
||||
|
||||
@@ -26,7 +26,14 @@
|
||||
<tr wire:key="{{ $buildplate->id }}" class="text-gray-200 border-b border-white/50 hover:bg-white/10 transition duration-150 ease-in-out">
|
||||
<x-table.item><p class="p-4 px-3 pl-6 font-bold">{{ $buildplate->name }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ $buildplate->description }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ App\Models\Manufacturer::find($buildplate->manufacturer_id)->name }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">
|
||||
@if ($buildplate->manufacturer_id !== 0)
|
||||
<a href="{{ route('manufacturer.show', $buildplate->manufacturer_id) }}" class="flex items-center gap-2">
|
||||
{{ App\Models\Manufacturer::find($buildplate->manufacturer_id)->name }}
|
||||
<flux:icon name="arrow-right" variant="mini"></flux:icon>
|
||||
</a>
|
||||
@endif
|
||||
</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3 text-left">{{ $buildplate->temp_max }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3 text-left">{{ $buildplate->amount }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3"></p></x-table.item>
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<section>
|
||||
<form wire:submit="save">
|
||||
<x-header>
|
||||
{{ __('Create Extruder') }}
|
||||
|
||||
<x-slot name="headerright">
|
||||
<flux:button type="submit" variant="primary" class="bg-selective hover:bg-selective-600 text-gray-950 hover:cursor-pointer transition-all ease-in-out" icon="check">Save</flux:button>
|
||||
<flux:button wire:click="cancel" variant="primary" class=" bg-red-700 shadow hover:bg-red-800 hover:cursor-pointer transition-all ease-in-out" icon="x-mark">Cancel</flux:button>
|
||||
</x-slot>
|
||||
</x-header>
|
||||
|
||||
<div class="container m-auto my-8 bg-elephant-950 border border-elephant-900 rounded-lg shadow p-6 text-gray-50">
|
||||
<div>
|
||||
<div class="px-4 sm:px-0">
|
||||
<h3 class="text-base/7 font-semibold text-white">Extruder Information</h3>
|
||||
<p class="mt-1 max-w-2xl text-sm/6 text-gray-200">Extruder details.</p>
|
||||
</div>
|
||||
<div class="mt-6 border-t border-white/10">
|
||||
<dl class="divide-y divide-white/10">
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Name</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
<flux:input wire:model="name" type="text" class="mt-1 block w-full"/>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Description</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
<flux:textarea wire:model="description" type="text" class="mt-1 block w-full"/>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Manufacturer</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
<flux:select wire:model="manufacturer_id" class="mt-1 block w-full">
|
||||
<flux:select.option default value="">Select Manufacturer</flux:select.option>
|
||||
@foreach(\App\Models\Manufacturer::all() as $manufacturer)
|
||||
<flux:select.option key="{{ $manufacturer->id }}" value="{{$manufacturer->id}}">{{$manufacturer->name}}</flux:select.option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Diameter</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
<flux:input.group>
|
||||
<flux:input wire:model="diameter" type="text" class="block w-full"/>
|
||||
<flux:input.group.suffix>mm</flux:input.group.suffix>
|
||||
</flux:input.group>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Max Temperature</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
<flux:input.group>
|
||||
<flux:input wire:model="temp_max" type="text" class="block w-full"/>
|
||||
<flux:input.group.suffix>°C</flux:input.group.suffix>
|
||||
</flux:input.group>
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
@@ -0,0 +1,67 @@
|
||||
<section>
|
||||
<form wire:submit="save">
|
||||
<x-header>
|
||||
{{ __('Edit Extruder') }}
|
||||
|
||||
<x-slot name="headerright">
|
||||
<flux:button type="submit" variant="primary" class="bg-selective hover:bg-selective-600 text-gray-950 hover:cursor-pointer transition-all ease-in-out" icon="check">Save</flux:button>
|
||||
<flux:button wire:click="cancel" variant="primary" class=" bg-red-700 shadow hover:bg-red-800 hover:cursor-pointer transition-all ease-in-out" icon="x-mark">Cancel</flux:button>
|
||||
</x-slot>
|
||||
</x-header>
|
||||
|
||||
<div class="container m-auto my-8 bg-elephant-950 border border-elephant-900 rounded-lg shadow p-6 text-gray-50">
|
||||
<div>
|
||||
<div class="px-4 sm:px-0">
|
||||
<h3 class="text-base/7 font-semibold text-white">Extruder Information</h3>
|
||||
<p class="mt-1 max-w-2xl text-sm/6 text-gray-200">Extruder details.</p>
|
||||
</div>
|
||||
<div class="mt-6 border-t border-white/10">
|
||||
<dl class="divide-y divide-white/10">
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Name</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
<flux:input wire:model="name" type="text" class="mt-1 block w-full"/>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Description</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
<flux:textarea wire:model="description" type="text" class="mt-1 block w-full"/>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Manufacturer</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
<flux:select wire:model="manufacturer_id" class="mt-1 block w-full">
|
||||
<flux:select.option default value="">Select Manufacturer</flux:select.option>
|
||||
@foreach(\App\Models\Manufacturer::all() as $manufacturer)
|
||||
<flux:select.option key="{{ $manufacturer->id }}" value="{{$manufacturer->id}}">{{$manufacturer->name}}</flux:select.option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Diameter</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
<flux:input.group>
|
||||
<flux:input wire:model="diameter" type="text" class="block w-full"/>
|
||||
<flux:input.group.suffix>mm</flux:input.group.suffix>
|
||||
</flux:input.group>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Max Temperature</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
<flux:input.group>
|
||||
<flux:input wire:model="temp_max" type="text" class="block w-full"/>
|
||||
<flux:input.group.suffix>°C</flux:input.group.suffix>
|
||||
</flux:input.group>
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
@@ -0,0 +1,55 @@
|
||||
<section>
|
||||
<x-header>
|
||||
{{ __('Extruders') }}
|
||||
|
||||
<x-slot name="headerleft">
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-black/10 border-white/20 rounded text-gray-50 placeholder:text-gray-200 focus:border-white/50 focus:ring-white/50" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="headerright">
|
||||
<flux:button wire:click="create" variant="primary" class="bg-selective hover:bg-selective-600 text-gray-950 transition ease-in-out hover:cursor-pointer">Create Extruder</flux:button>
|
||||
</x-slot>
|
||||
</x-header>
|
||||
|
||||
<div class="container m-auto my-8 bg-elephant border border-elephant-900 rounded-lg shadow p-6 text-gray-50">
|
||||
<x-table>
|
||||
<x-slot name="tableheader">
|
||||
<x-table.header>Name</x-table.header>
|
||||
<x-table.header>Description</x-table.header>
|
||||
<x-table.header>Manufacturer</x-table.header>
|
||||
<x-table.header>Diameter</x-table.header>
|
||||
<x-table.header>Max Temp.</x-table.header>
|
||||
<x-table.header></x-table.header>
|
||||
<x-table.header class="w-[150px]">Actions</x-table.header>
|
||||
</x-slot>
|
||||
@foreach ($extruders as $extruder)
|
||||
<tr wire:key="{{ $extruder->id }}" class="text-gray-200 border-b border-white/50 hover:bg-white/10 transition duration-150 ease-in-out">
|
||||
<x-table.item><p class="p-4 px-3 pl-6 font-bold">{{ $extruder->name }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ $extruder->description }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">
|
||||
@if ($extruder->manufacturer_id !== 0)
|
||||
<a href="{{ route('manufacturer.show', $extruder->manufacturer_id) }}" class="flex items-center gap-2">
|
||||
{{ App\Models\Manufacturer::find($extruder->manufacturer_id)->name }}
|
||||
<flux:icon name="arrow-right" variant="mini"></flux:icon>
|
||||
</a>
|
||||
@endif
|
||||
</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3 text-left">{{ $extruder->diameter }} mm</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3 text-left">{{ $extruder->temp_max }} °C</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 variant="primary" class="text-gray-200 bg-transparent shadow-none hover:bg-cornflower hover:shadow hover:text-gray-950 hover:cursor-pointer" wire:click="show({{ $extruder->id }})" icon="magnifying-glass"></flux:button>
|
||||
<flux:button variant="primary" class="text-gray-200 bg-transparent shadow-none hover:bg-gold-drop hover:shadow hover:text-gray-950 hover:cursor-pointer" wire:click="edit({{ $extruder->id }})" icon="pencil"></flux:button>
|
||||
<flux:button variant="primary" class="text-gray-200 bg-transparent shadow-none hover:bg-red-700 hover:shadow hover:cursor-pointer" wire:click="delete({{ $extruder->id }})" icon="trash"></flux:button>
|
||||
</div>
|
||||
</x-table.item>
|
||||
</tr>
|
||||
@endforeach
|
||||
<x-slot name="pagination">
|
||||
{{ $extruders->links() }}
|
||||
</x-slot>
|
||||
</x-table>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,55 @@
|
||||
<section>
|
||||
<x-header>
|
||||
{{ __('Show Extruder') }}
|
||||
|
||||
<x-slot name="headerright">
|
||||
<flux:button wire:click="back" variant="primary" class="bg-transparent shadow-none hover:bg-black/10 hover:cursor-pointer transition-all ease-in-out" icon="arrow-left">Back</flux:button>
|
||||
<flux:button wire:click="edit({{ $extruder->id }})" variant="primary" class="bg-selective text-gray-950 shadow-none hover:bg-selective-600 hover:cursor-pointer transition-all ease-in-out" icon="check">Edit</flux:button>
|
||||
</x-slot>
|
||||
</x-header>
|
||||
|
||||
<div class="container m-auto my-8 bg-elephant-950 border border-elephant-900 rounded-lg shadow p-6 text-gray-50">
|
||||
<div>
|
||||
<div class="px-4 sm:px-0">
|
||||
<h3 class="text-base/7 font-semibold text-white">Extruder Information</h3>
|
||||
<p class="mt-1 max-w-2xl text-sm/6 text-gray-200">Extruder details.</p>
|
||||
</div>
|
||||
<div class="mt-6 border-t border-white/10">
|
||||
<dl class="divide-y divide-white/10">
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Name</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
{{ $extruder->name }}
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Description</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
{{ $extruder->description }}
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Manufacturer</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
{{ App\Models\Manufacturer::find($extruder->manufacturer_id)->name }}
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Diameter</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
{{ $extruder->diameter }} mm
|
||||
</dd>
|
||||
</div>
|
||||
<div class="px-4 py-6 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0 items-center">
|
||||
<dt class="text-sm/6 font-medium text-gray-100">Max Temperature</dt>
|
||||
<dd class="mt-1 text-sm/6 text-gray-200 sm:col-span-2 sm:mt-0">
|
||||
{{ $extruder->temp_max }} °C
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
@@ -31,7 +31,7 @@
|
||||
<x-table.item>
|
||||
<p class="p-4 px-3">
|
||||
@if($manufacturer->website !== '')
|
||||
<a href="{{ $manufacturer->website }}" target="_blank" class="flex justify-center items-center gap-2">{{ $manufacturer->website }} <flux:icon.arrow-top-right-on-square variant="mini"/></a>
|
||||
<a href="{{ $manufacturer->website }}" target="_blank" class="flex items-center gap-2">{{ $manufacturer->website }} <flux:icon.arrow-top-right-on-square variant="mini"/></a>
|
||||
@endif
|
||||
</p>
|
||||
</x-table.item>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Livewire\Extruder\Extruder;
|
||||
use App\Livewire\Buildplate\Buildplate;
|
||||
use App\Livewire\Color\Color;
|
||||
use App\Livewire\Dashboard;
|
||||
@@ -54,6 +55,12 @@ Route::middleware([
|
||||
Route::get('manufacturer/{manufacturer}/edit', \App\Livewire\Manufacturer\EditManufacturer::class)->name('manufacturer.edit');
|
||||
Route::get('manufacturer/{manufacturer}', \App\Livewire\Manufacturer\ShowManufacturer::class)->name('manufacturer.show');
|
||||
|
||||
// Extruders
|
||||
Route::get('extruder', Extruder::class)->name('extruder.index');
|
||||
Route::get('extruder/create', \App\Livewire\Extruder\CreateExtruder::class)->name('extruder.create');
|
||||
Route::get('extruder/{extruder}/edit', \App\Livewire\Extruder\EditExtruder::class)->name('extruder.edit');
|
||||
Route::get('extruder/{extruder}', \App\Livewire\Extruder\ShowExtruder::class)->name('extruder.show');
|
||||
|
||||
// Orders
|
||||
Route::get('orders', Orders::class)->name('orders.index');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user