From 85b97ed3b14d0a0297fe71e514c71a74027dc999 Mon Sep 17 00:00:00 2001 From: Iridium34 Date: Fri, 12 Dec 2025 03:14:07 +0100 Subject: [PATCH] Removed all controller and view files related to Colors, Filaments, Filament Types, and Manufacturers. --- app/Http/Controllers/ColorController.php | 91 ----------- app/Http/Controllers/FilamentController.php | 143 ------------------ .../Controllers/FilamentTypeController.php | 87 ----------- .../Controllers/ManufacturerController.php | 106 ------------- app/Livewire/Filament/Filament.php | 22 ++- app/Livewire/Filament/Manufacturer.php | 10 +- resources/css/app.css | 12 ++ resources/views/colors/create.blade.php | 36 ----- resources/views/colors/edit.blade.php | 31 ---- resources/views/colors/index.blade.php | 28 ---- resources/views/colors/show.blade.php | 31 ---- resources/views/components/header.blade.php | 4 +- .../views/components/layouts/app.blade.php | 2 +- resources/views/components/navbar.blade.php | 40 +---- resources/views/components/table.blade.php | 2 +- .../views/components/table/header.blade.php | 2 +- resources/views/filaments/create.blade.php | 80 ---------- resources/views/filaments/edit.blade.php | 80 ---------- resources/views/filaments/index.blade.php | 48 ------ resources/views/filaments/show.blade.php | 60 -------- resources/views/layouts/app.blade.php | 6 +- .../livewire/filament/buildplate.blade.php | 12 +- .../views/livewire/filament/color.blade.php | 18 +-- .../livewire/filament/filament.blade.php | 78 +++++++--- .../livewire/filament/manufacturer.blade.php | 22 +-- .../views/livewire/filament/type.blade.php | 12 +- .../views/manufacturers/create.blade.php | 44 ------ resources/views/manufacturers/edit.blade.php | 34 ----- resources/views/manufacturers/index.blade.php | 45 ------ resources/views/manufacturers/show.blade.php | 35 ----- resources/views/types/create.blade.php | 36 ----- resources/views/types/edit.blade.php | 30 ---- resources/views/types/index.blade.php | 29 ---- resources/views/types/show.blade.php | 31 ---- 34 files changed, 127 insertions(+), 1220 deletions(-) delete mode 100644 app/Http/Controllers/ColorController.php delete mode 100644 app/Http/Controllers/FilamentController.php delete mode 100644 app/Http/Controllers/FilamentTypeController.php delete mode 100644 app/Http/Controllers/ManufacturerController.php delete mode 100644 resources/views/colors/create.blade.php delete mode 100644 resources/views/colors/edit.blade.php delete mode 100644 resources/views/colors/index.blade.php delete mode 100644 resources/views/colors/show.blade.php delete mode 100644 resources/views/filaments/create.blade.php delete mode 100644 resources/views/filaments/edit.blade.php delete mode 100644 resources/views/filaments/index.blade.php delete mode 100644 resources/views/filaments/show.blade.php delete mode 100644 resources/views/manufacturers/create.blade.php delete mode 100644 resources/views/manufacturers/edit.blade.php delete mode 100644 resources/views/manufacturers/index.blade.php delete mode 100644 resources/views/manufacturers/show.blade.php delete mode 100644 resources/views/types/create.blade.php delete mode 100644 resources/views/types/edit.blade.php delete mode 100644 resources/views/types/index.blade.php delete mode 100644 resources/views/types/show.blade.php diff --git a/app/Http/Controllers/ColorController.php b/app/Http/Controllers/ColorController.php deleted file mode 100644 index dcdaea7..0000000 --- a/app/Http/Controllers/ColorController.php +++ /dev/null @@ -1,91 +0,0 @@ -validate([ - 'name' => 'required|string|max:255', - 'hex' => 'required|string|max:255' - ]); - - $color = new Color(); - $color->name = $request->name; - $color->hex = $request->hex; - $color->save(); - - return redirect()->route('colors.index'); - } - - /** - * Display the specified resource. - */ - public function show(string $id) - { - // show single color - $color = Color::find($id); - return view('colors.show', compact('color')); - } - - /** - * Show the form for editing the specified resource. - */ - public function edit(string $id) - { - // edit color - $color = Color::find($id); - return view('colors.edit', compact('color')); - } - - /** - * Update the specified resource in storage. - */ - public function update(Request $request, string $id) - { - // update color - $color = Color::find($id); - $color->name = $request->name; - $color->hex = $request->hex; - $color->save(); - return redirect()->route('colors.show', $color->id); - } - - /** - * Remove the specified resource from storage. - */ - public function destroy(string $id) - { - // delete color - $color = Color::find($id); - $color->delete(); - return redirect()->route('colors.index'); - } -} diff --git a/app/Http/Controllers/FilamentController.php b/app/Http/Controllers/FilamentController.php deleted file mode 100644 index 5ea5c3b..0000000 --- a/app/Http/Controllers/FilamentController.php +++ /dev/null @@ -1,143 +0,0 @@ - $filaments, 'manufacturers' => $manufacturers]); - } - - /** - * Show the form for creating a new resource. - */ - public function create() - { - // create a new filament - $manufacturers = Manufacturer::all(); - $types = FilamentType::all(); - $colors = Color::all(); - return view('filaments.create', compact('manufacturers', 'types', 'colors')); - } - - /** - * Store a newly created resource in storage. - */ - public function store(Request $request) - { - // store a new filament - $request->validate([ - 'name' => 'required|string|max:255', - 'description' => 'nullable|string', - 'color_id' => 'required|exists:colors,id', - 'type_id' => 'required|exists:filament_types,id', - 'manufacturer_id' => 'required|exists:manufacturers,id', - 'weight' => 'required|numeric', - 'price' => 'nullable|decimal:2', - 'diameter' => 'required|decimal:2', - 'stock' => 'required|integer' - ]); - - $filament = new Filament(); - $filament->name = $request->name; - $filament->description = $request->description; - $filament->color_id = $request->color_id; - $filament->type_id = $request->type_id; - $filament->manufacturer_id = $request->manufacturer_id; - $filament->weight = $request->weight; - $filament->price = $request->price; - $filament->diameter = $request->diameter; - $filament->stock = $request->stock; - $filament->save(); - - ManufacturerController::refresh(); - return redirect()->route('filaments.index')->with('success', 'Filament created successfully.'); - } - - /** - * Display the specified resource. - */ - public function show(string $id) - { - // show a specific filament - $filament = Filament::find($id); - $manufacturer = Manufacturer::find($filament->manufacturer_id); - $type = FilamentType::find($filament->type_id); - $color = Color::find($filament->color_id); - return view('filaments.show', compact('filament', 'manufacturer', 'type', 'color')); - } - - /** - * Show the form for editing the specified resource. - */ - public function edit(string $id) - { - // edit a specific filament - $filament = Filament::find($id); - $manufacturers = Manufacturer::all(); - $types = FilamentType::all(); - $colors = Color::all(); - return view('filaments.edit', compact('filament', 'manufacturers', 'types', 'colors')); - } - - /** - * Update the specified resource in storage. - */ - public function update(Request $request, string $id) - { - // update a specific filament - $request->validate([ - 'name' => 'required|string|max:255', - 'description' => 'nullable|string', - 'color_id' => 'required|exists:colors,id', - 'type_id' => 'required|exists:filament_types,id', - 'manufacturer_id' => 'required|exists:manufacturers,id', - 'weight' => 'required|numeric', - 'price' => 'nullable|decimal:2', - 'diameter' => 'required|decimal:2', - 'stock' => 'required|integer' - ]); - - $filament = Filament::find($id); - $filament->name = $request->name; - $filament->description = $request->description; - $filament->color_id = $request->color_id; - $filament->type_id = $request->type_id; - $filament->manufacturer_id = $request->manufacturer_id; - $filament->weight = $request->weight; - $filament->price = $request->price; - $filament->diameter = $request->diameter; - $filament->stock = $request->stock; - $filament->save(); - - ManufacturerController::refresh(); - - return redirect()->route('filaments.show', $filament->id)->with('success', 'Filament updated successfully.'); - } - - /** - * Remove the specified resource from storage. - */ - public function destroy(string $id) - { - // delete a specific filament - $filament = Filament::find($id); - $filament->delete(); - - ManufacturerController::refresh(); - return redirect()->route('filaments.index')->with('success', 'Filament deleted successfully.'); - } -} diff --git a/app/Http/Controllers/FilamentTypeController.php b/app/Http/Controllers/FilamentTypeController.php deleted file mode 100644 index 1b458ef..0000000 --- a/app/Http/Controllers/FilamentTypeController.php +++ /dev/null @@ -1,87 +0,0 @@ -name = $request->name; - $type->description = $request->description; - $type->save(); - return redirect()->route('types.index'); - } - - /** - * Display the specified resource. - */ - public function show(string $id) - { - // Show Single Type - $type = FilamentType::find($id); - - - return view('types.show', compact('type')); - } - - /** - * Show the form for editing the specified resource. - */ - public function edit(string $id) - { - // - $type = FilamentType::find($id); - return view('types.edit', compact('type')); - } - - /** - * Update the specified resource in storage. - */ - public function update(Request $request, string $id) - { - // Store updated type - $type = FilamentType::find($id); - $type->name = $request->name; - $type->description = $request->description; - $type->save(); - return redirect()->route('types.show', $type->id); - } - - /** - * Remove the specified resource from storage. - */ - public function destroy(string $id) - { - // Delete Type - $type = FilamentType::find($id); - $type->delete(); - return redirect()->route('types.index')->with('success','Type deleted successfully.'); - - } -} diff --git a/app/Http/Controllers/ManufacturerController.php b/app/Http/Controllers/ManufacturerController.php deleted file mode 100644 index c8da5fc..0000000 --- a/app/Http/Controllers/ManufacturerController.php +++ /dev/null @@ -1,106 +0,0 @@ -sortBy('name'); - return view('manufacturers.index', compact('manufacturers')); - } - - public static function refresh() - { - foreach (Manufacturer::all() as $manufacturer) { - $manufacturer->filament_count = Filament::all()->where('manufacturer_id', $manufacturer->id)->count(); - $manufacturer->save(); - } - return redirect()->route('manufacturers.index')->with('success', 'Manufacturer count refreshed successfully.'); - } - - /** - * Show the form for creating a new resource. - */ - public function create() - { - // create a new manufacturer - return view('manufacturers.create'); - } - - /** - * Store a newly created resource in storage. - */ - public function store(Request $request) - { - // store a new manufacturer - $request->validate([ - 'name' => 'required|string|max:255' - ]); - - $manufacturer = new Manufacturer(); - $manufacturer->name = $request->name; - $manufacturer->description = $request->description; - $manufacturer->website = $request->website; - $manufacturer->save(); - - return redirect()->route('manufacturers.index')->with('success', 'Manufacturer created successfully.'); - } - - /** - * Display the specified resource. - */ - public function show(string $id) - { - // show a specific manufacturer - $manufacturer = Manufacturer::find($id); - return view('manufacturers.show', compact('manufacturer')); - } - - /** - * Show the form for editing the specified resource. - */ - public function edit(string $id) - { - // edit a specific manufacturer - $manufacturer = Manufacturer::find($id); - return view('manufacturers.edit', compact('manufacturer')); - } - - /** - * Update the specified resource in storage. - */ - public function update(Request $request, string $id) - { - // update a specific manufacturer - $request->validate([ - 'name' => 'required|string|max:255' - ]); - - $manufacturer = Manufacturer::find($id); - $manufacturer->name = $request->name; - $manufacturer->description = $request->description; - $manufacturer->website = $request->website; - $manufacturer->save(); - return redirect()->route('manufacturers.show', $manufacturer->id)->with('success', 'Manufacturer updated successfully.'); - } - - /** - * Remove the specified resource from storage. - */ - public function destroy(string $id) - { - // delete a specific manufacturer - $manufacturer = Manufacturer::find($id); - $manufacturer->delete(); - return redirect()->route('manufacturers.index')->with('success', 'Manufacturer deleted successfully.'); - } -} diff --git a/app/Livewire/Filament/Filament.php b/app/Livewire/Filament/Filament.php index 926d68d..225ed4d 100644 --- a/app/Livewire/Filament/Filament.php +++ b/app/Livewire/Filament/Filament.php @@ -27,19 +27,21 @@ class Filament extends Component public $type_id = ''; public $manufacturer_id = ''; public $weight = '1000'; + public $finish = 'Basic'; public $price = '0'; public $stock = '0'; - + public $search = ''; public $editid = ''; public $deleteid = ''; + public function create() { @Auth::check(); // Validate - $this->validate(); + $this->validate(); $filament = new Model(); $filament->name = $this->name; @@ -47,8 +49,9 @@ class Filament extends Component $filament->diameter = $this->diameter; $filament->color_id = $this->color_id; $filament->filament_type_id = $this->type_id; - $filament->manufacturer_id = $this->manufacturer_id; + $filament->manufacturer_id = $this->manufacturer_id; $filament->weight = $this->weight; + $filament->finish = $this->finish; $filament->price = $this->price; $filament->stock = $this->stock; $filament->save(); @@ -75,28 +78,30 @@ class Filament extends Component $this->type_id = $filament->filament_type_id; $this->manufacturer_id = $filament->manufacturer_id; $this->weight = $filament->weight; + $filament->finish = $this->finish; $this->price = $filament->price; $this->stock = $filament->stock; - + Flux::modal('editModal')->show(); } public function save($editid) { @Auth::check(); - + $filament = Model::findOrFail($editid); $filament->name = $this->name; $filament->description = $this->description; $filament->diameter = $this->diameter; $filament->color_id = $this->color_id; $filament->filament_type_id = $this->type_id; - $filament->manufacturer_id = $this->manufacturer_id; + $filament->manufacturer_id = $this->manufacturer_id; $filament->weight = $this->weight; + $filament->finish = $this->finish; $filament->price = $this->price; $filament->stock = $this->stock; $filament->save(); $this->resetInputFields(); - + Flux::modal('editModal')->close(); } @@ -114,6 +119,7 @@ class Filament extends Component $this->type_id = $filament->filament_type_id; $this->manufacturer_id = $filament->manufacturer_id; $this->weight = $filament->weight; + $this->finish = $filament->finish; $this->price = $filament->price; $this->stock = $filament->stock; @@ -136,7 +142,7 @@ class Filament extends Component Flux::modals()->close(); } public function resetInputFields() { - $this->reset(['name', 'description', 'diameter', 'color_id', 'type_id', 'manufacturer_id', 'weight', 'price', 'stock', 'deleteid', 'editid']); + $this->reset(['name', 'description', 'diameter', 'color_id', 'type_id', 'manufacturer_id', 'weight', 'price', 'finish', 'deleteid', 'editid']); } public function render() { diff --git a/app/Livewire/Filament/Manufacturer.php b/app/Livewire/Filament/Manufacturer.php index c948e3d..ebdd6ca 100644 --- a/app/Livewire/Filament/Manufacturer.php +++ b/app/Livewire/Filament/Manufacturer.php @@ -9,6 +9,7 @@ use Livewire\Attributes\title; use Livewire\Attributes\Validate; use Flux\Flux; use Illuminate\Support\Facades\Auth; +use App\Models\Filament; #[title('Manufacturer List')] class Manufacturer extends Component{ @@ -30,7 +31,7 @@ class Manufacturer extends Component{ // Validate - $this->validate(); + $this->validate(); $manufacturer = new Model(); $manufacturer->name = $this->name; @@ -55,12 +56,12 @@ class Manufacturer extends Component{ $this->name = $manufacturer->name; $this->description = $manufacturer->description; $this->website = $manufacturer->website; - + Flux::modal('editModal')->show(); } public function save($editid) { @Auth::check(); - + $manufacturer = Model::findOrFail($editid); $manufacturer->name = $this->name; $manufacturer->description = $this->description; @@ -68,7 +69,7 @@ class Manufacturer extends Component{ $manufacturer->save(); $this->resetInputFields(); - + Flux::modal('editModal')->close(); } public function deleteModal($manufacturerid) { @@ -105,6 +106,7 @@ class Manufacturer extends Component{ public function render() { + return view('livewire.filament.manufacturer', [ 'manufacturers' => Model::search('name', $this->search)->paginate(10) ]); diff --git a/resources/css/app.css b/resources/css/app.css index b702ade..19e51c1 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -42,6 +42,18 @@ --color-pumpkin-900: #7e2610; --color-pumpkin-950: #440f06; + --color-olivine-50: #f3f7ee; + --color-olivine-100: #e4edda; + --color-olivine-200: #ccdeb8; + --color-olivine-300: #a1c181; + --color-olivine-400: #8cb16a; + --color-olivine-500: #6f964c; + --color-olivine-600: #55763a; + --color-olivine-700: #435b30; + --color-olivine-800: #384a2a; + --color-olivine-900: #324027; + --color-olivine-950: #182211; + --color-nuke-50: oklch(0.99 0.0358 117.24); --color-nuke-100: oklch(0.97 0.0779 120.18); --color-nuke-200: oklch(0.95 0.1412 121.89); diff --git a/resources/views/colors/create.blade.php b/resources/views/colors/create.blade.php deleted file mode 100644 index 18f95cb..0000000 --- a/resources/views/colors/create.blade.php +++ /dev/null @@ -1,36 +0,0 @@ - - - {{ __('Create Colors') }} - - - -
- Back - Submit -
-
- - -
-
-
-
- @csrf -
- - -
- -
- - -
-
- Cancel - -
-
-
-
-
-
diff --git a/resources/views/colors/edit.blade.php b/resources/views/colors/edit.blade.php deleted file mode 100644 index 94c252d..0000000 --- a/resources/views/colors/edit.blade.php +++ /dev/null @@ -1,31 +0,0 @@ - - - {{ __('Edit Colors') }} - - - -
-
-
-
- @csrf - @method('PUT') -
- - -
- -
- - -
- -
- Cancel - -
-
-
-
-
-
diff --git a/resources/views/colors/index.blade.php b/resources/views/colors/index.blade.php deleted file mode 100644 index 9e2355b..0000000 --- a/resources/views/colors/index.blade.php +++ /dev/null @@ -1,28 +0,0 @@ - - - {{ __('Colors') }} - - - -
- Create -
-
- -
-
-
-
- @foreach ($colors as $color) - - @endforeach -
- -
-
-
-
diff --git a/resources/views/colors/show.blade.php b/resources/views/colors/show.blade.php deleted file mode 100644 index b6ae298..0000000 --- a/resources/views/colors/show.blade.php +++ /dev/null @@ -1,31 +0,0 @@ - - - {{ $color->name }} - - - -
- Back - Edit - Delete -
-
- -
-
-
-
-
Hex Code
-
- {{ $color->hex }} -
-
- - -
-
-
-
diff --git a/resources/views/components/header.blade.php b/resources/views/components/header.blade.php index c02404b..f06320a 100644 --- a/resources/views/components/header.blade.php +++ b/resources/views/components/header.blade.php @@ -1,4 +1,4 @@ -
+
@isset($headerleft) @@ -6,7 +6,7 @@ @endisset
-

+

{{ $slot }}

diff --git a/resources/views/components/layouts/app.blade.php b/resources/views/components/layouts/app.blade.php index d1255eb..0171f45 100644 --- a/resources/views/components/layouts/app.blade.php +++ b/resources/views/components/layouts/app.blade.php @@ -22,7 +22,7 @@ {{ $title . ' | ' . config('app.name') ?? config('app.name') }} - + -
-
- -
- - +
diff --git a/resources/views/components/table.blade.php b/resources/views/components/table.blade.php index 2efd905..52097c0 100644 --- a/resources/views/components/table.blade.php +++ b/resources/views/components/table.blade.php @@ -1,4 +1,4 @@ -
+
diff --git a/resources/views/components/table/header.blade.php b/resources/views/components/table/header.blade.php index 3cf0661..d634c84 100644 --- a/resources/views/components/table/header.blade.php +++ b/resources/views/components/table/header.blade.php @@ -1,3 +1,3 @@ - diff --git a/resources/views/filaments/create.blade.php b/resources/views/filaments/create.blade.php deleted file mode 100644 index 2977ef4..0000000 --- a/resources/views/filaments/create.blade.php +++ /dev/null @@ -1,80 +0,0 @@ - - - {{ __('Create Filaments') }} - - - -
- Back - Submit -
-
- - -
-
-
-
- @csrf -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- - -
- - -
- -
- Cancel - -
- -
-
-
-
diff --git a/resources/views/filaments/edit.blade.php b/resources/views/filaments/edit.blade.php deleted file mode 100644 index f12fa7c..0000000 --- a/resources/views/filaments/edit.blade.php +++ /dev/null @@ -1,80 +0,0 @@ - - - {{ __('Edit Filament') }} - - - -
-
-
-
- @csrf - @method('PUT') -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- - -
- - -
- -
- Cancel - -
- -
-
-
-
diff --git a/resources/views/filaments/index.blade.php b/resources/views/filaments/index.blade.php deleted file mode 100644 index cc586a2..0000000 --- a/resources/views/filaments/index.blade.php +++ /dev/null @@ -1,48 +0,0 @@ - - - {{ __('Filaments') }} - - - -
- Create -
-
- -
-
-
-
merge(['class' => 'py-4 px-3 first:pl-6 last:pr-6 text-jet']) }}> +merge(['class' => 'py-4 px-3 first:pl-6 last:pr-6 text-jet-50']) }}> {{ $slot }}
- - - - - - - - - - - - - - @foreach ($filaments as $filament) - - - - - - - - - - - - @endforeach - -
NameColorWeightDiameterPriceStockEditDelete
{{ $filament->name }}
{{ $filament->color->name }}
{{ $filament->weight }} g{{ $filament->diameter }} mm@isset($filament->price) {{ $filament->price }} @endisset{{ $filament->stock }}
- -
-
- - diff --git a/resources/views/filaments/show.blade.php b/resources/views/filaments/show.blade.php deleted file mode 100644 index b18f3fb..0000000 --- a/resources/views/filaments/show.blade.php +++ /dev/null @@ -1,60 +0,0 @@ - - - {{ $filament->name }} - - - -
- Back - Edit - Delete -
-
- -
-
-
-
-
Name
-
- {{ $filament->name }} -
-
Description
-
- {{ $filament->description }} -
-
Manufacturer
-
- {{ $filament->manufacturer->name }} -
-
Type
-
- {{ $filament->type->name }} -
-
Color
-
-
- {{ $filament->color->name }} -
-
Weight
-
- {{ $filament->weight }}g -
-
Diameter
-
- {{ $filament->diameter }}mm -
-
Price
-
- {{ $filament->price }} -
-
- - -
-
-
-
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index c4bee3b..13493ae 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -19,7 +19,7 @@ @livewireStyles @fluxAppearance - +
@@ -27,14 +27,14 @@ @if (isset($header) || isset($headeraction)) -
+
@if (isset($header)) {{ $header }} @endif - + @if (isset($headeraction)) {{ $headeraction }} diff --git a/resources/views/livewire/filament/buildplate.blade.php b/resources/views/livewire/filament/buildplate.blade.php index 4405793..d1ec60f 100644 --- a/resources/views/livewire/filament/buildplate.blade.php +++ b/resources/views/livewire/filament/buildplate.blade.php @@ -3,19 +3,19 @@ {{ __('Buildplates') }} - + - Create Buildplate + Create Buildplate -
+
Name @@ -27,7 +27,7 @@ @foreach ($buildplates as $buildplate) - +

