mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-11 09:09:28 +00:00
Tab Adressen: add handling selected Firma for edit and save
This commit is contained in:
@@ -198,13 +198,7 @@ class Kontakt extends FHCAPI_Controller
|
||||
$name = isset($_POST['name']) ? $_POST['name'] : null;
|
||||
$typ = isset($_POST['typ']) ? $_POST['typ'] : null;
|
||||
$anmerkung = isset($_POST['anmerkung']) ? $_POST['anmerkung'] : null;
|
||||
|
||||
if(isset($_POST['firma']))
|
||||
{
|
||||
$firma_id = $_POST['firma']['firma_id'];
|
||||
}
|
||||
else
|
||||
$firma_id = null;
|
||||
$firma_id = isset($_POST['firma_id']) ? $_POST['firma_id'] : null;
|
||||
|
||||
$result = $this->AdresseModel->insert(
|
||||
[
|
||||
@@ -271,17 +265,6 @@ class Kontakt extends FHCAPI_Controller
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Adresse_id']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
if(isset($_POST['firma']))
|
||||
{
|
||||
$firma_id = $_POST['firma']['firma_id'];
|
||||
}
|
||||
elseif(isset($_POST['firma_id']))
|
||||
{
|
||||
$firma_id = $_POST['firma_id'];
|
||||
}
|
||||
else
|
||||
$firma_id = null;
|
||||
|
||||
$person_id = isset($_POST['person_id']) ? $_POST['person_id'] : null;
|
||||
$co_name = isset($_POST['co_name']) ? $_POST['co_name'] : null;
|
||||
$strasse = isset($_POST['strasse']) ? $_POST['strasse'] : null;
|
||||
@@ -291,6 +274,7 @@ class Kontakt extends FHCAPI_Controller
|
||||
$name = isset($_POST['name']) ? $_POST['name'] : null;
|
||||
$typ = isset($_POST['typ']) ? $_POST['typ'] : null;
|
||||
$anmerkung = isset($_POST['anmerkung']) ? $_POST['anmerkung'] : null;
|
||||
$firma_id = isset($_POST['firma_id']) ? $_POST['firma_id'] : null;
|
||||
|
||||
$result = $this->AdresseModel->update(
|
||||
[
|
||||
|
||||
@@ -188,8 +188,8 @@ export default{
|
||||
title: this.$p.t('person', 'person_id')
|
||||
});
|
||||
/* cm.getColumnByField('actions').component.updateDefinition({
|
||||
title: this.$p.t('global', 'aktionen')
|
||||
});*/
|
||||
title: this.$p.t('global', 'aktionen')
|
||||
});*/
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -200,7 +200,7 @@ export default{
|
||||
typ: 'h',
|
||||
nation: 'A',
|
||||
address: {plz: null},
|
||||
plz: null
|
||||
plz: null,
|
||||
},
|
||||
statusNew: true,
|
||||
places: [],
|
||||
@@ -246,6 +246,10 @@ export default{
|
||||
this.loadAdress(adresse_id).then(() => {
|
||||
if(this.addressData.adresse_id)
|
||||
{
|
||||
this.selectedFirma = this.listFirmen.find(
|
||||
item => item.firma_id === this.addressData.firma_id
|
||||
);
|
||||
|
||||
this.addressData.address.plz = this.addressData.plz;
|
||||
// delete this.addressData.plz;
|
||||
this.loadPlaces(this.addressData.address.plz);
|
||||
@@ -353,6 +357,7 @@ export default{
|
||||
this.addressData.typ = 'h';
|
||||
this.addressData.nation = 'A';
|
||||
this.addressData.address = {plz: null};
|
||||
this.selectedFirma = null;
|
||||
|
||||
this.statusNew = true;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user