Removed all controller and view files related to Colors, Filaments, Filament Types, and Manufacturers.
This commit is contained in:
@@ -3,19 +3,19 @@
|
||||
{{ __('Buildplates') }}
|
||||
|
||||
<x-slot name="headerleft">
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-zinc-800 rounded focus:border-accent focus:ring-accent" />
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-jet-700 border-jet-500 rounded text-jet-50 placeholder:text-jet-200 focus:border-olivine focus:ring-olivine" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="headerright">
|
||||
<flux:modal.trigger name="createModal">
|
||||
<flux:button variant="primary" class="bg-nuke-400 hover:bg-nuke-300">Create Buildplate</flux:button>
|
||||
<flux:button variant="primary" class="bg-olivine hover:bg-olivine-600">Create Buildplate</flux:button>
|
||||
</flux:modal.trigger>
|
||||
</x-slot>
|
||||
</x-header>
|
||||
|
||||
|
||||
|
||||
<div class="container m-auto my-8">
|
||||
<div class="container m-auto my-8 bg-jet-800 rounded-lg shadow p-6 text-jet-50">
|
||||
<x-table>
|
||||
<x-slot name="tableheader">
|
||||
<x-table.header>Name</x-table.header>
|
||||
@@ -27,7 +27,7 @@
|
||||
<x-table.header class="w-1/6"></x-table.header>
|
||||
</x-slot>
|
||||
@foreach ($buildplates as $buildplate)
|
||||
<tr wire:key="{{ $buildplate->id }}" class="border-b border-blackout-950">
|
||||
<tr wire:key="{{ $buildplate->id }}" class="text-jet-200 border-b border-jet-600 hover:bg-jet-700 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>
|
||||
@@ -36,8 +36,8 @@
|
||||
<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({{ $buildplate->id }})" icon="pencil">Edit</flux:button>
|
||||
<flux:button wire:click="deleteModal({{ $buildplate->id }})" icon="x-mark">Delete</flux:button>
|
||||
<flux:button variant="ghost" wire:click="edit({{ $buildplate->id }})" icon="pencil">Edit</flux:button>
|
||||
<flux:button variant="danger" wire:click="deleteModal({{ $buildplate->id }})" icon="x-mark">Delete</flux:button>
|
||||
</div>
|
||||
</x-table.item>
|
||||
</tr>
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
{{ __('Colors') }}
|
||||
|
||||
<x-slot name="headerleft">
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-jet-100 border-jet-200 rounded text-jet focus:border-jet focus:ring-jet" />
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-jet-700 border-jet-500 rounded text-jet-50 placeholder:text-jet-200 focus:border-olivine focus:ring-olivine" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="headerright">
|
||||
<flux:modal.trigger name="createModal">
|
||||
<flux:button variant="primary" class="bg-pumpkin hover:bg-pumpkin-600">Create Color</flux:button>
|
||||
<flux:button variant="primary" class="bg-olivine hover:bg-olivine-600">Create Color</flux:button>
|
||||
</flux:modal.trigger>
|
||||
</x-slot>
|
||||
</x-header>
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="container m-auto my-8">
|
||||
<div class="container m-auto my-8 bg-jet-800 rounded-lg shadow p-6 text-jet-50">
|
||||
<x-table>
|
||||
<x-slot name="tableheader">
|
||||
<x-table.header>Name</x-table.header>
|
||||
@@ -27,15 +27,15 @@
|
||||
</x-slot>
|
||||
|
||||
@foreach ($colors as $color)
|
||||
<tr wire:key="{{ $color->id }}" class="border-b border-jet-100">
|
||||
<x-table.item><p class="p-4 px-3 pl-6 font-bold text-jet">{{ $color->name }}</p></x-table.item>
|
||||
<tr wire:key="{{ $color->id }}" class="text-jet-200 border-b border-jet-600 hover:bg-jet-700 transition duration-150 ease-in-out">
|
||||
<x-table.item><p class="p-4 px-3 pl-6 font-bold ">{{ $color->name }}</p></x-table.item>
|
||||
<x-table.item><div class="p-4 px-3 mx-3 h-8 rounded" style="background-color: {{ $color->hex }}"></div></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3 text-left text-jet">{{ $color->hex }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3 text-jet"></p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3 text-left ">{{ $color->hex }}</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">
|
||||
<button wire:click="edit({{ $color->id }})" class="bg-pumpkin text-jet border border-pumpkin-500 shadow hover:border-pumpkin-400 hover:bg-pumpkin-500 rounded-lg px-4 py-2 cursor-pointer" icon="pencil">Edit</button>
|
||||
<flux:button wire:click="deleteModal({{ $color->id }})" icon="x-mark">Delete</flux:button>
|
||||
<flux:button variant="ghost" wire:click="edit({{ $color->id }})" class=" rounded-lg px-4 py-2 cursor-pointer" icon="pencil">Edit</flux:button>
|
||||
<flux:button variant="danger" wire:click="deleteModal({{ $color->id }})" icon="x-mark">Delete</flux:button>
|
||||
</div>
|
||||
</x-table.item>
|
||||
</tr>
|
||||
|
||||
@@ -3,58 +3,61 @@
|
||||
{{ __('Filaments') }}
|
||||
|
||||
<x-slot name="headerleft">
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-zinc-800 rounded focus:border-accent focus:ring-accent" />
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-jet-700 border-jet-500 rounded text-jet-50 placeholder:text-jet-200 focus:border-olivine focus:ring-olivine" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="headerright">
|
||||
<flux:modal.trigger name="createModal">
|
||||
<flux:button variant="primary" class="bg-nuke-400 hover:bg-nuke-300">Create Filament</flux:button>
|
||||
</flux:modal.trigger>
|
||||
<flux:button variant="primary" class="bg-olivine hover:bg-olivine-600">Create Filament</flux:button>
|
||||
</flux:modal.trigger>
|
||||
</x-slot>
|
||||
</x-header>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="m-auto my-8 mx-12">
|
||||
|
||||
<div class="m-auto my-8 mx-12 bg-jet-800 rounded-lg shadow p-6 text-jet-50">
|
||||
<x-table>
|
||||
<x-slot name="tableheader">
|
||||
<x-table.header class="w-[50px]">ID</x-table.header>
|
||||
<x-table.header>Name</x-table.header>
|
||||
<x-table.header>Description</x-table.header>
|
||||
<x-table.header>Color</x-table.header>
|
||||
<x-table.header>Manufacturer</x-table.header>
|
||||
<x-table.header>Material</x-table.header>
|
||||
<x-table.header>Finish</x-table.header>
|
||||
<x-table.header>Diameter</x-table.header>
|
||||
<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-48"></x-table.header>
|
||||
<x-table.header class="w-[100px]"></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>
|
||||
<tr wire:key="{{ $filament->id }}" class="text-jet-200 border-b border-jet-600 hover:bg-jet-700 transition duration-150 ease-in-out">
|
||||
<x-table.item><p class="p-4 px-3 pl-6">{{ $filament->id }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3 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>
|
||||
<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 class="flex flex-row gap-2 px-2 justify-start items-center">
|
||||
<div class="p-4 h-[20px] w-[20px] rounded" style="background-color: {{ App\Models\Color::find($filament->color_id)->hex}}"></div>
|
||||
<p>{{ App\Models\Color::find($filament->color_id)->name }}</p>
|
||||
</div>
|
||||
</x-table.item>
|
||||
<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->finish }}</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</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>
|
||||
<flux:button wire:click="deleteModal({{ $filament->id }})" variant="danger" icon="x-mark">Delete</flux:button>
|
||||
</div>
|
||||
</x-table.item>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
<x-slot name="pagination">
|
||||
{{ $filaments->links() }}
|
||||
</x-slot>
|
||||
@@ -91,9 +94,11 @@
|
||||
<flux:select.option wire:key="{{ $color->id }}" value="{{ $color->id }}">{{ $color->name }}</flux:select.option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
<flux:input label="Finish" wire:model="finish" placeholder="Finish" required />
|
||||
<flux:input label="Diameter" wire:model="diameter" placeholder="Diameter" required />
|
||||
<flux:input label="Weight" wire:model="weight" placeholder="Weight" required />
|
||||
<flux:input label="Price" wire:model="price" placeholder="Price" required />
|
||||
<flux:input label="Stock" wire:model="stock" placeholder="Stock" required />
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<flux:spacer />
|
||||
@@ -109,19 +114,44 @@
|
||||
@else
|
||||
<flux:modal wire:model.self='editModal' name="editModal" class="md:w-lg">
|
||||
<form wire:submit.prevent="save({{ $editid }})">
|
||||
<div class="space-y-6">
|
||||
<div>
|
||||
<flux:heading size="lg" class="text-etheral-300">Edit manufacturer</flux:heading>
|
||||
<flux:text class="mt-2">Edit an existing manufacturer.</flux:text>
|
||||
</div>
|
||||
<flux:input label="Name" wire:model="name" placeholder="Manufacturer Name" required />
|
||||
<div class="space-y-6">
|
||||
<div>
|
||||
<flux:heading size="lg" class="text-nuke-400">Edit filament</flux:heading>
|
||||
<flux:text class="mt-2">Create a new filament.</flux:text>
|
||||
</div>
|
||||
<flux:input label="Name" wire:model="name" placeholder="Filament Name" required />
|
||||
<flux:textarea label="Description" wire:model="description" placeholder="Description" />
|
||||
<div class="grid grid-cols-2 gap-x-4 gap-y-6">
|
||||
<flux:select wire:model="manufacturer_id" label="Manufacturer">
|
||||
<flux:select.option disabled value="">Choose Manufacturer</flux:select.option>
|
||||
@foreach ($manufacturers as $manufacturer)
|
||||
<flux:select.option wire:key="{{ $manufacturer->id }}" value="{{ $manufacturer->id }}">{{ $manufacturer->name }}</flux:select.option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
<flux:select wire:model="type_id" label="Type">
|
||||
<flux:select.option disabled value="">Choose Type</flux:select.option>
|
||||
@foreach ($types as $type)
|
||||
<flux:select.option wire:key="{{ $type->id }}" value="{{ $type->id }}">{{ $type->name }}</flux:select.option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
<flux:select wire:model="color_id" label="Color" >
|
||||
<flux:select.option disabled value="">Choose Color</flux:select.option>
|
||||
@foreach ($colors as $color)
|
||||
<flux:select.option wire:key="{{ $color->id }}" value="{{ $color->id }}">{{ $color->name }}</flux:select.option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
<flux:input label="Finish" wire:model="finish" placeholder="Finish" required />
|
||||
<flux:input label="Diameter" wire:model="diameter" placeholder="Diameter" required />
|
||||
<flux:input label="Weight" wire:model="weight" placeholder="Weight" required />
|
||||
<flux:input label="Price" wire:model="price" placeholder="Price" required />
|
||||
<flux:input label="Stock" wire:model="stock" placeholder="Stock" required />
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<flux:spacer />
|
||||
<flux:button variant="ghost" wire:click='cancel'>Cancel</flux:button>
|
||||
<flux:button type="submit" variant="primary" class="bg-etheral-300 hover:bg-etheral-400">Save</flux:button>
|
||||
<flux:button type="submit" variant="primary" class="bg-olivine hover:bg-olivine-600">Save</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</flux:modal>
|
||||
@endempty
|
||||
@@ -148,4 +178,4 @@
|
||||
</form>
|
||||
</flux:modal>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
{{ __('Manufacturers') }}
|
||||
|
||||
<x-slot name="headerleft">
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-zinc-800 rounded focus:border-accent focus:ring-accent" />
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-jet-700 border-jet-500 rounded text-jet-50 placeholder:text-jet-200 focus:border-olivine focus:ring-olivine" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="headerright">
|
||||
<flux:modal.trigger name="createModal">
|
||||
<flux:button variant="primary" class="bg-nuke-400 hover:bg-nuke-300">Create Manufacturer</flux:button>
|
||||
<flux:button variant="primary" class="bg-olivine hover:bg-olivine-600">Create Manufacturer</flux:button>
|
||||
</flux:modal.trigger> </x-slot>
|
||||
</x-header>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container m-auto my-8">
|
||||
|
||||
<div class="container m-auto my-8 bg-jet-800 rounded-lg shadow p-6 text-jet-50">
|
||||
<x-table>
|
||||
<x-slot name="tableheader">
|
||||
<x-table.header>Name</x-table.header>
|
||||
@@ -26,20 +26,20 @@
|
||||
</x-slot>
|
||||
|
||||
@foreach ($manufacturers as $manufacturer)
|
||||
<tr wire:key="{{ $manufacturer->id }}" class="border-b border-blackout-950">
|
||||
<tr wire:key="{{ $manufacturer->id }}" class="text-jet-200 border-b border-jet-600 hover:bg-jet-700 transition duration-150 ease-in-out">
|
||||
<x-table.item><p class="p-4 px-3 pl-6 font-bold">{{ $manufacturer->name }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ $manufacturer->description }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3"><a href="{{ $manufacturer->website }}" target="_blank">{{ $manufacturer->website }}</a></p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3"></p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3"><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></p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ $manufacturer->filament_count }}</p></x-table.item>
|
||||
<x-table.item>
|
||||
<div class="flex flex-row gap-4 justify-end pr-8">
|
||||
<flux:button wire:click="edit({{ $manufacturer->id }})" icon="pencil">Edit</flux:button>
|
||||
<flux:button wire:click="deleteModal({{ $manufacturer->id }})" icon="x-mark">Delete</flux:button>
|
||||
<flux:button variant="ghost" wire:click="edit({{ $manufacturer->id }})" icon="pencil">Edit</flux:button>
|
||||
<flux:button variant="danger" wire:click="deleteModal({{ $manufacturer->id }})" icon="x-mark">Delete</flux:button>
|
||||
</div>
|
||||
</x-table.item>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
<x-slot name="pagination">
|
||||
{{ $manufacturers->links() }}
|
||||
</x-slot>
|
||||
@@ -113,4 +113,4 @@
|
||||
</form>
|
||||
</flux:modal>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
{{ __('Types') }}
|
||||
|
||||
<x-slot name="headerleft">
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-zinc-800 rounded focus:border-accent focus:ring-accent" />
|
||||
<input type="text" placeholder="Search..." wire:model.live="search" class="bg-jet-700 border-jet-500 rounded text-jet-50 placeholder:text-jet-200 focus:border-olivine focus:ring-olivine" />
|
||||
</x-slot>
|
||||
|
||||
<x-slot name="headerright">
|
||||
<flux:modal.trigger name="createModal">
|
||||
<flux:button variant="primary" class="bg-nuke-400 hover:bg-nuke-300">Create Type</flux:button>
|
||||
<flux:button variant="primary" class="bg-olivine hover:bg-olivine-600">Create Type</flux:button>
|
||||
</flux:modal.trigger> </x-slot>
|
||||
</x-header>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container m-auto my-8">
|
||||
<div class="container m-auto my-8 bg-jet-800 rounded-lg shadow p-6 text-jet-50">
|
||||
<x-table>
|
||||
<x-slot name="tableheader">
|
||||
<x-table.header>Name</x-table.header>
|
||||
@@ -25,14 +25,14 @@
|
||||
</x-slot>
|
||||
|
||||
@foreach ($types as $type)
|
||||
<tr wire:key="{{ $type->id }}" class="border-b border-blackout-950">
|
||||
<tr wire:key="{{ $type->id }}" class="text-jet-200 border-b border-jet-600 hover:bg-jet-700 transition duration-150 ease-in-out">
|
||||
<x-table.item><p class="p-4 px-3 pl-6 font-bold">{{ $type->name }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ $type->description }}</p></x-table.item>
|
||||
<x-table.item><p class="p-4 px-3">{{ $type->amount }}</p></x-table.item>
|
||||
<x-table.item>
|
||||
<div class="flex flex-row gap-4 justify-end pr-8">
|
||||
<flux:button wire:click="edit({{ $type->id }})" icon="pencil">Edit</flux:button>
|
||||
<flux:button wire:click="deleteModal({{ $type->id }})" icon="x-mark">Delete</flux:button>
|
||||
<flux:button variant="ghost" wire:click="edit({{ $type->id }})" icon="pencil">Edit</flux:button>
|
||||
<flux:button variant="danger" wire:click="deleteModal({{ $type->id }})" icon="x-mark">Delete</flux:button>
|
||||
</div>
|
||||
</x-table.item>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user