Prestudent History: aktiv & bold highlighting

This commit is contained in:
cgfhtw
2024-06-26 11:19:58 +02:00
parent c8f0bdd6d7
commit 7cf89392a2
2 changed files with 13 additions and 3 deletions
@@ -505,7 +505,7 @@ export default {
</form-form>
<div>
<legend>Gesamthistorie</legend>
<tbl-history :person_id="modelValue.person_id"></tbl-history>
<tbl-history :person-id="modelValue.person_id" :prestudent-id="modelValue.prestudent_id"></tbl-history>
</div>
</div>
`
@@ -5,12 +5,14 @@ export default{
CoreFilterCmpt
},
props: {
person_id: Number
personId: Number,
prestudentId: Number
},
data() {
let prestudent_id = this.prestudentId;
return {
tabulatorOptions: {
ajaxURL: 'api/frontend/v1/stv/Prestudent/getHistoryPrestudents/' + this.person_id,
ajaxURL: 'api/frontend/v1/stv/Prestudent/getHistoryPrestudents/' + this.personId,
ajaxRequestFunc: this.$fhcApi.get,
ajaxResponse: (url, params, response) => response.data,
//autoColumns: true,
@@ -24,6 +26,14 @@ export default{
{title:"Status", field:"status"},
{title:"PrestudentId", field:"prestudent_id", visible:false}
],
rowFormatter(row) {
if (["Abgewiesener","Abbrecher","Absolvent"].includes(row.getData().status_kurzbz)) {
row.getElement().classList.add('text-muted');
}
if (row.getData().prestudent_id == prestudent_id) {
row.getElement().classList.add('fw-bold');
}
},
layout: 'fitDataFill',
layoutColumnsOnNewData: false,
height: 'auto',