Merge branch 'feature-59258/Studierendenverwaltung_Kontakttypen'

This commit is contained in:
Harald Bamberger
2025-09-29 08:05:22 +02:00
2 changed files with 13 additions and 13 deletions
@@ -434,7 +434,10 @@ class Kontakt extends FHCAPI_Controller
$this->FirmaModel->addJoin('public.tbl_firma f', 'ON (f.firma_id = st.firma_id)', 'LEFT');
$this->KontakttypModel->addJoin('public.tbl_kontakttyp kt', 'ON (public.tbl_kontakt.kontakttyp = kt.kontakttyp)');
$result = $this->KontaktModel->loadWhere(
array('person_id' => $person_id)
array(
'person_id' => $person_id,
'public.tbl_kontakt.kontakttyp !=' => 'hidden'
)
);
if (isError($result))
@@ -442,20 +445,18 @@ class Kontakt extends FHCAPI_Controller
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
}
$this->terminateWithSuccess((getData($result) ?: []));
}
public function getKontakttypen()
{
$this->load->model('person/Kontakttyp_model', 'KontakttypModel');
$this->KontakttypModel->addOrder('beschreibung', 'ASC');
$result = $this->KontakttypModel->loadWhere(array('kontakttyp !=' => 'hidden'));
$result = $this->KontakttypModel->load();
if (isError($result)) {
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
}
else
{
$this->terminateWithSuccess(getData($result) ?: []);
}
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
}
public function loadContact()
@@ -300,8 +300,7 @@ export default{
this.$api
.call(ApiStvContact.getTypes())
.then(result => {
//this.kontakttypen = result.data;
this.kontakttypen = result.data.filter(item => item.kontakttyp !== 'hidden');
this.kontakttypen = result.data;
})
.catch(this.$fhcAlert.handleSystemError);
},
@@ -326,7 +325,7 @@ export default{
v-model="contactData.kontakttyp">
>
<option value="">keine Auswahl</option>
<option v-for="typ in kontakttypen" :key="typ.kontakttyp_kurzbz" :value="typ.kontakttyp" >{{typ.beschreibung}}</option>
<option v-for="typ in kontakttypen" :key="typ.kontakttyp" :value="typ.kontakttyp">{{typ.beschreibung}}</option>
</form-input>
</div>
@@ -455,4 +454,4 @@ export default{
>
</core-filter-cmpt>
</div>`
};
};