{{ $buildplate->name }}

{{ $buildplate->description }}

{{ App\Models\Manufacturer::find($buildplate->manufacturer_id)->name }}

@@ -36,8 +36,8 @@

- Edit - Delete + Edit + Delete
diff --git a/resources/views/livewire/filament/color.blade.php b/resources/views/livewire/filament/color.blade.php index 514d9e3..6368db0 100644 --- a/resources/views/livewire/filament/color.blade.php +++ b/resources/views/livewire/filament/color.blade.php @@ -3,12 +3,12 @@ {{ __('Colors') }} - + - Create Color + Create Color @@ -16,7 +16,7 @@ -
+
Name @@ -27,15 +27,15 @@ @foreach ($colors as $color) - -

{{ $color->name }}

+ +

{{ $color->name }}

-

{{ $color->hex }}

-

+

{{ $color->hex }}

+

- - Delete + Edit + Delete
diff --git a/resources/views/livewire/filament/filament.blade.php b/resources/views/livewire/filament/filament.blade.php index f189dde..9348f60 100644 --- a/resources/views/livewire/filament/filament.blade.php +++ b/resources/views/livewire/filament/filament.blade.php @@ -3,58 +3,61 @@ {{ __('Filaments') }} - + - Create Filament - + Create Filament + - -
+ +
+ ID Name Description Color Manufacturer Material + Finish Diameter Weight Price - Rolls - + @foreach ($filaments as $filament) - -

