mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 15:32:17 +00:00
Tab Kontakt: refactor displaying of kontakttyp, add updateamum, updatevon, filter kontakttyp hidden
This commit is contained in:
@@ -46,6 +46,7 @@ class Kontakt extends FHCAPI_Controller
|
||||
$this->load->model('organisation/standort_model', 'StandortModel');
|
||||
$this->load->model('ressource/firma_model', 'FirmaModel');
|
||||
$this->load->model('person/Kontakt_model', 'KontaktModel');
|
||||
$this->load->model('person/Kontakttyp_model', 'KontakttypModel');
|
||||
|
||||
// Extra Permissionchecks
|
||||
$permsMa = [];
|
||||
@@ -443,8 +444,10 @@ class Kontakt extends FHCAPI_Controller
|
||||
THEN public.tbl_kontakt.updateamum
|
||||
ELSE public.tbl_kontakt.insertamum
|
||||
END) AS lastUpdate, st.bezeichnung, f.name");
|
||||
$this->KontakttypModel->addSelect("kt.beschreibung as kontakttypbeschreibung");
|
||||
$this->StandortModel->addJoin('public.tbl_standort st', 'ON (public.tbl_kontakt.standort_id = st.standort_id)', 'LEFT');
|
||||
$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)
|
||||
);
|
||||
@@ -594,8 +597,8 @@ class Kontakt extends FHCAPI_Controller
|
||||
'anmerkung' => $anmerkung,
|
||||
'kontakt' => $kontakt,
|
||||
'zustellung' => $_POST['zustellung'],
|
||||
'insertvon' => $uid,
|
||||
'insertamum' => date('c'),
|
||||
'updatevon' => $uid,
|
||||
'updateamum' => date('c'),
|
||||
'standort_id' => $standort_id,
|
||||
'ext_id' => $ext_id
|
||||
]
|
||||
|
||||
@@ -26,7 +26,7 @@ export default{
|
||||
ajaxRequestFunc: () => this.$api.call(ApiStvContact.get(this.uid)),
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns:[
|
||||
{title:"Typ", field:"kontakttyp"},
|
||||
{title:"Typ", field:"kontakttypbeschreibung"},
|
||||
{title:"Kontakt", field:"kontakt"},
|
||||
{
|
||||
title:"Zustellung",
|
||||
@@ -109,7 +109,7 @@ export default{
|
||||
|
||||
let cm = this.$refs.table.tabulator.columnManager;
|
||||
|
||||
cm.getColumnByField('kontakttyp').component.updateDefinition({
|
||||
cm.getColumnByField('kontakttypbeschreibung').component.updateDefinition({
|
||||
title: this.$p.t('global', 'typ')
|
||||
});
|
||||
cm.getColumnByField('kontakt').component.updateDefinition({
|
||||
@@ -303,7 +303,8 @@ export default{
|
||||
this.$api
|
||||
.call(ApiStvContact.getTypes())
|
||||
.then(result => {
|
||||
this.kontakttypen = result.data;
|
||||
//this.kontakttypen = result.data;
|
||||
this.kontakttypen = result.data.filter(item => item.kontakttyp !== 'hidden');
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
@@ -328,7 +329,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_kurzbz" :value="typ.kontakttyp" >{{typ.beschreibung}}</option>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user