Updated Buildplate Forms
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
<div class="flex gap-2">
|
||||
<flux:spacer />
|
||||
<flux:button variant="ghost" wire:click='cancel'>Cancel</flux:button>
|
||||
<flux:button type="submit" variant="danger">Delete color</flux:button>
|
||||
<flux:button type="submit" variant="danger">Delete Buildplate</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user