|
|
@@ -107,6 +107,7 @@ class Supplier extends Component
|
|
|
$this->emit('load-select');
|
|
|
$this->add = true;
|
|
|
$this->update = false;
|
|
|
+ $this->emit('setEdit', true);
|
|
|
}
|
|
|
|
|
|
public function store()
|
|
|
@@ -169,6 +170,7 @@ class Supplier extends Component
|
|
|
session()->flash('success','Fornitore creato');
|
|
|
$this->resetFields();
|
|
|
$this->add = false;
|
|
|
+ $this->emit('setEdit', false);
|
|
|
} catch (\Exception $ex) {
|
|
|
session()->flash('error','Errore (' . $ex->getMessage() . ')');
|
|
|
}
|
|
|
@@ -205,6 +207,8 @@ class Supplier extends Component
|
|
|
$this->checkIsItaly();
|
|
|
$this->emit('load-provinces', $this->nation_id, 'provinceClass');
|
|
|
$this->emit('load-cities', $this->province_id, 'cityClass');
|
|
|
+
|
|
|
+ $this->emit('setEdit', true);
|
|
|
}
|
|
|
} catch (\Exception $ex) {
|
|
|
session()->flash('error','Errore (' . $ex->getMessage() . ')');
|
|
|
@@ -238,6 +242,8 @@ class Supplier extends Component
|
|
|
session()->flash('success','Fornitore aggiornato');
|
|
|
$this->resetFields();
|
|
|
$this->update = false;
|
|
|
+
|
|
|
+ $this->emit('setEdit', false);
|
|
|
} catch (\Exception $ex) {
|
|
|
session()->flash('error','Errore (' . $ex->getMessage() . ')');
|
|
|
}
|
|
|
@@ -248,6 +254,7 @@ class Supplier extends Component
|
|
|
$this->add = false;
|
|
|
$this->update = false;
|
|
|
$this->resetFields();
|
|
|
+ $this->emit('setEdit', false);
|
|
|
}
|
|
|
|
|
|
public function delete($id)
|