mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-19 04:59:27 +00:00
reload Tables correctly on student change
This commit is contained in:
@@ -36,9 +36,11 @@ export default {
|
||||
tabulatorOptions: {
|
||||
ajaxURL: 'dummy',
|
||||
ajaxRequestFunc: this.endpoint.getAllBetriebsmittel,
|
||||
ajaxParams: {
|
||||
type: this.typeId,
|
||||
id: this.id
|
||||
ajaxParams: () => {
|
||||
return {
|
||||
type: this.typeId,
|
||||
id: this.id
|
||||
};
|
||||
},
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns: [
|
||||
@@ -149,7 +151,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
id() {
|
||||
this.$refs.table.tabulator.setData('dummy', {type: this.typeId, id: this.id});
|
||||
this.$refs.table.reloadTable();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -49,9 +49,11 @@ export default {
|
||||
tabulatorOptions: {
|
||||
ajaxURL: 'dummy',
|
||||
ajaxRequestFunc: this.endpoint.getNotizen,
|
||||
ajaxParams: {
|
||||
id: this.id,
|
||||
type: this.typeId
|
||||
ajaxParams: () => {
|
||||
return {
|
||||
id: this.id,
|
||||
type: this.typeId
|
||||
};
|
||||
},
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns: [
|
||||
@@ -479,6 +481,9 @@ export default {
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
id() {
|
||||
this.reload();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -9,7 +9,6 @@ export default{
|
||||
prestudentId: Number
|
||||
},
|
||||
data() {
|
||||
let prestudent_id = this.prestudentId;
|
||||
return {
|
||||
tabulatorOptions: {
|
||||
ajaxURL: 'api/frontend/v1/stv/Prestudent/getHistoryPrestudents/' + this.personId,
|
||||
@@ -26,13 +25,13 @@ export default{
|
||||
{title:"Status", field:"status"},
|
||||
{title:"PrestudentId", field:"prestudent_id", visible:false}
|
||||
],
|
||||
rowFormatter(row) {
|
||||
rowFormatter: row => {
|
||||
const rowData = row.getData();
|
||||
const element = row.getElement();
|
||||
if (["Abgewiesener","Abbrecher","Absolvent"].includes(rowData.status_kurzbz)) {
|
||||
element.classList.add('disabled');
|
||||
}
|
||||
if (rowData.prestudent_id == prestudent_id) {
|
||||
if (rowData.prestudent_id == this.prestudentId) {
|
||||
element.classList.add('fw-bold');
|
||||
}
|
||||
},
|
||||
@@ -62,6 +61,11 @@ export default{
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
personId() {
|
||||
this.$refs.table.tabulator.setData('api/frontend/v1/stv/Prestudent/getHistoryPrestudents/' + this.personId);
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="stv-details-prestudent-history h-100 pt-3">
|
||||
<core-filter-cmpt
|
||||
|
||||
Reference in New Issue
Block a user