Stg-Ansicht: Status styled as link

Stg-Ansicht: Status styled as link
This commit is contained in:
cgfhtw
2023-08-22 11:13:05 +02:00
parent 8da161120f
commit b9bf2487c2
2 changed files with 14 additions and 7 deletions
@@ -573,6 +573,7 @@ class Studiengang_model extends DB_Model
);
$this->addJoin('bis.tbl_orgform o', $this->dbTable . '.orgform_kurzbz=o.orgform_kurzbz');
$this->addJoin('public.tbl_person pers', 'person_id');
$this->addJoin('public.tbl_student stud', 'p.prestudent_id=stud.prestudent_id', 'LEFT');
$this->db->where_in($this->dbTable . '.studiengang_kz', $studiengang_kzs);
$this->db->where_in('ps.status_kurzbz', $this->config->item('antrag_prestudentstatus_whitelist'));
@@ -147,6 +147,19 @@ export default {
valuesLookup: true,
clearable: true,
autocomplete: true,
},
formatter: (cell, formatterParams, onRendered) => {
let link = document.createElement('a');
link.href = "#";
link.innerHTML = cell.getValue();
link.addEventListener('click', e => {
e.preventDefault();
this.lastHistoryClickedId = cell.getData().studierendenantrag_id;
this.$refs.historyLoader.fetchData();
this.$refs.history.show();
});
return link;
}
}, {
field: 'matrikelnr',
@@ -338,13 +351,6 @@ export default {
this.table.on("rowSelectionChanged", data => {
this.$emit('update:selectedData', data);
});
this.table.on("cellClick", (e, cell) => {
if (cell.getColumn().getField() == 'statustyp') {
this.lastHistoryClickedId = cell.getData().studierendenantrag_id;
this.$refs.historyLoader.fetchData();
this.$refs.history.show();
}
});
},
template: `
<div class="studierendenantrag-leitung-table">