From d306b5af847594d8cc088c6a5815394c8aa4e8fd Mon Sep 17 00:00:00 2001 From: Iridium34 Date: Mon, 10 Nov 2025 21:00:56 +0100 Subject: [PATCH] Updated Buildplate Forms --- app/Livewire/Filament/Buildplate.php | 21 +++++++++++++++++++ .../livewire/filament/buildplate.blade.php | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Filament/Buildplate.php b/app/Livewire/Filament/Buildplate.php index 9cbe5c4..b42f743 100644 --- a/app/Livewire/Filament/Buildplate.php +++ b/app/Livewire/Filament/Buildplate.php @@ -31,6 +31,27 @@ class Buildplate extends Component public $editid = ''; public $deleteid = ''; + public function create() { + @Auth::check(); + + + // Validate + $this->validate(); + + $buildplate = new BuildplateModel(); + $buildplate->name = $this->name; + $buildplate->description = $this->description; + $buildplate->manufacturer_id = $this->manufacturer_id; + $buildplate->temp_max = $this->temp_max; + $buildplate->amount = $this->amount; + $buildplate->save(); + + // Clear the form + $this->resetInputFields(); + + // Close the modal + Flux::modal('createModal')->close(); + } public function edit($buildplateid) { @Auth::check(); diff --git a/resources/views/livewire/filament/buildplate.blade.php b/resources/views/livewire/filament/buildplate.blade.php index 31244ec..6eb3b33 100644 --- a/resources/views/livewire/filament/buildplate.blade.php +++ b/resources/views/livewire/filament/buildplate.blade.php @@ -136,7 +136,7 @@
Cancel - Delete color + Delete Buildplate