mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
filter hidden from kontakttyp, show typ.beschreibung in dropdown
This commit is contained in:
@@ -439,6 +439,7 @@ class Kontakt extends FHCAPI_Controller
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$this->terminateWithSuccess((getData($result) ?: []));
|
||||
|
||||
}
|
||||
|
||||
public function getKontakttypen()
|
||||
@@ -446,13 +447,13 @@ class Kontakt extends FHCAPI_Controller
|
||||
$this->load->model('person/Kontakttyp_model', 'KontakttypModel');
|
||||
|
||||
$result = $this->KontakttypModel->load();
|
||||
if (isError($result)) {
|
||||
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->terminateWithSuccess(getData($result) ?: []);
|
||||
}
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$filteredData = array_filter($data, function ($item) {
|
||||
return $item->kontakttyp !== "hidden";
|
||||
});
|
||||
$this->terminateWithSuccess($filteredData);
|
||||
}
|
||||
|
||||
public function loadContact()
|
||||
|
||||
@@ -322,7 +322,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.kontakttyp}}</option>
|
||||
<option v-for="typ in kontakttypen" :key="typ.kontakttyp" :value="typ.kontakttyp">{{typ.beschreibung}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user