fixed filament.blade.php
This commit is contained in:
@@ -20,6 +20,7 @@ class Filament extends Component
|
||||
|
||||
#[Validate('required')]
|
||||
public $name = '';
|
||||
|
||||
public $description = '';
|
||||
public $diameter = '1.75';
|
||||
public $color_id = '';
|
||||
@@ -44,9 +45,9 @@ class Filament extends Component
|
||||
$filament->name = $this->name;
|
||||
$filament->description = $this->description;
|
||||
$filament->diameter = $this->diameter;
|
||||
$filament->color_id = Color::Find($this->color_id);
|
||||
$filament->filament_type_id = Type::Find($this->type_id);
|
||||
$filament->manufacturer_id = Manufacturer::Find($this->manufacturer_id);
|
||||
$filament->color_id = $this->color_id;
|
||||
$filament->filament_type_id = $this->type_id;
|
||||
$filament->manufacturer_id = $this->manufacturer_id;
|
||||
$filament->weight = $this->weight;
|
||||
$filament->price = $this->price;
|
||||
$filament->stock = $this->stock;
|
||||
@@ -58,6 +59,14 @@ class Filament extends Component
|
||||
// Close the modal
|
||||
Flux::modal('createModal')->close();
|
||||
}
|
||||
|
||||
public function cancel() {
|
||||
$this->resetInputFields();
|
||||
Flux::modals()->close();
|
||||
}
|
||||
public function resetInputFields() {
|
||||
$this->reset(['name', 'description', 'diameter', 'color_id', 'type_id', 'manufacturer_id', 'weight', 'price', 'stock', 'deleteid', 'editid']);
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.filament.filament', [
|
||||
|
||||
Reference in New Issue
Block a user