|
|
@@ -124,6 +124,7 @@ class Supplier extends Component
|
|
|
$this->emit('load-select');
|
|
|
$this->add = true;
|
|
|
$this->update = false;
|
|
|
+ $this->emit('setEdit', true);
|
|
|
}
|
|
|
|
|
|
private function cleanEmptyFields()
|
|
|
@@ -192,6 +193,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() . ')');
|
|
|
}
|
|
|
@@ -229,6 +231,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() . ')');
|
|
|
@@ -240,6 +244,7 @@ class Supplier extends Component
|
|
|
$this->add = false;
|
|
|
$this->update = false;
|
|
|
$this->resetFields();
|
|
|
+ $this->emit('setEdit', false);
|
|
|
}
|
|
|
|
|
|
// Replace delete method with anonymize method
|
|
|
@@ -345,6 +350,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() . ')');
|
|
|
}
|