{{ $filament->name }}

+ +

{{ $filament->id }}

+

{{ $filament->name }}

{{ $filament->description }}

-
-
-

{{ App\Models\Color::find($filament->color_id)->name }}

+
+
+

{{ App\Models\Color::find($filament->color_id)->name }}

+

{{ App\Models\Manufacturer::find($filament->manufacturer_id)->name }}

{{ App\Models\FilamentType::find($filament->filament_type_id)->name }}

+

{{ $filament->finish }}

{{ $filament->diameter }} mm

{{ $filament->weight }} g

{{ $filament->price }}€

-

{{ $filament->stock }}

Edit - Delete + Delete
@endforeach - + {{ $filaments->links() }} @@ -91,9 +94,11 @@ {{ $color->name }} @endforeach + +
@@ -109,19 +114,44 @@ @else
-
-
- Edit manufacturer - Edit an existing manufacturer. -
- +
+
+ Edit filament + Create a new filament. +
+ +
+ + Choose Manufacturer + @foreach ($manufacturers as $manufacturer) + {{ $manufacturer->name }} + @endforeach + + + Choose Type + @foreach ($types as $type) + {{ $type->name }} + @endforeach + + + Choose Color + @foreach ($colors as $color) + {{ $color->name }} + @endforeach + + + + + + +
Cancel - Save + Save
-
+
@endempty @@ -148,4 +178,4 @@ -
\ No newline at end of file + diff --git a/resources/views/livewire/filament/manufacturer.blade.php b/resources/views/livewire/filament/manufacturer.blade.php index 4820d16..719079b 100644 --- a/resources/views/livewire/filament/manufacturer.blade.php +++ b/resources/views/livewire/filament/manufacturer.blade.php @@ -3,19 +3,19 @@ {{ __('Manufacturers') }} - + - Create Manufacturer + Create Manufacturer - -
+ +
Name @@ -26,20 +26,20 @@ @foreach ($manufacturers as $manufacturer) - +

{{ $manufacturer->name }}

{{ $manufacturer->description }}

-

{{ $manufacturer->website }}

-

+

{{ $manufacturer->website }}

+

{{ $manufacturer->filament_count }}

- Edit - Delete + Edit + Delete
@endforeach - + {{ $manufacturers->links() }} @@ -113,4 +113,4 @@ - \ No newline at end of file + diff --git a/resources/views/livewire/filament/type.blade.php b/resources/views/livewire/filament/type.blade.php index 327c7f5..add7e6c 100644 --- a/resources/views/livewire/filament/type.blade.php +++ b/resources/views/livewire/filament/type.blade.php @@ -3,19 +3,19 @@ {{ __('Types') }} - + - Create Type + Create Type -
+
Name @@ -25,14 +25,14 @@ @foreach ($types as $type) - +

{{ $type->name }}

{{ $type->description }}

{{ $type->amount }}

- Edit - Delete + Edit + Delete
diff --git a/resources/views/manufacturers/create.blade.php b/resources/views/manufacturers/create.blade.php deleted file mode 100644 index 4e55cbd..0000000 --- a/resources/views/manufacturers/create.blade.php +++ /dev/null @@ -1,44 +0,0 @@ - - - {{ __('Create Manufacturers') }} - - - -
- Back - Submit -
-
- - -
-
-
-
- @csrf -
- - -
- -
- - -
-
- - -
-
- - -
-
- Cancel - -
-
-
-
-
-
diff --git a/resources/views/manufacturers/edit.blade.php b/resources/views/manufacturers/edit.blade.php deleted file mode 100644 index 9907a31..0000000 --- a/resources/views/manufacturers/edit.blade.php +++ /dev/null @@ -1,34 +0,0 @@ - - - {{ __('Edit Manufacturers') }} - - - -
-
-
-
- @csrf - @method('PUT') -
- - -
- -
- - -
-
- - -
-
- Cancel - -
-
-
-
-
-
diff --git a/resources/views/manufacturers/index.blade.php b/resources/views/manufacturers/index.blade.php deleted file mode 100644 index 8f46d22..0000000 --- a/resources/views/manufacturers/index.blade.php +++ /dev/null @@ -1,45 +0,0 @@ - - - {{ __('Manufacturers') }} - - - -
- Create -
-
- -
-
-
- - - - - - - - - - - - - - @foreach ($manufacturers as $manufacturer) - - - - - - - - - - @endforeach - -
NameFilamentsWebsiteStockEditDelete
{{ $manufacturer->name }}{{ $manufacturer->filament_count }}{{ $manufacturer->website }} @isset($manufacturer->website) @endisset
- -
-
-
-
diff --git a/resources/views/manufacturers/show.blade.php b/resources/views/manufacturers/show.blade.php deleted file mode 100644 index 876f531..0000000 --- a/resources/views/manufacturers/show.blade.php +++ /dev/null @@ -1,35 +0,0 @@ - - - {{ $manufacturer->name }} - - - -
- Back - Edit - Delete -
-
- -
-
-
-
-
Description
-
- {{ $manufacturer->description }} -
-
Website
- -
- - -
-
-
-
diff --git a/resources/views/types/create.blade.php b/resources/views/types/create.blade.php deleted file mode 100644 index 9dbffb9..0000000 --- a/resources/views/types/create.blade.php +++ /dev/null @@ -1,36 +0,0 @@ - - - {{ __('Create Types') }} - - - -
- Back - Submit -
-
- - -
-
-
-
- @csrf -
- - -
- -
- - -
-
- Cancel - -
-
-
-
-
-
diff --git a/resources/views/types/edit.blade.php b/resources/views/types/edit.blade.php deleted file mode 100644 index 11efc54..0000000 --- a/resources/views/types/edit.blade.php +++ /dev/null @@ -1,30 +0,0 @@ - - - {{ __('Edit Types') }} - - - -
-
-
-
- @csrf - @method('PUT') -
- - -
- -
- - -
-
- Cancel - -
-
-
-
-
-
diff --git a/resources/views/types/index.blade.php b/resources/views/types/index.blade.php deleted file mode 100644 index ed72e7c..0000000 --- a/resources/views/types/index.blade.php +++ /dev/null @@ -1,29 +0,0 @@ - - - {{ __('Types') }} - - - -
- Create -
-
- -
-
-
-
    -
  • ID
    Name
    Options
  • - @foreach ($types as $type) -
  • -
    {{ $type->id }}
    - -
    -
  • - @endforeach -
- -
-
-
-
diff --git a/resources/views/types/show.blade.php b/resources/views/types/show.blade.php deleted file mode 100644 index 973c4a8..0000000 --- a/resources/views/types/show.blade.php +++ /dev/null @@ -1,31 +0,0 @@ - - - {{ $type->name }} - - - -
- Back - Edit - Delete -
-
- -
-
-
-
-
Description
-
- {{ $type->description }} -
-
- - -
-
-
-